diff --git a/.github/README.md b/.github/README.md index f27fbe7..83c4d39 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,26 +1,26 @@ -> [!NOTE] -> Don't fork please, unless you have something to add. Star my repo! - -> [!WARNING] -> The main domain does **NOT** get the latest updates on my website. If you want the latest version of my website, the Dev version website will have the latest updates. - -# 1,500 commits!! - -## URLs to my website: -### [Main Domain](https://jackpurrin.me/) - -### [Cloudflare Pages Mirror](https://jackpurrin-me.pages.dev) - -### [Neocities](https://jackpurrin.neocities.org/) - -## Beta/Dev Versions of my website -### [Main Domain](https://dev.jackpurrin.me/) - -### [Cloudflare Pages Mirror](https://dev-e0a.pages.dev) - -## TODO: - -- [x] Improve the chat room -- [ ] Find a better way to add suggestions -- [ ] Add back some games of demand -- [ ] Add an image gallery of sorts +> [!NOTE] +> Don't fork please, unless you have something to add. Star my repo! + +> [!WARNING] +> The main domain does **NOT** get the latest updates on my website. If you want the latest version of my website, the Dev version website will have the latest updates. + +# 1,500 commits!! + +## URLs to my website: +### [Main Domain](https://jackpurrin.me/) + +### [Cloudflare Pages Mirror](https://jackpurrin-me.pages.dev) + +### [Neocities](https://jackpurrin.neocities.org/) + +## Beta/Dev Versions of my website +### [Main Domain](https://dev.jackpurrin.me/) + +### [Cloudflare Pages Mirror](https://dev-e0a.pages.dev) + +## TODO: + +- [x] Improve the chat room +- [ ] Find a better way to add suggestions +- [ ] Add back some games of demand +- [ ] Add an image gallery of sorts diff --git a/404.html b/404.html index 2eb8efa..7950ff0 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@

you tried to go to

goofy gooberson

but that does not exist!

- go home? + go home? diff --git a/change.html b/change.html deleted file mode 100644 index 7de53f8..0000000 --- a/change.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - jackpurrin's cafe - - - - - - - - - - -
-
- -
-
-

changelog

- -
- -
-
- - diff --git a/css/chat.css b/css/chat.css new file mode 100644 index 0000000..b0f61fa --- /dev/null +++ b/css/chat.css @@ -0,0 +1,45 @@ +@import url(main.css); + +.message { + padding: 5px 0; +} +.message .member { + display: inline-block; +} +.message-form__button { + margin: 10px; +} + +.members-count, +.members-list, +.messages { + padding: 15px; + margin-bottom: 15px; + max-height: 30vw; +} + +.messages { + flex-shrink: 1; + overflow: auto; + height: 30vh; +} + +.member { + padding-right: 10px; + position: relative; +} + +.message-form { + display: flex; + flex-shrink: 0; +} + +.message-form__input { + flex-grow: 1; + padding: 10px 15px; + font-size: 16px; +} + +.member, .members-count, .message { + border: none; +} \ No newline at end of file diff --git a/css/font.css b/css/font.css index c3f789b..f5e37c0 100644 --- a/css/font.css +++ b/css/font.css @@ -2,6 +2,7 @@ html, body { font-family: monospace; font-size: var(--txt-size); + text-align: center; } a { diff --git a/css/main.css b/css/main.css index 1764d27..dce0e5a 100644 --- a/css/main.css +++ b/css/main.css @@ -7,7 +7,6 @@ html { background-color: var(--bkg-clr); color: var(--txt-clr); - text-align: center; overflow: scroll; } diff --git a/css/navbar.css b/css/navbar.css index 1747b4f..3e7fb4e 100644 --- a/css/navbar.css +++ b/css/navbar.css @@ -1,16 +1,14 @@ +@import url(font.css); +@import url(vars.css); + .wrapper { display: flex; } ul { list-style-type: none; - padding: 15px 35px; - line-height: 3vh; } -nav { - width: 15%; -} main { flex: 1; } @@ -23,3 +21,8 @@ main { width: 100% !important; } } + +iframe { + height: 70vh; + border: none; +} \ No newline at end of file diff --git a/css/photobook.css b/css/photobook.css index d75a758..2ea2bde 100644 --- a/css/photobook.css +++ b/css/photobook.css @@ -3,4 +3,4 @@ img { max-width: 20%; max-width: 50vw; -} +} \ No newline at end of file diff --git a/drawings.html b/drawings.html deleted file mode 100644 index 10ca9a7..0000000 --- a/drawings.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - jackpurrin's cafe - - - - - - - - - - -
-
- -
-

community drawings

-

draw anything you want and email it to me!

-

i will feature the drawing and your website on this page. if you don't have a website, i will include socials

-

two rules, that's all.

- -
- -
- drawn by the one and only obscureobscure!! -
-
-
- - diff --git a/guestbook.html b/guestbook.html deleted file mode 100644 index ef8ef8d..0000000 --- a/guestbook.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - jackpurrin's cafe - - - - - - - - - -
-
- -
-

guestbook

-
- - credit to virtual observer! -
-
- - diff --git a/index.html b/index.html index 2598346..2419400 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@
-

welcome to my internet cafe!!

+

welcome to my devsite!!

warnings

this website isn't really anything special, but there is some stuff that can be problematic for people

there is discussion of mental health issues, which can be a trigger for some people.

@@ -44,7 +44,7 @@

webrings

PROCEED WITH CAUTION


click below to enter

- +
diff --git a/pages/community/chat.html b/pages/community/chat.html new file mode 100644 index 0000000..d0f8bf0 --- /dev/null +++ b/pages/community/chat.html @@ -0,0 +1,35 @@ + + + + jackpurrin's cafe + + + + + + + + + + + +
+
+ +
+

chat room

+
-
+
-
+
+ +
+ + +
+ +
+
+ + diff --git a/pages/community/drawings.html b/pages/community/drawings.html new file mode 100644 index 0000000..63157f3 --- /dev/null +++ b/pages/community/drawings.html @@ -0,0 +1,38 @@ + + + + jackpurrin's cafe + + + + + + + + + + +
+
+ +
+

community drawings

+

draw anything you want and email it to me!

+

i will feature the drawing and your website on this page. if you don't have a website, i will include socials

+

two rules, that's all.

