index.js 170 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["SockJS"] = factory();
  8. else
  9. root["SockJS"] = factory();
  10. })((typeof self !== 'undefined' ? self : this), function() {
  11. return /******/ (function() { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ "./node_modules/inherits/inherits_browser.js":
  14. /*!***************************************************!*\
  15. !*** ./node_modules/inherits/inherits_browser.js ***!
  16. \***************************************************/
  17. /***/ (function(module) {
  18. if (typeof Object.create === 'function') {
  19. // implementation from standard node.js 'util' module
  20. module.exports = function inherits(ctor, superCtor) {
  21. if (superCtor) {
  22. ctor.super_ = superCtor;
  23. ctor.prototype = Object.create(superCtor.prototype, {
  24. constructor: {
  25. value: ctor,
  26. enumerable: false,
  27. writable: true,
  28. configurable: true
  29. }
  30. });
  31. }
  32. };
  33. } else {
  34. // old school shim for old browsers
  35. module.exports = function inherits(ctor, superCtor) {
  36. if (superCtor) {
  37. ctor.super_ = superCtor;
  38. var TempCtor = function TempCtor() {};
  39. TempCtor.prototype = superCtor.prototype;
  40. ctor.prototype = new TempCtor();
  41. ctor.prototype.constructor = ctor;
  42. }
  43. };
  44. }
  45. /***/ }),
  46. /***/ "./node_modules/ms/index.js":
  47. /*!**********************************!*\
  48. !*** ./node_modules/ms/index.js ***!
  49. \**********************************/
  50. /***/ (function(module) {
  51. /**
  52. * Helpers.
  53. */
  54. var s = 1000;
  55. var m = s * 60;
  56. var h = m * 60;
  57. var d = h * 24;
  58. var w = d * 7;
  59. var y = d * 365.25;
  60. /**
  61. * Parse or format the given `val`.
  62. *
  63. * Options:
  64. *
  65. * - `long` verbose formatting [false]
  66. *
  67. * @param {String|Number} val
  68. * @param {Object} [options]
  69. * @throws {Error} throw an error if val is not a non-empty string or a number
  70. * @return {String|Number}
  71. * @api public
  72. */
  73. module.exports = function (val, options) {
  74. options = options || {};
  75. var type = typeof val;
  76. if (type === 'string' && val.length > 0) {
  77. return parse(val);
  78. } else if (type === 'number' && isFinite(val)) {
  79. return options.long ? fmtLong(val) : fmtShort(val);
  80. }
  81. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  82. };
  83. /**
  84. * Parse the given `str` and return milliseconds.
  85. *
  86. * @param {String} str
  87. * @return {Number}
  88. * @api private
  89. */
  90. function parse(str) {
  91. str = String(str);
  92. if (str.length > 100) {
  93. return;
  94. }
  95. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  96. if (!match) {
  97. return;
  98. }
  99. var n = parseFloat(match[1]);
  100. var type = (match[2] || 'ms').toLowerCase();
  101. switch (type) {
  102. case 'years':
  103. case 'year':
  104. case 'yrs':
  105. case 'yr':
  106. case 'y':
  107. return n * y;
  108. case 'weeks':
  109. case 'week':
  110. case 'w':
  111. return n * w;
  112. case 'days':
  113. case 'day':
  114. case 'd':
  115. return n * d;
  116. case 'hours':
  117. case 'hour':
  118. case 'hrs':
  119. case 'hr':
  120. case 'h':
  121. return n * h;
  122. case 'minutes':
  123. case 'minute':
  124. case 'mins':
  125. case 'min':
  126. case 'm':
  127. return n * m;
  128. case 'seconds':
  129. case 'second':
  130. case 'secs':
  131. case 'sec':
  132. case 's':
  133. return n * s;
  134. case 'milliseconds':
  135. case 'millisecond':
  136. case 'msecs':
  137. case 'msec':
  138. case 'ms':
  139. return n;
  140. default:
  141. return undefined;
  142. }
  143. }
  144. /**
  145. * Short format for `ms`.
  146. *
  147. * @param {Number} ms
  148. * @return {String}
  149. * @api private
  150. */
  151. function fmtShort(ms) {
  152. var msAbs = Math.abs(ms);
  153. if (msAbs >= d) {
  154. return Math.round(ms / d) + 'd';
  155. }
  156. if (msAbs >= h) {
  157. return Math.round(ms / h) + 'h';
  158. }
  159. if (msAbs >= m) {
  160. return Math.round(ms / m) + 'm';
  161. }
  162. if (msAbs >= s) {
  163. return Math.round(ms / s) + 's';
  164. }
  165. return ms + 'ms';
  166. }
  167. /**
  168. * Long format for `ms`.
  169. *
  170. * @param {Number} ms
  171. * @return {String}
  172. * @api private
  173. */
  174. function fmtLong(ms) {
  175. var msAbs = Math.abs(ms);
  176. if (msAbs >= d) {
  177. return plural(ms, msAbs, d, 'day');
  178. }
  179. if (msAbs >= h) {
  180. return plural(ms, msAbs, h, 'hour');
  181. }
  182. if (msAbs >= m) {
  183. return plural(ms, msAbs, m, 'minute');
  184. }
  185. if (msAbs >= s) {
  186. return plural(ms, msAbs, s, 'second');
  187. }
  188. return ms + ' ms';
  189. }
  190. /**
  191. * Pluralization helper.
  192. */
  193. function plural(ms, msAbs, n, name) {
  194. var isPlural = msAbs >= n * 1.5;
  195. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  196. }
  197. /***/ }),
  198. /***/ "./node_modules/querystringify/index.js":
  199. /*!**********************************************!*\
  200. !*** ./node_modules/querystringify/index.js ***!
  201. \**********************************************/
  202. /***/ (function(__unused_webpack_module, exports) {
  203. "use strict";
  204. var has = Object.prototype.hasOwnProperty,
  205. undef;
  206. /**
  207. * Decode a URI encoded string.
  208. *
  209. * @param {String} input The URI encoded string.
  210. * @returns {String|Null} The decoded string.
  211. * @api private
  212. */
  213. function decode(input) {
  214. try {
  215. return decodeURIComponent(input.replace(/\+/g, ' '));
  216. } catch (e) {
  217. return null;
  218. }
  219. }
  220. /**
  221. * Attempts to encode a given input.
  222. *
  223. * @param {String} input The string that needs to be encoded.
  224. * @returns {String|Null} The encoded string.
  225. * @api private
  226. */
  227. function encode(input) {
  228. try {
  229. return encodeURIComponent(input);
  230. } catch (e) {
  231. return null;
  232. }
  233. }
  234. /**
  235. * Simple query string parser.
  236. *
  237. * @param {String} query The query string that needs to be parsed.
  238. * @returns {Object}
  239. * @api public
  240. */
  241. function querystring(query) {
  242. var parser = /([^=?#&]+)=?([^&]*)/g,
  243. result = {},
  244. part;
  245. while (part = parser.exec(query)) {
  246. var key = decode(part[1]),
  247. value = decode(part[2]); //
  248. // Prevent overriding of existing properties. This ensures that build-in
  249. // methods like `toString` or __proto__ are not overriden by malicious
  250. // querystrings.
  251. //
  252. // In the case if failed decoding, we want to omit the key/value pairs
  253. // from the result.
  254. //
  255. if (key === null || value === null || key in result) continue;
  256. result[key] = value;
  257. }
  258. return result;
  259. }
  260. /**
  261. * Transform a query string to an object.
  262. *
  263. * @param {Object} obj Object that should be transformed.
  264. * @param {String} prefix Optional prefix.
  265. * @returns {String}
  266. * @api public
  267. */
  268. function querystringify(obj, prefix) {
  269. prefix = prefix || '';
  270. var pairs = [],
  271. value,
  272. key; //
  273. // Optionally prefix with a '?' if needed
  274. //
  275. if ('string' !== typeof prefix) prefix = '?';
  276. for (key in obj) {
  277. if (has.call(obj, key)) {
  278. value = obj[key]; //
  279. // Edge cases where we actually want to encode the value to an empty
  280. // string instead of the stringified value.
  281. //
  282. if (!value && (value === null || value === undef || isNaN(value))) {
  283. value = '';
  284. }
  285. key = encode(key);
  286. value = encode(value); //
  287. // If we failed to encode the strings, we should bail out as we don't
  288. // want to add invalid strings to the query.
  289. //
  290. if (key === null || value === null) continue;
  291. pairs.push(key + '=' + value);
  292. }
  293. }
  294. return pairs.length ? prefix + pairs.join('&') : '';
  295. } //
  296. // Expose the module.
  297. //
  298. exports.stringify = querystringify;
  299. exports.parse = querystring;
  300. /***/ }),
  301. /***/ "./node_modules/requires-port/index.js":
  302. /*!*********************************************!*\
  303. !*** ./node_modules/requires-port/index.js ***!
  304. \*********************************************/
  305. /***/ (function(module) {
  306. "use strict";
  307. /**
  308. * Check if we're required to add a port number.
  309. *
  310. * @see https://url.spec.whatwg.org/#default-port
  311. * @param {Number|String} port Port number we need to check
  312. * @param {String} protocol Protocol we need to check against.
  313. * @returns {Boolean} Is it a default port for the given protocol
  314. * @api private
  315. */
  316. module.exports = function required(port, protocol) {
  317. protocol = protocol.split(':')[0];
  318. port = +port;
  319. if (!port) return false;
  320. switch (protocol) {
  321. case 'http':
  322. case 'ws':
  323. return port !== 80;
  324. case 'https':
  325. case 'wss':
  326. return port !== 443;
  327. case 'ftp':
  328. return port !== 21;
  329. case 'gopher':
  330. return port !== 70;
  331. case 'file':
  332. return false;
  333. }
  334. return port !== 0;
  335. };
  336. /***/ }),
  337. /***/ "./node_modules/sockjs-client/lib/entry.js":
  338. /*!*************************************************!*\
  339. !*** ./node_modules/sockjs-client/lib/entry.js ***!
  340. \*************************************************/
  341. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  342. "use strict";
  343. var transportList = __webpack_require__(/*! ./transport-list */ "./node_modules/sockjs-client/lib/transport-list.js");
  344. module.exports = __webpack_require__(/*! ./main */ "./node_modules/sockjs-client/lib/main.js")(transportList); // TODO can't get rid of this until all servers do
  345. if ('_sockjs_onload' in __webpack_require__.g) {
  346. setTimeout(__webpack_require__.g._sockjs_onload, 1);
  347. }
  348. /***/ }),
  349. /***/ "./node_modules/sockjs-client/lib/event/close.js":
  350. /*!*******************************************************!*\
  351. !*** ./node_modules/sockjs-client/lib/event/close.js ***!
  352. \*******************************************************/
  353. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  354. "use strict";
  355. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  356. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  357. function CloseEvent() {
  358. Event.call(this);
  359. this.initEvent('close', false, false);
  360. this.wasClean = false;
  361. this.code = 0;
  362. this.reason = '';
  363. }
  364. inherits(CloseEvent, Event);
  365. module.exports = CloseEvent;
  366. /***/ }),
  367. /***/ "./node_modules/sockjs-client/lib/event/emitter.js":
  368. /*!*********************************************************!*\
  369. !*** ./node_modules/sockjs-client/lib/event/emitter.js ***!
  370. \*********************************************************/
  371. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  372. "use strict";
  373. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  374. EventTarget = __webpack_require__(/*! ./eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js");
  375. function EventEmitter() {
  376. EventTarget.call(this);
  377. }
  378. inherits(EventEmitter, EventTarget);
  379. EventEmitter.prototype.removeAllListeners = function (type) {
  380. if (type) {
  381. delete this._listeners[type];
  382. } else {
  383. this._listeners = {};
  384. }
  385. };
  386. EventEmitter.prototype.once = function (type, listener) {
  387. var self = this,
  388. fired = false;
  389. function g() {
  390. self.removeListener(type, g);
  391. if (!fired) {
  392. fired = true;
  393. listener.apply(this, arguments);
  394. }
  395. }
  396. this.on(type, g);
  397. };
  398. EventEmitter.prototype.emit = function () {
  399. var type = arguments[0];
  400. var listeners = this._listeners[type];
  401. if (!listeners) {
  402. return;
  403. } // equivalent of Array.prototype.slice.call(arguments, 1);
  404. var l = arguments.length;
  405. var args = new Array(l - 1);
  406. for (var ai = 1; ai < l; ai++) {
  407. args[ai - 1] = arguments[ai];
  408. }
  409. for (var i = 0; i < listeners.length; i++) {
  410. listeners[i].apply(this, args);
  411. }
  412. };
  413. EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;
  414. EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;
  415. module.exports.EventEmitter = EventEmitter;
  416. /***/ }),
  417. /***/ "./node_modules/sockjs-client/lib/event/event.js":
  418. /*!*******************************************************!*\
  419. !*** ./node_modules/sockjs-client/lib/event/event.js ***!
  420. \*******************************************************/
  421. /***/ (function(module) {
  422. "use strict";
  423. function Event(eventType) {
  424. this.type = eventType;
  425. }
  426. Event.prototype.initEvent = function (eventType, canBubble, cancelable) {
  427. this.type = eventType;
  428. this.bubbles = canBubble;
  429. this.cancelable = cancelable;
  430. this.timeStamp = +new Date();
  431. return this;
  432. };
  433. Event.prototype.stopPropagation = function () {};
  434. Event.prototype.preventDefault = function () {};
  435. Event.CAPTURING_PHASE = 1;
  436. Event.AT_TARGET = 2;
  437. Event.BUBBLING_PHASE = 3;
  438. module.exports = Event;
  439. /***/ }),
  440. /***/ "./node_modules/sockjs-client/lib/event/eventtarget.js":
  441. /*!*************************************************************!*\
  442. !*** ./node_modules/sockjs-client/lib/event/eventtarget.js ***!
  443. \*************************************************************/
  444. /***/ (function(module) {
  445. "use strict";
  446. /* Simplified implementation of DOM2 EventTarget.
  447. * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
  448. */
  449. function EventTarget() {
  450. this._listeners = {};
  451. }
  452. EventTarget.prototype.addEventListener = function (eventType, listener) {
  453. if (!(eventType in this._listeners)) {
  454. this._listeners[eventType] = [];
  455. }
  456. var arr = this._listeners[eventType]; // #4
  457. if (arr.indexOf(listener) === -1) {
  458. // Make a copy so as not to interfere with a current dispatchEvent.
  459. arr = arr.concat([listener]);
  460. }
  461. this._listeners[eventType] = arr;
  462. };
  463. EventTarget.prototype.removeEventListener = function (eventType, listener) {
  464. var arr = this._listeners[eventType];
  465. if (!arr) {
  466. return;
  467. }
  468. var idx = arr.indexOf(listener);
  469. if (idx !== -1) {
  470. if (arr.length > 1) {
  471. // Make a copy so as not to interfere with a current dispatchEvent.
  472. this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));
  473. } else {
  474. delete this._listeners[eventType];
  475. }
  476. return;
  477. }
  478. };
  479. EventTarget.prototype.dispatchEvent = function () {
  480. var event = arguments[0];
  481. var t = event.type; // equivalent of Array.prototype.slice.call(arguments, 0);
  482. var args = arguments.length === 1 ? [event] : Array.apply(null, arguments); // TODO: This doesn't match the real behavior; per spec, onfoo get
  483. // their place in line from the /first/ time they're set from
  484. // non-null. Although WebKit bumps it to the end every time it's
  485. // set.
  486. if (this['on' + t]) {
  487. this['on' + t].apply(this, args);
  488. }
  489. if (t in this._listeners) {
  490. // Grab a reference to the listeners list. removeEventListener may alter the list.
  491. var listeners = this._listeners[t];
  492. for (var i = 0; i < listeners.length; i++) {
  493. listeners[i].apply(this, args);
  494. }
  495. }
  496. };
  497. module.exports = EventTarget;
  498. /***/ }),
  499. /***/ "./node_modules/sockjs-client/lib/event/trans-message.js":
  500. /*!***************************************************************!*\
  501. !*** ./node_modules/sockjs-client/lib/event/trans-message.js ***!
  502. \***************************************************************/
  503. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  504. "use strict";
  505. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  506. Event = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/event/event.js");
  507. function TransportMessageEvent(data) {
  508. Event.call(this);
  509. this.initEvent('message', false, false);
  510. this.data = data;
  511. }
  512. inherits(TransportMessageEvent, Event);
  513. module.exports = TransportMessageEvent;
  514. /***/ }),
  515. /***/ "./node_modules/sockjs-client/lib/facade.js":
  516. /*!**************************************************!*\
  517. !*** ./node_modules/sockjs-client/lib/facade.js ***!
  518. \**************************************************/
  519. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  520. "use strict";
  521. var iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js");
  522. function FacadeJS(transport) {
  523. this._transport = transport;
  524. transport.on('message', this._transportMessage.bind(this));
  525. transport.on('close', this._transportClose.bind(this));
  526. }
  527. FacadeJS.prototype._transportClose = function (code, reason) {
  528. iframeUtils.postMessage('c', JSON.stringify([code, reason]));
  529. };
  530. FacadeJS.prototype._transportMessage = function (frame) {
  531. iframeUtils.postMessage('t', frame);
  532. };
  533. FacadeJS.prototype._send = function (data) {
  534. this._transport.send(data);
  535. };
  536. FacadeJS.prototype._close = function () {
  537. this._transport.close();
  538. this._transport.removeAllListeners();
  539. };
  540. module.exports = FacadeJS;
  541. /***/ }),
  542. /***/ "./node_modules/sockjs-client/lib/iframe-bootstrap.js":
  543. /*!************************************************************!*\
  544. !*** ./node_modules/sockjs-client/lib/iframe-bootstrap.js ***!
  545. \************************************************************/
  546. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  547. "use strict";
  548. var urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  549. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  550. FacadeJS = __webpack_require__(/*! ./facade */ "./node_modules/sockjs-client/lib/facade.js"),
  551. InfoIframeReceiver = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js"),
  552. iframeUtils = __webpack_require__(/*! ./utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  553. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js");
  554. var debug = function debug() {};
  555. if (true) {
  556. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:iframe-bootstrap');
  557. }
  558. module.exports = function (SockJS, availableTransports) {
  559. var transportMap = {};
  560. availableTransports.forEach(function (at) {
  561. if (at.facadeTransport) {
  562. transportMap[at.facadeTransport.transportName] = at.facadeTransport;
  563. }
  564. }); // hard-coded for the info iframe
  565. // TODO see if we can make this more dynamic
  566. transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;
  567. var parentOrigin;
  568. /* eslint-disable camelcase */
  569. SockJS.bootstrap_iframe = function () {
  570. /* eslint-enable camelcase */
  571. var facade;
  572. iframeUtils.currentWindowId = loc.hash.slice(1);
  573. var onMessage = function onMessage(e) {
  574. if (e.source !== parent) {
  575. return;
  576. }
  577. if (typeof parentOrigin === 'undefined') {
  578. parentOrigin = e.origin;
  579. }
  580. if (e.origin !== parentOrigin) {
  581. return;
  582. }
  583. var iframeMessage;
  584. try {
  585. iframeMessage = JSON.parse(e.data);
  586. } catch (ignored) {
  587. debug('bad json', e.data);
  588. return;
  589. }
  590. if (iframeMessage.windowId !== iframeUtils.currentWindowId) {
  591. return;
  592. }
  593. switch (iframeMessage.type) {
  594. case 's':
  595. var p;
  596. try {
  597. p = JSON.parse(iframeMessage.data);
  598. } catch (ignored) {
  599. debug('bad json', iframeMessage.data);
  600. break;
  601. }
  602. var version = p[0];
  603. var transport = p[1];
  604. var transUrl = p[2];
  605. var baseUrl = p[3];
  606. debug(version, transport, transUrl, baseUrl); // change this to semver logic
  607. if (version !== SockJS.version) {
  608. throw new Error('Incompatible SockJS! Main site uses:' + ' "' + version + '", the iframe:' + ' "' + SockJS.version + '".');
  609. }
  610. if (!urlUtils.isOriginEqual(transUrl, loc.href) || !urlUtils.isOriginEqual(baseUrl, loc.href)) {
  611. throw new Error('Can\'t connect to different domain from within an ' + 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');
  612. }
  613. facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));
  614. break;
  615. case 'm':
  616. facade._send(iframeMessage.data);
  617. break;
  618. case 'c':
  619. if (facade) {
  620. facade._close();
  621. }
  622. facade = null;
  623. break;
  624. }
  625. };
  626. eventUtils.attachEvent('message', onMessage); // Start
  627. iframeUtils.postMessage('s');
  628. };
  629. };
  630. /***/ }),
  631. /***/ "./node_modules/sockjs-client/lib/info-ajax.js":
  632. /*!*****************************************************!*\
  633. !*** ./node_modules/sockjs-client/lib/info-ajax.js ***!
  634. \*****************************************************/
  635. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  636. "use strict";
  637. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  638. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  639. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  640. var debug = function debug() {};
  641. if (true) {
  642. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-ajax');
  643. }
  644. function InfoAjax(url, AjaxObject) {
  645. EventEmitter.call(this);
  646. var self = this;
  647. var t0 = +new Date();
  648. this.xo = new AjaxObject('GET', url);
  649. this.xo.once('finish', function (status, text) {
  650. var info, rtt;
  651. if (status === 200) {
  652. rtt = +new Date() - t0;
  653. if (text) {
  654. try {
  655. info = JSON.parse(text);
  656. } catch (e) {
  657. debug('bad json', text);
  658. }
  659. }
  660. if (!objectUtils.isObject(info)) {
  661. info = {};
  662. }
  663. }
  664. self.emit('finish', info, rtt);
  665. self.removeAllListeners();
  666. });
  667. }
  668. inherits(InfoAjax, EventEmitter);
  669. InfoAjax.prototype.close = function () {
  670. this.removeAllListeners();
  671. this.xo.close();
  672. };
  673. module.exports = InfoAjax;
  674. /***/ }),
  675. /***/ "./node_modules/sockjs-client/lib/info-iframe-receiver.js":
  676. /*!****************************************************************!*\
  677. !*** ./node_modules/sockjs-client/lib/info-iframe-receiver.js ***!
  678. \****************************************************************/
  679. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  680. "use strict";
  681. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  682. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  683. XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  684. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  685. function InfoReceiverIframe(transUrl) {
  686. var self = this;
  687. EventEmitter.call(this);
  688. this.ir = new InfoAjax(transUrl, XHRLocalObject);
  689. this.ir.once('finish', function (info, rtt) {
  690. self.ir = null;
  691. self.emit('message', JSON.stringify([info, rtt]));
  692. });
  693. }
  694. inherits(InfoReceiverIframe, EventEmitter);
  695. InfoReceiverIframe.transportName = 'iframe-info-receiver';
  696. InfoReceiverIframe.prototype.close = function () {
  697. if (this.ir) {
  698. this.ir.close();
  699. this.ir = null;
  700. }
  701. this.removeAllListeners();
  702. };
  703. module.exports = InfoReceiverIframe;
  704. /***/ }),
  705. /***/ "./node_modules/sockjs-client/lib/info-iframe.js":
  706. /*!*******************************************************!*\
  707. !*** ./node_modules/sockjs-client/lib/info-iframe.js ***!
  708. \*******************************************************/
  709. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  710. "use strict";
  711. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  712. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  713. utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  714. IframeTransport = __webpack_require__(/*! ./transport/iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  715. InfoReceiverIframe = __webpack_require__(/*! ./info-iframe-receiver */ "./node_modules/sockjs-client/lib/info-iframe-receiver.js");
  716. var debug = function debug() {};
  717. if (true) {
  718. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-iframe');
  719. }
  720. function InfoIframe(baseUrl, url) {
  721. var self = this;
  722. EventEmitter.call(this);
  723. var go = function go() {
  724. var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);
  725. ifr.once('message', function (msg) {
  726. if (msg) {
  727. var d;
  728. try {
  729. d = JSON.parse(msg);
  730. } catch (e) {
  731. debug('bad json', msg);
  732. self.emit('finish');
  733. self.close();
  734. return;
  735. }
  736. var info = d[0],
  737. rtt = d[1];
  738. self.emit('finish', info, rtt);
  739. }
  740. self.close();
  741. });
  742. ifr.once('close', function () {
  743. self.emit('finish');
  744. self.close();
  745. });
  746. }; // TODO this seems the same as the 'needBody' from transports
  747. if (!__webpack_require__.g.document.body) {
  748. utils.attachEvent('load', go);
  749. } else {
  750. go();
  751. }
  752. }
  753. inherits(InfoIframe, EventEmitter);
  754. InfoIframe.enabled = function () {
  755. return IframeTransport.enabled();
  756. };
  757. InfoIframe.prototype.close = function () {
  758. if (this.ifr) {
  759. this.ifr.close();
  760. }
  761. this.removeAllListeners();
  762. this.ifr = null;
  763. };
  764. module.exports = InfoIframe;
  765. /***/ }),
  766. /***/ "./node_modules/sockjs-client/lib/info-receiver.js":
  767. /*!*********************************************************!*\
  768. !*** ./node_modules/sockjs-client/lib/info-receiver.js ***!
  769. \*********************************************************/
  770. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  771. "use strict";
  772. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  773. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  774. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  775. XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js"),
  776. XHRCors = __webpack_require__(/*! ./transport/sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  777. XHRLocal = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  778. XHRFake = __webpack_require__(/*! ./transport/sender/xhr-fake */ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js"),
  779. InfoIframe = __webpack_require__(/*! ./info-iframe */ "./node_modules/sockjs-client/lib/info-iframe.js"),
  780. InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
  781. var debug = function debug() {};
  782. if (true) {
  783. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:info-receiver');
  784. }
  785. function InfoReceiver(baseUrl, urlInfo) {
  786. debug(baseUrl);
  787. var self = this;
  788. EventEmitter.call(this);
  789. setTimeout(function () {
  790. self.doXhr(baseUrl, urlInfo);
  791. }, 0);
  792. }
  793. inherits(InfoReceiver, EventEmitter); // TODO this is currently ignoring the list of available transports and the whitelist
  794. InfoReceiver._getReceiver = function (baseUrl, url, urlInfo) {
  795. // determine method of CORS support (if needed)
  796. if (urlInfo.sameOrigin) {
  797. return new InfoAjax(url, XHRLocal);
  798. }
  799. if (XHRCors.enabled) {
  800. return new InfoAjax(url, XHRCors);
  801. }
  802. if (XDR.enabled && urlInfo.sameScheme) {
  803. return new InfoAjax(url, XDR);
  804. }
  805. if (InfoIframe.enabled()) {
  806. return new InfoIframe(baseUrl, url);
  807. }
  808. return new InfoAjax(url, XHRFake);
  809. };
  810. InfoReceiver.prototype.doXhr = function (baseUrl, urlInfo) {
  811. var self = this,
  812. url = urlUtils.addPath(baseUrl, '/info');
  813. debug('doXhr', url);
  814. this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);
  815. this.timeoutRef = setTimeout(function () {
  816. debug('timeout');
  817. self._cleanup(false);
  818. self.emit('finish');
  819. }, InfoReceiver.timeout);
  820. this.xo.once('finish', function (info, rtt) {
  821. debug('finish', info, rtt);
  822. self._cleanup(true);
  823. self.emit('finish', info, rtt);
  824. });
  825. };
  826. InfoReceiver.prototype._cleanup = function (wasClean) {
  827. debug('_cleanup');
  828. clearTimeout(this.timeoutRef);
  829. this.timeoutRef = null;
  830. if (!wasClean && this.xo) {
  831. this.xo.close();
  832. }
  833. this.xo = null;
  834. };
  835. InfoReceiver.prototype.close = function () {
  836. debug('close');
  837. this.removeAllListeners();
  838. this._cleanup(false);
  839. };
  840. InfoReceiver.timeout = 8000;
  841. module.exports = InfoReceiver;
  842. /***/ }),
  843. /***/ "./node_modules/sockjs-client/lib/location.js":
  844. /*!****************************************************!*\
  845. !*** ./node_modules/sockjs-client/lib/location.js ***!
  846. \****************************************************/
  847. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  848. "use strict";
  849. module.exports = __webpack_require__.g.location || {
  850. origin: 'http://localhost:80',
  851. protocol: 'http:',
  852. host: 'localhost',
  853. port: 80,
  854. href: 'http://localhost/',
  855. hash: ''
  856. };
  857. /***/ }),
  858. /***/ "./node_modules/sockjs-client/lib/main.js":
  859. /*!************************************************!*\
  860. !*** ./node_modules/sockjs-client/lib/main.js ***!
  861. \************************************************/
  862. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  863. "use strict";
  864. __webpack_require__(/*! ./shims */ "./node_modules/sockjs-client/lib/shims.js");
  865. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js"),
  866. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  867. random = __webpack_require__(/*! ./utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  868. escape = __webpack_require__(/*! ./utils/escape */ "./node_modules/sockjs-client/lib/utils/escape.js"),
  869. urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  870. eventUtils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  871. transport = __webpack_require__(/*! ./utils/transport */ "./node_modules/sockjs-client/lib/utils/transport.js"),
  872. objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js"),
  873. browser = __webpack_require__(/*! ./utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  874. log = __webpack_require__(/*! ./utils/log */ "./node_modules/sockjs-client/lib/utils/log.js"),
  875. Event = __webpack_require__(/*! ./event/event */ "./node_modules/sockjs-client/lib/event/event.js"),
  876. EventTarget = __webpack_require__(/*! ./event/eventtarget */ "./node_modules/sockjs-client/lib/event/eventtarget.js"),
  877. loc = __webpack_require__(/*! ./location */ "./node_modules/sockjs-client/lib/location.js"),
  878. CloseEvent = __webpack_require__(/*! ./event/close */ "./node_modules/sockjs-client/lib/event/close.js"),
  879. TransportMessageEvent = __webpack_require__(/*! ./event/trans-message */ "./node_modules/sockjs-client/lib/event/trans-message.js"),
  880. InfoReceiver = __webpack_require__(/*! ./info-receiver */ "./node_modules/sockjs-client/lib/info-receiver.js");
  881. var debug = function debug() {};
  882. if (true) {
  883. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:main');
  884. }
  885. var transports; // follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface
  886. function SockJS(url, protocols, options) {
  887. if (!(this instanceof SockJS)) {
  888. return new SockJS(url, protocols, options);
  889. }
  890. if (arguments.length < 1) {
  891. throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
  892. }
  893. EventTarget.call(this);
  894. this.readyState = SockJS.CONNECTING;
  895. this.extensions = '';
  896. this.protocol = ''; // non-standard extension
  897. options = options || {};
  898. if (options.protocols_whitelist) {
  899. log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead.");
  900. }
  901. this._transportsWhitelist = options.transports;
  902. this._transportOptions = options.transportOptions || {};
  903. this._timeout = options.timeout || 0;
  904. var sessionId = options.sessionId || 8;
  905. if (typeof sessionId === 'function') {
  906. this._generateSessionId = sessionId;
  907. } else if (typeof sessionId === 'number') {
  908. this._generateSessionId = function () {
  909. return random.string(sessionId);
  910. };
  911. } else {
  912. throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');
  913. }
  914. this._server = options.server || random.numberString(1000); // Step 1 of WS spec - parse and validate the url. Issue #8
  915. var parsedUrl = new URL(url);
  916. if (!parsedUrl.host || !parsedUrl.protocol) {
  917. throw new SyntaxError("The URL '" + url + "' is invalid");
  918. } else if (parsedUrl.hash) {
  919. throw new SyntaxError('The URL must not contain a fragment');
  920. } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
  921. throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed.");
  922. }
  923. var secure = parsedUrl.protocol === 'https:'; // Step 2 - don't allow secure origin with an insecure protocol
  924. if (loc.protocol === 'https:' && !secure) {
  925. // exception is 127.0.0.0/8 and ::1 urls
  926. if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) {
  927. throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');
  928. }
  929. } // Step 3 - check port access - no need here
  930. // Step 4 - parse protocols argument
  931. if (!protocols) {
  932. protocols = [];
  933. } else if (!Array.isArray(protocols)) {
  934. protocols = [protocols];
  935. } // Step 5 - check protocols argument
  936. var sortedProtocols = protocols.sort();
  937. sortedProtocols.forEach(function (proto, i) {
  938. if (!proto) {
  939. throw new SyntaxError("The protocols entry '" + proto + "' is invalid.");
  940. }
  941. if (i < sortedProtocols.length - 1 && proto === sortedProtocols[i + 1]) {
  942. throw new SyntaxError("The protocols entry '" + proto + "' is duplicated.");
  943. }
  944. }); // Step 6 - convert origin
  945. var o = urlUtils.getOrigin(loc.href);
  946. this._origin = o ? o.toLowerCase() : null; // remove the trailing slash
  947. parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, '')); // store the sanitized url
  948. this.url = parsedUrl.href;
  949. debug('using url', this.url); // Step 7 - start connection in background
  950. // obtain server info
  951. // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26
  952. this._urlInfo = {
  953. nullOrigin: !browser.hasDomain(),
  954. sameOrigin: urlUtils.isOriginEqual(this.url, loc.href),
  955. sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)
  956. };
  957. this._ir = new InfoReceiver(this.url, this._urlInfo);
  958. this._ir.once('finish', this._receiveInfo.bind(this));
  959. }
  960. inherits(SockJS, EventTarget);
  961. function userSetCode(code) {
  962. return code === 1000 || code >= 3000 && code <= 4999;
  963. }
  964. SockJS.prototype.close = function (code, reason) {
  965. // Step 1
  966. if (code && !userSetCode(code)) {
  967. throw new Error('InvalidAccessError: Invalid code');
  968. } // Step 2.4 states the max is 123 bytes, but we are just checking length
  969. if (reason && reason.length > 123) {
  970. throw new SyntaxError('reason argument has an invalid length');
  971. } // Step 3.1
  972. if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {
  973. return;
  974. } // TODO look at docs to determine how to set this
  975. var wasClean = true;
  976. this._close(code || 1000, reason || 'Normal closure', wasClean);
  977. };
  978. SockJS.prototype.send = function (data) {
  979. // #13 - convert anything non-string to string
  980. // TODO this currently turns objects into [object Object]
  981. if (typeof data !== 'string') {
  982. data = '' + data;
  983. }
  984. if (this.readyState === SockJS.CONNECTING) {
  985. throw new Error('InvalidStateError: The connection has not been established yet');
  986. }
  987. if (this.readyState !== SockJS.OPEN) {
  988. return;
  989. }
  990. this._transport.send(escape.quote(data));
  991. };
  992. SockJS.version = __webpack_require__(/*! ./version */ "./node_modules/sockjs-client/lib/version.js");
  993. SockJS.CONNECTING = 0;
  994. SockJS.OPEN = 1;
  995. SockJS.CLOSING = 2;
  996. SockJS.CLOSED = 3;
  997. SockJS.prototype._receiveInfo = function (info, rtt) {
  998. debug('_receiveInfo', rtt);
  999. this._ir = null;
  1000. if (!info) {
  1001. this._close(1002, 'Cannot connect to server');
  1002. return;
  1003. } // establish a round-trip timeout (RTO) based on the
  1004. // round-trip time (RTT)
  1005. this._rto = this.countRTO(rtt); // allow server to override url used for the actual transport
  1006. this._transUrl = info.base_url ? info.base_url : this.url;
  1007. info = objectUtils.extend(info, this._urlInfo);
  1008. debug('info', info); // determine list of desired and supported transports
  1009. var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);
  1010. this._transports = enabledTransports.main;
  1011. debug(this._transports.length + ' enabled transports');
  1012. this._connect();
  1013. };
  1014. SockJS.prototype._connect = function () {
  1015. for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {
  1016. debug('attempt', Transport.transportName);
  1017. if (Transport.needBody) {
  1018. if (!__webpack_require__.g.document.body || typeof __webpack_require__.g.document.readyState !== 'undefined' && __webpack_require__.g.document.readyState !== 'complete' && __webpack_require__.g.document.readyState !== 'interactive') {
  1019. debug('waiting for body');
  1020. this._transports.unshift(Transport);
  1021. eventUtils.attachEvent('load', this._connect.bind(this));
  1022. return;
  1023. }
  1024. } // calculate timeout based on RTO and round trips. Default to 5s
  1025. var timeoutMs = Math.max(this._timeout, this._rto * Transport.roundTrips || 5000);
  1026. this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);
  1027. debug('using timeout', timeoutMs);
  1028. var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());
  1029. var options = this._transportOptions[Transport.transportName];
  1030. debug('transport url', transportUrl);
  1031. var transportObj = new Transport(transportUrl, this._transUrl, options);
  1032. transportObj.on('message', this._transportMessage.bind(this));
  1033. transportObj.once('close', this._transportClose.bind(this));
  1034. transportObj.transportName = Transport.transportName;
  1035. this._transport = transportObj;
  1036. return;
  1037. }
  1038. this._close(2000, 'All transports failed', false);
  1039. };
  1040. SockJS.prototype._transportTimeout = function () {
  1041. debug('_transportTimeout');
  1042. if (this.readyState === SockJS.CONNECTING) {
  1043. if (this._transport) {
  1044. this._transport.close();
  1045. }
  1046. this._transportClose(2007, 'Transport timed out');
  1047. }
  1048. };
  1049. SockJS.prototype._transportMessage = function (msg) {
  1050. debug('_transportMessage', msg);
  1051. var self = this,
  1052. type = msg.slice(0, 1),
  1053. content = msg.slice(1),
  1054. payload; // first check for messages that don't need a payload
  1055. switch (type) {
  1056. case 'o':
  1057. this._open();
  1058. return;
  1059. case 'h':
  1060. this.dispatchEvent(new Event('heartbeat'));
  1061. debug('heartbeat', this.transport);
  1062. return;
  1063. }
  1064. if (content) {
  1065. try {
  1066. payload = JSON.parse(content);
  1067. } catch (e) {
  1068. debug('bad json', content);
  1069. }
  1070. }
  1071. if (typeof payload === 'undefined') {
  1072. debug('empty payload', content);
  1073. return;
  1074. }
  1075. switch (type) {
  1076. case 'a':
  1077. if (Array.isArray(payload)) {
  1078. payload.forEach(function (p) {
  1079. debug('message', self.transport, p);
  1080. self.dispatchEvent(new TransportMessageEvent(p));
  1081. });
  1082. }
  1083. break;
  1084. case 'm':
  1085. debug('message', this.transport, payload);
  1086. this.dispatchEvent(new TransportMessageEvent(payload));
  1087. break;
  1088. case 'c':
  1089. if (Array.isArray(payload) && payload.length === 2) {
  1090. this._close(payload[0], payload[1], true);
  1091. }
  1092. break;
  1093. }
  1094. };
  1095. SockJS.prototype._transportClose = function (code, reason) {
  1096. debug('_transportClose', this.transport, code, reason);
  1097. if (this._transport) {
  1098. this._transport.removeAllListeners();
  1099. this._transport = null;
  1100. this.transport = null;
  1101. }
  1102. if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {
  1103. this._connect();
  1104. return;
  1105. }
  1106. this._close(code, reason);
  1107. };
  1108. SockJS.prototype._open = function () {
  1109. debug('_open', this._transport && this._transport.transportName, this.readyState);
  1110. if (this.readyState === SockJS.CONNECTING) {
  1111. if (this._transportTimeoutId) {
  1112. clearTimeout(this._transportTimeoutId);
  1113. this._transportTimeoutId = null;
  1114. }
  1115. this.readyState = SockJS.OPEN;
  1116. this.transport = this._transport.transportName;
  1117. this.dispatchEvent(new Event('open'));
  1118. debug('connected', this.transport);
  1119. } else {
  1120. // The server might have been restarted, and lost track of our
  1121. // connection.
  1122. this._close(1006, 'Server lost session');
  1123. }
  1124. };
  1125. SockJS.prototype._close = function (code, reason, wasClean) {
  1126. debug('_close', this.transport, code, reason, wasClean, this.readyState);
  1127. var forceFail = false;
  1128. if (this._ir) {
  1129. forceFail = true;
  1130. this._ir.close();
  1131. this._ir = null;
  1132. }
  1133. if (this._transport) {
  1134. this._transport.close();
  1135. this._transport = null;
  1136. this.transport = null;
  1137. }
  1138. if (this.readyState === SockJS.CLOSED) {
  1139. throw new Error('InvalidStateError: SockJS has already been closed');
  1140. }
  1141. this.readyState = SockJS.CLOSING;
  1142. setTimeout(function () {
  1143. this.readyState = SockJS.CLOSED;
  1144. if (forceFail) {
  1145. this.dispatchEvent(new Event('error'));
  1146. }
  1147. var e = new CloseEvent('close');
  1148. e.wasClean = wasClean || false;
  1149. e.code = code || 1000;
  1150. e.reason = reason;
  1151. this.dispatchEvent(e);
  1152. this.onmessage = this.onclose = this.onerror = null;
  1153. debug('disconnected');
  1154. }.bind(this), 0);
  1155. }; // See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/
  1156. // and RFC 2988.
  1157. SockJS.prototype.countRTO = function (rtt) {
  1158. // In a local environment, when using IE8/9 and the `jsonp-polling`
  1159. // transport the time needed to establish a connection (the time that pass
  1160. // from the opening of the transport to the call of `_dispatchOpen`) is
  1161. // around 200msec (the lower bound used in the article above) and this
  1162. // causes spurious timeouts. For this reason we calculate a value slightly
  1163. // larger than that used in the article.
  1164. if (rtt > 100) {
  1165. return 4 * rtt; // rto > 400msec
  1166. }
  1167. return 300 + rtt; // 300msec < rto <= 400msec
  1168. };
  1169. module.exports = function (availableTransports) {
  1170. transports = transport(availableTransports);
  1171. __webpack_require__(/*! ./iframe-bootstrap */ "./node_modules/sockjs-client/lib/iframe-bootstrap.js")(SockJS, availableTransports);
  1172. return SockJS;
  1173. };
  1174. /***/ }),
  1175. /***/ "./node_modules/sockjs-client/lib/shims.js":
  1176. /*!*************************************************!*\
  1177. !*** ./node_modules/sockjs-client/lib/shims.js ***!
  1178. \*************************************************/
  1179. /***/ (function() {
  1180. "use strict";
  1181. /* eslint-disable */
  1182. /* jscs: disable */
  1183. // pulled specific shims from https://github.com/es-shims/es5-shim
  1184. var ArrayPrototype = Array.prototype;
  1185. var ObjectPrototype = Object.prototype;
  1186. var FunctionPrototype = Function.prototype;
  1187. var StringPrototype = String.prototype;
  1188. var array_slice = ArrayPrototype.slice;
  1189. var _toString = ObjectPrototype.toString;
  1190. var isFunction = function isFunction(val) {
  1191. return ObjectPrototype.toString.call(val) === '[object Function]';
  1192. };
  1193. var isArray = function isArray(obj) {
  1194. return _toString.call(obj) === '[object Array]';
  1195. };
  1196. var isString = function isString(obj) {
  1197. return _toString.call(obj) === '[object String]';
  1198. };
  1199. var supportsDescriptors = Object.defineProperty && function () {
  1200. try {
  1201. Object.defineProperty({}, 'x', {});
  1202. return true;
  1203. } catch (e) {
  1204. /* this is ES3 */
  1205. return false;
  1206. }
  1207. }(); // Define configurable, writable and non-enumerable props
  1208. // if they don't exist.
  1209. var defineProperty;
  1210. if (supportsDescriptors) {
  1211. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1212. if (!forceAssign && name in object) {
  1213. return;
  1214. }
  1215. Object.defineProperty(object, name, {
  1216. configurable: true,
  1217. enumerable: false,
  1218. writable: true,
  1219. value: method
  1220. });
  1221. };
  1222. } else {
  1223. defineProperty = function defineProperty(object, name, method, forceAssign) {
  1224. if (!forceAssign && name in object) {
  1225. return;
  1226. }
  1227. object[name] = method;
  1228. };
  1229. }
  1230. var defineProperties = function defineProperties(object, map, forceAssign) {
  1231. for (var name in map) {
  1232. if (ObjectPrototype.hasOwnProperty.call(map, name)) {
  1233. defineProperty(object, name, map[name], forceAssign);
  1234. }
  1235. }
  1236. };
  1237. var toObject = function toObject(o) {
  1238. if (o == null) {
  1239. // this matches both null and undefined
  1240. throw new TypeError("can't convert " + o + ' to object');
  1241. }
  1242. return Object(o);
  1243. }; //
  1244. // Util
  1245. // ======
  1246. //
  1247. // ES5 9.4
  1248. // http://es5.github.com/#x9.4
  1249. // http://jsperf.com/to-integer
  1250. function toInteger(num) {
  1251. var n = +num;
  1252. if (n !== n) {
  1253. // isNaN
  1254. n = 0;
  1255. } else if (n !== 0 && n !== 1 / 0 && n !== -(1 / 0)) {
  1256. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  1257. }
  1258. return n;
  1259. }
  1260. function ToUint32(x) {
  1261. return x >>> 0;
  1262. } //
  1263. // Function
  1264. // ========
  1265. //
  1266. // ES-5 15.3.4.5
  1267. // http://es5.github.com/#x15.3.4.5
  1268. function Empty() {}
  1269. defineProperties(FunctionPrototype, {
  1270. bind: function bind(that) {
  1271. // .length is 1
  1272. // 1. Let Target be the this value.
  1273. var target = this; // 2. If IsCallable(Target) is false, throw a TypeError exception.
  1274. if (!isFunction(target)) {
  1275. throw new TypeError('Function.prototype.bind called on incompatible ' + target);
  1276. } // 3. Let A be a new (possibly empty) internal list of all of the
  1277. // argument values provided after thisArg (arg1, arg2 etc), in order.
  1278. // XXX slicedArgs will stand in for "A" if used
  1279. var args = array_slice.call(arguments, 1); // for normal call
  1280. // 4. Let F be a new native ECMAScript object.
  1281. // 11. Set the [[Prototype]] internal property of F to the standard
  1282. // built-in Function prototype object as specified in 15.3.3.1.
  1283. // 12. Set the [[Call]] internal property of F as described in
  1284. // 15.3.4.5.1.
  1285. // 13. Set the [[Construct]] internal property of F as described in
  1286. // 15.3.4.5.2.
  1287. // 14. Set the [[HasInstance]] internal property of F as described in
  1288. // 15.3.4.5.3.
  1289. var binder = function binder() {
  1290. if (this instanceof bound) {
  1291. // 15.3.4.5.2 [[Construct]]
  1292. // When the [[Construct]] internal method of a function object,
  1293. // F that was created using the bind function is called with a
  1294. // list of arguments ExtraArgs, the following steps are taken:
  1295. // 1. Let target be the value of F's [[TargetFunction]]
  1296. // internal property.
  1297. // 2. If target has no [[Construct]] internal method, a
  1298. // TypeError exception is thrown.
  1299. // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
  1300. // property.
  1301. // 4. Let args be a new list containing the same values as the
  1302. // list boundArgs in the same order followed by the same
  1303. // values as the list ExtraArgs in the same order.
  1304. // 5. Return the result of calling the [[Construct]] internal
  1305. // method of target providing args as the arguments.
  1306. var result = target.apply(this, args.concat(array_slice.call(arguments)));
  1307. if (Object(result) === result) {
  1308. return result;
  1309. }
  1310. return this;
  1311. } else {
  1312. // 15.3.4.5.1 [[Call]]
  1313. // When the [[Call]] internal method of a function object, F,
  1314. // which was created using the bind function is called with a
  1315. // this value and a list of arguments ExtraArgs, the following
  1316. // steps are taken:
  1317. // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
  1318. // property.
  1319. // 2. Let boundThis be the value of F's [[BoundThis]] internal
  1320. // property.
  1321. // 3. Let target be the value of F's [[TargetFunction]] internal
  1322. // property.
  1323. // 4. Let args be a new list containing the same values as the
  1324. // list boundArgs in the same order followed by the same
  1325. // values as the list ExtraArgs in the same order.
  1326. // 5. Return the result of calling the [[Call]] internal method
  1327. // of target providing boundThis as the this value and
  1328. // providing args as the arguments.
  1329. // equiv: target.call(this, ...boundArgs, ...args)
  1330. return target.apply(that, args.concat(array_slice.call(arguments)));
  1331. }
  1332. }; // 15. If the [[Class]] internal property of Target is "Function", then
  1333. // a. Let L be the length property of Target minus the length of A.
  1334. // b. Set the length own property of F to either 0 or L, whichever is
  1335. // larger.
  1336. // 16. Else set the length own property of F to 0.
  1337. var boundLength = Math.max(0, target.length - args.length); // 17. Set the attributes of the length own property of F to the values
  1338. // specified in 15.3.5.1.
  1339. var boundArgs = [];
  1340. for (var i = 0; i < boundLength; i++) {
  1341. boundArgs.push('$' + i);
  1342. } // XXX Build a dynamic function with desired amount of arguments is the only
  1343. // way to set the length property of a function.
  1344. // In environments where Content Security Policies enabled (Chrome extensions,
  1345. // for ex.) all use of eval or Function costructor throws an exception.
  1346. // However in all of these environments Function.prototype.bind exists
  1347. // and so this code will never be executed.
  1348. var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);
  1349. if (target.prototype) {
  1350. Empty.prototype = target.prototype;
  1351. bound.prototype = new Empty(); // Clean up dangling references.
  1352. Empty.prototype = null;
  1353. } // TODO
  1354. // 18. Set the [[Extensible]] internal property of F to true.
  1355. // TODO
  1356. // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
  1357. // 20. Call the [[DefineOwnProperty]] internal method of F with
  1358. // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
  1359. // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
  1360. // false.
  1361. // 21. Call the [[DefineOwnProperty]] internal method of F with
  1362. // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
  1363. // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
  1364. // and false.
  1365. // TODO
  1366. // NOTE Function objects created using Function.prototype.bind do not
  1367. // have a prototype property or the [[Code]], [[FormalParameters]], and
  1368. // [[Scope]] internal properties.
  1369. // XXX can't delete prototype in pure-js.
  1370. // 22. Return F.
  1371. return bound;
  1372. }
  1373. }); //
  1374. // Array
  1375. // =====
  1376. //
  1377. // ES5 15.4.3.2
  1378. // http://es5.github.com/#x15.4.3.2
  1379. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
  1380. defineProperties(Array, {
  1381. isArray: isArray
  1382. });
  1383. var boxedString = Object('a');
  1384. var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
  1385. var properlyBoxesContext = function properlyBoxed(method) {
  1386. // Check node 0.6.21 bug where third parameter is not boxed
  1387. var properlyBoxesNonStrict = true;
  1388. var properlyBoxesStrict = true;
  1389. if (method) {
  1390. method.call('foo', function (_, __, context) {
  1391. if (typeof context !== 'object') {
  1392. properlyBoxesNonStrict = false;
  1393. }
  1394. });
  1395. method.call([1], function () {
  1396. 'use strict';
  1397. properlyBoxesStrict = typeof this === 'string';
  1398. }, 'x');
  1399. }
  1400. return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
  1401. };
  1402. defineProperties(ArrayPrototype, {
  1403. forEach: function forEach(fun
  1404. /*, thisp*/
  1405. ) {
  1406. var object = toObject(this),
  1407. self = splitString && isString(this) ? this.split('') : object,
  1408. thisp = arguments[1],
  1409. i = -1,
  1410. length = self.length >>> 0; // If no callback function or if callback is not a callable function
  1411. if (!isFunction(fun)) {
  1412. throw new TypeError(); // TODO message
  1413. }
  1414. while (++i < length) {
  1415. if (i in self) {
  1416. // Invoke the callback function with call, passing arguments:
  1417. // context, property value, property key, thisArg object
  1418. // context
  1419. fun.call(thisp, self[i], i, object);
  1420. }
  1421. }
  1422. }
  1423. }, !properlyBoxesContext(ArrayPrototype.forEach)); // ES5 15.4.4.14
  1424. // http://es5.github.com/#x15.4.4.14
  1425. // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
  1426. var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
  1427. defineProperties(ArrayPrototype, {
  1428. indexOf: function indexOf(sought
  1429. /*, fromIndex */
  1430. ) {
  1431. var self = splitString && isString(this) ? this.split('') : toObject(this),
  1432. length = self.length >>> 0;
  1433. if (!length) {
  1434. return -1;
  1435. }
  1436. var i = 0;
  1437. if (arguments.length > 1) {
  1438. i = toInteger(arguments[1]);
  1439. } // handle negative indices
  1440. i = i >= 0 ? i : Math.max(0, length + i);
  1441. for (; i < length; i++) {
  1442. if (i in self && self[i] === sought) {
  1443. return i;
  1444. }
  1445. }
  1446. return -1;
  1447. }
  1448. }, hasFirefox2IndexOfBug); //
  1449. // String
  1450. // ======
  1451. //
  1452. // ES5 15.5.4.14
  1453. // http://es5.github.com/#x15.5.4.14
  1454. // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
  1455. // Many browsers do not split properly with regular expressions or they
  1456. // do not perform the split correctly under obscure conditions.
  1457. // See http://blog.stevenlevithan.com/archives/cross-browser-split
  1458. // I've tested in many browsers and this seems to cover the deviant ones:
  1459. // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
  1460. // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
  1461. // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
  1462. // [undefined, "t", undefined, "e", ...]
  1463. // ''.split(/.?/) should be [], not [""]
  1464. // '.'.split(/()()/) should be ["."], not ["", "", "."]
  1465. var string_split = StringPrototype.split;
  1466. if ('ab'.split(/(?:ab)*/).length !== 2 || '.'.split(/(.?)(.?)/).length !== 4 || 'tesst'.split(/(s)*/)[1] === 't' || 'test'.split(/(?:)/, -1).length !== 4 || ''.split(/.?/).length || '.'.split(/()()/).length > 1) {
  1467. (function () {
  1468. var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group
  1469. StringPrototype.split = function (separator, limit) {
  1470. var string = this;
  1471. if (separator === void 0 && limit === 0) {
  1472. return [];
  1473. } // If `separator` is not a regex, use native split
  1474. if (_toString.call(separator) !== '[object RegExp]') {
  1475. return string_split.call(this, separator, limit);
  1476. }
  1477. var output = [],
  1478. flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.extended ? 'x' : '') + ( // Proposed for ES6
  1479. separator.sticky ? 'y' : ''),
  1480. // Firefox 3+
  1481. lastLastIndex = 0,
  1482. // Make `global` and avoid `lastIndex` issues by working with a copy
  1483. separator2,
  1484. match,
  1485. lastIndex,
  1486. lastLength;
  1487. separator = new RegExp(separator.source, flags + 'g');
  1488. string += ''; // Type-convert
  1489. if (!compliantExecNpcg) {
  1490. // Doesn't need flags gy, but they don't hurt
  1491. separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags);
  1492. }
  1493. /* Values for `limit`, per the spec:
  1494. * If undefined: 4294967295 // Math.pow(2, 32) - 1
  1495. * If 0, Infinity, or NaN: 0
  1496. * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
  1497. * If negative number: 4294967296 - Math.floor(Math.abs(limit))
  1498. * If other: Type-convert, then use the above rules
  1499. */
  1500. limit = limit === void 0 ? -1 >>> 0 : // Math.pow(2, 32) - 1
  1501. ToUint32(limit);
  1502. while (match = separator.exec(string)) {
  1503. // `separator.lastIndex` is not reliable cross-browser
  1504. lastIndex = match.index + match[0].length;
  1505. if (lastIndex > lastLastIndex) {
  1506. output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for
  1507. // nonparticipating capturing groups
  1508. if (!compliantExecNpcg && match.length > 1) {
  1509. match[0].replace(separator2, function () {
  1510. for (var i = 1; i < arguments.length - 2; i++) {
  1511. if (arguments[i] === void 0) {
  1512. match[i] = void 0;
  1513. }
  1514. }
  1515. });
  1516. }
  1517. if (match.length > 1 && match.index < string.length) {
  1518. ArrayPrototype.push.apply(output, match.slice(1));
  1519. }
  1520. lastLength = match[0].length;
  1521. lastLastIndex = lastIndex;
  1522. if (output.length >= limit) {
  1523. break;
  1524. }
  1525. }
  1526. if (separator.lastIndex === match.index) {
  1527. separator.lastIndex++; // Avoid an infinite loop
  1528. }
  1529. }
  1530. if (lastLastIndex === string.length) {
  1531. if (lastLength || !separator.test('')) {
  1532. output.push('');
  1533. }
  1534. } else {
  1535. output.push(string.slice(lastLastIndex));
  1536. }
  1537. return output.length > limit ? output.slice(0, limit) : output;
  1538. };
  1539. })(); // [bugfix, chrome]
  1540. // If separator is undefined, then the result array contains just one String,
  1541. // which is the this value (converted to a String). If limit is not undefined,
  1542. // then the output array is truncated so that it contains no more than limit
  1543. // elements.
  1544. // "0".split(undefined, 0) -> []
  1545. } else if ('0'.split(void 0, 0).length) {
  1546. StringPrototype.split = function split(separator, limit) {
  1547. if (separator === void 0 && limit === 0) {
  1548. return [];
  1549. }
  1550. return string_split.call(this, separator, limit);
  1551. };
  1552. } // ECMA-262, 3rd B.2.3
  1553. // Not an ECMAScript standard, although ECMAScript 3rd Edition has a
  1554. // non-normative section suggesting uniform semantics and it should be
  1555. // normalized across all browsers
  1556. // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
  1557. var string_substr = StringPrototype.substr;
  1558. var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
  1559. defineProperties(StringPrototype, {
  1560. substr: function substr(start, length) {
  1561. return string_substr.call(this, start < 0 ? (start = this.length + start) < 0 ? 0 : start : start, length);
  1562. }
  1563. }, hasNegativeSubstrBug);
  1564. /***/ }),
  1565. /***/ "./node_modules/sockjs-client/lib/transport-list.js":
  1566. /*!**********************************************************!*\
  1567. !*** ./node_modules/sockjs-client/lib/transport-list.js ***!
  1568. \**********************************************************/
  1569. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1570. "use strict";
  1571. module.exports = [// streaming transports
  1572. __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/lib/transport/websocket.js"), __webpack_require__(/*! ./transport/xhr-streaming */ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js"), __webpack_require__(/*! ./transport/xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"), __webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/eventsource */ "./node_modules/sockjs-client/lib/transport/eventsource.js")) // polling transports
  1573. , __webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/htmlfile */ "./node_modules/sockjs-client/lib/transport/htmlfile.js")), __webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js"), __webpack_require__(/*! ./transport/xdr-polling */ "./node_modules/sockjs-client/lib/transport/xdr-polling.js"), __webpack_require__(/*! ./transport/lib/iframe-wrap */ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js")(__webpack_require__(/*! ./transport/xhr-polling */ "./node_modules/sockjs-client/lib/transport/xhr-polling.js")), __webpack_require__(/*! ./transport/jsonp-polling */ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js")];
  1574. /***/ }),
  1575. /***/ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js":
  1576. /*!**************************************************************************!*\
  1577. !*** ./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js ***!
  1578. \**************************************************************************/
  1579. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1580. "use strict";
  1581. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1582. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1583. utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1584. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1585. XHR = __webpack_require__.g.XMLHttpRequest;
  1586. var debug = function debug() {};
  1587. if (true) {
  1588. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:browser:xhr');
  1589. }
  1590. function AbstractXHRObject(method, url, payload, opts) {
  1591. debug(method, url);
  1592. var self = this;
  1593. EventEmitter.call(this);
  1594. setTimeout(function () {
  1595. self._start(method, url, payload, opts);
  1596. }, 0);
  1597. }
  1598. inherits(AbstractXHRObject, EventEmitter);
  1599. AbstractXHRObject.prototype._start = function (method, url, payload, opts) {
  1600. var self = this;
  1601. try {
  1602. this.xhr = new XHR();
  1603. } catch (x) {// intentionally empty
  1604. }
  1605. if (!this.xhr) {
  1606. debug('no xhr');
  1607. this.emit('finish', 0, 'no xhr support');
  1608. this._cleanup();
  1609. return;
  1610. } // several browsers cache POSTs
  1611. url = urlUtils.addQuery(url, 't=' + +new Date()); // Explorer tends to keep connection open, even after the
  1612. // tab gets closed: http://bugs.jquery.com/ticket/5280
  1613. this.unloadRef = utils.unloadAdd(function () {
  1614. debug('unload cleanup');
  1615. self._cleanup(true);
  1616. });
  1617. try {
  1618. this.xhr.open(method, url, true);
  1619. if (this.timeout && 'timeout' in this.xhr) {
  1620. this.xhr.timeout = this.timeout;
  1621. this.xhr.ontimeout = function () {
  1622. debug('xhr timeout');
  1623. self.emit('finish', 0, '');
  1624. self._cleanup(false);
  1625. };
  1626. }
  1627. } catch (e) {
  1628. debug('exception', e); // IE raises an exception on wrong port.
  1629. this.emit('finish', 0, '');
  1630. this._cleanup(false);
  1631. return;
  1632. }
  1633. if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {
  1634. debug('withCredentials'); // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :
  1635. // "This never affects same-site requests."
  1636. this.xhr.withCredentials = true;
  1637. }
  1638. if (opts && opts.headers) {
  1639. for (var key in opts.headers) {
  1640. this.xhr.setRequestHeader(key, opts.headers[key]);
  1641. }
  1642. }
  1643. this.xhr.onreadystatechange = function () {
  1644. if (self.xhr) {
  1645. var x = self.xhr;
  1646. var text, status;
  1647. debug('readyState', x.readyState);
  1648. switch (x.readyState) {
  1649. case 3:
  1650. // IE doesn't like peeking into responseText or status
  1651. // on Microsoft.XMLHTTP and readystate=3
  1652. try {
  1653. status = x.status;
  1654. text = x.responseText;
  1655. } catch (e) {// intentionally empty
  1656. }
  1657. debug('status', status); // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1658. if (status === 1223) {
  1659. status = 204;
  1660. } // IE does return readystate == 3 for 404 answers.
  1661. if (status === 200 && text && text.length > 0) {
  1662. debug('chunk');
  1663. self.emit('chunk', status, text);
  1664. }
  1665. break;
  1666. case 4:
  1667. status = x.status;
  1668. debug('status', status); // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450
  1669. if (status === 1223) {
  1670. status = 204;
  1671. } // IE returns this for a bad port
  1672. // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx
  1673. if (status === 12005 || status === 12029) {
  1674. status = 0;
  1675. }
  1676. debug('finish', status, x.responseText);
  1677. self.emit('finish', status, x.responseText);
  1678. self._cleanup(false);
  1679. break;
  1680. }
  1681. }
  1682. };
  1683. try {
  1684. self.xhr.send(payload);
  1685. } catch (e) {
  1686. self.emit('finish', 0, '');
  1687. self._cleanup(false);
  1688. }
  1689. };
  1690. AbstractXHRObject.prototype._cleanup = function (abort) {
  1691. debug('cleanup');
  1692. if (!this.xhr) {
  1693. return;
  1694. }
  1695. this.removeAllListeners();
  1696. utils.unloadDel(this.unloadRef); // IE needs this field to be a function
  1697. this.xhr.onreadystatechange = function () {};
  1698. if (this.xhr.ontimeout) {
  1699. this.xhr.ontimeout = null;
  1700. }
  1701. if (abort) {
  1702. try {
  1703. this.xhr.abort();
  1704. } catch (x) {// intentionally empty
  1705. }
  1706. }
  1707. this.unloadRef = this.xhr = null;
  1708. };
  1709. AbstractXHRObject.prototype.close = function () {
  1710. debug('close');
  1711. this._cleanup(true);
  1712. };
  1713. AbstractXHRObject.enabled = !!XHR; // override XMLHttpRequest for IE6/7
  1714. // obfuscate to avoid firewalls
  1715. var axo = ['Active'].concat('Object').join('X');
  1716. if (!AbstractXHRObject.enabled && axo in __webpack_require__.g) {
  1717. debug('overriding xmlhttprequest');
  1718. XHR = function XHR() {
  1719. try {
  1720. return new __webpack_require__.g[axo]('Microsoft.XMLHTTP');
  1721. } catch (e) {
  1722. return null;
  1723. }
  1724. };
  1725. AbstractXHRObject.enabled = !!new XHR();
  1726. }
  1727. var cors = false;
  1728. try {
  1729. cors = 'withCredentials' in new XHR();
  1730. } catch (ignored) {// intentionally empty
  1731. }
  1732. AbstractXHRObject.supportsCORS = cors;
  1733. module.exports = AbstractXHRObject;
  1734. /***/ }),
  1735. /***/ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js":
  1736. /*!*************************************************************************!*\
  1737. !*** ./node_modules/sockjs-client/lib/transport/browser/eventsource.js ***!
  1738. \*************************************************************************/
  1739. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1740. module.exports = __webpack_require__.g.EventSource;
  1741. /***/ }),
  1742. /***/ "./node_modules/sockjs-client/lib/transport/browser/websocket.js":
  1743. /*!***********************************************************************!*\
  1744. !*** ./node_modules/sockjs-client/lib/transport/browser/websocket.js ***!
  1745. \***********************************************************************/
  1746. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1747. "use strict";
  1748. var Driver = __webpack_require__.g.WebSocket || __webpack_require__.g.MozWebSocket;
  1749. if (Driver) {
  1750. module.exports = function WebSocketBrowserDriver(url) {
  1751. return new Driver(url);
  1752. };
  1753. } else {
  1754. module.exports = undefined;
  1755. }
  1756. /***/ }),
  1757. /***/ "./node_modules/sockjs-client/lib/transport/eventsource.js":
  1758. /*!*****************************************************************!*\
  1759. !*** ./node_modules/sockjs-client/lib/transport/eventsource.js ***!
  1760. \*****************************************************************/
  1761. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1762. "use strict";
  1763. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1764. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  1765. EventSourceReceiver = __webpack_require__(/*! ./receiver/eventsource */ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js"),
  1766. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  1767. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  1768. function EventSourceTransport(transUrl) {
  1769. if (!EventSourceTransport.enabled()) {
  1770. throw new Error('Transport created when disabled');
  1771. }
  1772. AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
  1773. }
  1774. inherits(EventSourceTransport, AjaxBasedTransport);
  1775. EventSourceTransport.enabled = function () {
  1776. return !!EventSourceDriver;
  1777. };
  1778. EventSourceTransport.transportName = 'eventsource';
  1779. EventSourceTransport.roundTrips = 2;
  1780. module.exports = EventSourceTransport;
  1781. /***/ }),
  1782. /***/ "./node_modules/sockjs-client/lib/transport/htmlfile.js":
  1783. /*!**************************************************************!*\
  1784. !*** ./node_modules/sockjs-client/lib/transport/htmlfile.js ***!
  1785. \**************************************************************/
  1786. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1787. "use strict";
  1788. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1789. HtmlfileReceiver = __webpack_require__(/*! ./receiver/htmlfile */ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js"),
  1790. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  1791. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js");
  1792. function HtmlFileTransport(transUrl) {
  1793. if (!HtmlfileReceiver.enabled) {
  1794. throw new Error('Transport created when disabled');
  1795. }
  1796. AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
  1797. }
  1798. inherits(HtmlFileTransport, AjaxBasedTransport);
  1799. HtmlFileTransport.enabled = function (info) {
  1800. return HtmlfileReceiver.enabled && info.sameOrigin;
  1801. };
  1802. HtmlFileTransport.transportName = 'htmlfile';
  1803. HtmlFileTransport.roundTrips = 2;
  1804. module.exports = HtmlFileTransport;
  1805. /***/ }),
  1806. /***/ "./node_modules/sockjs-client/lib/transport/iframe.js":
  1807. /*!************************************************************!*\
  1808. !*** ./node_modules/sockjs-client/lib/transport/iframe.js ***!
  1809. \************************************************************/
  1810. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1811. "use strict";
  1812. // Few cool transports do work only for same-origin. In order to make
  1813. // them work cross-domain we shall use iframe, served from the
  1814. // remote domain. New browsers have capabilities to communicate with
  1815. // cross domain iframe using postMessage(). In IE it was implemented
  1816. // from IE 8+, but of course, IE got some details wrong:
  1817. // http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
  1818. // http://stevesouders.com/misc/test-postmessage.php
  1819. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1820. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  1821. version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js"),
  1822. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1823. iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  1824. eventUtils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  1825. random = __webpack_require__(/*! ../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  1826. var debug = function debug() {};
  1827. if (true) {
  1828. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:transport:iframe');
  1829. }
  1830. function IframeTransport(transport, transUrl, baseUrl) {
  1831. if (!IframeTransport.enabled()) {
  1832. throw new Error('Transport created when disabled');
  1833. }
  1834. EventEmitter.call(this);
  1835. var self = this;
  1836. this.origin = urlUtils.getOrigin(baseUrl);
  1837. this.baseUrl = baseUrl;
  1838. this.transUrl = transUrl;
  1839. this.transport = transport;
  1840. this.windowId = random.string(8);
  1841. var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;
  1842. debug(transport, transUrl, iframeUrl);
  1843. this.iframeObj = iframeUtils.createIframe(iframeUrl, function (r) {
  1844. debug('err callback');
  1845. self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');
  1846. self.close();
  1847. });
  1848. this.onmessageCallback = this._message.bind(this);
  1849. eventUtils.attachEvent('message', this.onmessageCallback);
  1850. }
  1851. inherits(IframeTransport, EventEmitter);
  1852. IframeTransport.prototype.close = function () {
  1853. debug('close');
  1854. this.removeAllListeners();
  1855. if (this.iframeObj) {
  1856. eventUtils.detachEvent('message', this.onmessageCallback);
  1857. try {
  1858. // When the iframe is not loaded, IE raises an exception
  1859. // on 'contentWindow'.
  1860. this.postMessage('c');
  1861. } catch (x) {// intentionally empty
  1862. }
  1863. this.iframeObj.cleanup();
  1864. this.iframeObj = null;
  1865. this.onmessageCallback = this.iframeObj = null;
  1866. }
  1867. };
  1868. IframeTransport.prototype._message = function (e) {
  1869. debug('message', e.data);
  1870. if (!urlUtils.isOriginEqual(e.origin, this.origin)) {
  1871. debug('not same origin', e.origin, this.origin);
  1872. return;
  1873. }
  1874. var iframeMessage;
  1875. try {
  1876. iframeMessage = JSON.parse(e.data);
  1877. } catch (ignored) {
  1878. debug('bad json', e.data);
  1879. return;
  1880. }
  1881. if (iframeMessage.windowId !== this.windowId) {
  1882. debug('mismatched window id', iframeMessage.windowId, this.windowId);
  1883. return;
  1884. }
  1885. switch (iframeMessage.type) {
  1886. case 's':
  1887. this.iframeObj.loaded(); // window global dependency
  1888. this.postMessage('s', JSON.stringify([version, this.transport, this.transUrl, this.baseUrl]));
  1889. break;
  1890. case 't':
  1891. this.emit('message', iframeMessage.data);
  1892. break;
  1893. case 'c':
  1894. var cdata;
  1895. try {
  1896. cdata = JSON.parse(iframeMessage.data);
  1897. } catch (ignored) {
  1898. debug('bad json', iframeMessage.data);
  1899. return;
  1900. }
  1901. this.emit('close', cdata[0], cdata[1]);
  1902. this.close();
  1903. break;
  1904. }
  1905. };
  1906. IframeTransport.prototype.postMessage = function (type, data) {
  1907. debug('postMessage', type, data);
  1908. this.iframeObj.post(JSON.stringify({
  1909. windowId: this.windowId,
  1910. type: type,
  1911. data: data || ''
  1912. }), this.origin);
  1913. };
  1914. IframeTransport.prototype.send = function (message) {
  1915. debug('send', message);
  1916. this.postMessage('m', message);
  1917. };
  1918. IframeTransport.enabled = function () {
  1919. return iframeUtils.iframeEnabled;
  1920. };
  1921. IframeTransport.transportName = 'iframe';
  1922. IframeTransport.roundTrips = 2;
  1923. module.exports = IframeTransport;
  1924. /***/ }),
  1925. /***/ "./node_modules/sockjs-client/lib/transport/jsonp-polling.js":
  1926. /*!*******************************************************************!*\
  1927. !*** ./node_modules/sockjs-client/lib/transport/jsonp-polling.js ***!
  1928. \*******************************************************************/
  1929. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1930. "use strict";
  1931. // The simplest and most robust transport, using the well-know cross
  1932. // domain hack - JSONP. This transport is quite inefficient - one
  1933. // message could use up to one http request. But at least it works almost
  1934. // everywhere.
  1935. // Known limitations:
  1936. // o you will get a spinning cursor
  1937. // o for Konqueror a dumb timer is needed to detect errors
  1938. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1939. SenderReceiver = __webpack_require__(/*! ./lib/sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js"),
  1940. JsonpReceiver = __webpack_require__(/*! ./receiver/jsonp */ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js"),
  1941. jsonpSender = __webpack_require__(/*! ./sender/jsonp */ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js");
  1942. function JsonPTransport(transUrl) {
  1943. if (!JsonPTransport.enabled()) {
  1944. throw new Error('Transport created when disabled');
  1945. }
  1946. SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
  1947. }
  1948. inherits(JsonPTransport, SenderReceiver);
  1949. JsonPTransport.enabled = function () {
  1950. return !!__webpack_require__.g.document;
  1951. };
  1952. JsonPTransport.transportName = 'jsonp-polling';
  1953. JsonPTransport.roundTrips = 1;
  1954. JsonPTransport.needBody = true;
  1955. module.exports = JsonPTransport;
  1956. /***/ }),
  1957. /***/ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js":
  1958. /*!********************************************************************!*\
  1959. !*** ./node_modules/sockjs-client/lib/transport/lib/ajax-based.js ***!
  1960. \********************************************************************/
  1961. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1962. "use strict";
  1963. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  1964. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  1965. SenderReceiver = __webpack_require__(/*! ./sender-receiver */ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js");
  1966. var debug = function debug() {};
  1967. if (true) {
  1968. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:ajax-based');
  1969. }
  1970. function createAjaxSender(AjaxObject) {
  1971. return function (url, payload, callback) {
  1972. debug('create ajax sender', url, payload);
  1973. var opt = {};
  1974. if (typeof payload === 'string') {
  1975. opt.headers = {
  1976. 'Content-type': 'text/plain'
  1977. };
  1978. }
  1979. var ajaxUrl = urlUtils.addPath(url, '/xhr_send');
  1980. var xo = new AjaxObject('POST', ajaxUrl, payload, opt);
  1981. xo.once('finish', function (status) {
  1982. debug('finish', status);
  1983. xo = null;
  1984. if (status !== 200 && status !== 204) {
  1985. return callback(new Error('http status ' + status));
  1986. }
  1987. callback();
  1988. });
  1989. return function () {
  1990. debug('abort');
  1991. xo.close();
  1992. xo = null;
  1993. var err = new Error('Aborted');
  1994. err.code = 1000;
  1995. callback(err);
  1996. };
  1997. };
  1998. }
  1999. function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
  2000. SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
  2001. }
  2002. inherits(AjaxBasedTransport, SenderReceiver);
  2003. module.exports = AjaxBasedTransport;
  2004. /***/ }),
  2005. /***/ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js":
  2006. /*!*************************************************************************!*\
  2007. !*** ./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js ***!
  2008. \*************************************************************************/
  2009. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2010. "use strict";
  2011. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2012. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2013. var debug = function debug() {};
  2014. if (true) {
  2015. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:buffered-sender');
  2016. }
  2017. function BufferedSender(url, sender) {
  2018. debug(url);
  2019. EventEmitter.call(this);
  2020. this.sendBuffer = [];
  2021. this.sender = sender;
  2022. this.url = url;
  2023. }
  2024. inherits(BufferedSender, EventEmitter);
  2025. BufferedSender.prototype.send = function (message) {
  2026. debug('send', message);
  2027. this.sendBuffer.push(message);
  2028. if (!this.sendStop) {
  2029. this.sendSchedule();
  2030. }
  2031. }; // For polling transports in a situation when in the message callback,
  2032. // new message is being send. If the sending connection was started
  2033. // before receiving one, it is possible to saturate the network and
  2034. // timeout due to the lack of receiving socket. To avoid that we delay
  2035. // sending messages by some small time, in order to let receiving
  2036. // connection be started beforehand. This is only a halfmeasure and
  2037. // does not fix the big problem, but it does make the tests go more
  2038. // stable on slow networks.
  2039. BufferedSender.prototype.sendScheduleWait = function () {
  2040. debug('sendScheduleWait');
  2041. var self = this;
  2042. var tref;
  2043. this.sendStop = function () {
  2044. debug('sendStop');
  2045. self.sendStop = null;
  2046. clearTimeout(tref);
  2047. };
  2048. tref = setTimeout(function () {
  2049. debug('timeout');
  2050. self.sendStop = null;
  2051. self.sendSchedule();
  2052. }, 25);
  2053. };
  2054. BufferedSender.prototype.sendSchedule = function () {
  2055. debug('sendSchedule', this.sendBuffer.length);
  2056. var self = this;
  2057. if (this.sendBuffer.length > 0) {
  2058. var payload = '[' + this.sendBuffer.join(',') + ']';
  2059. this.sendStop = this.sender(this.url, payload, function (err) {
  2060. self.sendStop = null;
  2061. if (err) {
  2062. debug('error', err);
  2063. self.emit('close', err.code || 1006, 'Sending error: ' + err);
  2064. self.close();
  2065. } else {
  2066. self.sendScheduleWait();
  2067. }
  2068. });
  2069. this.sendBuffer = [];
  2070. }
  2071. };
  2072. BufferedSender.prototype._cleanup = function () {
  2073. debug('_cleanup');
  2074. this.removeAllListeners();
  2075. };
  2076. BufferedSender.prototype.close = function () {
  2077. debug('close');
  2078. this._cleanup();
  2079. if (this.sendStop) {
  2080. this.sendStop();
  2081. this.sendStop = null;
  2082. }
  2083. };
  2084. module.exports = BufferedSender;
  2085. /***/ }),
  2086. /***/ "./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js":
  2087. /*!*********************************************************************!*\
  2088. !*** ./node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js ***!
  2089. \*********************************************************************/
  2090. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2091. "use strict";
  2092. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2093. IframeTransport = __webpack_require__(/*! ../iframe */ "./node_modules/sockjs-client/lib/transport/iframe.js"),
  2094. objectUtils = __webpack_require__(/*! ../../utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
  2095. module.exports = function (transport) {
  2096. function IframeWrapTransport(transUrl, baseUrl) {
  2097. IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
  2098. }
  2099. inherits(IframeWrapTransport, IframeTransport);
  2100. IframeWrapTransport.enabled = function (url, info) {
  2101. if (!__webpack_require__.g.document) {
  2102. return false;
  2103. }
  2104. var iframeInfo = objectUtils.extend({}, info);
  2105. iframeInfo.sameOrigin = true;
  2106. return transport.enabled(iframeInfo) && IframeTransport.enabled();
  2107. };
  2108. IframeWrapTransport.transportName = 'iframe-' + transport.transportName;
  2109. IframeWrapTransport.needBody = true;
  2110. IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)
  2111. IframeWrapTransport.facadeTransport = transport;
  2112. return IframeWrapTransport;
  2113. };
  2114. /***/ }),
  2115. /***/ "./node_modules/sockjs-client/lib/transport/lib/polling.js":
  2116. /*!*****************************************************************!*\
  2117. !*** ./node_modules/sockjs-client/lib/transport/lib/polling.js ***!
  2118. \*****************************************************************/
  2119. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2120. "use strict";
  2121. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2122. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2123. var debug = function debug() {};
  2124. if (true) {
  2125. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:polling');
  2126. }
  2127. function Polling(Receiver, receiveUrl, AjaxObject) {
  2128. debug(receiveUrl);
  2129. EventEmitter.call(this);
  2130. this.Receiver = Receiver;
  2131. this.receiveUrl = receiveUrl;
  2132. this.AjaxObject = AjaxObject;
  2133. this._scheduleReceiver();
  2134. }
  2135. inherits(Polling, EventEmitter);
  2136. Polling.prototype._scheduleReceiver = function () {
  2137. debug('_scheduleReceiver');
  2138. var self = this;
  2139. var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
  2140. poll.on('message', function (msg) {
  2141. debug('message', msg);
  2142. self.emit('message', msg);
  2143. });
  2144. poll.once('close', function (code, reason) {
  2145. debug('close', code, reason, self.pollIsClosing);
  2146. self.poll = poll = null;
  2147. if (!self.pollIsClosing) {
  2148. if (reason === 'network') {
  2149. self._scheduleReceiver();
  2150. } else {
  2151. self.emit('close', code || 1006, reason);
  2152. self.removeAllListeners();
  2153. }
  2154. }
  2155. });
  2156. };
  2157. Polling.prototype.abort = function () {
  2158. debug('abort');
  2159. this.removeAllListeners();
  2160. this.pollIsClosing = true;
  2161. if (this.poll) {
  2162. this.poll.abort();
  2163. }
  2164. };
  2165. module.exports = Polling;
  2166. /***/ }),
  2167. /***/ "./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js":
  2168. /*!*************************************************************************!*\
  2169. !*** ./node_modules/sockjs-client/lib/transport/lib/sender-receiver.js ***!
  2170. \*************************************************************************/
  2171. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2172. "use strict";
  2173. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2174. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2175. BufferedSender = __webpack_require__(/*! ./buffered-sender */ "./node_modules/sockjs-client/lib/transport/lib/buffered-sender.js"),
  2176. Polling = __webpack_require__(/*! ./polling */ "./node_modules/sockjs-client/lib/transport/lib/polling.js");
  2177. var debug = function debug() {};
  2178. if (true) {
  2179. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender-receiver');
  2180. }
  2181. function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
  2182. var pollUrl = urlUtils.addPath(transUrl, urlSuffix);
  2183. debug(pollUrl);
  2184. var self = this;
  2185. BufferedSender.call(this, transUrl, senderFunc);
  2186. this.poll = new Polling(Receiver, pollUrl, AjaxObject);
  2187. this.poll.on('message', function (msg) {
  2188. debug('poll message', msg);
  2189. self.emit('message', msg);
  2190. });
  2191. this.poll.once('close', function (code, reason) {
  2192. debug('poll close', code, reason);
  2193. self.poll = null;
  2194. self.emit('close', code, reason);
  2195. self.close();
  2196. });
  2197. }
  2198. inherits(SenderReceiver, BufferedSender);
  2199. SenderReceiver.prototype.close = function () {
  2200. BufferedSender.prototype.close.call(this);
  2201. debug('close');
  2202. this.removeAllListeners();
  2203. if (this.poll) {
  2204. this.poll.abort();
  2205. this.poll = null;
  2206. }
  2207. };
  2208. module.exports = SenderReceiver;
  2209. /***/ }),
  2210. /***/ "./node_modules/sockjs-client/lib/transport/receiver/eventsource.js":
  2211. /*!**************************************************************************!*\
  2212. !*** ./node_modules/sockjs-client/lib/transport/receiver/eventsource.js ***!
  2213. \**************************************************************************/
  2214. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2215. "use strict";
  2216. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2217. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2218. EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
  2219. var debug = function debug() {};
  2220. if (true) {
  2221. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:eventsource');
  2222. }
  2223. function EventSourceReceiver(url) {
  2224. debug(url);
  2225. EventEmitter.call(this);
  2226. var self = this;
  2227. var es = this.es = new EventSourceDriver(url);
  2228. es.onmessage = function (e) {
  2229. debug('message', e.data);
  2230. self.emit('message', decodeURI(e.data));
  2231. };
  2232. es.onerror = function (e) {
  2233. debug('error', es.readyState, e); // ES on reconnection has readyState = 0 or 1.
  2234. // on network error it's CLOSED = 2
  2235. var reason = es.readyState !== 2 ? 'network' : 'permanent';
  2236. self._cleanup();
  2237. self._close(reason);
  2238. };
  2239. }
  2240. inherits(EventSourceReceiver, EventEmitter);
  2241. EventSourceReceiver.prototype.abort = function () {
  2242. debug('abort');
  2243. this._cleanup();
  2244. this._close('user');
  2245. };
  2246. EventSourceReceiver.prototype._cleanup = function () {
  2247. debug('cleanup');
  2248. var es = this.es;
  2249. if (es) {
  2250. es.onmessage = es.onerror = null;
  2251. es.close();
  2252. this.es = null;
  2253. }
  2254. };
  2255. EventSourceReceiver.prototype._close = function (reason) {
  2256. debug('close', reason);
  2257. var self = this; // Safari and chrome < 15 crash if we close window before
  2258. // waiting for ES cleanup. See:
  2259. // https://code.google.com/p/chromium/issues/detail?id=89155
  2260. setTimeout(function () {
  2261. self.emit('close', null, reason);
  2262. self.removeAllListeners();
  2263. }, 200);
  2264. };
  2265. module.exports = EventSourceReceiver;
  2266. /***/ }),
  2267. /***/ "./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js":
  2268. /*!***********************************************************************!*\
  2269. !*** ./node_modules/sockjs-client/lib/transport/receiver/htmlfile.js ***!
  2270. \***********************************************************************/
  2271. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2272. "use strict";
  2273. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2274. iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2275. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2276. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2277. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
  2278. var debug = function debug() {};
  2279. if (true) {
  2280. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:htmlfile');
  2281. }
  2282. function HtmlfileReceiver(url) {
  2283. debug(url);
  2284. EventEmitter.call(this);
  2285. var self = this;
  2286. iframeUtils.polluteGlobalNamespace();
  2287. this.id = 'a' + random.string(6);
  2288. url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));
  2289. debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);
  2290. var constructFunc = HtmlfileReceiver.htmlfileEnabled ? iframeUtils.createHtmlfile : iframeUtils.createIframe;
  2291. __webpack_require__.g[iframeUtils.WPrefix][this.id] = {
  2292. start: function start() {
  2293. debug('start');
  2294. self.iframeObj.loaded();
  2295. },
  2296. message: function message(data) {
  2297. debug('message', data);
  2298. self.emit('message', data);
  2299. },
  2300. stop: function stop() {
  2301. debug('stop');
  2302. self._cleanup();
  2303. self._close('network');
  2304. }
  2305. };
  2306. this.iframeObj = constructFunc(url, function () {
  2307. debug('callback');
  2308. self._cleanup();
  2309. self._close('permanent');
  2310. });
  2311. }
  2312. inherits(HtmlfileReceiver, EventEmitter);
  2313. HtmlfileReceiver.prototype.abort = function () {
  2314. debug('abort');
  2315. this._cleanup();
  2316. this._close('user');
  2317. };
  2318. HtmlfileReceiver.prototype._cleanup = function () {
  2319. debug('_cleanup');
  2320. if (this.iframeObj) {
  2321. this.iframeObj.cleanup();
  2322. this.iframeObj = null;
  2323. }
  2324. delete __webpack_require__.g[iframeUtils.WPrefix][this.id];
  2325. };
  2326. HtmlfileReceiver.prototype._close = function (reason) {
  2327. debug('_close', reason);
  2328. this.emit('close', null, reason);
  2329. this.removeAllListeners();
  2330. };
  2331. HtmlfileReceiver.htmlfileEnabled = false; // obfuscate to avoid firewalls
  2332. var axo = ['Active'].concat('Object').join('X');
  2333. if (axo in __webpack_require__.g) {
  2334. try {
  2335. HtmlfileReceiver.htmlfileEnabled = !!new __webpack_require__.g[axo]('htmlfile');
  2336. } catch (x) {// intentionally empty
  2337. }
  2338. }
  2339. HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;
  2340. module.exports = HtmlfileReceiver;
  2341. /***/ }),
  2342. /***/ "./node_modules/sockjs-client/lib/transport/receiver/jsonp.js":
  2343. /*!********************************************************************!*\
  2344. !*** ./node_modules/sockjs-client/lib/transport/receiver/jsonp.js ***!
  2345. \********************************************************************/
  2346. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2347. "use strict";
  2348. var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
  2349. random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2350. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2351. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2352. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2353. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2354. var debug = function debug() {};
  2355. if (true) {
  2356. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:jsonp');
  2357. }
  2358. function JsonpReceiver(url) {
  2359. debug(url);
  2360. var self = this;
  2361. EventEmitter.call(this);
  2362. utils.polluteGlobalNamespace();
  2363. this.id = 'a' + random.string(6);
  2364. var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));
  2365. __webpack_require__.g[utils.WPrefix][this.id] = this._callback.bind(this);
  2366. this._createScript(urlWithId); // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.
  2367. this.timeoutId = setTimeout(function () {
  2368. debug('timeout');
  2369. self._abort(new Error('JSONP script loaded abnormally (timeout)'));
  2370. }, JsonpReceiver.timeout);
  2371. }
  2372. inherits(JsonpReceiver, EventEmitter);
  2373. JsonpReceiver.prototype.abort = function () {
  2374. debug('abort');
  2375. if (__webpack_require__.g[utils.WPrefix][this.id]) {
  2376. var err = new Error('JSONP user aborted read');
  2377. err.code = 1000;
  2378. this._abort(err);
  2379. }
  2380. };
  2381. JsonpReceiver.timeout = 35000;
  2382. JsonpReceiver.scriptErrorTimeout = 1000;
  2383. JsonpReceiver.prototype._callback = function (data) {
  2384. debug('_callback', data);
  2385. this._cleanup();
  2386. if (this.aborting) {
  2387. return;
  2388. }
  2389. if (data) {
  2390. debug('message', data);
  2391. this.emit('message', data);
  2392. }
  2393. this.emit('close', null, 'network');
  2394. this.removeAllListeners();
  2395. };
  2396. JsonpReceiver.prototype._abort = function (err) {
  2397. debug('_abort', err);
  2398. this._cleanup();
  2399. this.aborting = true;
  2400. this.emit('close', err.code, err.message);
  2401. this.removeAllListeners();
  2402. };
  2403. JsonpReceiver.prototype._cleanup = function () {
  2404. debug('_cleanup');
  2405. clearTimeout(this.timeoutId);
  2406. if (this.script2) {
  2407. this.script2.parentNode.removeChild(this.script2);
  2408. this.script2 = null;
  2409. }
  2410. if (this.script) {
  2411. var script = this.script; // Unfortunately, you can't really abort script loading of
  2412. // the script.
  2413. script.parentNode.removeChild(script);
  2414. script.onreadystatechange = script.onerror = script.onload = script.onclick = null;
  2415. this.script = null;
  2416. }
  2417. delete __webpack_require__.g[utils.WPrefix][this.id];
  2418. };
  2419. JsonpReceiver.prototype._scriptError = function () {
  2420. debug('_scriptError');
  2421. var self = this;
  2422. if (this.errorTimer) {
  2423. return;
  2424. }
  2425. this.errorTimer = setTimeout(function () {
  2426. if (!self.loadedOkay) {
  2427. self._abort(new Error('JSONP script loaded abnormally (onerror)'));
  2428. }
  2429. }, JsonpReceiver.scriptErrorTimeout);
  2430. };
  2431. JsonpReceiver.prototype._createScript = function (url) {
  2432. debug('_createScript', url);
  2433. var self = this;
  2434. var script = this.script = __webpack_require__.g.document.createElement('script');
  2435. var script2; // Opera synchronous load trick.
  2436. script.id = 'a' + random.string(8);
  2437. script.src = url;
  2438. script.type = 'text/javascript';
  2439. script.charset = 'UTF-8';
  2440. script.onerror = this._scriptError.bind(this);
  2441. script.onload = function () {
  2442. debug('onload');
  2443. self._abort(new Error('JSONP script loaded abnormally (onload)'));
  2444. }; // IE9 fires 'error' event after onreadystatechange or before, in random order.
  2445. // Use loadedOkay to determine if actually errored
  2446. script.onreadystatechange = function () {
  2447. debug('onreadystatechange', script.readyState);
  2448. if (/loaded|closed/.test(script.readyState)) {
  2449. if (script && script.htmlFor && script.onclick) {
  2450. self.loadedOkay = true;
  2451. try {
  2452. // In IE, actually execute the script.
  2453. script.onclick();
  2454. } catch (x) {// intentionally empty
  2455. }
  2456. }
  2457. if (script) {
  2458. self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));
  2459. }
  2460. }
  2461. }; // IE: event/htmlFor/onclick trick.
  2462. // One can't rely on proper order for onreadystatechange. In order to
  2463. // make sure, set a 'htmlFor' and 'event' properties, so that
  2464. // script code will be installed as 'onclick' handler for the
  2465. // script object. Later, onreadystatechange, manually execute this
  2466. // code. FF and Chrome doesn't work with 'event' and 'htmlFor'
  2467. // set. For reference see:
  2468. // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html
  2469. // Also, read on that about script ordering:
  2470. // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
  2471. if (typeof script.async === 'undefined' && __webpack_require__.g.document.attachEvent) {
  2472. // According to mozilla docs, in recent browsers script.async defaults
  2473. // to 'true', so we may use it to detect a good browser:
  2474. // https://developer.mozilla.org/en/HTML/Element/script
  2475. if (!browser.isOpera()) {
  2476. // Naively assume we're in IE
  2477. try {
  2478. script.htmlFor = script.id;
  2479. script.event = 'onclick';
  2480. } catch (x) {// intentionally empty
  2481. }
  2482. script.async = true;
  2483. } else {
  2484. // Opera, second sync script hack
  2485. script2 = this.script2 = __webpack_require__.g.document.createElement('script');
  2486. script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};";
  2487. script.async = script2.async = false;
  2488. }
  2489. }
  2490. if (typeof script.async !== 'undefined') {
  2491. script.async = true;
  2492. }
  2493. var head = __webpack_require__.g.document.getElementsByTagName('head')[0];
  2494. head.insertBefore(script, head.firstChild);
  2495. if (script2) {
  2496. head.insertBefore(script2, head.firstChild);
  2497. }
  2498. };
  2499. module.exports = JsonpReceiver;
  2500. /***/ }),
  2501. /***/ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js":
  2502. /*!******************************************************************!*\
  2503. !*** ./node_modules/sockjs-client/lib/transport/receiver/xhr.js ***!
  2504. \******************************************************************/
  2505. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2506. "use strict";
  2507. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2508. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
  2509. var debug = function debug() {};
  2510. if (true) {
  2511. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:receiver:xhr');
  2512. }
  2513. function XhrReceiver(url, AjaxObject) {
  2514. debug(url);
  2515. EventEmitter.call(this);
  2516. var self = this;
  2517. this.bufferPosition = 0;
  2518. this.xo = new AjaxObject('POST', url, null);
  2519. this.xo.on('chunk', this._chunkHandler.bind(this));
  2520. this.xo.once('finish', function (status, text) {
  2521. debug('finish', status, text);
  2522. self._chunkHandler(status, text);
  2523. self.xo = null;
  2524. var reason = status === 200 ? 'network' : 'permanent';
  2525. debug('close', reason);
  2526. self.emit('close', null, reason);
  2527. self._cleanup();
  2528. });
  2529. }
  2530. inherits(XhrReceiver, EventEmitter);
  2531. XhrReceiver.prototype._chunkHandler = function (status, text) {
  2532. debug('_chunkHandler', status);
  2533. if (status !== 200 || !text) {
  2534. return;
  2535. }
  2536. for (var idx = -1;; this.bufferPosition += idx + 1) {
  2537. var buf = text.slice(this.bufferPosition);
  2538. idx = buf.indexOf('\n');
  2539. if (idx === -1) {
  2540. break;
  2541. }
  2542. var msg = buf.slice(0, idx);
  2543. if (msg) {
  2544. debug('message', msg);
  2545. this.emit('message', msg);
  2546. }
  2547. }
  2548. };
  2549. XhrReceiver.prototype._cleanup = function () {
  2550. debug('_cleanup');
  2551. this.removeAllListeners();
  2552. };
  2553. XhrReceiver.prototype.abort = function () {
  2554. debug('abort');
  2555. if (this.xo) {
  2556. this.xo.close();
  2557. debug('close');
  2558. this.emit('close', null, 'user');
  2559. this.xo = null;
  2560. }
  2561. this._cleanup();
  2562. };
  2563. module.exports = XhrReceiver;
  2564. /***/ }),
  2565. /***/ "./node_modules/sockjs-client/lib/transport/sender/jsonp.js":
  2566. /*!******************************************************************!*\
  2567. !*** ./node_modules/sockjs-client/lib/transport/sender/jsonp.js ***!
  2568. \******************************************************************/
  2569. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2570. "use strict";
  2571. var random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js"),
  2572. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2573. var debug = function debug() {};
  2574. if (true) {
  2575. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:jsonp');
  2576. }
  2577. var form, area;
  2578. function createIframe(id) {
  2579. debug('createIframe', id);
  2580. try {
  2581. // ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
  2582. return __webpack_require__.g.document.createElement('<iframe name="' + id + '">');
  2583. } catch (x) {
  2584. var iframe = __webpack_require__.g.document.createElement('iframe');
  2585. iframe.name = id;
  2586. return iframe;
  2587. }
  2588. }
  2589. function createForm() {
  2590. debug('createForm');
  2591. form = __webpack_require__.g.document.createElement('form');
  2592. form.style.display = 'none';
  2593. form.style.position = 'absolute';
  2594. form.method = 'POST';
  2595. form.enctype = 'application/x-www-form-urlencoded';
  2596. form.acceptCharset = 'UTF-8';
  2597. area = __webpack_require__.g.document.createElement('textarea');
  2598. area.name = 'd';
  2599. form.appendChild(area);
  2600. __webpack_require__.g.document.body.appendChild(form);
  2601. }
  2602. module.exports = function (url, payload, callback) {
  2603. debug(url, payload);
  2604. if (!form) {
  2605. createForm();
  2606. }
  2607. var id = 'a' + random.string(8);
  2608. form.target = id;
  2609. form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);
  2610. var iframe = createIframe(id);
  2611. iframe.id = id;
  2612. iframe.style.display = 'none';
  2613. form.appendChild(iframe);
  2614. try {
  2615. area.value = payload;
  2616. } catch (e) {// seriously broken browsers get here
  2617. }
  2618. form.submit();
  2619. var completed = function completed(err) {
  2620. debug('completed', id, err);
  2621. if (!iframe.onerror) {
  2622. return;
  2623. }
  2624. iframe.onreadystatechange = iframe.onerror = iframe.onload = null; // Opera mini doesn't like if we GC iframe
  2625. // immediately, thus this timeout.
  2626. setTimeout(function () {
  2627. debug('cleaning up', id);
  2628. iframe.parentNode.removeChild(iframe);
  2629. iframe = null;
  2630. }, 500);
  2631. area.value = ''; // It is not possible to detect if the iframe succeeded or
  2632. // failed to submit our form.
  2633. callback(err);
  2634. };
  2635. iframe.onerror = function () {
  2636. debug('onerror', id);
  2637. completed();
  2638. };
  2639. iframe.onload = function () {
  2640. debug('onload', id);
  2641. completed();
  2642. };
  2643. iframe.onreadystatechange = function (e) {
  2644. debug('onreadystatechange', id, iframe.readyState, e);
  2645. if (iframe.readyState === 'complete') {
  2646. completed();
  2647. }
  2648. };
  2649. return function () {
  2650. debug('aborted', id);
  2651. completed(new Error('Aborted'));
  2652. };
  2653. };
  2654. /***/ }),
  2655. /***/ "./node_modules/sockjs-client/lib/transport/sender/xdr.js":
  2656. /*!****************************************************************!*\
  2657. !*** ./node_modules/sockjs-client/lib/transport/sender/xdr.js ***!
  2658. \****************************************************************/
  2659. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2660. "use strict";
  2661. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2662. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2663. eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2664. browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
  2665. urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js");
  2666. var debug = function debug() {};
  2667. if (true) {
  2668. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:sender:xdr');
  2669. } // References:
  2670. // http://ajaxian.com/archives/100-line-ajax-wrapper
  2671. // http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx
  2672. function XDRObject(method, url, payload) {
  2673. debug(method, url);
  2674. var self = this;
  2675. EventEmitter.call(this);
  2676. setTimeout(function () {
  2677. self._start(method, url, payload);
  2678. }, 0);
  2679. }
  2680. inherits(XDRObject, EventEmitter);
  2681. XDRObject.prototype._start = function (method, url, payload) {
  2682. debug('_start');
  2683. var self = this;
  2684. var xdr = new __webpack_require__.g.XDomainRequest(); // IE caches even POSTs
  2685. url = urlUtils.addQuery(url, 't=' + +new Date());
  2686. xdr.onerror = function () {
  2687. debug('onerror');
  2688. self._error();
  2689. };
  2690. xdr.ontimeout = function () {
  2691. debug('ontimeout');
  2692. self._error();
  2693. };
  2694. xdr.onprogress = function () {
  2695. debug('progress', xdr.responseText);
  2696. self.emit('chunk', 200, xdr.responseText);
  2697. };
  2698. xdr.onload = function () {
  2699. debug('load');
  2700. self.emit('finish', 200, xdr.responseText);
  2701. self._cleanup(false);
  2702. };
  2703. this.xdr = xdr;
  2704. this.unloadRef = eventUtils.unloadAdd(function () {
  2705. self._cleanup(true);
  2706. });
  2707. try {
  2708. // Fails with AccessDenied if port number is bogus
  2709. this.xdr.open(method, url);
  2710. if (this.timeout) {
  2711. this.xdr.timeout = this.timeout;
  2712. }
  2713. this.xdr.send(payload);
  2714. } catch (x) {
  2715. this._error();
  2716. }
  2717. };
  2718. XDRObject.prototype._error = function () {
  2719. this.emit('finish', 0, '');
  2720. this._cleanup(false);
  2721. };
  2722. XDRObject.prototype._cleanup = function (abort) {
  2723. debug('cleanup', abort);
  2724. if (!this.xdr) {
  2725. return;
  2726. }
  2727. this.removeAllListeners();
  2728. eventUtils.unloadDel(this.unloadRef);
  2729. this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;
  2730. if (abort) {
  2731. try {
  2732. this.xdr.abort();
  2733. } catch (x) {// intentionally empty
  2734. }
  2735. }
  2736. this.unloadRef = this.xdr = null;
  2737. };
  2738. XDRObject.prototype.close = function () {
  2739. debug('close');
  2740. this._cleanup(true);
  2741. }; // IE 8/9 if the request target uses the same scheme - #79
  2742. XDRObject.enabled = !!(__webpack_require__.g.XDomainRequest && browser.hasDomain());
  2743. module.exports = XDRObject;
  2744. /***/ }),
  2745. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js":
  2746. /*!*********************************************************************!*\
  2747. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js ***!
  2748. \*********************************************************************/
  2749. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2750. "use strict";
  2751. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2752. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2753. function XHRCorsObject(method, url, payload, opts) {
  2754. XhrDriver.call(this, method, url, payload, opts);
  2755. }
  2756. inherits(XHRCorsObject, XhrDriver);
  2757. XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
  2758. module.exports = XHRCorsObject;
  2759. /***/ }),
  2760. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js":
  2761. /*!*********************************************************************!*\
  2762. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-fake.js ***!
  2763. \*********************************************************************/
  2764. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2765. "use strict";
  2766. var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2767. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
  2768. function
  2769. /* method, url, payload, opts */
  2770. XHRFake() {
  2771. var self = this;
  2772. EventEmitter.call(this);
  2773. this.to = setTimeout(function () {
  2774. self.emit('finish', 200, '{}');
  2775. }, XHRFake.timeout);
  2776. }
  2777. inherits(XHRFake, EventEmitter);
  2778. XHRFake.prototype.close = function () {
  2779. clearTimeout(this.to);
  2780. };
  2781. XHRFake.timeout = 2000;
  2782. module.exports = XHRFake;
  2783. /***/ }),
  2784. /***/ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js":
  2785. /*!**********************************************************************!*\
  2786. !*** ./node_modules/sockjs-client/lib/transport/sender/xhr-local.js ***!
  2787. \**********************************************************************/
  2788. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2789. "use strict";
  2790. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2791. XhrDriver = __webpack_require__(/*! ../driver/xhr */ "./node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js");
  2792. function XHRLocalObject(method, url, payload
  2793. /*, opts */
  2794. ) {
  2795. XhrDriver.call(this, method, url, payload, {
  2796. noCredentials: true
  2797. });
  2798. }
  2799. inherits(XHRLocalObject, XhrDriver);
  2800. XHRLocalObject.enabled = XhrDriver.enabled;
  2801. module.exports = XHRLocalObject;
  2802. /***/ }),
  2803. /***/ "./node_modules/sockjs-client/lib/transport/websocket.js":
  2804. /*!***************************************************************!*\
  2805. !*** ./node_modules/sockjs-client/lib/transport/websocket.js ***!
  2806. \***************************************************************/
  2807. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2808. "use strict";
  2809. var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  2810. urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
  2811. inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2812. EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
  2813. WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js");
  2814. var debug = function debug() {};
  2815. if (true) {
  2816. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:websocket');
  2817. }
  2818. function WebSocketTransport(transUrl, ignore, options) {
  2819. if (!WebSocketTransport.enabled()) {
  2820. throw new Error('Transport created when disabled');
  2821. }
  2822. EventEmitter.call(this);
  2823. debug('constructor', transUrl);
  2824. var self = this;
  2825. var url = urlUtils.addPath(transUrl, '/websocket');
  2826. if (url.slice(0, 5) === 'https') {
  2827. url = 'wss' + url.slice(5);
  2828. } else {
  2829. url = 'ws' + url.slice(4);
  2830. }
  2831. this.url = url;
  2832. this.ws = new WebsocketDriver(this.url, [], options);
  2833. this.ws.onmessage = function (e) {
  2834. debug('message event', e.data);
  2835. self.emit('message', e.data);
  2836. }; // Firefox has an interesting bug. If a websocket connection is
  2837. // created after onunload, it stays alive even when user
  2838. // navigates away from the page. In such situation let's lie -
  2839. // let's not open the ws connection at all. See:
  2840. // https://github.com/sockjs/sockjs-client/issues/28
  2841. // https://bugzilla.mozilla.org/show_bug.cgi?id=696085
  2842. this.unloadRef = utils.unloadAdd(function () {
  2843. debug('unload');
  2844. self.ws.close();
  2845. });
  2846. this.ws.onclose = function (e) {
  2847. debug('close event', e.code, e.reason);
  2848. self.emit('close', e.code, e.reason);
  2849. self._cleanup();
  2850. };
  2851. this.ws.onerror = function (e) {
  2852. debug('error event', e);
  2853. self.emit('close', 1006, 'WebSocket connection broken');
  2854. self._cleanup();
  2855. };
  2856. }
  2857. inherits(WebSocketTransport, EventEmitter);
  2858. WebSocketTransport.prototype.send = function (data) {
  2859. var msg = '[' + data + ']';
  2860. debug('send', msg);
  2861. this.ws.send(msg);
  2862. };
  2863. WebSocketTransport.prototype.close = function () {
  2864. debug('close');
  2865. var ws = this.ws;
  2866. this._cleanup();
  2867. if (ws) {
  2868. ws.close();
  2869. }
  2870. };
  2871. WebSocketTransport.prototype._cleanup = function () {
  2872. debug('_cleanup');
  2873. var ws = this.ws;
  2874. if (ws) {
  2875. ws.onmessage = ws.onclose = ws.onerror = null;
  2876. }
  2877. utils.unloadDel(this.unloadRef);
  2878. this.unloadRef = this.ws = null;
  2879. this.removeAllListeners();
  2880. };
  2881. WebSocketTransport.enabled = function () {
  2882. debug('enabled');
  2883. return !!WebsocketDriver;
  2884. };
  2885. WebSocketTransport.transportName = 'websocket'; // In theory, ws should require 1 round trip. But in chrome, this is
  2886. // not very stable over SSL. Most likely a ws connection requires a
  2887. // separate SSL connection, in which case 2 round trips are an
  2888. // absolute minumum.
  2889. WebSocketTransport.roundTrips = 2;
  2890. module.exports = WebSocketTransport;
  2891. /***/ }),
  2892. /***/ "./node_modules/sockjs-client/lib/transport/xdr-polling.js":
  2893. /*!*****************************************************************!*\
  2894. !*** ./node_modules/sockjs-client/lib/transport/xdr-polling.js ***!
  2895. \*****************************************************************/
  2896. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2897. "use strict";
  2898. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2899. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2900. XdrStreamingTransport = __webpack_require__(/*! ./xdr-streaming */ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js"),
  2901. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2902. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js");
  2903. function XdrPollingTransport(transUrl) {
  2904. if (!XDRObject.enabled) {
  2905. throw new Error('Transport created when disabled');
  2906. }
  2907. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
  2908. }
  2909. inherits(XdrPollingTransport, AjaxBasedTransport);
  2910. XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
  2911. XdrPollingTransport.transportName = 'xdr-polling';
  2912. XdrPollingTransport.roundTrips = 2; // preflight, ajax
  2913. module.exports = XdrPollingTransport;
  2914. /***/ }),
  2915. /***/ "./node_modules/sockjs-client/lib/transport/xdr-streaming.js":
  2916. /*!*******************************************************************!*\
  2917. !*** ./node_modules/sockjs-client/lib/transport/xdr-streaming.js ***!
  2918. \*******************************************************************/
  2919. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2920. "use strict";
  2921. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2922. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2923. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2924. XDRObject = __webpack_require__(/*! ./sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js"); // According to:
  2925. // http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
  2926. // http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
  2927. function XdrStreamingTransport(transUrl) {
  2928. if (!XDRObject.enabled) {
  2929. throw new Error('Transport created when disabled');
  2930. }
  2931. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
  2932. }
  2933. inherits(XdrStreamingTransport, AjaxBasedTransport);
  2934. XdrStreamingTransport.enabled = function (info) {
  2935. if (info.cookie_needed || info.nullOrigin) {
  2936. return false;
  2937. }
  2938. return XDRObject.enabled && info.sameScheme;
  2939. };
  2940. XdrStreamingTransport.transportName = 'xdr-streaming';
  2941. XdrStreamingTransport.roundTrips = 2; // preflight, ajax
  2942. module.exports = XdrStreamingTransport;
  2943. /***/ }),
  2944. /***/ "./node_modules/sockjs-client/lib/transport/xhr-polling.js":
  2945. /*!*****************************************************************!*\
  2946. !*** ./node_modules/sockjs-client/lib/transport/xhr-polling.js ***!
  2947. \*****************************************************************/
  2948. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2949. "use strict";
  2950. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2951. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2952. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2953. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  2954. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js");
  2955. function XhrPollingTransport(transUrl) {
  2956. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  2957. throw new Error('Transport created when disabled');
  2958. }
  2959. AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
  2960. }
  2961. inherits(XhrPollingTransport, AjaxBasedTransport);
  2962. XhrPollingTransport.enabled = function (info) {
  2963. if (info.nullOrigin) {
  2964. return false;
  2965. }
  2966. if (XHRLocalObject.enabled && info.sameOrigin) {
  2967. return true;
  2968. }
  2969. return XHRCorsObject.enabled;
  2970. };
  2971. XhrPollingTransport.transportName = 'xhr-polling';
  2972. XhrPollingTransport.roundTrips = 2; // preflight, ajax
  2973. module.exports = XhrPollingTransport;
  2974. /***/ }),
  2975. /***/ "./node_modules/sockjs-client/lib/transport/xhr-streaming.js":
  2976. /*!*******************************************************************!*\
  2977. !*** ./node_modules/sockjs-client/lib/transport/xhr-streaming.js ***!
  2978. \*******************************************************************/
  2979. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2980. "use strict";
  2981. var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
  2982. AjaxBasedTransport = __webpack_require__(/*! ./lib/ajax-based */ "./node_modules/sockjs-client/lib/transport/lib/ajax-based.js"),
  2983. XhrReceiver = __webpack_require__(/*! ./receiver/xhr */ "./node_modules/sockjs-client/lib/transport/receiver/xhr.js"),
  2984. XHRCorsObject = __webpack_require__(/*! ./sender/xhr-cors */ "./node_modules/sockjs-client/lib/transport/sender/xhr-cors.js"),
  2985. XHRLocalObject = __webpack_require__(/*! ./sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
  2986. browser = __webpack_require__(/*! ../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  2987. function XhrStreamingTransport(transUrl) {
  2988. if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
  2989. throw new Error('Transport created when disabled');
  2990. }
  2991. AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
  2992. }
  2993. inherits(XhrStreamingTransport, AjaxBasedTransport);
  2994. XhrStreamingTransport.enabled = function (info) {
  2995. if (info.nullOrigin) {
  2996. return false;
  2997. } // Opera doesn't support xhr-streaming #60
  2998. // But it might be able to #92
  2999. if (browser.isOpera()) {
  3000. return false;
  3001. }
  3002. return XHRCorsObject.enabled;
  3003. };
  3004. XhrStreamingTransport.transportName = 'xhr-streaming';
  3005. XhrStreamingTransport.roundTrips = 2; // preflight, ajax
  3006. // Safari gets confused when a streaming ajax request is started
  3007. // before onload. This causes the load indicator to spin indefinetely.
  3008. // Only require body when used in a browser
  3009. XhrStreamingTransport.needBody = !!__webpack_require__.g.document;
  3010. module.exports = XhrStreamingTransport;
  3011. /***/ }),
  3012. /***/ "./node_modules/sockjs-client/lib/utils/browser-crypto.js":
  3013. /*!****************************************************************!*\
  3014. !*** ./node_modules/sockjs-client/lib/utils/browser-crypto.js ***!
  3015. \****************************************************************/
  3016. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3017. "use strict";
  3018. if (__webpack_require__.g.crypto && __webpack_require__.g.crypto.getRandomValues) {
  3019. module.exports.randomBytes = function (length) {
  3020. var bytes = new Uint8Array(length);
  3021. __webpack_require__.g.crypto.getRandomValues(bytes);
  3022. return bytes;
  3023. };
  3024. } else {
  3025. module.exports.randomBytes = function (length) {
  3026. var bytes = new Array(length);
  3027. for (var i = 0; i < length; i++) {
  3028. bytes[i] = Math.floor(Math.random() * 256);
  3029. }
  3030. return bytes;
  3031. };
  3032. }
  3033. /***/ }),
  3034. /***/ "./node_modules/sockjs-client/lib/utils/browser.js":
  3035. /*!*********************************************************!*\
  3036. !*** ./node_modules/sockjs-client/lib/utils/browser.js ***!
  3037. \*********************************************************/
  3038. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3039. "use strict";
  3040. module.exports = {
  3041. isOpera: function isOpera() {
  3042. return __webpack_require__.g.navigator && /opera/i.test(__webpack_require__.g.navigator.userAgent);
  3043. },
  3044. isKonqueror: function isKonqueror() {
  3045. return __webpack_require__.g.navigator && /konqueror/i.test(__webpack_require__.g.navigator.userAgent);
  3046. } // #187 wrap document.domain in try/catch because of WP8 from file:///
  3047. ,
  3048. hasDomain: function hasDomain() {
  3049. // non-browser client always has a domain
  3050. if (!__webpack_require__.g.document) {
  3051. return true;
  3052. }
  3053. try {
  3054. return !!__webpack_require__.g.document.domain;
  3055. } catch (e) {
  3056. return false;
  3057. }
  3058. }
  3059. };
  3060. /***/ }),
  3061. /***/ "./node_modules/sockjs-client/lib/utils/escape.js":
  3062. /*!********************************************************!*\
  3063. !*** ./node_modules/sockjs-client/lib/utils/escape.js ***!
  3064. \********************************************************/
  3065. /***/ (function(module) {
  3066. "use strict";
  3067. // Some extra characters that Chrome gets wrong, and substitutes with
  3068. // something else on the wire.
  3069. // eslint-disable-next-line no-control-regex, no-misleading-character-class
  3070. var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,
  3071. extraLookup; // This may be quite slow, so let's delay until user actually uses bad
  3072. // characters.
  3073. var unrollLookup = function unrollLookup(escapable) {
  3074. var i;
  3075. var unrolled = {};
  3076. var c = [];
  3077. for (i = 0; i < 65536; i++) {
  3078. c.push(String.fromCharCode(i));
  3079. }
  3080. escapable.lastIndex = 0;
  3081. c.join('').replace(escapable, function (a) {
  3082. unrolled[a] = "\\u" + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
  3083. return '';
  3084. });
  3085. escapable.lastIndex = 0;
  3086. return unrolled;
  3087. }; // Quote string, also taking care of unicode characters that browsers
  3088. // often break. Especially, take care of unicode surrogates:
  3089. // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates
  3090. module.exports = {
  3091. quote: function quote(string) {
  3092. var quoted = JSON.stringify(string); // In most cases this should be very fast and good enough.
  3093. extraEscapable.lastIndex = 0;
  3094. if (!extraEscapable.test(quoted)) {
  3095. return quoted;
  3096. }
  3097. if (!extraLookup) {
  3098. extraLookup = unrollLookup(extraEscapable);
  3099. }
  3100. return quoted.replace(extraEscapable, function (a) {
  3101. return extraLookup[a];
  3102. });
  3103. }
  3104. };
  3105. /***/ }),
  3106. /***/ "./node_modules/sockjs-client/lib/utils/event.js":
  3107. /*!*******************************************************!*\
  3108. !*** ./node_modules/sockjs-client/lib/utils/event.js ***!
  3109. \*******************************************************/
  3110. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3111. "use strict";
  3112. var random = __webpack_require__(/*! ./random */ "./node_modules/sockjs-client/lib/utils/random.js");
  3113. var onUnload = {},
  3114. afterUnload = false // detect google chrome packaged apps because they don't allow the 'unload' event
  3115. ,
  3116. isChromePackagedApp = __webpack_require__.g.chrome && __webpack_require__.g.chrome.app && __webpack_require__.g.chrome.app.runtime;
  3117. module.exports = {
  3118. attachEvent: function attachEvent(event, listener) {
  3119. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3120. __webpack_require__.g.addEventListener(event, listener, false);
  3121. } else if (__webpack_require__.g.document && __webpack_require__.g.attachEvent) {
  3122. // IE quirks.
  3123. // According to: http://stevesouders.com/misc/test-postmessage.php
  3124. // the message gets delivered only to 'document', not 'window'.
  3125. __webpack_require__.g.document.attachEvent('on' + event, listener); // I get 'window' for ie8.
  3126. __webpack_require__.g.attachEvent('on' + event, listener);
  3127. }
  3128. },
  3129. detachEvent: function detachEvent(event, listener) {
  3130. if (typeof __webpack_require__.g.addEventListener !== 'undefined') {
  3131. __webpack_require__.g.removeEventListener(event, listener, false);
  3132. } else if (__webpack_require__.g.document && __webpack_require__.g.detachEvent) {
  3133. __webpack_require__.g.document.detachEvent('on' + event, listener);
  3134. __webpack_require__.g.detachEvent('on' + event, listener);
  3135. }
  3136. },
  3137. unloadAdd: function unloadAdd(listener) {
  3138. if (isChromePackagedApp) {
  3139. return null;
  3140. }
  3141. var ref = random.string(8);
  3142. onUnload[ref] = listener;
  3143. if (afterUnload) {
  3144. setTimeout(this.triggerUnloadCallbacks, 0);
  3145. }
  3146. return ref;
  3147. },
  3148. unloadDel: function unloadDel(ref) {
  3149. if (ref in onUnload) {
  3150. delete onUnload[ref];
  3151. }
  3152. },
  3153. triggerUnloadCallbacks: function triggerUnloadCallbacks() {
  3154. for (var ref in onUnload) {
  3155. onUnload[ref]();
  3156. delete onUnload[ref];
  3157. }
  3158. }
  3159. };
  3160. var unloadTriggered = function unloadTriggered() {
  3161. if (afterUnload) {
  3162. return;
  3163. }
  3164. afterUnload = true;
  3165. module.exports.triggerUnloadCallbacks();
  3166. }; // 'unload' alone is not reliable in opera within an iframe, but we
  3167. // can't use `beforeunload` as IE fires it on javascript: links.
  3168. if (!isChromePackagedApp) {
  3169. module.exports.attachEvent('unload', unloadTriggered);
  3170. }
  3171. /***/ }),
  3172. /***/ "./node_modules/sockjs-client/lib/utils/iframe.js":
  3173. /*!********************************************************!*\
  3174. !*** ./node_modules/sockjs-client/lib/utils/iframe.js ***!
  3175. \********************************************************/
  3176. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3177. "use strict";
  3178. var eventUtils = __webpack_require__(/*! ./event */ "./node_modules/sockjs-client/lib/utils/event.js"),
  3179. browser = __webpack_require__(/*! ./browser */ "./node_modules/sockjs-client/lib/utils/browser.js");
  3180. var debug = function debug() {};
  3181. if (true) {
  3182. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:iframe');
  3183. }
  3184. module.exports = {
  3185. WPrefix: '_jp',
  3186. currentWindowId: null,
  3187. polluteGlobalNamespace: function polluteGlobalNamespace() {
  3188. if (!(module.exports.WPrefix in __webpack_require__.g)) {
  3189. __webpack_require__.g[module.exports.WPrefix] = {};
  3190. }
  3191. },
  3192. postMessage: function postMessage(type, data) {
  3193. if (__webpack_require__.g.parent !== __webpack_require__.g) {
  3194. __webpack_require__.g.parent.postMessage(JSON.stringify({
  3195. windowId: module.exports.currentWindowId,
  3196. type: type,
  3197. data: data || ''
  3198. }), '*');
  3199. } else {
  3200. debug('Cannot postMessage, no parent window.', type, data);
  3201. }
  3202. },
  3203. createIframe: function createIframe(iframeUrl, errorCallback) {
  3204. var iframe = __webpack_require__.g.document.createElement('iframe');
  3205. var tref, unloadRef;
  3206. var unattach = function unattach() {
  3207. debug('unattach');
  3208. clearTimeout(tref); // Explorer had problems with that.
  3209. try {
  3210. iframe.onload = null;
  3211. } catch (x) {// intentionally empty
  3212. }
  3213. iframe.onerror = null;
  3214. };
  3215. var cleanup = function cleanup() {
  3216. debug('cleanup');
  3217. if (iframe) {
  3218. unattach(); // This timeout makes chrome fire onbeforeunload event
  3219. // within iframe. Without the timeout it goes straight to
  3220. // onunload.
  3221. setTimeout(function () {
  3222. if (iframe) {
  3223. iframe.parentNode.removeChild(iframe);
  3224. }
  3225. iframe = null;
  3226. }, 0);
  3227. eventUtils.unloadDel(unloadRef);
  3228. }
  3229. };
  3230. var onerror = function onerror(err) {
  3231. debug('onerror', err);
  3232. if (iframe) {
  3233. cleanup();
  3234. errorCallback(err);
  3235. }
  3236. };
  3237. var post = function post(msg, origin) {
  3238. debug('post', msg, origin);
  3239. setTimeout(function () {
  3240. try {
  3241. // When the iframe is not loaded, IE raises an exception
  3242. // on 'contentWindow'.
  3243. if (iframe && iframe.contentWindow) {
  3244. iframe.contentWindow.postMessage(msg, origin);
  3245. }
  3246. } catch (x) {// intentionally empty
  3247. }
  3248. }, 0);
  3249. };
  3250. iframe.src = iframeUrl;
  3251. iframe.style.display = 'none';
  3252. iframe.style.position = 'absolute';
  3253. iframe.onerror = function () {
  3254. onerror('onerror');
  3255. };
  3256. iframe.onload = function () {
  3257. debug('onload'); // `onload` is triggered before scripts on the iframe are
  3258. // executed. Give it few seconds to actually load stuff.
  3259. clearTimeout(tref);
  3260. tref = setTimeout(function () {
  3261. onerror('onload timeout');
  3262. }, 2000);
  3263. };
  3264. __webpack_require__.g.document.body.appendChild(iframe);
  3265. tref = setTimeout(function () {
  3266. onerror('timeout');
  3267. }, 15000);
  3268. unloadRef = eventUtils.unloadAdd(cleanup);
  3269. return {
  3270. post: post,
  3271. cleanup: cleanup,
  3272. loaded: unattach
  3273. };
  3274. }
  3275. /* eslint no-undef: "off", new-cap: "off" */
  3276. ,
  3277. createHtmlfile: function createHtmlfile(iframeUrl, errorCallback) {
  3278. var axo = ['Active'].concat('Object').join('X');
  3279. var doc = new __webpack_require__.g[axo]('htmlfile');
  3280. var tref, unloadRef;
  3281. var iframe;
  3282. var unattach = function unattach() {
  3283. clearTimeout(tref);
  3284. iframe.onerror = null;
  3285. };
  3286. var cleanup = function cleanup() {
  3287. if (doc) {
  3288. unattach();
  3289. eventUtils.unloadDel(unloadRef);
  3290. iframe.parentNode.removeChild(iframe);
  3291. iframe = doc = null;
  3292. CollectGarbage();
  3293. }
  3294. };
  3295. var onerror = function onerror(r) {
  3296. debug('onerror', r);
  3297. if (doc) {
  3298. cleanup();
  3299. errorCallback(r);
  3300. }
  3301. };
  3302. var post = function post(msg, origin) {
  3303. try {
  3304. // When the iframe is not loaded, IE raises an exception
  3305. // on 'contentWindow'.
  3306. setTimeout(function () {
  3307. if (iframe && iframe.contentWindow) {
  3308. iframe.contentWindow.postMessage(msg, origin);
  3309. }
  3310. }, 0);
  3311. } catch (x) {// intentionally empty
  3312. }
  3313. };
  3314. doc.open();
  3315. doc.write('<html><s' + 'cript>' + 'document.domain="' + __webpack_require__.g.document.domain + '";' + '</s' + 'cript></html>');
  3316. doc.close();
  3317. doc.parentWindow[module.exports.WPrefix] = __webpack_require__.g[module.exports.WPrefix];
  3318. var c = doc.createElement('div');
  3319. doc.body.appendChild(c);
  3320. iframe = doc.createElement('iframe');
  3321. c.appendChild(iframe);
  3322. iframe.src = iframeUrl;
  3323. iframe.onerror = function () {
  3324. onerror('onerror');
  3325. };
  3326. tref = setTimeout(function () {
  3327. onerror('timeout');
  3328. }, 15000);
  3329. unloadRef = eventUtils.unloadAdd(cleanup);
  3330. return {
  3331. post: post,
  3332. cleanup: cleanup,
  3333. loaded: unattach
  3334. };
  3335. }
  3336. };
  3337. module.exports.iframeEnabled = false;
  3338. if (__webpack_require__.g.document) {
  3339. // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with
  3340. // huge delay, or not at all.
  3341. module.exports.iframeEnabled = (typeof __webpack_require__.g.postMessage === 'function' || typeof __webpack_require__.g.postMessage === 'object') && !browser.isKonqueror();
  3342. }
  3343. /***/ }),
  3344. /***/ "./node_modules/sockjs-client/lib/utils/log.js":
  3345. /*!*****************************************************!*\
  3346. !*** ./node_modules/sockjs-client/lib/utils/log.js ***!
  3347. \*****************************************************/
  3348. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3349. "use strict";
  3350. var logObject = {};
  3351. ['log', 'debug', 'warn'].forEach(function (level) {
  3352. var levelExists;
  3353. try {
  3354. levelExists = __webpack_require__.g.console && __webpack_require__.g.console[level] && __webpack_require__.g.console[level].apply;
  3355. } catch (e) {// do nothing
  3356. }
  3357. logObject[level] = levelExists ? function () {
  3358. return __webpack_require__.g.console[level].apply(__webpack_require__.g.console, arguments);
  3359. } : level === 'log' ? function () {} : logObject.log;
  3360. });
  3361. module.exports = logObject;
  3362. /***/ }),
  3363. /***/ "./node_modules/sockjs-client/lib/utils/object.js":
  3364. /*!********************************************************!*\
  3365. !*** ./node_modules/sockjs-client/lib/utils/object.js ***!
  3366. \********************************************************/
  3367. /***/ (function(module) {
  3368. "use strict";
  3369. module.exports = {
  3370. isObject: function isObject(obj) {
  3371. var type = typeof obj;
  3372. return type === 'function' || type === 'object' && !!obj;
  3373. },
  3374. extend: function extend(obj) {
  3375. if (!this.isObject(obj)) {
  3376. return obj;
  3377. }
  3378. var source, prop;
  3379. for (var i = 1, length = arguments.length; i < length; i++) {
  3380. source = arguments[i];
  3381. for (prop in source) {
  3382. if (Object.prototype.hasOwnProperty.call(source, prop)) {
  3383. obj[prop] = source[prop];
  3384. }
  3385. }
  3386. }
  3387. return obj;
  3388. }
  3389. };
  3390. /***/ }),
  3391. /***/ "./node_modules/sockjs-client/lib/utils/random.js":
  3392. /*!********************************************************!*\
  3393. !*** ./node_modules/sockjs-client/lib/utils/random.js ***!
  3394. \********************************************************/
  3395. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3396. "use strict";
  3397. var crypto = __webpack_require__(/*! crypto */ "./node_modules/sockjs-client/lib/utils/browser-crypto.js"); // This string has length 32, a power of 2, so the modulus doesn't introduce a
  3398. // bias.
  3399. var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';
  3400. module.exports = {
  3401. string: function string(length) {
  3402. var max = _randomStringChars.length;
  3403. var bytes = crypto.randomBytes(length);
  3404. var ret = [];
  3405. for (var i = 0; i < length; i++) {
  3406. ret.push(_randomStringChars.substr(bytes[i] % max, 1));
  3407. }
  3408. return ret.join('');
  3409. },
  3410. number: function number(max) {
  3411. return Math.floor(Math.random() * max);
  3412. },
  3413. numberString: function numberString(max) {
  3414. var t = ('' + (max - 1)).length;
  3415. var p = new Array(t + 1).join('0');
  3416. return (p + this.number(max)).slice(-t);
  3417. }
  3418. };
  3419. /***/ }),
  3420. /***/ "./node_modules/sockjs-client/lib/utils/transport.js":
  3421. /*!***********************************************************!*\
  3422. !*** ./node_modules/sockjs-client/lib/utils/transport.js ***!
  3423. \***********************************************************/
  3424. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3425. "use strict";
  3426. var debug = function debug() {};
  3427. if (true) {
  3428. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:transport');
  3429. }
  3430. module.exports = function (availableTransports) {
  3431. return {
  3432. filterToEnabled: function filterToEnabled(transportsWhitelist, info) {
  3433. var transports = {
  3434. main: [],
  3435. facade: []
  3436. };
  3437. if (!transportsWhitelist) {
  3438. transportsWhitelist = [];
  3439. } else if (typeof transportsWhitelist === 'string') {
  3440. transportsWhitelist = [transportsWhitelist];
  3441. }
  3442. availableTransports.forEach(function (trans) {
  3443. if (!trans) {
  3444. return;
  3445. }
  3446. if (trans.transportName === 'websocket' && info.websocket === false) {
  3447. debug('disabled from server', 'websocket');
  3448. return;
  3449. }
  3450. if (transportsWhitelist.length && transportsWhitelist.indexOf(trans.transportName) === -1) {
  3451. debug('not in whitelist', trans.transportName);
  3452. return;
  3453. }
  3454. if (trans.enabled(info)) {
  3455. debug('enabled', trans.transportName);
  3456. transports.main.push(trans);
  3457. if (trans.facadeTransport) {
  3458. transports.facade.push(trans.facadeTransport);
  3459. }
  3460. } else {
  3461. debug('disabled', trans.transportName);
  3462. }
  3463. });
  3464. return transports;
  3465. }
  3466. };
  3467. };
  3468. /***/ }),
  3469. /***/ "./node_modules/sockjs-client/lib/utils/url.js":
  3470. /*!*****************************************************!*\
  3471. !*** ./node_modules/sockjs-client/lib/utils/url.js ***!
  3472. \*****************************************************/
  3473. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3474. "use strict";
  3475. var URL = __webpack_require__(/*! url-parse */ "./node_modules/url-parse/index.js");
  3476. var debug = function debug() {};
  3477. if (true) {
  3478. debug = __webpack_require__(/*! debug */ "./node_modules/sockjs-client/node_modules/debug/src/browser.js")('sockjs-client:utils:url');
  3479. }
  3480. module.exports = {
  3481. getOrigin: function getOrigin(url) {
  3482. if (!url) {
  3483. return null;
  3484. }
  3485. var p = new URL(url);
  3486. if (p.protocol === 'file:') {
  3487. return null;
  3488. }
  3489. var port = p.port;
  3490. if (!port) {
  3491. port = p.protocol === 'https:' ? '443' : '80';
  3492. }
  3493. return p.protocol + '//' + p.hostname + ':' + port;
  3494. },
  3495. isOriginEqual: function isOriginEqual(a, b) {
  3496. var res = this.getOrigin(a) === this.getOrigin(b);
  3497. debug('same', a, b, res);
  3498. return res;
  3499. },
  3500. isSchemeEqual: function isSchemeEqual(a, b) {
  3501. return a.split(':')[0] === b.split(':')[0];
  3502. },
  3503. addPath: function addPath(url, path) {
  3504. var qs = url.split('?');
  3505. return qs[0] + path + (qs[1] ? '?' + qs[1] : '');
  3506. },
  3507. addQuery: function addQuery(url, q) {
  3508. return url + (url.indexOf('?') === -1 ? '?' + q : '&' + q);
  3509. },
  3510. isLoopbackAddr: function isLoopbackAddr(addr) {
  3511. return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^\[::1\]$/.test(addr);
  3512. }
  3513. };
  3514. /***/ }),
  3515. /***/ "./node_modules/sockjs-client/lib/version.js":
  3516. /*!***************************************************!*\
  3517. !*** ./node_modules/sockjs-client/lib/version.js ***!
  3518. \***************************************************/
  3519. /***/ (function(module) {
  3520. module.exports = '1.6.0';
  3521. /***/ }),
  3522. /***/ "./node_modules/sockjs-client/node_modules/debug/src/browser.js":
  3523. /*!**********************************************************************!*\
  3524. !*** ./node_modules/sockjs-client/node_modules/debug/src/browser.js ***!
  3525. \**********************************************************************/
  3526. /***/ (function(module, exports, __webpack_require__) {
  3527. "use strict";
  3528. function _typeof(obj) {
  3529. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  3530. _typeof = function _typeof(obj) {
  3531. return typeof obj;
  3532. };
  3533. } else {
  3534. _typeof = function _typeof(obj) {
  3535. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  3536. };
  3537. }
  3538. return _typeof(obj);
  3539. }
  3540. /* eslint-env browser */
  3541. /**
  3542. * This is the web browser implementation of `debug()`.
  3543. */
  3544. exports.log = log;
  3545. exports.formatArgs = formatArgs;
  3546. exports.save = save;
  3547. exports.load = load;
  3548. exports.useColors = useColors;
  3549. exports.storage = localstorage();
  3550. /**
  3551. * Colors.
  3552. */
  3553. exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
  3554. /**
  3555. * Currently only WebKit-based Web Inspectors, Firefox >= v31,
  3556. * and the Firebug extension (any Firefox version) are known
  3557. * to support "%c" CSS customizations.
  3558. *
  3559. * TODO: add a `localStorage` variable to explicitly enable/disable colors
  3560. */
  3561. // eslint-disable-next-line complexity
  3562. function useColors() {
  3563. // NB: In an Electron preload script, document will be defined but not fully
  3564. // initialized. Since we know we're in Chrome, we'll just detect this case
  3565. // explicitly
  3566. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  3567. return true;
  3568. } // Internet Explorer and Edge do not support colors.
  3569. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  3570. return false;
  3571. } // Is webkit? http://stackoverflow.com/a/16459606/376773
  3572. // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
  3573. return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
  3574. typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
  3575. // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  3576. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
  3577. typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  3578. }
  3579. /**
  3580. * Colorize log arguments if enabled.
  3581. *
  3582. * @api public
  3583. */
  3584. function formatArgs(args) {
  3585. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  3586. if (!this.useColors) {
  3587. return;
  3588. }
  3589. var c = 'color: ' + this.color;
  3590. args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
  3591. // arguments passed either before or after the %c, so we need to
  3592. // figure out the correct index to insert the CSS into
  3593. var index = 0;
  3594. var lastC = 0;
  3595. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  3596. if (match === '%%') {
  3597. return;
  3598. }
  3599. index++;
  3600. if (match === '%c') {
  3601. // We only are interested in the *last* %c
  3602. // (the user may have provided their own)
  3603. lastC = index;
  3604. }
  3605. });
  3606. args.splice(lastC, 0, c);
  3607. }
  3608. /**
  3609. * Invokes `console.log()` when available.
  3610. * No-op when `console.log` is not a "function".
  3611. *
  3612. * @api public
  3613. */
  3614. function log() {
  3615. var _console; // This hackery is required for IE8/9, where
  3616. // the `console.log` function doesn't have 'apply'
  3617. return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
  3618. }
  3619. /**
  3620. * Save `namespaces`.
  3621. *
  3622. * @param {String} namespaces
  3623. * @api private
  3624. */
  3625. function save(namespaces) {
  3626. try {
  3627. if (namespaces) {
  3628. exports.storage.setItem('debug', namespaces);
  3629. } else {
  3630. exports.storage.removeItem('debug');
  3631. }
  3632. } catch (error) {// Swallow
  3633. // XXX (@Qix-) should we be logging these?
  3634. }
  3635. }
  3636. /**
  3637. * Load `namespaces`.
  3638. *
  3639. * @return {String} returns the previously persisted debug modes
  3640. * @api private
  3641. */
  3642. function load() {
  3643. var r;
  3644. try {
  3645. r = exports.storage.getItem('debug');
  3646. } catch (error) {} // Swallow
  3647. // XXX (@Qix-) should we be logging these?
  3648. // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
  3649. if (!r && typeof process !== 'undefined' && 'env' in process) {
  3650. r = process.env.DEBUG;
  3651. }
  3652. return r;
  3653. }
  3654. /**
  3655. * Localstorage attempts to return the localstorage.
  3656. *
  3657. * This is necessary because safari throws
  3658. * when a user disables cookies/localstorage
  3659. * and you attempt to access it.
  3660. *
  3661. * @return {LocalStorage}
  3662. * @api private
  3663. */
  3664. function localstorage() {
  3665. try {
  3666. // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
  3667. // The Browser also has localStorage in the global context.
  3668. return localStorage;
  3669. } catch (error) {// Swallow
  3670. // XXX (@Qix-) should we be logging these?
  3671. }
  3672. }
  3673. module.exports = __webpack_require__(/*! ./common */ "./node_modules/sockjs-client/node_modules/debug/src/common.js")(exports);
  3674. var formatters = module.exports.formatters;
  3675. /**
  3676. * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
  3677. */
  3678. formatters.j = function (v) {
  3679. try {
  3680. return JSON.stringify(v);
  3681. } catch (error) {
  3682. return '[UnexpectedJSONParseError]: ' + error.message;
  3683. }
  3684. };
  3685. /***/ }),
  3686. /***/ "./node_modules/sockjs-client/node_modules/debug/src/common.js":
  3687. /*!*********************************************************************!*\
  3688. !*** ./node_modules/sockjs-client/node_modules/debug/src/common.js ***!
  3689. \*********************************************************************/
  3690. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3691. "use strict";
  3692. /**
  3693. * This is the common logic for both the Node.js and web browser
  3694. * implementations of `debug()`.
  3695. */
  3696. function setup(env) {
  3697. createDebug.debug = createDebug;
  3698. createDebug.default = createDebug;
  3699. createDebug.coerce = coerce;
  3700. createDebug.disable = disable;
  3701. createDebug.enable = enable;
  3702. createDebug.enabled = enabled;
  3703. createDebug.humanize = __webpack_require__(/*! ms */ "./node_modules/ms/index.js");
  3704. Object.keys(env).forEach(function (key) {
  3705. createDebug[key] = env[key];
  3706. });
  3707. /**
  3708. * Active `debug` instances.
  3709. */
  3710. createDebug.instances = [];
  3711. /**
  3712. * The currently active debug mode names, and names to skip.
  3713. */
  3714. createDebug.names = [];
  3715. createDebug.skips = [];
  3716. /**
  3717. * Map of special "%n" handling functions, for the debug "format" argument.
  3718. *
  3719. * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  3720. */
  3721. createDebug.formatters = {};
  3722. /**
  3723. * Selects a color for a debug namespace
  3724. * @param {String} namespace The namespace string for the for the debug instance to be colored
  3725. * @return {Number|String} An ANSI color code for the given namespace
  3726. * @api private
  3727. */
  3728. function selectColor(namespace) {
  3729. var hash = 0;
  3730. for (var i = 0; i < namespace.length; i++) {
  3731. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  3732. hash |= 0; // Convert to 32bit integer
  3733. }
  3734. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  3735. }
  3736. createDebug.selectColor = selectColor;
  3737. /**
  3738. * Create a debugger with the given `namespace`.
  3739. *
  3740. * @param {String} namespace
  3741. * @return {Function}
  3742. * @api public
  3743. */
  3744. function createDebug(namespace) {
  3745. var prevTime;
  3746. function debug() {
  3747. // Disabled?
  3748. if (!debug.enabled) {
  3749. return;
  3750. }
  3751. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3752. args[_key] = arguments[_key];
  3753. }
  3754. var self = debug; // Set `diff` timestamp
  3755. var curr = Number(new Date());
  3756. var ms = curr - (prevTime || curr);
  3757. self.diff = ms;
  3758. self.prev = prevTime;
  3759. self.curr = curr;
  3760. prevTime = curr;
  3761. args[0] = createDebug.coerce(args[0]);
  3762. if (typeof args[0] !== 'string') {
  3763. // Anything else let's inspect with %O
  3764. args.unshift('%O');
  3765. } // Apply any `formatters` transformations
  3766. var index = 0;
  3767. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  3768. // If we encounter an escaped % then don't increase the array index
  3769. if (match === '%%') {
  3770. return match;
  3771. }
  3772. index++;
  3773. var formatter = createDebug.formatters[format];
  3774. if (typeof formatter === 'function') {
  3775. var val = args[index];
  3776. match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
  3777. args.splice(index, 1);
  3778. index--;
  3779. }
  3780. return match;
  3781. }); // Apply env-specific formatting (colors, etc.)
  3782. createDebug.formatArgs.call(self, args);
  3783. var logFn = self.log || createDebug.log;
  3784. logFn.apply(self, args);
  3785. }
  3786. debug.namespace = namespace;
  3787. debug.enabled = createDebug.enabled(namespace);
  3788. debug.useColors = createDebug.useColors();
  3789. debug.color = selectColor(namespace);
  3790. debug.destroy = destroy;
  3791. debug.extend = extend; // Debug.formatArgs = formatArgs;
  3792. // debug.rawLog = rawLog;
  3793. // env-specific initialization logic for debug instances
  3794. if (typeof createDebug.init === 'function') {
  3795. createDebug.init(debug);
  3796. }
  3797. createDebug.instances.push(debug);
  3798. return debug;
  3799. }
  3800. function destroy() {
  3801. var index = createDebug.instances.indexOf(this);
  3802. if (index !== -1) {
  3803. createDebug.instances.splice(index, 1);
  3804. return true;
  3805. }
  3806. return false;
  3807. }
  3808. function extend(namespace, delimiter) {
  3809. return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  3810. }
  3811. /**
  3812. * Enables a debug mode by namespaces. This can include modes
  3813. * separated by a colon and wildcards.
  3814. *
  3815. * @param {String} namespaces
  3816. * @api public
  3817. */
  3818. function enable(namespaces) {
  3819. createDebug.save(namespaces);
  3820. createDebug.names = [];
  3821. createDebug.skips = [];
  3822. var i;
  3823. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  3824. var len = split.length;
  3825. for (i = 0; i < len; i++) {
  3826. if (!split[i]) {
  3827. // ignore empty strings
  3828. continue;
  3829. }
  3830. namespaces = split[i].replace(/\*/g, '.*?');
  3831. if (namespaces[0] === '-') {
  3832. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  3833. } else {
  3834. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  3835. }
  3836. }
  3837. for (i = 0; i < createDebug.instances.length; i++) {
  3838. var instance = createDebug.instances[i];
  3839. instance.enabled = createDebug.enabled(instance.namespace);
  3840. }
  3841. }
  3842. /**
  3843. * Disable debug output.
  3844. *
  3845. * @api public
  3846. */
  3847. function disable() {
  3848. createDebug.enable('');
  3849. }
  3850. /**
  3851. * Returns true if the given mode name is enabled, false otherwise.
  3852. *
  3853. * @param {String} name
  3854. * @return {Boolean}
  3855. * @api public
  3856. */
  3857. function enabled(name) {
  3858. if (name[name.length - 1] === '*') {
  3859. return true;
  3860. }
  3861. var i;
  3862. var len;
  3863. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  3864. if (createDebug.skips[i].test(name)) {
  3865. return false;
  3866. }
  3867. }
  3868. for (i = 0, len = createDebug.names.length; i < len; i++) {
  3869. if (createDebug.names[i].test(name)) {
  3870. return true;
  3871. }
  3872. }
  3873. return false;
  3874. }
  3875. /**
  3876. * Coerce `val`.
  3877. *
  3878. * @param {Mixed} val
  3879. * @return {Mixed}
  3880. * @api private
  3881. */
  3882. function coerce(val) {
  3883. if (val instanceof Error) {
  3884. return val.stack || val.message;
  3885. }
  3886. return val;
  3887. }
  3888. createDebug.enable(createDebug.load());
  3889. return createDebug;
  3890. }
  3891. module.exports = setup;
  3892. /***/ }),
  3893. /***/ "./node_modules/url-parse/index.js":
  3894. /*!*****************************************!*\
  3895. !*** ./node_modules/url-parse/index.js ***!
  3896. \*****************************************/
  3897. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3898. "use strict";
  3899. var required = __webpack_require__(/*! requires-port */ "./node_modules/requires-port/index.js"),
  3900. qs = __webpack_require__(/*! querystringify */ "./node_modules/querystringify/index.js"),
  3901. controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
  3902. CRHTLF = /[\n\r\t]/g,
  3903. slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//,
  3904. port = /:\d+$/,
  3905. protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,
  3906. windowsDriveLetter = /^[a-zA-Z]:/;
  3907. /**
  3908. * Remove control characters and whitespace from the beginning of a string.
  3909. *
  3910. * @param {Object|String} str String to trim.
  3911. * @returns {String} A new string representing `str` stripped of control
  3912. * characters and whitespace from its beginning.
  3913. * @public
  3914. */
  3915. function trimLeft(str) {
  3916. return (str ? str : '').toString().replace(controlOrWhitespace, '');
  3917. }
  3918. /**
  3919. * These are the parse rules for the URL parser, it informs the parser
  3920. * about:
  3921. *
  3922. * 0. The char it Needs to parse, if it's a string it should be done using
  3923. * indexOf, RegExp using exec and NaN means set as current value.
  3924. * 1. The property we should set when parsing this value.
  3925. * 2. Indication if it's backwards or forward parsing, when set as number it's
  3926. * the value of extra chars that should be split off.
  3927. * 3. Inherit from location if non existing in the parser.
  3928. * 4. `toLowerCase` the resulting value.
  3929. */
  3930. var rules = [['#', 'hash'], // Extract from the back.
  3931. ['?', 'query'], // Extract from the back.
  3932. function sanitize(address, url) {
  3933. // Sanitize what is left of the address
  3934. return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
  3935. }, ['/', 'pathname'], // Extract from the back.
  3936. ['@', 'auth', 1], // Extract from the front.
  3937. [NaN, 'host', undefined, 1, 1], // Set left over value.
  3938. [/:(\d*)$/, 'port', undefined, 1], // RegExp the back.
  3939. [NaN, 'hostname', undefined, 1, 1] // Set left over.
  3940. ];
  3941. /**
  3942. * These properties should not be copied or inherited from. This is only needed
  3943. * for all non blob URL's as a blob URL does not include a hash, only the
  3944. * origin.
  3945. *
  3946. * @type {Object}
  3947. * @private
  3948. */
  3949. var ignore = {
  3950. hash: 1,
  3951. query: 1
  3952. };
  3953. /**
  3954. * The location object differs when your code is loaded through a normal page,
  3955. * Worker or through a worker using a blob. And with the blobble begins the
  3956. * trouble as the location object will contain the URL of the blob, not the
  3957. * location of the page where our code is loaded in. The actual origin is
  3958. * encoded in the `pathname` so we can thankfully generate a good "default"
  3959. * location from it so we can generate proper relative URL's again.
  3960. *
  3961. * @param {Object|String} loc Optional default location object.
  3962. * @returns {Object} lolcation object.
  3963. * @public
  3964. */
  3965. function lolcation(loc) {
  3966. var globalVar;
  3967. if (typeof window !== 'undefined') globalVar = window;else if (typeof __webpack_require__.g !== 'undefined') globalVar = __webpack_require__.g;else if (typeof self !== 'undefined') globalVar = self;else globalVar = {};
  3968. var location = globalVar.location || {};
  3969. loc = loc || location;
  3970. var finaldestination = {},
  3971. type = typeof loc,
  3972. key;
  3973. if ('blob:' === loc.protocol) {
  3974. finaldestination = new Url(unescape(loc.pathname), {});
  3975. } else if ('string' === type) {
  3976. finaldestination = new Url(loc, {});
  3977. for (key in ignore) {
  3978. delete finaldestination[key];
  3979. }
  3980. } else if ('object' === type) {
  3981. for (key in loc) {
  3982. if (key in ignore) continue;
  3983. finaldestination[key] = loc[key];
  3984. }
  3985. if (finaldestination.slashes === undefined) {
  3986. finaldestination.slashes = slashes.test(loc.href);
  3987. }
  3988. }
  3989. return finaldestination;
  3990. }
  3991. /**
  3992. * Check whether a protocol scheme is special.
  3993. *
  3994. * @param {String} The protocol scheme of the URL
  3995. * @return {Boolean} `true` if the protocol scheme is special, else `false`
  3996. * @private
  3997. */
  3998. function isSpecial(scheme) {
  3999. return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';
  4000. }
  4001. /**
  4002. * @typedef ProtocolExtract
  4003. * @type Object
  4004. * @property {String} protocol Protocol matched in the URL, in lowercase.
  4005. * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
  4006. * @property {String} rest Rest of the URL that is not part of the protocol.
  4007. */
  4008. /**
  4009. * Extract protocol information from a URL with/without double slash ("//").
  4010. *
  4011. * @param {String} address URL we want to extract from.
  4012. * @param {Object} location
  4013. * @return {ProtocolExtract} Extracted information.
  4014. * @private
  4015. */
  4016. function extractProtocol(address, location) {
  4017. address = trimLeft(address);
  4018. address = address.replace(CRHTLF, '');
  4019. location = location || {};
  4020. var match = protocolre.exec(address);
  4021. var protocol = match[1] ? match[1].toLowerCase() : '';
  4022. var forwardSlashes = !!match[2];
  4023. var otherSlashes = !!match[3];
  4024. var slashesCount = 0;
  4025. var rest;
  4026. if (forwardSlashes) {
  4027. if (otherSlashes) {
  4028. rest = match[2] + match[3] + match[4];
  4029. slashesCount = match[2].length + match[3].length;
  4030. } else {
  4031. rest = match[2] + match[4];
  4032. slashesCount = match[2].length;
  4033. }
  4034. } else {
  4035. if (otherSlashes) {
  4036. rest = match[3] + match[4];
  4037. slashesCount = match[3].length;
  4038. } else {
  4039. rest = match[4];
  4040. }
  4041. }
  4042. if (protocol === 'file:') {
  4043. if (slashesCount >= 2) {
  4044. rest = rest.slice(2);
  4045. }
  4046. } else if (isSpecial(protocol)) {
  4047. rest = match[4];
  4048. } else if (protocol) {
  4049. if (forwardSlashes) {
  4050. rest = rest.slice(2);
  4051. }
  4052. } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
  4053. rest = match[4];
  4054. }
  4055. return {
  4056. protocol: protocol,
  4057. slashes: forwardSlashes || isSpecial(protocol),
  4058. slashesCount: slashesCount,
  4059. rest: rest
  4060. };
  4061. }
  4062. /**
  4063. * Resolve a relative URL pathname against a base URL pathname.
  4064. *
  4065. * @param {String} relative Pathname of the relative URL.
  4066. * @param {String} base Pathname of the base URL.
  4067. * @return {String} Resolved pathname.
  4068. * @private
  4069. */
  4070. function resolve(relative, base) {
  4071. if (relative === '') return base;
  4072. var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')),
  4073. i = path.length,
  4074. last = path[i - 1],
  4075. unshift = false,
  4076. up = 0;
  4077. while (i--) {
  4078. if (path[i] === '.') {
  4079. path.splice(i, 1);
  4080. } else if (path[i] === '..') {
  4081. path.splice(i, 1);
  4082. up++;
  4083. } else if (up) {
  4084. if (i === 0) unshift = true;
  4085. path.splice(i, 1);
  4086. up--;
  4087. }
  4088. }
  4089. if (unshift) path.unshift('');
  4090. if (last === '.' || last === '..') path.push('');
  4091. return path.join('/');
  4092. }
  4093. /**
  4094. * The actual URL instance. Instead of returning an object we've opted-in to
  4095. * create an actual constructor as it's much more memory efficient and
  4096. * faster and it pleases my OCD.
  4097. *
  4098. * It is worth noting that we should not use `URL` as class name to prevent
  4099. * clashes with the global URL instance that got introduced in browsers.
  4100. *
  4101. * @constructor
  4102. * @param {String} address URL we want to parse.
  4103. * @param {Object|String} [location] Location defaults for relative paths.
  4104. * @param {Boolean|Function} [parser] Parser for the query string.
  4105. * @private
  4106. */
  4107. function Url(address, location, parser) {
  4108. address = trimLeft(address);
  4109. address = address.replace(CRHTLF, '');
  4110. if (!(this instanceof Url)) {
  4111. return new Url(address, location, parser);
  4112. }
  4113. var relative,
  4114. extracted,
  4115. parse,
  4116. instruction,
  4117. index,
  4118. key,
  4119. instructions = rules.slice(),
  4120. type = typeof location,
  4121. url = this,
  4122. i = 0; //
  4123. // The following if statements allows this module two have compatibility with
  4124. // 2 different API:
  4125. //
  4126. // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
  4127. // where the boolean indicates that the query string should also be parsed.
  4128. //
  4129. // 2. The `URL` interface of the browser which accepts a URL, object as
  4130. // arguments. The supplied object will be used as default values / fall-back
  4131. // for relative paths.
  4132. //
  4133. if ('object' !== type && 'string' !== type) {
  4134. parser = location;
  4135. location = null;
  4136. }
  4137. if (parser && 'function' !== typeof parser) parser = qs.parse;
  4138. location = lolcation(location); //
  4139. // Extract protocol information before running the instructions.
  4140. //
  4141. extracted = extractProtocol(address || '', location);
  4142. relative = !extracted.protocol && !extracted.slashes;
  4143. url.slashes = extracted.slashes || relative && location.slashes;
  4144. url.protocol = extracted.protocol || location.protocol || '';
  4145. address = extracted.rest; //
  4146. // When the authority component is absent the URL starts with a path
  4147. // component.
  4148. //
  4149. if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {
  4150. instructions[3] = [/(.*)/, 'pathname'];
  4151. }
  4152. for (; i < instructions.length; i++) {
  4153. instruction = instructions[i];
  4154. if (typeof instruction === 'function') {
  4155. address = instruction(address, url);
  4156. continue;
  4157. }
  4158. parse = instruction[0];
  4159. key = instruction[1];
  4160. if (parse !== parse) {
  4161. url[key] = address;
  4162. } else if ('string' === typeof parse) {
  4163. index = parse === '@' ? address.lastIndexOf(parse) : address.indexOf(parse);
  4164. if (~index) {
  4165. if ('number' === typeof instruction[2]) {
  4166. url[key] = address.slice(0, index);
  4167. address = address.slice(index + instruction[2]);
  4168. } else {
  4169. url[key] = address.slice(index);
  4170. address = address.slice(0, index);
  4171. }
  4172. }
  4173. } else if (index = parse.exec(address)) {
  4174. url[key] = index[1];
  4175. address = address.slice(0, index.index);
  4176. }
  4177. url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : ''); //
  4178. // Hostname, host and protocol should be lowercased so they can be used to
  4179. // create a proper `origin`.
  4180. //
  4181. if (instruction[4]) url[key] = url[key].toLowerCase();
  4182. } //
  4183. // Also parse the supplied query string in to an object. If we're supplied
  4184. // with a custom parser as function use that instead of the default build-in
  4185. // parser.
  4186. //
  4187. if (parser) url.query = parser(url.query); //
  4188. // If the URL is relative, resolve the pathname against the base URL.
  4189. //
  4190. if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {
  4191. url.pathname = resolve(url.pathname, location.pathname);
  4192. } //
  4193. // Default to a / for pathname if none exists. This normalizes the URL
  4194. // to always have a /
  4195. //
  4196. if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
  4197. url.pathname = '/' + url.pathname;
  4198. } //
  4199. // We should not add port numbers if they are already the default port number
  4200. // for a given protocol. As the host also contains the port number we're going
  4201. // override it with the hostname which contains no port number.
  4202. //
  4203. if (!required(url.port, url.protocol)) {
  4204. url.host = url.hostname;
  4205. url.port = '';
  4206. } //
  4207. // Parse down the `auth` for the username and password.
  4208. //
  4209. url.username = url.password = '';
  4210. if (url.auth) {
  4211. index = url.auth.indexOf(':');
  4212. if (~index) {
  4213. url.username = url.auth.slice(0, index);
  4214. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4215. url.password = url.auth.slice(index + 1);
  4216. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4217. } else {
  4218. url.username = encodeURIComponent(decodeURIComponent(url.auth));
  4219. }
  4220. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4221. }
  4222. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null'; //
  4223. // The href is just the compiled result.
  4224. //
  4225. url.href = url.toString();
  4226. }
  4227. /**
  4228. * This is convenience method for changing properties in the URL instance to
  4229. * insure that they all propagate correctly.
  4230. *
  4231. * @param {String} part Property we need to adjust.
  4232. * @param {Mixed} value The newly assigned value.
  4233. * @param {Boolean|Function} fn When setting the query, it will be the function
  4234. * used to parse the query.
  4235. * When setting the protocol, double slash will be
  4236. * removed from the final url if it is true.
  4237. * @returns {URL} URL instance for chaining.
  4238. * @public
  4239. */
  4240. function set(part, value, fn) {
  4241. var url = this;
  4242. switch (part) {
  4243. case 'query':
  4244. if ('string' === typeof value && value.length) {
  4245. value = (fn || qs.parse)(value);
  4246. }
  4247. url[part] = value;
  4248. break;
  4249. case 'port':
  4250. url[part] = value;
  4251. if (!required(value, url.protocol)) {
  4252. url.host = url.hostname;
  4253. url[part] = '';
  4254. } else if (value) {
  4255. url.host = url.hostname + ':' + value;
  4256. }
  4257. break;
  4258. case 'hostname':
  4259. url[part] = value;
  4260. if (url.port) value += ':' + url.port;
  4261. url.host = value;
  4262. break;
  4263. case 'host':
  4264. url[part] = value;
  4265. if (port.test(value)) {
  4266. value = value.split(':');
  4267. url.port = value.pop();
  4268. url.hostname = value.join(':');
  4269. } else {
  4270. url.hostname = value;
  4271. url.port = '';
  4272. }
  4273. break;
  4274. case 'protocol':
  4275. url.protocol = value.toLowerCase();
  4276. url.slashes = !fn;
  4277. break;
  4278. case 'pathname':
  4279. case 'hash':
  4280. if (value) {
  4281. var char = part === 'pathname' ? '/' : '#';
  4282. url[part] = value.charAt(0) !== char ? char + value : value;
  4283. } else {
  4284. url[part] = value;
  4285. }
  4286. break;
  4287. case 'username':
  4288. case 'password':
  4289. url[part] = encodeURIComponent(value);
  4290. break;
  4291. case 'auth':
  4292. var index = value.indexOf(':');
  4293. if (~index) {
  4294. url.username = value.slice(0, index);
  4295. url.username = encodeURIComponent(decodeURIComponent(url.username));
  4296. url.password = value.slice(index + 1);
  4297. url.password = encodeURIComponent(decodeURIComponent(url.password));
  4298. } else {
  4299. url.username = encodeURIComponent(decodeURIComponent(value));
  4300. }
  4301. }
  4302. for (var i = 0; i < rules.length; i++) {
  4303. var ins = rules[i];
  4304. if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
  4305. }
  4306. url.auth = url.password ? url.username + ':' + url.password : url.username;
  4307. url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';
  4308. url.href = url.toString();
  4309. return url;
  4310. }
  4311. /**
  4312. * Transform the properties back in to a valid and full URL string.
  4313. *
  4314. * @param {Function} stringify Optional query stringify function.
  4315. * @returns {String} Compiled version of the URL.
  4316. * @public
  4317. */
  4318. function toString(stringify) {
  4319. if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;
  4320. var query,
  4321. url = this,
  4322. host = url.host,
  4323. protocol = url.protocol;
  4324. if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
  4325. var result = protocol + (url.protocol && url.slashes || isSpecial(url.protocol) ? '//' : '');
  4326. if (url.username) {
  4327. result += url.username;
  4328. if (url.password) result += ':' + url.password;
  4329. result += '@';
  4330. } else if (url.password) {
  4331. result += ':' + url.password;
  4332. result += '@';
  4333. } else if (url.protocol !== 'file:' && isSpecial(url.protocol) && !host && url.pathname !== '/') {
  4334. //
  4335. // Add back the empty userinfo, otherwise the original invalid URL
  4336. // might be transformed into a valid one with `url.pathname` as host.
  4337. //
  4338. result += '@';
  4339. } //
  4340. // Trailing colon is removed from `url.host` when it is parsed. If it still
  4341. // ends with a colon, then add back the trailing colon that was removed. This
  4342. // prevents an invalid URL from being transformed into a valid one.
  4343. //
  4344. if (host[host.length - 1] === ':' || port.test(url.hostname) && !url.port) {
  4345. host += ':';
  4346. }
  4347. result += host + url.pathname;
  4348. query = 'object' === typeof url.query ? stringify(url.query) : url.query;
  4349. if (query) result += '?' !== query.charAt(0) ? '?' + query : query;
  4350. if (url.hash) result += url.hash;
  4351. return result;
  4352. }
  4353. Url.prototype = {
  4354. set: set,
  4355. toString: toString
  4356. }; //
  4357. // Expose the URL parser and some additional properties that might be useful for
  4358. // others or testing.
  4359. //
  4360. Url.extractProtocol = extractProtocol;
  4361. Url.location = lolcation;
  4362. Url.trimLeft = trimLeft;
  4363. Url.qs = qs;
  4364. module.exports = Url;
  4365. /***/ })
  4366. /******/ });
  4367. /************************************************************************/
  4368. /******/ // The module cache
  4369. /******/ var __webpack_module_cache__ = {};
  4370. /******/
  4371. /******/ // The require function
  4372. /******/ function __webpack_require__(moduleId) {
  4373. /******/ // Check if module is in cache
  4374. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  4375. /******/ if (cachedModule !== undefined) {
  4376. /******/ return cachedModule.exports;
  4377. /******/ }
  4378. /******/ // Create a new module (and put it into the cache)
  4379. /******/ var module = __webpack_module_cache__[moduleId] = {
  4380. /******/ // no module.id needed
  4381. /******/ // no module.loaded needed
  4382. /******/ exports: {}
  4383. /******/ };
  4384. /******/
  4385. /******/ // Execute the module function
  4386. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  4387. /******/
  4388. /******/ // Return the exports of the module
  4389. /******/ return module.exports;
  4390. /******/ }
  4391. /******/
  4392. /************************************************************************/
  4393. /******/ /* webpack/runtime/compat get default export */
  4394. /******/ !function() {
  4395. /******/ // getDefaultExport function for compatibility with non-harmony modules
  4396. /******/ __webpack_require__.n = function(module) {
  4397. /******/ var getter = module && module.__esModule ?
  4398. /******/ function() { return module['default']; } :
  4399. /******/ function() { return module; };
  4400. /******/ __webpack_require__.d(getter, { a: getter });
  4401. /******/ return getter;
  4402. /******/ };
  4403. /******/ }();
  4404. /******/
  4405. /******/ /* webpack/runtime/define property getters */
  4406. /******/ !function() {
  4407. /******/ // define getter functions for harmony exports
  4408. /******/ __webpack_require__.d = function(exports, definition) {
  4409. /******/ for(var key in definition) {
  4410. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  4411. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  4412. /******/ }
  4413. /******/ }
  4414. /******/ };
  4415. /******/ }();
  4416. /******/
  4417. /******/ /* webpack/runtime/global */
  4418. /******/ !function() {
  4419. /******/ __webpack_require__.g = (function() {
  4420. /******/ if (typeof globalThis === 'object') return globalThis;
  4421. /******/ try {
  4422. /******/ return this || new Function('return this')();
  4423. /******/ } catch (e) {
  4424. /******/ if (typeof window === 'object') return window;
  4425. /******/ }
  4426. /******/ })();
  4427. /******/ }();
  4428. /******/
  4429. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  4430. /******/ !function() {
  4431. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  4432. /******/ }();
  4433. /******/
  4434. /******/ /* webpack/runtime/make namespace object */
  4435. /******/ !function() {
  4436. /******/ // define __esModule on exports
  4437. /******/ __webpack_require__.r = function(exports) {
  4438. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  4439. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  4440. /******/ }
  4441. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  4442. /******/ };
  4443. /******/ }();
  4444. /******/
  4445. /************************************************************************/
  4446. var __webpack_exports__ = {};
  4447. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  4448. !function() {
  4449. "use strict";
  4450. /*!***************************************************!*\
  4451. !*** ./client-src/modules/sockjs-client/index.js ***!
  4452. \***************************************************/
  4453. __webpack_require__.r(__webpack_exports__);
  4454. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4455. /* harmony export */ "default": function() { return /* reexport default from dynamic */ sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a; }
  4456. /* harmony export */ });
  4457. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sockjs-client */ "./node_modules/sockjs-client/lib/entry.js");
  4458. /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
  4459. // eslint-disable-next-line import/no-extraneous-dependencies
  4460. }();
  4461. /******/ return __webpack_exports__;
  4462. /******/ })()
  4463. ;
  4464. });