+ +
+ +
+ drawn by the one and only obscureobscure!! +
+
+
+ + diff --git a/pages/community/guestbook.html b/pages/community/guestbook.html new file mode 100644 index 0000000..8a924db --- /dev/null +++ b/pages/community/guestbook.html @@ -0,0 +1,28 @@ + + + + jackpurrin's cafe + + + + + + + + + + +
+
+ +
+

guestbook

+
+ + credit to virtual observer! +
+
+ + diff --git a/about.html b/pages/content/about.html similarity index 61% rename from about.html rename to pages/content/about.html index 51bdfd2..b8d952d 100644 --- a/about.html +++ b/pages/content/about.html @@ -1,43 +1,21 @@ - + jackpurrin's cafe - - - - - + + + + +

about

diff --git a/pages/content/photobook.html b/pages/content/photobook.html new file mode 100644 index 0000000..32c21b8 --- /dev/null +++ b/pages/content/photobook.html @@ -0,0 +1,29 @@ + + + + jackpurrin's cafe + + + + + + + + + + +
+
+ +
+

photobook

+

pictures i took

+ +

pictures i found on the internet

+ +
+
+ + diff --git a/rings.html b/pages/off-site/rings.html similarity index 53% rename from rings.html rename to pages/off-site/rings.html index e56b7b7..3634d16 100644 --- a/rings.html +++ b/pages/off-site/rings.html @@ -1,43 +1,21 @@ - + jackpurrin's cafe - - - - - + + + + +

webrings and buttons

@@ -50,11 +28,11 @@

webrings and buttons

- +
- +
@@ -77,20 +55,20 @@

webrings and buttons

- rosebyte.xyz - doqmeat.com - thinliquid.dev + rosebyte.xyz + doqmeat.com + thinliquid.dev
- microgravities.net - sunshine.nekoweb.org - toasty.place + microgravities.net + sunshine.nekoweb.org + toasty.place
- milkyway.nekoweb.org - angelnetcast.com + milkyway.nekoweb.org + angelnetcast.com
hedy.dev
diff --git a/socials.html b/pages/off-site/socials.html similarity index 54% rename from socials.html rename to pages/off-site/socials.html index f02c19f..372359e 100644 --- a/socials.html +++ b/pages/off-site/socials.html @@ -1,5 +1,5 @@ - + jackpurrin's cafe @@ -15,29 +15,7 @@

my socials

diff --git a/pages/site/changelog.html b/pages/site/changelog.html new file mode 100644 index 0000000..6a10f1b --- /dev/null +++ b/pages/site/changelog.html @@ -0,0 +1,29 @@ + + + + jackpurrin's cafe + + + + + + + + + + +
+
+ +
+
+

changelog

+ +
+ +
+
+ + diff --git a/home.html b/pages/site/index.html similarity index 50% rename from home.html rename to pages/site/index.html index ef9c2f1..9e631f4 100644 --- a/home.html +++ b/pages/site/index.html @@ -1,66 +1,46 @@ - + jackpurrin's cafe - - - - - + + + + +

jackpurrin's cafe

about

This website was made by a nerdy and bored high school student. I spend most of my time programming and learning. Inside and outside of school.

My hobbies are music and programming. I used to play Minecraft and other games, but I don't play very many games anymore.

- Read more about me and this website here + Read more about me and this website here

webrings

Webrings are some cool things. It's like a small internet of people's websites linked together, in a ring!

I have joined quite a few of them, and most of them I find really interesting!

-

If you wanna check some out and meet my neighbors, click here!

+

If you wanna check some out and meet my neighbors, click here!

drawings

I wanna know the people that come onto my website better, and a fun and interesting way to do that is by the things the peoples draw!

So I made a page dedicated on my website just for the drawings my people have made! Anyone can put something on there, and they can look at it too!

Just email me, listed on my socials or on the page itself.

-

Check out the area over here!

+

Check out the area over here!

status and mood

- + The current mood of jackpurrin at www.imood.com

last.fm

- +
diff --git a/pages/site/sidebar.html b/pages/site/sidebar.html new file mode 100644 index 0000000..6415ad0 --- /dev/null +++ b/pages/site/sidebar.html @@ -0,0 +1,24 @@ + + + diff --git a/todo.html b/pages/site/todo.html similarity index 62% rename from todo.html rename to pages/site/todo.html index 4e8d2f3..6c54fe2 100644 --- a/todo.html +++ b/pages/site/todo.html @@ -1,43 +1,21 @@ - + jackpurrin's cafe - - - - - + + + + +

todo list

@@ -54,8 +32,9 @@

todo list

    -
  • a last.fm widget
  • +
  • a last.fm widget
  • a calander
  • +
  • a rss reader for my blog posts
  • a preview for my photobook
  • a quiz of some sorts
@@ -105,17 +84,9 @@

todo list

  • - +
  • -
  • - - -
  • -
  • - - -
  • diff --git a/photo.html b/photo.html deleted file mode 100644 index 5baa0be..0000000 --- a/photo.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - jackpurrin's cafe - - - - - - - - - - -
    -
    - -
    -

    photobook

    -

    pictures i took

    - -

    pictures i found on the internet

    - -
    -
    - - diff --git a/script/chat.js b/script/chat.js new file mode 100644 index 0000000..563b7c1 --- /dev/null +++ b/script/chat.js @@ -0,0 +1,252 @@ +const CLIENT_ID = "d1qG6gE60plpGPPq"; + +const drone = new ScaleDrone(CLIENT_ID, { + data: { + // Will be sent out as clientData via events + name: getRandomName(), + color: getRandomColor(), + }, +}); + +let members = []; + +drone.on("open", (error) => { + if (error) { + return console.error(error); + } + console.log("Successfully connected to Scaledrone"); + + const room = drone.subscribe("observable-room"); + room.on("open", (error) => { + if (error) { + return console.error(error); + } + console.log("Successfully joined room"); + }); + + room.on("members", (m) => { + members = m; + updateMembersDOM(); + }); + + room.on("member_join", (member) => { + members.push(member); + updateMembersDOM(); + }); + + room.on("member_leave", ({ id }) => { + const index = members.findIndex((member) => member.id === id); + members.splice(index, 1); + updateMembersDOM(); + }); + + room.on("data", (text, member) => { + if (member) { + addMessageToListDOM(text, member); + } else { + // Message is from server + } + }); +}); + +drone.on("close", (event) => { + console.log("Connection was closed", event); +}); + +drone.on("error", (error) => { + console.error(error); +}); + +function getRandomName() { + const heart = ["❤️", "🧡", "💛", "💚", "💙", "💜", "💘"]; + const adjs = [ + "autumn", + "hidden", + "bitter", + "misty", + "silent", + "empty", + "dry", + "dark", + "summer", + "icy", + "delicate", + "quiet", + "white", + "cool", + "spring", + "winter", + "patient", + "twilight", + "dawn", + "crimson", + "wispy", + "weathered", + "blue", + "billowing", + "broken", + "cold", + "damp", + "falling", + "frosty", + "green", + "long", + "late", + "lingering", + "bold", + "little", + "morning", + "muddy", + "old", + "red", + "rough", + "still", + "small", + "sparkling", + "throbbing", + "shy", + "wandering", + "withered", + "wild", + "black", + "young", + "holy", + "solitary", + "fragrant", + "aged", + "snowy", + "proud", + "floral", + "restless", + "divine", + "polished", + "ancient", + "purple", + "lively", + "nameless", + ]; + const nouns = [ + "waterfall", + "river", + "breeze", + "moon", + "rain", + "wind", + "sea", + "morning", + "snow", + "lake", + "sunset", + "pine", + "shadow", + "leaf", + "dawn", + "glitter", + "forest", + "hill", + "cloud", + "meadow", + "sun", + "glade", + "bird", + "brook", + "butterfly", + "bush", + "dew", + "dust", + "field", + "fire", + "flower", + "firefly", + "feather", + "grass", + "haze", + "mountain", + "night", + "pond", + "darkness", + "snowflake", + "silence", + "sound", + "sky", + "shape", + "surf", + "thunder", + "violet", + "water", + "wildflower", + "wave", + "water", + "resonance", + "sun", + "wood", + "dream", + "cherry", + "tree", + "fog", + "frost", + "voice", + "paper", + "frog", + "smoke", + "star", + ]; + return heart[Math.floor(Math.random() * heart.length)] + " " + adjs[Math.floor(Math.random() * adjs.length)] + "_" + nouns[Math.floor(Math.random() * nouns.length)]; +} + +function getRandomColor() { + return "#" + Math.floor(Math.random() * 0xff69ff).toString(16); +} + +//------------- DOM STUFF + +const DOM = { + membersCount: document.querySelector(".members-count"), + membersList: document.querySelector(".members-list"), + messages: document.querySelector(".messages"), + input: document.querySelector(".message-form__input"), + form: document.querySelector(".message-form"), +}; + +DOM.form.addEventListener("submit", sendMessage); + +function sendMessage() { + const value = DOM.input.value; + if (value === "") { + return; + } + DOM.input.value = ""; + drone.publish({ room: "observable-room", message: value }); +} + +function createMemberElement(member) { + const { name, color } = member.clientData; + const el = document.createElement("div"); + el.appendChild(document.createTextNode(name)); + el.className = "member"; + el.style.color = color; + return el; +} + +function updateMembersDOM() { + DOM.membersCount.innerText = `${members.length} users in room:`; + DOM.membersList.innerHTML = ""; + members.forEach((member) => DOM.membersList.appendChild(createMemberElement(member))); +} + +function createMessageElement(text, member) { + const el = document.createElement("div"); + el.appendChild(createMemberElement(member)); + el.appendChild(document.createTextNode(text)); + el.className = "message"; + return el; +} + +function addMessageToListDOM(text, member) { + const el = DOM.messages; + const wasTop = el.scrollTop === el.scrollHeight - el.clientHeight; + el.appendChild(createMessageElement(text, member)); + if (wasTop) { + el.scrollTop = el.scrollHeight - el.clientHeight; + } +} \ No newline at end of file diff --git a/script/guestbook.js b/script/guestbook.js index 250be06..5bfa4ac 100644 --- a/script/guestbook.js +++ b/script/guestbook.js @@ -1,4 +1,4 @@ -const s_stylePath = "/css/guestbook.css"; +const s_stylePath = ""; const s_formId = "1FAIpQLSfNs1C5gok6NGwYFI1uNLzej8OLdetaTeX7qY3XSCyyKmotVA"; const s_nameId = "488959249"; const s_websiteId = "1782451882"; diff --git a/script/scaledrone.js b/script/scaledrone.js new file mode 100644 index 0000000..f467999 --- /dev/null +++ b/script/scaledrone.js @@ -0,0 +1,294 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function formatArgs(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),this.useColors){var o="color: "+this.color;e.splice(1,0,o,"color: inherit");var t=0,C=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(C=++t)}),e.splice(C,0,o)}}function log(){var e;return"object"===("undefined"==typeof console?"undefined":_typeof(console))&&console.log&&(e=console).log.apply(e,arguments)}function save(e){try{e?exports.storage.setItem("debug",e):exports.storage.removeItem("debug")}catch(e){}}function load(){var e;try{e=exports.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}function localstorage(){try{return localStorage}catch(e){}}exports.log=log,exports.formatArgs=formatArgs,exports.save=save,exports.load=load,exports.useColors=useColors,exports.storage=localstorage(),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"],module.exports=require("./common")(exports);var formatters=module.exports.formatters;formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}; + +}).call(this)}).call(this,require('_process')) +},{"./common":4,"_process":12}],4:[function(require,module,exports){ +"use strict";function setup(e){function n(e){for(var n=0,t=0;t1?t[o-1]:void 0,i=o>2?t[2]:void 0;for(a=r.length>3&&"function"==typeof a?(o--,a):void 0,i&&isIterateeCall(t[0],t[1],i)&&(a=o<3?void 0:a,o=1),e=Object(e);++n-1&&r%1==0&&r-1&&r%1==0&&r<=MAX_SAFE_INTEGER}function isObject(r){var e=typeof r;return!!r&&("object"==e||"function"==e)}function isObjectLike(r){return!!r&&"object"==typeof r}var assign=createAssigner(function(r,e){if(nonEnumShadows||isPrototype(e)||isArrayLike(e))copyObject(e,keys(e),r);else for(var t in e)hasOwnProperty.call(e,t)&&assignValue(r,t,e[t])});function keys(r){return isArrayLike(r)?arrayLikeKeys(r):baseKeys(r)}module.exports=assign; + +},{}],9:[function(require,module,exports){ +(function (global){(function (){ +var FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();function getValue(t,e){return null==t?void 0:t[e]}function isHostObject(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,splice=arrayProto.splice,Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function Hash(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1}function listCacheSet(t,e){var r=this.__data__,a=assocIndexOf(r,t);return a<0?r.push([t,e]):r[a][1]=e,this}function MapCache(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1}function arrayIncludesWith(e,t,r){for(var a=-1,n=e?e.length:0;++a-1}function listCacheSet(e,t){var r=this.__data__,a=assocIndexOf(r,e);return a<0?r.push([e,t]):r[a][1]=t,this}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t=LARGE_ARRAY_SIZE&&(o=cacheHas,s=!1,t=new SetCache(t));e:for(;++n0&&r(i)?t>1?baseFlatten(i,t-1,r,a,n):arrayPush(n,i):a||(n[n.length]=i)}return n}function baseGetAllKeys(e,t,r){var a=t(e);return isArray(e)?a:arrayPush(a,r(e))}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)||isHostObject(e)?reIsNative:reIsHostCtor).test(toSource(e))}function baseKeysIn(e){if(!isObject(e))return nativeKeysIn(e);var t=isPrototype(e),r=[];for(var a in e)("constructor"!=a||!t&&hasOwnProperty.call(e,a))&&r.push(a);return r}function basePick(e,t){return basePickBy(e=Object(e),t,function(t,r){return r in e})}function basePickBy(e,t,r){for(var a=-1,n=t.length,o={};++a-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&objectToString.call(e)==symbolTag}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,!0):baseKeysIn(e)}var omit=baseRest(function(e,t){return null==e?{}:(t=arrayMap(baseFlatten(t,1),toKey),basePick(e,baseDifference(getAllKeysIn(e),t)))});function stubArray(){return[]}module.exports=omit; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],11:[function(require,module,exports){ +var s=1e3,m=60*s,h=60*m,d=24*h,w=7*d,y=365.25*d;function parse(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var a=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*y;case"weeks":case"week":case"w":return a*w;case"days":case"day":case"d":return a*d;case"hours":case"hour":case"hrs":case"hr":case"h":return a*h;case"minutes":case"minute":case"mins":case"min":case"m":return a*m;case"seconds":case"second":case"secs":case"sec":case"s":return a*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function fmtShort(e){var r=Math.abs(e);return r>=d?Math.round(e/d)+"d":r>=h?Math.round(e/h)+"h":r>=m?Math.round(e/m)+"m":r>=s?Math.round(e/s)+"s":e+"ms"}function fmtLong(e){var r=Math.abs(e);return r>=d?plural(e,r,d,"day"):r>=h?plural(e,r,h,"hour"):r>=m?plural(e,r,m,"minute"):r>=s?plural(e,r,s,"second"):e+" ms"}function plural(s,e,r,a){var n=e>=1.5*r;return Math.round(s/r)+" "+a+(n?"s":"")}module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return parse(s);if("number"===r&&isFinite(s))return e.long?fmtLong(s):fmtShort(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}; + +},{}],12:[function(require,module,exports){ +var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var r=1;r1?this._listeners[t]=s.slice(0,i).concat(s.slice(i+1)):delete this._listeners[t])}},EventTarget.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,s=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,s),e in this._listeners)for(var i=this._listeners[e],n=0;n=3e3&&t<=4999}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:main")),inherits(SockJS,EventTarget),SockJS.prototype.close=function(t,e){if(t&&!userSetCode(t))throw new Error("InvalidAccessError: Invalid code");if(e&&e.length>123)throw new SyntaxError("reason argument has an invalid length");if(this.readyState!==SockJS.CLOSING&&this.readyState!==SockJS.CLOSED){this._close(t||1e3,e||"Normal closure",!0)}},SockJS.prototype.send=function(t){if("string"!=typeof t&&(t=""+t),this.readyState===SockJS.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===SockJS.OPEN&&this._transport.send(escape.quote(t))},SockJS.version=require("./version"),SockJS.CONNECTING=0,SockJS.OPEN=1,SockJS.CLOSING=2,SockJS.CLOSED=3,SockJS.prototype._receiveInfo=function(t,e){if(debug("_receiveInfo",e),this._ir=null,t){this._rto=this.countRTO(e),this._transUrl=t.base_url?t.base_url:this.url,t=objectUtils.extend(t,this._urlInfo),debug("info",t);var r=transports.filterToEnabled(this._transportsWhitelist,t);this._transports=r.main,debug(this._transports.length+" enabled transports"),this._connect()}else this._close(1002,"Cannot connect to server")},SockJS.prototype._connect=function(){for(var t=this._transports.shift();t;t=this._transports.shift()){if(debug("attempt",t.transportName),t.needBody&&(!global.document.body||void 0!==global.document.readyState&&"complete"!==global.document.readyState&&"interactive"!==global.document.readyState))return debug("waiting for body"),this._transports.unshift(t),void eventUtils.attachEvent("load",this._connect.bind(this));var e=Math.max(this._timeout,this._rto*t.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),e),debug("using timeout",e);var r=urlUtils.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),s=this._transportOptions[t.transportName];debug("transport url",r);var o=new t(r,this._transUrl,s);return o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=t.transportName,void(this._transport=o)}this._close(2e3,"All transports failed",!1)},SockJS.prototype._transportTimeout=function(){debug("_transportTimeout"),this.readyState===SockJS.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},SockJS.prototype._transportMessage=function(t){debug("_transportMessage",t);var e,r=this,s=t.slice(0,1),o=t.slice(1);switch(s){case"o":return void this._open();case"h":return this.dispatchEvent(new Event("heartbeat")),void debug("heartbeat",this.transport)}if(o)try{e=JSON.parse(o)}catch(t){debug("bad json",o)}if(void 0!==e)switch(s){case"a":Array.isArray(e)&&e.forEach(function(t){debug("message",r.transport,t),r.dispatchEvent(new TransportMessageEvent(t))});break;case"m":debug("message",this.transport,e),this.dispatchEvent(new TransportMessageEvent(e));break;case"c":Array.isArray(e)&&2===e.length&&this._close(e[0],e[1],!0)}else debug("empty payload",o)},SockJS.prototype._transportClose=function(t,e){debug("_transportClose",this.transport,t,e),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),userSetCode(t)||2e3===t||this.readyState!==SockJS.CONNECTING?this._close(t,e):this._connect()},SockJS.prototype._open=function(){debug("_open",this._transport&&this._transport.transportName,this.readyState),this.readyState===SockJS.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=SockJS.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new Event("open")),debug("connected",this.transport)):this._close(1006,"Server lost session")},SockJS.prototype._close=function(t,e,r){debug("_close",this.transport,t,e,r,this.readyState);var s=!1;if(this._ir&&(s=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===SockJS.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=SockJS.CLOSING,setTimeout(function(){this.readyState=SockJS.CLOSED,s&&this.dispatchEvent(new Event("error"));var o=new CloseEvent("close");o.wasClean=r||!1,o.code=t||1e3,o.reason=e,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null,debug("disconnected")}.bind(this),0)},SockJS.prototype.countRTO=function(t){return t>100?4*t:300+t},module.exports=function(t){return transports=transport(t),require("./iframe-bootstrap")(SockJS,t),SockJS}; + +}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./event/close":16,"./event/event":18,"./event/eventtarget":19,"./event/trans-message":20,"./iframe-bootstrap":22,"./info-receiver":26,"./location":27,"./shims":29,"./utils/browser":58,"./utils/escape":59,"./utils/event":60,"./utils/log":62,"./utils/object":63,"./utils/random":64,"./utils/transport":65,"./utils/url":66,"./version":67,"_process":12,"debug":3,"inherits":6,"url-parse":68}],29:[function(require,module,exports){ +"use strict";var defineProperty,ArrayPrototype=Array.prototype,ObjectPrototype=Object.prototype,FunctionPrototype=Function.prototype,StringPrototype=String.prototype,array_slice=ArrayPrototype.slice,_toString=ObjectPrototype.toString,isFunction=function(t){return"[object Function]"===ObjectPrototype.toString.call(t)},isArray=function(t){return"[object Array]"===_toString.call(t)},isString=function(t){return"[object String]"===_toString.call(t)},supportsDescriptors=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();defineProperty=supportsDescriptors?function(t,r,e,n){!n&&r in t||Object.defineProperty(t,r,{configurable:!0,enumerable:!1,writable:!0,value:e})}:function(t,r,e,n){!n&&r in t||(t[r]=e)};var defineProperties=function(t,r,e){for(var n in r)ObjectPrototype.hasOwnProperty.call(r,n)&&defineProperty(t,n,r[n],e)},toObject=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};function toInteger(t){var r=+t;return r!=r?r=0:0!==r&&r!==1/0&&r!==-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r))),r}function ToUint32(t){return t>>>0}function Empty(){}defineProperties(FunctionPrototype,{bind:function(t){var r=this;if(!isFunction(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var e=array_slice.call(arguments,1),n=Math.max(0,r.length-e.length),i=[],o=0;o>>0;if(!isFunction(t))throw new TypeError;for(;++i>>0;if(!e)return-1;var n=0;for(arguments.length>1&&(n=toInteger(arguments[1])),n=n>=0?n:Math.max(0,e+n);n1?function(){var t=void 0===/()??/.exec("")[1];StringPrototype.split=function(r,e){var n=this;if(void 0===r&&0===e)return[];if("[object RegExp]"!==_toString.call(r))return string_split.call(this,r,e);var i,o,s,p,c=[],l=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.extended?"x":"")+(r.sticky?"y":""),a=0;for(r=new RegExp(r.source,l+"g"),n+="",t||(i=new RegExp("^"+r.source+"$(?!\\s)",l)),e=void 0===e?-1>>>0:ToUint32(e);(o=r.exec(n))&&!((s=o.index+o[0].length)>a&&(c.push(n.slice(a,o.index)),!t&&o.length>1&&o[0].replace(i,function(){for(var t=1;t1&&o.index=e));)r.lastIndex===o.index&&r.lastIndex++;return a===n.length?!p&&r.test("")||c.push(""):c.push(n.slice(a)),c.length>e?c.slice(0,e):c}}():"0".split(void 0,0).length&&(StringPrototype.split=function(t,r){return void 0===t&&0===r?[]:string_split.call(this,t,r)});var string_substr=StringPrototype.substr,hasNegativeSubstrBug="".substr&&"b"!=="0b".substr(-1);defineProperties(StringPrototype,{substr:function(t,r){return string_substr.call(this,t<0&&(t=this.length+t)<0?0:t,r)}},hasNegativeSubstrBug); + +},{}],30:[function(require,module,exports){ +"use strict";module.exports=[require("./transport/websocket"),require("./transport/xhr-streaming"),require("./transport/xdr-streaming"),require("./transport/eventsource"),require("./transport/lib/iframe-wrap")(require("./transport/eventsource")),require("./transport/htmlfile"),require("./transport/lib/iframe-wrap")(require("./transport/htmlfile")),require("./transport/xhr-polling"),require("./transport/xdr-polling"),require("./transport/lib/iframe-wrap")(require("./transport/xhr-polling")),require("./transport/jsonp-polling")]; + +},{"./transport/eventsource":34,"./transport/htmlfile":35,"./transport/jsonp-polling":37,"./transport/lib/iframe-wrap":40,"./transport/websocket":52,"./transport/xdr-polling":53,"./transport/xdr-streaming":54,"./transport/xhr-polling":55,"./transport/xhr-streaming":56}],31:[function(require,module,exports){ +(function (process,global){(function (){ +"use strict";var EventEmitter=require("events").EventEmitter,inherits=require("inherits"),utils=require("../../utils/event"),urlUtils=require("../../utils/url"),XHR=global.XMLHttpRequest,debug=function(){};function AbstractXHRObject(t,e,i,r){debug(t,e);var s=this;EventEmitter.call(this),setTimeout(function(){s._start(t,e,i,r)},0)}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:browser:xhr")),inherits(AbstractXHRObject,EventEmitter),AbstractXHRObject.prototype._start=function(t,e,i,r){var s=this;try{this.xhr=new XHR}catch(t){}if(!this.xhr)return debug("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();e=urlUtils.addQuery(e,"t="+ +new Date),this.unloadRef=utils.unloadAdd(function(){debug("unload cleanup"),s._cleanup(!0)});try{this.xhr.open(t,e,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){debug("xhr timeout"),s.emit("finish",0,""),s._cleanup(!1)})}catch(t){return debug("exception",t),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!AbstractXHRObject.supportsCORS||(debug("withCredentials"),this.xhr.withCredentials=!0),r&&r.headers)for(var n in r.headers)this.xhr.setRequestHeader(n,r.headers[n]);this.xhr.onreadystatechange=function(){if(s.xhr){var t,e,i=s.xhr;switch(debug("readyState",i.readyState),i.readyState){case 3:try{e=i.status,t=i.responseText}catch(t){}debug("status",e),1223===e&&(e=204),200===e&&t&&t.length>0&&(debug("chunk"),s.emit("chunk",e,t));break;case 4:e=i.status,debug("status",e),1223===e&&(e=204),12005!==e&&12029!==e||(e=0),debug("finish",e,i.responseText),s.emit("finish",e,i.responseText),s._cleanup(!1)}}};try{s.xhr.send(i)}catch(t){s.emit("finish",0,""),s._cleanup(!1)}},AbstractXHRObject.prototype._cleanup=function(t){if(debug("cleanup"),this.xhr){if(this.removeAllListeners(),utils.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(t){}this.unloadRef=this.xhr=null}},AbstractXHRObject.prototype.close=function(){debug("close"),this._cleanup(!0)},AbstractXHRObject.enabled=!!XHR;var axo=["Active"].concat("Object").join("X");!AbstractXHRObject.enabled&&axo in global&&(debug("overriding xmlhttprequest"),XHR=function(){try{return new global[axo]("Microsoft.XMLHTTP")}catch(t){return null}},AbstractXHRObject.enabled=!!new XHR);var cors=!1;try{cors="withCredentials"in new XHR}catch(t){}AbstractXHRObject.supportsCORS=cors,module.exports=AbstractXHRObject; + +}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../../utils/event":60,"../../utils/url":66,"_process":12,"debug":3,"events":17,"inherits":6}],32:[function(require,module,exports){ +(function (global){(function (){ +module.exports=global.EventSource; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],33:[function(require,module,exports){ +(function (global){(function (){ +"use strict";var Driver=global.WebSocket||global.MozWebSocket;module.exports=Driver?function(e){return new Driver(e)}:void 0; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],34:[function(require,module,exports){ +"use strict";var inherits=require("inherits"),AjaxBasedTransport=require("./lib/ajax-based"),EventSourceReceiver=require("./receiver/eventsource"),XHRCorsObject=require("./sender/xhr-cors"),EventSourceDriver=require("eventsource");function EventSourceTransport(e){if(!EventSourceTransport.enabled())throw new Error("Transport created when disabled");AjaxBasedTransport.call(this,e,"/eventsource",EventSourceReceiver,XHRCorsObject)}inherits(EventSourceTransport,AjaxBasedTransport),EventSourceTransport.enabled=function(){return!!EventSourceDriver},EventSourceTransport.transportName="eventsource",EventSourceTransport.roundTrips=2,module.exports=EventSourceTransport; + +},{"./lib/ajax-based":38,"./receiver/eventsource":43,"./sender/xhr-cors":49,"eventsource":32,"inherits":6}],35:[function(require,module,exports){ +"use strict";var inherits=require("inherits"),HtmlfileReceiver=require("./receiver/htmlfile"),XHRLocalObject=require("./sender/xhr-local"),AjaxBasedTransport=require("./lib/ajax-based");function HtmlFileTransport(e){if(!HtmlfileReceiver.enabled)throw new Error("Transport created when disabled");AjaxBasedTransport.call(this,e,"/htmlfile",HtmlfileReceiver,XHRLocalObject)}inherits(HtmlFileTransport,AjaxBasedTransport),HtmlFileTransport.enabled=function(e){return HtmlfileReceiver.enabled&&e.sameOrigin},HtmlFileTransport.transportName="htmlfile",HtmlFileTransport.roundTrips=2,module.exports=HtmlFileTransport; + +},{"./lib/ajax-based":38,"./receiver/htmlfile":44,"./sender/xhr-local":51,"inherits":6}],36:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),EventEmitter=require("events").EventEmitter,version=require("../version"),urlUtils=require("../utils/url"),iframeUtils=require("../utils/iframe"),eventUtils=require("../utils/event"),random=require("../utils/random"),debug=function(){};function IframeTransport(e,t,s){if(!IframeTransport.enabled())throw new Error("Transport created when disabled");EventEmitter.call(this);var r=this;this.origin=urlUtils.getOrigin(s),this.baseUrl=s,this.transUrl=t,this.transport=e,this.windowId=random.string(8);var i=urlUtils.addPath(s,"/iframe.html")+"#"+this.windowId;debug(e,t,i),this.iframeObj=iframeUtils.createIframe(i,function(e){debug("err callback"),r.emit("close",1006,"Unable to load an iframe ("+e+")"),r.close()}),this.onmessageCallback=this._message.bind(this),eventUtils.attachEvent("message",this.onmessageCallback)}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:transport:iframe")),inherits(IframeTransport,EventEmitter),IframeTransport.prototype.close=function(){if(debug("close"),this.removeAllListeners(),this.iframeObj){eventUtils.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},IframeTransport.prototype._message=function(e){if(debug("message",e.data),urlUtils.isOriginEqual(e.origin,this.origin)){var t;try{t=JSON.parse(e.data)}catch(t){return void debug("bad json",e.data)}if(t.windowId===this.windowId)switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([version,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var s;try{s=JSON.parse(t.data)}catch(e){return void debug("bad json",t.data)}this.emit("close",s[0],s[1]),this.close()}else debug("mismatched window id",t.windowId,this.windowId)}else debug("not same origin",e.origin,this.origin)},IframeTransport.prototype.postMessage=function(e,t){debug("postMessage",e,t),this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},IframeTransport.prototype.send=function(e){debug("send",e),this.postMessage("m",e)},IframeTransport.enabled=function(){return iframeUtils.iframeEnabled},IframeTransport.transportName="iframe",IframeTransport.roundTrips=2,module.exports=IframeTransport; + +}).call(this)}).call(this,require('_process')) +},{"../utils/event":60,"../utils/iframe":61,"../utils/random":64,"../utils/url":66,"../version":67,"_process":12,"debug":3,"events":17,"inherits":6}],37:[function(require,module,exports){ +(function (global){(function (){ +"use strict";var inherits=require("inherits"),SenderReceiver=require("./lib/sender-receiver"),JsonpReceiver=require("./receiver/jsonp"),jsonpSender=require("./sender/jsonp");function JsonPTransport(e){if(!JsonPTransport.enabled())throw new Error("Transport created when disabled");SenderReceiver.call(this,e,"/jsonp",jsonpSender,JsonpReceiver)}inherits(JsonPTransport,SenderReceiver),JsonPTransport.enabled=function(){return!!global.document},JsonPTransport.transportName="jsonp-polling",JsonPTransport.roundTrips=1,JsonPTransport.needBody=!0,module.exports=JsonPTransport; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./lib/sender-receiver":42,"./receiver/jsonp":45,"./sender/jsonp":47,"inherits":6}],38:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),urlUtils=require("../../utils/url"),SenderReceiver=require("./sender-receiver"),debug=function(){};function createAjaxSender(e){return function(r,n,t){debug("create ajax sender",r,n);var i={};"string"==typeof n&&(i.headers={"Content-type":"text/plain"});var s=urlUtils.addPath(r,"/xhr_send"),a=new e("POST",s,n,i);return a.once("finish",function(e){if(debug("finish",e),a=null,200!==e&&204!==e)return t(new Error("http status "+e));t()}),function(){debug("abort"),a.close(),a=null;var e=new Error("Aborted");e.code=1e3,t(e)}}}function AjaxBasedTransport(e,r,n,t){SenderReceiver.call(this,e,r,createAjaxSender(t),n,t)}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:ajax-based")),inherits(AjaxBasedTransport,SenderReceiver),module.exports=AjaxBasedTransport; + +}).call(this)}).call(this,require('_process')) +},{"../../utils/url":66,"./sender-receiver":42,"_process":12,"debug":3,"inherits":6}],39:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),EventEmitter=require("events").EventEmitter,debug=function(){};function BufferedSender(e,t){debug(e),EventEmitter.call(this),this.sendBuffer=[],this.sender=t,this.url=e}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:buffered-sender")),inherits(BufferedSender,EventEmitter),BufferedSender.prototype.send=function(e){debug("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},BufferedSender.prototype.sendScheduleWait=function(){debug("sendScheduleWait");var e,t=this;this.sendStop=function(){debug("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout(function(){debug("timeout"),t.sendStop=null,t.sendSchedule()},25)},BufferedSender.prototype.sendSchedule=function(){debug("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,function(t){e.sendStop=null,t?(debug("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()}),this.sendBuffer=[]}},BufferedSender.prototype._cleanup=function(){debug("_cleanup"),this.removeAllListeners()},BufferedSender.prototype.close=function(){debug("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},module.exports=BufferedSender; + +}).call(this)}).call(this,require('_process')) +},{"_process":12,"debug":3,"events":17,"inherits":6}],40:[function(require,module,exports){ +(function (global){(function (){ +"use strict";var inherits=require("inherits"),IframeTransport=require("../iframe"),objectUtils=require("../../utils/object");module.exports=function(r){function e(e,t){IframeTransport.call(this,r.transportName,e,t)}return inherits(e,IframeTransport),e.enabled=function(e,t){if(!global.document)return!1;var n=objectUtils.extend({},t);return n.sameOrigin=!0,r.enabled(n)&&IframeTransport.enabled()},e.transportName="iframe-"+r.transportName,e.needBody=!0,e.roundTrips=IframeTransport.roundTrips+r.roundTrips-1,e.facadeTransport=r,e}; + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../../utils/object":63,"../iframe":36,"inherits":6}],41:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),EventEmitter=require("events").EventEmitter,debug=function(){};function Polling(e,i,t){debug(i),EventEmitter.call(this),this.Receiver=e,this.receiveUrl=i,this.AjaxObject=t,this._scheduleReceiver()}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:polling")),inherits(Polling,EventEmitter),Polling.prototype._scheduleReceiver=function(){debug("_scheduleReceiver");var e=this,i=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);i.on("message",function(i){debug("message",i),e.emit("message",i)}),i.once("close",function(t,l){debug("close",t,l,e.pollIsClosing),e.poll=i=null,e.pollIsClosing||("network"===l?e._scheduleReceiver():(e.emit("close",t||1006,l),e.removeAllListeners()))})},Polling.prototype.abort=function(){debug("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},module.exports=Polling; + +}).call(this)}).call(this,require('_process')) +},{"_process":12,"debug":3,"events":17,"inherits":6}],42:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),urlUtils=require("../../utils/url"),BufferedSender=require("./buffered-sender"),Polling=require("./polling"),debug=function(){};function SenderReceiver(e,l,r,i,s){var o=urlUtils.addPath(e,l);debug(o);var n=this;BufferedSender.call(this,e,r),this.poll=new Polling(i,o,s),this.poll.on("message",function(e){debug("poll message",e),n.emit("message",e)}),this.poll.once("close",function(e,l){debug("poll close",e,l),n.poll=null,n.emit("close",e,l),n.close()})}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:sender-receiver")),inherits(SenderReceiver,BufferedSender),SenderReceiver.prototype.close=function(){BufferedSender.prototype.close.call(this),debug("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},module.exports=SenderReceiver; + +}).call(this)}).call(this,require('_process')) +},{"../../utils/url":66,"./buffered-sender":39,"./polling":41,"_process":12,"debug":3,"inherits":6}],43:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),EventEmitter=require("events").EventEmitter,EventSourceDriver=require("eventsource"),debug=function(){};function EventSourceReceiver(e){debug(e),EventEmitter.call(this);var t=this,r=this.es=new EventSourceDriver(e);r.onmessage=function(e){debug("message",e.data),t.emit("message",decodeURI(e.data))},r.onerror=function(e){debug("error",r.readyState,e);var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:receiver:eventsource")),inherits(EventSourceReceiver,EventEmitter),EventSourceReceiver.prototype.abort=function(){debug("abort"),this._cleanup(),this._close("user")},EventSourceReceiver.prototype._cleanup=function(){debug("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},EventSourceReceiver.prototype._close=function(e){debug("close",e);var t=this;setTimeout(function(){t.emit("close",null,e),t.removeAllListeners()},200)},module.exports=EventSourceReceiver; + +}).call(this)}).call(this,require('_process')) +},{"_process":12,"debug":3,"events":17,"eventsource":32,"inherits":6}],44:[function(require,module,exports){ +(function (process,global){(function (){ +"use strict";var inherits=require("inherits"),iframeUtils=require("../../utils/iframe"),urlUtils=require("../../utils/url"),EventEmitter=require("events").EventEmitter,random=require("../../utils/random"),debug=function(){};function HtmlfileReceiver(e){debug(e),EventEmitter.call(this);var i=this;iframeUtils.polluteGlobalNamespace(),this.id="a"+random.string(6),e=urlUtils.addQuery(e,"c="+decodeURIComponent(iframeUtils.WPrefix+"."+this.id)),debug("using htmlfile",HtmlfileReceiver.htmlfileEnabled);var t=HtmlfileReceiver.htmlfileEnabled?iframeUtils.createHtmlfile:iframeUtils.createIframe;global[iframeUtils.WPrefix][this.id]={start:function(){debug("start"),i.iframeObj.loaded()},message:function(e){debug("message",e),i.emit("message",e)},stop:function(){debug("stop"),i._cleanup(),i._close("network")}},this.iframeObj=t(e,function(){debug("callback"),i._cleanup(),i._close("permanent")})}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:receiver:htmlfile")),inherits(HtmlfileReceiver,EventEmitter),HtmlfileReceiver.prototype.abort=function(){debug("abort"),this._cleanup(),this._close("user")},HtmlfileReceiver.prototype._cleanup=function(){debug("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete global[iframeUtils.WPrefix][this.id]},HtmlfileReceiver.prototype._close=function(e){debug("_close",e),this.emit("close",null,e),this.removeAllListeners()},HtmlfileReceiver.htmlfileEnabled=!1;var axo=["Active"].concat("Object").join("X");if(axo in global)try{HtmlfileReceiver.htmlfileEnabled=!!new global[axo]("htmlfile")}catch(e){}HtmlfileReceiver.enabled=HtmlfileReceiver.htmlfileEnabled||iframeUtils.iframeEnabled,module.exports=HtmlfileReceiver; + +}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../../utils/iframe":61,"../../utils/random":64,"../../utils/url":66,"_process":12,"debug":3,"events":17,"inherits":6}],45:[function(require,module,exports){ +(function (process,global){(function (){ +"use strict";var utils=require("../../utils/iframe"),random=require("../../utils/random"),browser=require("../../utils/browser"),urlUtils=require("../../utils/url"),inherits=require("inherits"),EventEmitter=require("events").EventEmitter,debug=function(){};function JsonpReceiver(e){debug(e);var t=this;EventEmitter.call(this),utils.polluteGlobalNamespace(),this.id="a"+random.string(6);var r=urlUtils.addQuery(e,"c="+encodeURIComponent(utils.WPrefix+"."+this.id));global[utils.WPrefix][this.id]=this._callback.bind(this),this._createScript(r),this.timeoutId=setTimeout(function(){debug("timeout"),t._abort(new Error("JSONP script loaded abnormally (timeout)"))},JsonpReceiver.timeout)}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:receiver:jsonp")),inherits(JsonpReceiver,EventEmitter),JsonpReceiver.prototype.abort=function(){if(debug("abort"),global[utils.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},JsonpReceiver.timeout=35e3,JsonpReceiver.scriptErrorTimeout=1e3,JsonpReceiver.prototype._callback=function(e){debug("_callback",e),this._cleanup(),this.aborting||(e&&(debug("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},JsonpReceiver.prototype._abort=function(e){debug("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},JsonpReceiver.prototype._cleanup=function(){if(debug("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete global[utils.WPrefix][this.id]},JsonpReceiver.prototype._scriptError=function(){debug("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout(function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))},JsonpReceiver.scriptErrorTimeout))},JsonpReceiver.prototype._createScript=function(e){debug("_createScript",e);var t,r=this,i=this.script=global.document.createElement("script");if(i.id="a"+random.string(8),i.src=e,i.type="text/javascript",i.charset="UTF-8",i.onerror=this._scriptError.bind(this),i.onload=function(){debug("onload"),r._abort(new Error("JSONP script loaded abnormally (onload)"))},i.onreadystatechange=function(){if(debug("onreadystatechange",i.readyState),/loaded|closed/.test(i.readyState)){if(i&&i.htmlFor&&i.onclick){r.loadedOkay=!0;try{i.onclick()}catch(e){}}i&&r._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===i.async&&global.document.attachEvent)if(browser.isOpera())(t=this.script2=global.document.createElement("script")).text="try{var a = document.getElementById('"+i.id+"'); if(a)a.onerror();}catch(x){};",i.async=t.async=!1;else{try{i.htmlFor=i.id,i.event="onclick"}catch(e){}i.async=!0}void 0!==i.async&&(i.async=!0);var o=global.document.getElementsByTagName("head")[0];o.insertBefore(i,o.firstChild),t&&o.insertBefore(t,o.firstChild)},module.exports=JsonpReceiver; + +}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"../../utils/browser":58,"../../utils/iframe":61,"../../utils/random":64,"../../utils/url":66,"_process":12,"debug":3,"events":17,"inherits":6}],46:[function(require,module,exports){ +(function (process){(function (){ +"use strict";var inherits=require("inherits"),EventEmitter=require("events").EventEmitter,debug=function(){};function XhrReceiver(e,i){debug(e),EventEmitter.call(this);var t=this;this.bufferPosition=0,this.xo=new i("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(e,i){debug("finish",e,i),t._chunkHandler(e,i),t.xo=null;var r=200===e?"network":"permanent";debug("close",r),t.emit("close",null,r),t._cleanup()})}"production"!==process.env.NODE_ENV&&(debug=require("debug")("sockjs-client:receiver:xhr")),inherits(XhrReceiver,EventEmitter),XhrReceiver.prototype._chunkHandler=function(e,i){if(debug("_chunkHandler",e),200===e&&i)for(var t=-1;;this.bufferPosition+=t+1){var r=i.slice(this.bufferPosition);if(-1===(t=r.indexOf("\n")))break;var n=r.slice(0,t);n&&(debug("message",n),this.emit("message",n))}},XhrReceiver.prototype._cleanup=function(){debug("_cleanup"),this.removeAllListeners()},XhrReceiver.prototype.abort=function(){debug("abort"),this.xo&&(this.xo.close(),debug("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},module.exports=XhrReceiver; + +}).call(this)}).call(this,require('_process')) +},{"_process":12,"debug":3,"events":17,"inherits":6}],47:[function(require,module,exports){ +(function (process,global){(function (){ +"use strict";var form,area,random=require("../../utils/random"),urlUtils=require("../../utils/url"),debug=function(){};function createIframe(e){debug("createIframe",e);try{return global.document.createElement('