Difference between revisions of "Team:Nottingham/react/main"

Line 1: Line 1:
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=566)}([function(t,e,n){"use strict";t.exports=n(565)},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(258);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(553);function i(){return t.exports=i=r||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(this,arguments)}t.exports=i},function(t,e,n){var r;
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=566)}([function(t,e,n){"use strict";t.exports=n(565)},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(259);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(553);function i(){return t.exports=i=r||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(this,arguments)}t.exports=i},function(t,e,n){var r;
 
/*!
 
/*!
 
   Copyright (c) 2017 Jed Watson.
 
   Copyright (c) 2017 Jed Watson.
Line 10: Line 10:
 
   http://jedwatson.github.io/classnames
 
   http://jedwatson.github.io/classnames
 
*/
 
*/
!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&t.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}void 0!==t&&t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){t.exports=n(556)()},function(t,e,n){var r=n(50),i=n(1);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(490),i=n(53)(r);t.exports=i},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(258);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(t,i.key,i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}},function(t,e,n){var r=n(526),i=n(253);function o(e){return t.exports=o=i?r:function(t){return t.__proto__||r(t)},o(e)}t.exports=o},function(t,e,n){var r=n(520),i=n(517);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},function(t,e,n){var r=n(244),i=n(243),o=n(242),a=n(2);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},s=o(n);"function"==typeof i&&(s=s.concat(i(n).filter(function(t){return r(n,t).enumerable}))),s.forEach(function(e){a(t,e,n[e])})}return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82),i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o="[DEFAULT]",a=[],s=function(){function t(t,e,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(t),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(t){a.push(t),setTimeout(function(){return t(null)},0)},removeAuthTokenListener:function(t){a=a.filter(function(e){return e!==t})}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(t){this.checkDestroyed_(),this._automaticDataCollectionEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){t.firebase_.INTERNAL.removeApp(t.name_);var e=[];return Object.keys(t.services_).forEach(function(n){Object.keys(t.services_[n]).forEach(function(r){e.push(t.services_[n][r])})}),Promise.all(e.map(function(t){return t.INTERNAL.delete()}))}).then(function(){t.isDeleted_=!0,t.services_={}})},t.prototype._getService=function(t,e){if(void 0===e&&(e=o),this.checkDestroyed_(),this.services_[t]||(this.services_[t]={}),!this.services_[t][e]){var n=e!==o?e:void 0,r=this.firebase_.INTERNAL.factories[t](this,this.extendApp.bind(this),n);this.services_[t][e]=r}return this.services_[t][e]},t.prototype.extendApp=function(t){var e=this;r.deepExtend(this,t),t.INTERNAL&&t.INTERNAL.addAuthTokenListener&&(a.forEach(function(t){e.INTERNAL.addAuthTokenListener(t)}),a=[])},t.prototype.checkDestroyed_=function(){this.isDeleted_&&u("app-deleted",{name:this.name_})},t}();function u(t,e){throw c.create(t,e)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),l=function t(){var e={},n={},a={},c={__esModule:!0,initializeApp:function(t,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var a=n;void 0===a.name&&(a.name=o);var l=a.name;"string"==typeof l&&l||u("bad-app-name",{name:l+""}),i(e,l)&&u("duplicate-app",{name:l});var f=new s(t,a,c);return e[l]=f,h(f,"create"),f},app:l,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(t,e,i,o,h){n[t]&&u("duplicate-service",{name:t}),n[t]=e,o&&(a[t]=o,f().forEach(function(t){o("create",t)}));var p=function(e){return void 0===e&&(e=l()),"function"!=typeof e[t]&&u("invalid-app-argument",{name:t}),e[t]()};return void 0!==i&&r.deepExtend(p,i),c[t]=p,s.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,h?e:[])},p},createFirebaseNamespace:t,extendNamespace:function(t){r.deepExtend(c,t)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(t){h(e[t],"delete"),delete e[t]},factories:n,useAsService:p,Promise:Promise,deepExtend:r.deepExtend}};function l(t){return i(e,t=t||o)||u("no-app",{name:t}),e[t]}function f(){return Object.keys(e).map(function(t){return e[t]})}function h(t,e){Object.keys(n).forEach(function(n){var r=p(t,n);null!==r&&a[r]&&a[r](e,t)})}function p(t,e){if("serverAuth"===e)return null;var n=e;return t.options,n}return r.patchProperty(c,"default",c),Object.defineProperty(c,"apps",{get:f}),r.patchProperty(l,"App",s),c}();e.firebase=l,e.default=l},function(t,e,n){var r=n(48),i=n(34),o=n(201),a=n(18);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(241),i=n(53),o=n(119),a=i(function(t,e){return o(t)?r(t,e):[]});t.exports=a},function(t,e,n){"use strict";for(var r=function(t){return null!==t&&!Array.isArray(t)&&"object"==typeof t},i={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},o=0;o<24;o+=1)i[112+o]="F"+(o+1);for(var a=0;a<26;a+=1){var s=a+65;i[s]=[String.fromCharCode(s+32),String.fromCharCode(s)]}var u={codes:i,getCode:function(t){return r(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var e=r(t),n=i[e?t.keyCode||t.which:t];return Array.isArray(n)&&(n=e?n[t.shiftKey?1:0]:n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};u.Spacebar=u[" "],u.Digit0=u[0],u.Digit1=u[1],u.Digit2=u[2],u.Digit3=u[3],u.Digit4=u[4],u.Digit5=u[5],u.Digit6=u[6],u.Digit7=u[7],u.Digit8=u[8],u.Digit9=u[9],u.Tilde=u["~"],u.GraveAccent=u["`"],u.ExclamationPoint=u["!"],u.AtSign=u["@"],u.PoundSign=u["#"],u.PercentSign=u["%"],u.Caret=u["^"],u.Ampersand=u["&"],u.PlusSign=u["+"],u.MinusSign=u["-"],u.EqualsSign=u["="],u.DivisionSign=u["/"],u.MultiplicationSign=u["*"],u.Comma=u[","],u.Decimal=u["."],u.Colon=u[":"],u.Semicolon=u[";"],u.Pipe=u["|"],u.BackSlash=u["\\"],u.QuestionMark=u["?"],u.SingleQuote=u["'"],u.DoubleQuote=u['"'],u.LeftCurlyBrace=u["{"],u.RightCurlyBrace=u["}"],u.LeftParenthesis=u["("],u.RightParenthesis=u[")"],u.LeftAngleBracket=u["<"],u.RightAngleBracket=u[">"],u.LeftSquareBracket=u["["],u.RightSquareBracket=u["]"],t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(121),i=n(38),o=n(96),a=n(46),s=n(72),u=Math.max;t.exports=function(t,e,n,c){t=i(t)?t:s(t),n=n&&!c?a(n):0;var l=t.length;return n<0&&(n=u(l+n,0)),o(t)?n<=l&&t.indexOf(e,n)>-1:!!l&&r(t,e,n)>-1}},function(t,e,n){var r=n(125);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e){t.exports={}},function(t,e,n){var r=n(436),i=n(435),o=n(424);t.exports=function(t){return r(t)||i(t)||o()}},function(t,e,n){var r=n(423),i=n(421);t.exports=function(t,e,n){return r(i,t,e,n)}},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;(u=new Error(e.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){var r=n(237),i=n(114),o=n(38);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(87),i=n(62),o=n(221),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(447),i=n(446),o=n(442);t.exports=function(t,e){return r(t)||i(t,e)||o()}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(251),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(467),i=n(454),o=n(47),a=n(18),s=n(452);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(516),i=n(252);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(23)("map",n(15));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"someByType",function(){return nt}),n.d(r,"findByType",function(){return rt}),n.d(r,"isNil",function(){return it});var i={};n.r(i),n.d(i,"COLORS",function(){return xe}),n.d(i,"FLOATS",function(){return Se}),n.d(i,"SIZES",function(){return ke}),n.d(i,"TEXT_ALIGNMENTS",function(){return Ne}),n.d(i,"VERTICAL_ALIGNMENTS",function(){return Ae}),n.d(i,"VISIBILITY",function(){return Ie}),n.d(i,"WIDTHS",function(){return Oe}),n.d(i,"DIRECTIONAL_TRANSITIONS",function(){return Pe}),n.d(i,"STATIC_TRANSITIONS",function(){return Re}),n.d(i,"TRANSITIONS",function(){return De}),n.d(i,"ACCESSIBILITY",function(){return Me}),n.d(i,"ARROWS",function(){return Le}),n.d(i,"AUDIO_VIDEO",function(){return Fe}),n.d(i,"BUSINESS",function(){return Ue}),n.d(i,"CHESS",function(){return je}),n.d(i,"CODE",function(){return Be}),n.d(i,"COMMUNICATION",function(){return qe}),n.d(i,"COMPUTERS",function(){return Ve}),n.d(i,"CURRENCY",function(){return We}),n.d(i,"DATE_TIME",function(){return He}),n.d(i,"DESIGN",function(){return ze}),n.d(i,"EDITORS",function(){return Ke}),n.d(i,"FILES",function(){return Ge}),n.d(i,"GENDERS",function(){return Qe}),n.d(i,"HANDS_GESTURES",function(){return Ye}),n.d(i,"HEALTH",function(){return Xe}),n.d(i,"IMAGES",function(){return $e}),n.d(i,"INTERFACES",function(){return Je}),n.d(i,"LOGISTICS",function(){return Ze}),n.d(i,"MAPS",function(){return tn}),n.d(i,"MEDICAL",function(){return en}),n.d(i,"OBJECTS",function(){return nn}),n.d(i,"PAYMENTS_SHOPPING",function(){return rn}),n.d(i,"SHAPES",function(){return on}),n.d(i,"SPINNERS",function(){return an}),n.d(i,"SPORTS",function(){return sn}),n.d(i,"STATUS",function(){return un}),n.d(i,"USERS_PEOPLE",function(){return cn}),n.d(i,"VEHICLES",function(){return ln}),n.d(i,"WRITING",function(){return fn}),n.d(i,"BRANDS",function(){return hn}),n.d(i,"ICONS",function(){return pn}),n.d(i,"ICON_ALIASES",function(){return dn}),n.d(i,"ICONS_AND_ALIASES",function(){return vn}),n.d(i,"COMPONENT_CONTEXT_SPECIFIC_ICONS",function(){return mn}),n.d(i,"ALL_ICONS_IN_ALL_CONTEXTS",function(){return yn});var o=n(3),a=n.n(o),s=n(8),u=n.n(s),c=n(9),l=n.n(c),f=n(6),h=n.n(f),p=n(10),d=n.n(p),v=n(11),m=n.n(v),y=n(1),g=n.n(y),b=n(2),_=n.n(b),w=n(35),E=n.n(w),T=n(7),C=n.n(T),x=(n(5),n(0)),S=n.n(x),k=n(12),N=n.n(k),A=n(99),I=n.n(A),O=n(32),P=n.n(O),R=(n(475),n(73)),D=n.n(R),M=n(45),L=n.n(M),F=n(28),U=n.n(F),j=(n(450),n(98)),B=n.n(j),q=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e[t];if(void 0!==o)return o;if(i){var a=e[(r=t,"default".concat(r[0].toUpperCase()+r.slice(1)))];if(void 0!==a)return a;if(n){var s=n[t];if(void 0!==s)return s}}return"checked"!==t&&("value"===t?e.multiple?[]:"":void 0)},V=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"trySetState",function(t,e){var r=n.constructor.autoControlledProps,i=Object.keys(t).reduce(function(e,i){return void 0!==n.props[i]?e:-1===r.indexOf(i)?e:(e[i]=t[i],e)},{});e&&(i=N()({},i,e)),Object.keys(i).length>0&&n.setState(i)});var a=n.constructor.autoControlledProps,s=C()(g()(g()(n)),"getInitialAutoControlledState",n.props)||{},c=a.reduce(function(t,e){return t[e]=q(e,n.props,s,!0),t},{});return n.state=N()({},s,c),n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.constructor.autoControlledProps.reduce(function(n,r){var i=P()(t[r]),o=!P()(e.props[r])&&i;return i?o&&(n[r]=q(r,t)):n[r]=t[r],n},{});Object.keys(n).length>0&&this.setState(n)}}]),e}(x.Component),W=n(31),H=n.n(W),z=n(29),K=n.n(z),G=n(295),Q=n.n(G),Y=function(t){return Q()(D()(x.Children.toArray(t),x.isValidElement),"key")},X=function(t,e,n){return E()(n,t)?n[t]:e[t]},$=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=function(t,e){var n={},r=[];return K()(U()(t),function(t){E()(e,t)?r.length&&(n[t]=r,r=[]):r.push(t)}),[n,r]}(t,e),i=H()(r,2),o=i[0],a=i[1];return K()(U()(e),function(r){E()(o,r)&&K()(o[r],function(r){n[r]=X(r,t,e)}),n[r]=X(r,t,e)}),K()(a,function(r){n[r]=X(r,t,e)}),n},J=n(143),Z=n.n(J),tt=n(59),et=n.n(tt),nt=function(t,e){return et()(x.Children.toArray(t),{type:e})},rt=function(t,e){return Z()(x.Children.toArray(t),{type:e})},it=function(t){return null===t||void 0===t||Array.isArray(t)&&0===t.length},ot=n(50),at=n.n(ot),st={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function ut(t){var e=at()(t);return"string"===e||"number"===e?st[t]||t:""}var ct=function(t,e){return t&&e},lt=function(t,e){return t&&!0!==t&&"".concat(t," ").concat(e)},ft=function(t,e){return t&&(!0===t?e:"".concat(t," ").concat(e))},ht=function(t,e){return t&&!0!==t?t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(t){return"".concat(t.replace("-"," ")," ").concat(e)}).join(" "):null},pt=function(t){return"justified"===t?"justified":lt(t,"aligned")},dt=function(t){return lt(t,"aligned")},vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&"equal"===t)return"equal width";var n=at()(t);return"string"!==n&&"number"!==n||!e?ut(t):"".concat(ut(t)," ").concat(e)},mt=n(22),yt=n.n(mt),gt=(n(294),n(293),n(292),n(291),n(146),n(290),n(289),n(195),n(145),n(288),n(287),n(194),n(193),n(36)),bt=n.n(gt),_t=n(75),wt=n.n(_t),Et=(n(286),n(13)),Tt=n.n(Et),Ct="object"===("undefined"==typeof document?"undefined":at()(document))&&null!==document,xt="object"===("undefined"==typeof window?"undefined":at()(window))&&null!==window&&window.self===window,St=function t(){return Tt()(t.override)?Ct&&xt:t.override};St();var kt=function(){function t(e){u()(this,t),this.handlers=new Set(e)}return l()(t,[{key:"addHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t),n.add(t)}),new t(n)}},{key:"dispatchEvent",value:function(t,e){e?this.handlers.forEach(function(e){e(t)}):yt()(this.handlers).pop()(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t)}),new t(n)}}]),t}(),Nt=function(){function t(e,n){u()(this,t),this.handlerSets=n,this.poolName=e}return l()(t,[{key:"addHandlers",value:function(e,n){var r=new Map(this.handlerSets);return r.has(e)?r.set(e,r.get(e).addHandlers(n)):r.set(e,new kt(n)),new t(this.poolName,r)}},{key:"dispatchEvent",value:function(t,e){var n=this.handlerSets.get(t);n&&n.dispatchEvent(e,"default"===this.poolName)}},{key:"hasHandlers",value:function(t){var e=this.handlerSets.get(t);return!!e&&e.hasHandlers()}},{key:"removeHandlers",value:function(e,n){var r=new Map(this.handlerSets);if(!r.has(e))return new t(this.poolName,r);var i=r.get(e).removeHandlers(n);return i.hasHandlers()?r.set(e,i):r.delete(e),new t(this.poolName,r)}}]),t}();_()(Nt,"createByType",function(t,e,n){var r=new Map;return r.set(e,new kt(n)),new Nt(t,r)});var At=function(){function t(e){u()(this,t),_()(this,"handlers",new Map),_()(this,"pools",new Map),_()(this,"createEmitter",function(t,e){return function(n){e.forEach(function(e){e.dispatchEvent(t,n)})}}),this.target=e}return l()(t,[{key:"addHandlers",value:function(t,e,n){this.removeTargetHandler(e),this.pools.has(t)?this.pools.set(t,this.pools.get(t).addHandlers(e,n)):this.pools.set(t,Nt.createByType(t,e,n)),this.addTargetHandler(e)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,e,n){var r=this.pools.get(t);if(r){var i=r.removeHandlers(e,n);i.hasHandlers(e)?(this.removeTargetHandler(e),this.pools.set(t,i)):(this.removeTargetHandler(e),this.pools.delete(t)),this.pools.size>0&&this.addTargetHandler(e)}}},{key:"addTargetHandler",value:function(t){var e=this.createEmitter(t,this.pools);this.handlers.set(t,e),this.target.addEventListener(t,e)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t)),this.handlers.delete(t))}}]),t}(),It=n(18),Ot=n.n(It),Pt=function(t){return Ot()(t)?t:[t]},Rt=function(t){return"document"===t?document:"window"===t?window:t||document},Dt=new(function(){function t(){var e=this;u()(this,t),_()(this,"targets",new Map),_()(this,"getTarget",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Rt(t);if(e.targets.has(r))return e.targets.get(r);if(!n)return null;var i=new At(r);return e.targets.set(r,i),i}),_()(this,"removeTarget",function(t){e.targets.delete(Rt(t))})}return l()(t,[{key:"sub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o;this.getTarget(i).addHandlers(a,t,Pt(e))}}},{key:"unsub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o,s=this.getTarget(i,!1);s&&(s.removeHandlers(a,t,Pt(e)),s.hasHandlers()||this.removeTarget(i))}}}]),t}()),Mt=n(74),Lt=n.n(Mt),Ft=n(81),Ut=n.n(Ft),jt=n(44),Bt=n.n(jt),qt=n(60),Vt=n.n(qt),Wt=n(96),Ht=n.n(Wt),zt=n(285),Kt=n.n(zt),Gt=n(4),Qt=n.n(Gt);function Yt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthand() Component must be a string or function.");if(Tt()(n)||Kt()(n))return null;var i=Ht()(n),o=Vt()(n),a=Bt()(n),s=Object(x.isValidElement)(n),u=Ut()(n),c=i||o||Ot()(n);if(!(a||s||u||c))return null;var l=r.defaultProps,f=void 0===l?{}:l,h=s&&n.props||u&&n||c&&e(n),p=r.overrideProps,d=void 0===p?{}:p;d=Bt()(d)?d(N()({},f,h)):d;var v=N()({},f,h,d);if(f.className||d.className||h.className){var m=Qt()(f.className,d.className,h.className);v.className=Lt()(m.split(" ")).join(" ")}if((f.style||d.style||h.style)&&(v.style=N()({},f.style,h.style,d.style)),Tt()(v.key)){var y=v.childKey,g=r.autoGenerateKey,b=void 0===g||g;Tt()(y)?b&&(i||o)&&(v.key=n):(v.key="function"==typeof y?y(v):y,delete v.childKey)}return s?Object(x.cloneElement)(n,v):c||u?S.a.createElement(t,v):a?n(t,v,v.children):void 0}function Xt(t,e){if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthandFactory() Component must be a string or function.");return function(n,r){return Yt(t,e,n,r)}}Yt.handledProps=[];var $t=Xt("div",function(t){return{children:t}}),Jt=Xt("iframe",function(t){return{src:t}}),Zt=Xt("img",function(t){return{src:t}}),te=Xt("input",function(t){return{type:t}}),ee=Xt("label",function(t){return{children:t}}),ne=Xt("p",function(t){return{children:t}}),re=function(t,e){var n=t.handledProps,r=void 0===n?[]:n;return Object.keys(e).reduce(function(t,n){return"childKey"===n?t:(-1===r.indexOf(n)&&(t[n]=e[n]),t)},{})};var ie=function(t,e,n){var r=t.defaultProps,i=void 0===r?{}:r;if(e.as&&e.as!==i.as)return e.as;if(n){var o=n();if(o)return o}return e.href?"a":i.as||"div"},oe=n(19),ae=n.n(oe),se=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","type","value"],ue=se.concat(["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]),ce=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.htmlProps,r=void 0===n?ue:n,i=e.includeAria,o=void 0===i||i,a={},s={};return K()(t,function(t,e){var n=o&&(/^aria-.*$/.test(e)||"role"===e);(ae()(r,e)||n?a:s)[e]=t}),[a,s]},le=n(100),fe=n.n(le),he=n(284),pe=n.n(he),de=function(t,e){if(et()([e,t],Tt.a))return!1;if(e.target&&(C()(e.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return C()(e.target,"removeAttribute","data-suir-click-target"),t.contains(e.target);var n=e.clientX,r=e.clientY;if(et()([n,r],Tt.a))return!1;var i=t.getClientRects();if(!(t.offsetWidth&&t.offsetHeight&&i&&i.length))return!1;var o=pe()(i),a=o.top,s=o.bottom,u=o.left,c=o.right;return!et()([a,s,u,c],Tt.a)&&fe()(r,a,s+.001)&&fe()(n,u,c+.001)},ve=function(t){return{active:!1,type:"ellipsisItem",value:t}},me=n(283),ye=n.n(me),ge=n(15),be=n.n(ge),_e=function(t,e,n){return be()(ye()(t,e+1),n)},we=function(t,e){var n=t.activePage,r=t.boundaryRange,i=t.siblingRange,o=t.totalPages,a=r,s=_e(1,a,e),u=o+1-r,c=_e(u,o,e),l=Math.min(Math.max(n-i,a+2),u-1-2*i-1),f=l+2*i,h=_e(l,f,e);return yt()(s).concat([function(t,e,n){var r=e-1;return(r!==t+1?ve:n)(r)}(a,l,e)],yt()(h),[function(t,e,n){var r=t+1;return(r!==e-1?ve:n)(r)}(f,u,e)],yt()(c)).filter(Boolean)},Ee=function(t){var e,n,r,i={activePage:+(e=t).activePage,boundaryRange:+e.boundaryRange,siblingRange:+e.siblingRange,totalPages:+e.totalPages},o=i.activePage,a=i.totalPages,s=function(t){return function(e){return{active:t===e,type:"pageItem",value:e}}}(o),u=(r=(n=i).boundaryRange,3+2*n.siblingRange+2*r>=n.totalPages?_e(1,a,s):we(i,s));return[{active:!1,type:"firstItem",value:1},function(t){return{active:!1,type:"prevItem",value:Math.max(1,t-1)}}(o)].concat(yt()(u),[function(t,e){return{active:!1,type:"nextItem",value:Math.min(t+1,e)}}(o,a),function(t){return{active:!1,type:"lastItem",value:t}}(a)])},Te=n(72),Ce=n.n(Te),xe=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],Se=["left","right"],ke=["mini","tiny","small","medium","large","big","huge","massive"],Ne=["left","center","right","justified"],Ae=["bottom","middle","top"],Ie=["mobile","tablet","computer","large screen","widescreen"],Oe=yt()(U()(st)).concat(yt()(U()(st).map(Number)),yt()(Ce()(st))),Pe=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"],Re=["jiggle","flash","shake","pulse","tada","bounce","glow"],De=Pe.concat(Re),Me=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"],Le=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign in alternate","sign out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload"],Fe=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"],Ue=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"],je=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"],Be=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"],qe=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"],Ve=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"],We=["dollar sign","euro sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"],He=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"],ze=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"],Ke=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"],Ge=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"],Qe=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"],Ye=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"],Xe=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"],$e=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"],Je=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign in alternate","sign out alternate","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"],Ze=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"],tn=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"],en=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"],nn=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"],rn=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"],on=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"],an=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"],sn=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"],un=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"],cn=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"],ln=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"],fn=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"],hn=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin in","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"],pn=Lt()(Me.concat(Le,Fe,Ue,je,Be,qe,Ve,We,He,ze,Ke,Ge,Qe,Ye,Xe,$e,Je,Ze,tn,en,nn,rn,on,an,sn,un,cn,ln,fn,hn)),dn=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","credit card amazon pay","credit card american express","credit card diners club","credit card discover","credit card jcb","credit card mastercard","credit card paypal","credit card stripe","credit card visa","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","american express card","american express","amex","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery medium","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","diners club card","diners club","discover card","discover","discussions","doctor","dollar","dont","dribble","drivers license","dropdown","eercast","emergency","envira gallery","erase","eur","euro","eyedropper","fa","factory","favorite","feed","female homosexual","file text","find","first aid","five hundred pixels","fork","game","gay","gbp","gittip","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","japan credit bureau card","japan credit bureau","jcb","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","mastercard card","mastercard","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","optinmonster","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","pocket","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme isle","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","visa card","visa","volume control phone","wait","warning circle","warning sign","warning","wechat","wi-fi","wikipedia","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yc","ycombinator","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"],vn=Lt()(yt()(pn).concat(dn)),mn=["left dropdown"],yn=Lt()(yt()(vn).concat(mn)),gn=function(t,e){return"number"==typeof t||"string"==typeof t?t:t[e]},bn=n(142),_n=n.n(bn),wn=(n(282),n(190)),En=n.n(wn).a,Tn=n(16),Cn=n.n(Tn);function xn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()(o,"icons",n),u=re(xn,t),c=ie(xn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}xn.handledProps=["as","children","className","content","size"],xn.propTypes={},xn.defaultProps={as:"i"};var Sn=xn,kn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"getIconAriaOptions",value:function(){var t={};return this.props["aria-label"]||(t["aria-hidden"]="true"),t}},{key:"render",value:function(){var t=this.props,n=t.bordered,r=t.circular,i=t.className,o=t.color,s=t.corner,u=t.disabled,c=t.fitted,l=t.flipped,f=t.inverted,h=t.link,p=t.loading,d=t.name,v=t.rotated,m=t.size,y=Qt()(o,d,m,ct(n,"bordered"),ct(r,"circular"),ct(s,"corner"),ct(u,"disabled"),ct(c,"fitted"),ct(f,"inverted"),ct(h,"link"),ct(p,"loading"),lt(l,"flipped"),lt(v,"rotated"),"icon",i),g=re(e,this.props),b=ie(e,this.props),_=this.getIconAriaOptions();return S.a.createElement(b,a()({},g,_,{className:y}))}}]),e}(x.Component);_()(kn,"defaultProps",{as:"i"}),_()(kn,"Group",Sn),_()(kn,"handledProps",["aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"]),kn.propTypes={},kn.create=Xt(kn,function(t){return{name:t}});var Nn=kn,An=n(17),In=n.n(An),On=n(83),Pn=n.n(On),Rn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.innerRef;t&&t(Object(On.findDOMNode)(this))}},{key:"render",value:function(){var t=this.props.children;return x.Children.only(t)}}]),e}(x.Component);_()(Rn,"handledProps",["children","innerRef"]),Rn.propTypes={};var Dn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDocumentClick",function(t){var e=r.props,n=e.closeOnDocumentClick,i=e.closeOnRootNodeClick;if(r.rootNode&&r.portalNode&&!de(r.triggerNode,t)&&!de(r.portalNode,t)){var o=de(r.rootNode,t);(n&&!o||i&&o)&&r.close(t)}}),_()(g()(g()(r)),"handleEscape",function(t){r.props.closeOnEscape&&In.a.getCode(t)===In.a.Escape&&r.close(t)}),_()(g()(g()(r)),"handlePortalMouseLeave",function(t){var e=r.props,n=e.closeOnPortalMouseLeave,i=e.mouseLeaveDelay;n&&(r.mouseLeaveTimer=r.closeWithTimeout(t,i))}),_()(g()(g()(r)),"handlePortalMouseEnter",function(){r.props.closeOnPortalMouseLeave&&clearTimeout(r.mouseLeaveTimer)}),_()(g()(g()(r)),"handleTriggerBlur",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerBlur,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onBlur",t].concat(a));var u=C()(g()(g()(r)),"rootNode.contains",t.relatedTarget);i&&!u&&r.close(t)}),_()(g()(g()(r)),"handleTriggerClick",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerClick,o=e.openOnTriggerClick,a=r.state.open,s=arguments.length,u=new Array(s>1?s-1:0),c=1;c<s;c++)u[c-1]=arguments[c];C.a.apply(void 0,[n,"props.onClick",t].concat(u)),a&&i?r.close(t):!a&&o&&r.open(t)}),_()(g()(g()(r)),"handleTriggerFocus",function(t){for(var e=r.props,n=e.trigger,i=e.openOnTriggerFocus,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onFocus",t].concat(a)),i&&r.open(t)}),_()(g()(g()(r)),"handleTriggerMouseLeave",function(t){clearTimeout(r.mouseEnterTimer);for(var e=r.props,n=e.trigger,i=e.closeOnTriggerMouseLeave,o=e.mouseLeaveDelay,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseLeave",t].concat(s)),i&&(r.mouseLeaveTimer=r.closeWithTimeout(t,o))}),_()(g()(g()(r)),"handleTriggerMouseEnter",function(t){clearTimeout(r.mouseLeaveTimer);for(var e=r.props,n=e.trigger,i=e.mouseEnterDelay,o=e.openOnTriggerMouseEnter,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseEnter",t].concat(s)),o&&(r.mouseEnterTimer=r.openWithTimeout(t,i))}),_()(g()(g()(r)),"open",function(t){var e=r.props.onOpen;e&&e(t,r.props),r.trySetState({open:!0})}),_()(g()(g()(r)),"openWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.open(n)},e||0)}),_()(g()(g()(r)),"close",function(t){var e=r.props.onClose;e&&e(t,r.props),r.trySetState({open:!1})}),_()(g()(g()(r)),"closeWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.close(n)},e||0)}),_()(g()(g()(r)),"attachRenderSubTreeSubscribers",function(t){if(!r.rootNode)return null;r.portalNode=r.rootNode.firstElementChild,Dt.sub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.sub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode})}),_()(g()(g()(r)),"mountPortal",function(){if(St()&&!r.rootNode){var t=r.props,e=t.eventPool,n=t.mountNode,i=void 0===n?St()?document.body:null:n,o=t.prepend;r.rootNode=document.createElement("div"),o?i.insertBefore(r.rootNode,i.firstElementChild):i.appendChild(r.rootNode),Dt.sub("click",r.handleDocumentClick,{pool:e}),Dt.sub("keydown",r.handleEscape,{pool:e}),C()(r.props,"onMount",null,r.props)}}),_()(g()(g()(r)),"unmountPortal",function(){if(St()&&r.rootNode){var t=r.props.eventPool;Pn.a.unmountComponentAtNode(r.rootNode),r.rootNode.parentNode.removeChild(r.rootNode),Dt.unsub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.unsub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode}),r.rootNode=null,r.portalNode=null,Dt.unsub("click",r.handleDocumentClick,{pool:t}),Dt.unsub("keydown",r.handleEscape,{pool:t}),C()(r.props,"onUnmount",null,r.props)}}),_()(g()(g()(r)),"handleRef",function(t){return r.triggerNode=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(t,e){this.renderPortal(),e.open&&!this.state.open&&this.unmountPortal()}},{key:"componentWillUnmount",value:function(){this.unmountPortal(),clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"renderPortal",value:function(){var t=this;if(this.state.open){var e=this.props,n=e.children,r=e.className,i=e.eventPool,o=e.style;if(this.mountPortal(),!St())return null;this.rootNode.className=r||"",this.rootNode.style=o||"",this.portalNode&&(Dt.unsub("mouseleave",this.handlePortalMouseLeave,{pool:i,target:this.portalNode}),Dt.unsub("mouseenter",this.handlePortalMouseEnter,{pool:i,target:this.portalNode})),Pn.a.unstable_renderSubtreeIntoContainer(this,x.Children.only(n),this.rootNode,function(){return t.attachRenderSubTreeSubscribers(i)})}}},{key:"render",value:function(){var t=this.props.trigger;return t?S.a.createElement(Rn,{innerRef:this.handleRef},Object(x.cloneElement)(t,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})):null}}]),e}(V);_()(Dn,"defaultProps",{closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0}),_()(Dn,"autoControlledProps",["open"]),_()(Dn,"handledProps",["children","className","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnRootNodeClick","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","prepend","style","trigger"]),Dn.propTypes={};var Mn=Dn;function Ln(t){var e=t.blurring,n=t.className,i=t.children,o=t.content,s=t.dimmed,u=Qt()(ct(e,"blurring"),ct(s,"dimmed"),"dimmable",n),c=re(Ln,t),l=ie(Ln,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(i)?o:i)}Ln.handledProps=["as","blurring","children","className","content","dimmed"],Ln.propTypes={};var Fn=Ln,Un=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){C()(r.props,"onClick",t,r.props),r.contentRef&&r.contentRef!==t.target&&de(r.contentRef,t)||C()(r.props,"onClickOutside",t,r.props)}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"handleContentRef",function(t){return r.contentRef=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.active;this.props.active!==e&&this.toggleStyles(e)}},{key:"componentDidMount",value:function(){var t=this.props.active;this.toggleStyles(t)}},{key:"toggleStyles",value:function(t){this.ref&&(t?this.ref.style.setProperty("display","flex","important"):this.ref.style.removeProperty("display"))}},{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.inverted,l=t.page,f=t.simple,h=t.verticalAlign,p=Qt()("ui",ct(n,"active transition visible"),ct(u,"disabled"),ct(c,"inverted"),ct(l,"page"),ct(f,"simple"),dt(h),"dimmer",o),d=re(e,this.props),v=ie(e,this.props),m=r.isNil(i)?s:i;return S.a.createElement(v,a()({},d,{className:p,onClick:this.handleClick,ref:this.handleRef}),m&&S.a.createElement("div",{className:"content",ref:this.handleContentRef},m))}}]),e}(x.Component);_()(Un,"handledProps",["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"]),Un.propTypes={};var jn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handlePortalMount",function(){St()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))}),_()(g()(g()(r)),"handlePortalUnmount",function(){St()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.page,i=re(e,this.props);return r?S.a.createElement(Mn,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:n,openOnTriggerClick:!1},S.a.createElement(Un,a()({},i,{active:n,page:r}))):S.a.createElement(Un,a()({},i,{active:n,page:r}))}}]),e}(x.Component);function Bn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()("ui",o,n,"images"),u=re(Bn,t),c=ie(Bn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(jn,"Dimmable",Fn),_()(jn,"Inner",Un),_()(jn,"handledProps",["active","page"]),jn.propTypes={},jn.create=Xt(jn,function(t){return{content:t}}),Bn.handledProps=["as","children","className","content","size"],Bn.propTypes={};var qn=Bn,Vn=["alt","height","src","srcSet","width"];function Wn(t){var e=t.avatar,n=t.bordered,i=t.centered,o=t.children,s=t.circular,u=t.className,c=t.content,l=t.dimmer,f=t.disabled,h=t.floated,p=t.fluid,d=t.hidden,v=t.href,m=t.inline,y=t.label,g=t.rounded,b=t.size,_=t.spaced,w=t.verticalAlign,E=t.wrapped,T=t.ui,C=Qt()(ct(T,"ui"),b,ct(e,"avatar"),ct(n,"bordered"),ct(s,"circular"),ct(i,"centered"),ct(f,"disabled"),ct(p,"fluid"),ct(d,"hidden"),ct(m,"inline"),ct(g,"rounded"),ft(_,"spaced"),lt(h,"floated"),dt(w,"aligned"),"image",u),x=re(Wn,t),k=ce(x,{htmlProps:Vn}),N=H()(k,2),A=N[0],I=N[1],O=ie(Wn,t,function(){if(!(Tt()(l)&&Tt()(y)&&Tt()(E)&&r.isNil(o)))return"div"});return r.isNil(o)?r.isNil(c)?"img"===O?S.a.createElement(O,a()({},I,A,{className:C})):S.a.createElement(O,a()({},I,{className:C,href:v}),jn.create(l,{autoGenerateKey:!1}),Yn.create(y,{autoGenerateKey:!1}),S.a.createElement("img",A)):S.a.createElement(O,a()({},x,{className:C}),c):S.a.createElement(O,a()({},x,{className:C}),o)}Wn.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],Wn.Group=qn,Wn.propTypes={},Wn.defaultProps={as:"img",ui:!0},Wn.create=Xt(Wn,function(t){return{src:t}});var Hn=Wn;function zn(t){var e=t.children,n=t.className,i=t.content,o=Qt()("detail",n),s=re(zn,t),u=ie(zn,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}zn.handledProps=["as","children","className","content"],zn.propTypes={},zn.create=Xt(zn,function(t){return{content:t}});var Kn=zn;function Gn(t){var e=t.children,n=t.circular,i=t.className,o=t.color,s=t.content,u=t.size,c=t.tag,l=Qt()("ui",o,u,ct(n,"circular"),ct(c,"tag"),"labels",i),f=re(Gn,t),h=ie(Gn,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(e)?s:e)}Gn.handledProps=["as","children","circular","className","color","content","size","tag"],Gn.propTypes={};var Qn=Gn,Yn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),C()(r.props,"onRemove",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.attached,o=t.basic,s=t.children,u=t.circular,c=t.className,l=t.color,f=t.content,h=t.corner,p=t.detail,d=t.empty,v=t.floating,m=t.horizontal,y=t.icon,g=t.image,b=t.onRemove,_=t.pointing,w=t.removeIcon,E=t.ribbon,T=t.size,C=t.tag,x=(!0===_?"pointing":("left"===_||"right"===_)&&"".concat(_," pointing"))||("above"===_||"below"===_)&&"pointing ".concat(_),k=Qt()("ui",l,x,T,ct(n,"active"),ct(o,"basic"),ct(u,"circular"),ct(d,"empty"),ct(v,"floating"),ct(m,"horizontal"),ct(!0===g,"image"),ct(C,"tag"),ft(h,"corner"),ft(E,"ribbon"),lt(i,"attached"),"label",c),N=re(e,this.props),A=ie(e,this.props);if(!r.isNil(s))return S.a.createElement(A,a()({},N,{className:k,onClick:this.handleClick}),s);var I=P()(w)?"delete":w;return S.a.createElement(A,a()({className:k,onClick:this.handleClick},N),Nn.create(y,{autoGenerateKey:!1}),"boolean"!=typeof g&&Hn.create(g,{autoGenerateKey:!1}),f,Kn.create(p,{autoGenerateKey:!1}),b&&Nn.create(I,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))}}]),e}(x.Component);function Xn(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()(ct(s,"visible"),ct(o,"hidden"),"content",n),c=re(Xn,t),l=ie(Xn,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}_()(Yn,"Detail",Kn),_()(Yn,"Group",Qn),_()(Yn,"handledProps",["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","removeIcon","ribbon","size","tag"]),Yn.propTypes={},Yn.create=Xt(Yn,function(t){return{content:t}}),Xn.handledProps=["as","children","className","content","hidden","visible"],Xn.propTypes={};var $n=Xn;function Jn(t){var e=t.attached,n=t.basic,i=t.buttons,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.content,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.labeled,m=t.negative,y=t.positive,g=t.primary,b=t.secondary,_=t.size,w=t.toggle,E=t.vertical,T=t.widths,C=Qt()("ui",u,_,ct(n,"basic"),ct(c,"compact"),ct(h,"fluid"),ct(p,"icon"),ct(d,"inverted"),ct(v,"labeled"),ct(m,"negative"),ct(y,"positive"),ct(g,"primary"),ct(b,"secondary"),ct(w,"toggle"),ct(E,"vertical"),ft(e,"attached"),lt(f,"floated"),vt(T),"buttons",s),x=re(Jn,t),k=ie(Jn,t);return Tt()(i)?S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?l:o):S.a.createElement(k,a()({},x,{className:C}),be()(i,function(t){return rr.create(t)}))}Jn.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],Jn.propTypes={};var Zn=Jn;function tr(t){var e=t.className,n=t.text,r=Qt()("or",e),i=re(tr,t),o=ie(tr,t);return S.a.createElement(o,a()({},i,{className:r,"data-text":n}))}tr.handledProps=["as","className","text"],tr.propTypes={};var er=tr,nr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"computeElementType",function(){var t=i.props,e=t.attached,n=t.label;if(!Tt()(e)||!Tt()(n))return"div"}),_()(g()(g()(i)),"computeTabIndex",function(t){var e=i.props,n=e.disabled,r=e.tabIndex;return Tt()(r)?n?-1:"div"===t?0:void 0:r}),_()(g()(g()(i)),"focus",function(){return C()(i.ref,"focus")}),_()(g()(g()(i)),"handleClick",function(t){i.props.disabled?t.preventDefault():C()(i.props,"onClick",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"hasIconClass",function(){var t=i.props,e=t.labelPosition,n=t.children,o=t.content,a=t.icon;return!0===a||a&&(e||r.isNil(n)&&Tt()(o))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.animated,o=t.attached,s=t.basic,u=t.children,c=t.circular,l=t.className,f=t.color,h=t.compact,p=t.content,d=t.disabled,v=t.floated,m=t.fluid,y=t.icon,g=t.inverted,b=t.label,_=t.labelPosition,w=t.loading,E=t.negative,T=t.positive,C=t.primary,x=t.secondary,k=t.role,N=t.size,A=t.toggle,I=Qt()(f,N,ct(n,"active"),ct(s,"basic"),ct(c,"circular"),ct(h,"compact"),ct(m,"fluid"),ct(this.hasIconClass(),"icon"),ct(g,"inverted"),ct(w,"loading"),ct(E,"negative"),ct(T,"positive"),ct(C,"primary"),ct(x,"secondary"),ct(A,"toggle"),ft(i,"animated"),ft(o,"attached")),O=Qt()(ft(_||!!b,"labeled")),P=Qt()(ct(d,"disabled"),lt(v,"floated")),R=re(e,this.props),D=ie(e,this.props,this.computeElementType),M=this.computeTabIndex(D);if(!Tt()(b)){var L=Qt()("ui",I,"button",l),F=Qt()("ui",O,"button",l,P),U=Yn.create(b,{defaultProps:{basic:!0,pointing:"left"===_?"right":"left"},autoGenerateKey:!1});return S.a.createElement(D,a()({},R,{className:F,onClick:this.handleClick}),"left"===_&&U,S.a.createElement("button",{className:L,disabled:d,ref:this.handleRef,tabIndex:M},Nn.create(y,{autoGenerateKey:!1})," ",p),("right"===_||!_)&&U)}var j=Qt()("ui",I,P,O,"button",l),B=!r.isNil(u);return S.a.createElement(D,a()({},R,{className:j,disabled:d&&"button"===D||void 0,onClick:this.handleClick,ref:this.handleRef,role:k,tabIndex:M}),B&&u,!B&&Nn.create(y,{autoGenerateKey:!1}),!B&&p)}}]),e}(x.Component);_()(nr,"defaultProps",{as:"button",role:"button"}),_()(nr,"Content",$n),_()(nr,"Group",Zn),_()(nr,"Or",er),_()(nr,"handledProps",["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle"]),nr.propTypes={},nr.create=Xt(nr,function(t){return{content:t}});var rr=nr,ir=n(97),or=n.n(ir),ar=n(58),sr=n.n(ar),ur=function(t){var e=t.node;if(St())return Tt()(e)?document.body:e},cr=n(281),lr=n.n(cr),fr=n(280),hr=n.n(fr),pr=n(279),dr=n.n(pr),vr=n(278),mr=n.n(vr),yr=n(277),gr=n.n(yr),br=n(276),_r=n.n(br),wr=wt()(_r.a,bt()("props.className"),gr()(mr()(/\s+/)),dr()(hr.a),lr.a),Er=function(t,e){return[I()(e,t),I()(t,e)]},Tr=new Map,Cr=function(t,e){var n=wr(e),r=Er(Tr.get(t),n),i=H()(r,2),o=i[0],a=i[1];K()(o,function(e){return t.classList.add(e)}),K()(a,function(e){return t.classList.remove(e)}),Tr.set(t,n)},xr=new function t(){var e=this;u()(this,t),_()(this,"add",function(t,n){e.nodes.has(t)?e.nodes.get(t).add(n):e.nodes.set(t,new Set([n]))}),_()(this,"del",function(t,n){if(e.nodes.has(t)){var r=e.nodes.get(t);1!==r.size?r.delete(n):e.nodes.delete(t)}}),_()(this,"emit",function(t,n){n(t,e.nodes.get(t))}),this.nodes=new Map},Sr=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return t.className!==this.props.className}},{key:"componentWillMount",value:function(){var t=ur(this.props);t&&(xr.add(t,this),xr.emit(t,Cr))}},{key:"componentDidUpdate",value:function(){var t=ur(this.props);t&&xr.emit(t,Cr)}},{key:"componentWillUnmount",value:function(){var t=ur(this.props);t&&(xr.del(t,this),xr.emit(t,Cr))}},{key:"render",value:function(){return null}}]),e}(x.Component);function kr(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"header"),s=re(kr,t),u=ie(kr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Sr,"handledProps",["className","node"]),Sr.propTypes={},kr.handledProps=["as","children","className","content"],kr.propTypes={},kr.create=Xt(kr,function(t){return{content:t}});var Nr=kr;function Ar(t){var e=t.children,n=t.className,i=t.content,o=t.image,s=t.scrolling,u=Qt()(n,ct(o,"image"),ct(s,"scrolling"),"content"),c=re(Ar,t),l=ie(Ar,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ar.handledProps=["as","children","className","content","image","scrolling"],Ar.propTypes={},Ar.create=Xt(Ar,function(t){return{content:t}});var Ir=Ar,Or=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleButtonOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onActionClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.actions,o=n.children,s=n.className,u=n.content,c=Qt()("actions",s),l=re(e,this.props),f=ie(e,this.props);return r.isNil(o)?r.isNil(u)?S.a.createElement(f,a()({},l,{className:c}),be()(i,function(e){return rr.create(e,{overrideProps:t.handleButtonOverrides})})):S.a.createElement(f,a()({},l,{className:c}),u):S.a.createElement(f,a()({},l,{className:c}),o)}}]),e}(x.Component);function Pr(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pr,t),u=ie(Pr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Or,"handledProps",["actions","as","children","className","content","onActionClick"]),Or.propTypes={},Or.create=Xt(Or,function(t){return{actions:t}}),Pr.handledProps=["as","children","className","content"],Pr.propTypes={};var Rr=Pr,Dr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"getMountNode",function(){return St()?i.props.mountNode||document.body:null}),_()(g()(g()(i)),"handleActionsOverrides",function(t){return{onActionClick:function(e,n){C()(t,"onActionClick",e,n),C()(i.props,"onActionClick",e,i.props),i.handleClose(e)}}}),_()(g()(g()(i)),"handleClose",function(t){C()(i.props,"onClose",t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),i.handleClose(e)}}}),_()(g()(g()(i)),"handleOpen",function(t){C()(i.props,"onOpen",t,i.props),i.trySetState({open:!0})}),_()(g()(g()(i)),"handlePortalMount",function(t){i.setState({scrolling:!1}),i.setPositionAndClassNames(),C()(i.props,"onMount",t,i.props)}),_()(g()(g()(i)),"handlePortalUnmount",function(t){cancelAnimationFrame(i.animationRequestId),C()(i.props,"onUnmount",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"handlePortalRef",function(t){return i.portalRef=t}),_()(g()(g()(i)),"setRootNodeStyle",function(){i.portalRef&&i.portalRef&&i.portalRef.rootNode.style.setProperty("display","flex","important")}),_()(g()(g()(i)),"setPositionAndClassNames",function(){var t,e=i.props.dimmer;e&&(t="dimmable dimmed","blurring"===e&&(t+=" blurring"));var n={};if(i.ref){var r=i.ref.getBoundingClientRect().height>=window.innerHeight;null!==i.state.marginTop&&(n.marginTop=null),i.state.scrolling!==r&&(n.scrolling=r),r&&(t+=" scrolling")}i.state.mountClasses!==t&&(n.mountClasses=t),L()(n)||i.setState(n),i.animationRequestId=requestAnimationFrame(i.setPositionAndClassNames),i.setRootNodeStyle()}),_()(g()(g()(i)),"renderContent",function(t){var n=i.props,o=n.actions,s=n.basic,u=n.children,c=n.className,l=n.closeIcon,f=n.content,h=n.header,p=n.mountNode,d=n.size,v=n.style,m=i.state,y=m.marginTop,g=m.mountClasses,b=m.scrolling,_=Qt()("ui",d,ct(s,"basic"),ct(b,"scrolling"),"modal transition visible active",c),w=ie(e,i.props),E=!0===l?"close":l,T=Nn.create(E,{overrideProps:i.handleIconOverrides});return r.isNil(u)?S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,Nr.create(h,{autoGenerateKey:!1}),Ir.create(f,{autoGenerateKey:!1}),Or.create(o,{overrideProps:i.handleActionsOverrides}))):S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,u))}),n))}return m()(e,t),l()(e,[{key:"componentWillUnmount",value:function(){this.handlePortalUnmount()}},{key:"render",value:function(){var t=this.state.open,n=this.props,r=n.centered,i=n.closeOnDimmerClick,o=n.closeOnDocumentClick,s=n.dimmer,u=n.eventPool,c=n.trigger,l=this.getMountNode();if(!St())return Object(x.isValidElement)(c)?c:null;var f=re(e,this.props),h=Mn.handledProps,p=sr()(f,function(t,e,n){return ae()(h,n)||(t[n]=e),t},{}),d=or()(f,h),v=s?Qt()("ui","inverted"===s&&"inverted",!r&&"top aligned","page modals dimmer transition visible active"):null;return S.a.createElement(Mn,a()({closeOnDocumentClick:o,closeOnRootNodeClick:i},d,{trigger:c,className:v,eventPool:u,mountNode:l,open:t,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,ref:this.handlePortalRef}),this.renderContent(p))}}]),e}(V);_()(Dr,"defaultProps",{centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"}),_()(Dr,"autoControlledProps",["open"]),_()(Dr,"Header",Nr),_()(Dr,"Content",Ir),_()(Dr,"Description",Rr),_()(Dr,"Actions",Or),_()(Dr,"handledProps",["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"]),Dr.propTypes={};var Mr=Dr,Lr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleCancel",function(t){C()(r.props,"onCancel",t,r.props)}),_()(g()(g()(r)),"handleCancelOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),r.handleCancel(e)}}}),_()(g()(g()(r)),"handleConfirmOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onConfirm",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.cancelButton,r=t.confirmButton,i=t.content,o=t.header,s=t.open,u=t.size,c=re(e,this.props),l={};return E()(this.props,"open")&&(l.open=s),S.a.createElement(Mr,a()({},c,l,{size:u,onClose:this.handleCancel}),Mr.Header.create(o,{autoGenerateKey:!1}),Mr.Content.create(i,{autoGenerateKey:!1}),S.a.createElement(Mr.Actions,null,rr.create(n,{autoGenerateKey:!1,overrideProps:this.handleCancelOverrides}),rr.create(r,{autoGenerateKey:!1,defaultProps:{primary:!0},overrideProps:this.handleConfirmOverrides})))}}]),e}(x.Component);_()(Lr,"defaultProps",{cancelButton:"Cancel",confirmButton:"OK",content:"Are you sure?",size:"small"}),_()(Lr,"handledProps",["cancelButton","confirmButton","content","header","onCancel","onConfirm","open","size"]),Lr.propTypes={};var Fr=Lr;function Ur(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ur,t),u=ie(Ur,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ur.handledProps=["as","children","className","content"],Ur.propTypes={};var jr=Ur,Br=n(275),qr=n.n(Br),Vr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.fitted,f=t.header,h=t.icon,p=t.link,d=t.name,v=t.onClick,m=t.position,y=Qt()(s,m,ct(n,"active"),ct(c,"disabled"),ct(!0===h||h&&!(d||u),"icon"),ct(f,"header"),ct(p,"link"),ft(l,"fitted"),"item",o),g=ie(e,this.props,function(){if(v)return"a"}),b=re(e,this.props);return r.isNil(i)?S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),r.isNil(u)?qr()(d):u):S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),i)}}]),e}(x.Component);function Wr(t){var e=t.children,n=t.className,i=t.content,o=t.position,s=Qt()(o,"menu",n),u=re(Wr,t),c=ie(Wr,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(Vr,"handledProps",["active","as","children","className","color","content","disabled","fitted","header","icon","index","link","name","onClick","position"]),Vr.propTypes={},Vr.create=Xt(Vr,function(t){return{content:t,name:t}}),Wr.handledProps=["as","children","className","content","position"],Wr.propTypes={};var Hr=Wr,zr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){var i=n.index;r.trySetState({activeIndex:i}),C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"renderItems",value:function(){var t=this,e=this.props.items,n=this.state.activeIndex;return be()(e,function(e,r){return Vr.create(e,{defaultProps:{active:parseInt(n,10)===r,index:r},overrideProps:t.handleItemOverrides})})}},{key:"render",value:function(){var t=this.props,n=t.attached,i=t.borderless,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.fixed,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.pagination,m=t.pointing,y=t.secondary,g=t.size,b=t.stackable,_=t.tabular,w=t.text,E=t.vertical,T=t.widths,C=Qt()("ui",u,g,ct(i,"borderless"),ct(c,"compact"),ct(h,"fluid"),ct(d,"inverted"),ct(v,"pagination"),ct(m,"pointing"),ct(y,"secondary"),ct(b,"stackable"),ct(w,"text"),ct(E,"vertical"),ft(n,"attached"),ft(f,"floated"),ft(p,"icon"),ft(_,"tabular"),lt(l,"fixed"),vt(T,"item"),s,"menu"),x=re(e,this.props),k=ie(e,this.props);return S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?this.renderItems():o)}}]),e}(V);_()(zr,"autoControlledProps",["activeIndex"]),_()(zr,"Header",jr),_()(zr,"Item",Vr),_()(zr,"Menu",Hr),_()(zr,"handledProps",["activeIndex","as","attached","borderless","children","className","color","compact","defaultActiveIndex","fixed","floated","fluid","icon","inverted","items","onItemClick","pagination","pointing","secondary","size","stackable","tabular","text","vertical","widths"]),zr.propTypes={},zr.create=Xt(zr,function(t){return{items:t}});var Kr=zr,Gr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){"ellipsisItem"!==r.props.type&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleKeyDown",function(t){C()(r.props,"onKeyDown",t,r.props),In.a.getCode(t)===In.a.Enter&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleOverrides",function(){return{onClick:r.handleClick,onKeyDown:r.handleKeyDown}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,e=t.active,n=t.type,r=this.props.disabled||"ellipsisItem"===n;return Vr.create(this.props,{defaultProps:{active:e,disabled:r,"aria-current":e,onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:r?-1:0},overrideProps:this.handleOverrides})}}]),e}(x.Component);_()(Gr,"handledProps",["active","disabled","onClick","onKeyDown","type"]),Gr.propTypes={},Gr.create=Xt(Gr,function(t){return{content:t}});var Qr=Gr,Yr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.value;+r.state.activePage!=+n&&(r.trySetState({activePage:n}),C()(r.props,"onPageChange",t,N()({},r.props,{activePage:n})))}),_()(g()(g()(r)),"handleItemOverrides",function(t,e,n){return function(i){return{active:t,type:e,key:"".concat(e,"-").concat(n),onClick:function(t,e){C()(i,"onClick",t,e),r.handleItemClick(t,e)}}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n["aria-label"],i=n.boundaryRange,o=n.siblingRange,s=n.totalPages,u=this.state.activePage,c=Ee({activePage:u,boundaryRange:i,siblingRange:o,totalPages:s}),l=re(e,this.props);return S.a.createElement(Kr,a()({},l,{"aria-label":r,pagination:!0,role:"navigation"}),be()(c,function(e){var n=e.active,r=e.type,i=e.value;return Qr.create(t.props[r],{defaultProps:{content:i,value:i},overrideProps:t.handleItemOverrides(n,r,i)})}))}}]),e}(V);_()(Yr,"autoControlledProps",["activePage"]),_()(Yr,"defaultProps",{"aria-label":"Pagination Navigation",boundaryRange:1,ellipsisItem:"...",firstItem:{"aria-label":"First item",content:"«"},lastItem:{"aria-label":"Last item",content:"»"},nextItem:{"aria-label":"Next item",content:"⟩"},pageItem:{},prevItem:{"aria-label":"Previous item",content:"⟨"},siblingRange:1}),_()(Yr,"Item",Qr),_()(Yr,"handledProps",["activePage","aria-label","boundaryRange","defaultActivePage","ellipsisItem","firstItem","lastItem","nextItem","onPageChange","pageItem","prevItem","siblingRange","totalPages"]),Yr.propTypes={};var Xr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"canToggle",function(){var t=r.props,e=t.disabled,n=t.radio,i=t.readOnly,o=r.state.checked;return!(e||i||n&&o)}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(r)),"handleContainerClick",function(t){var e=r.props.id;Tt()(e)&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputClick",function(t){r.props.id&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"handleClick",function(t){var e=r.state,n=e.checked,i=e.indeterminate;r.canToggle()&&(C()(r.props,"onClick",t,N()({},r.props,{checked:!n,indeterminate:!!i})),C()(r.props,"onChange",t,N()({},r.props,{checked:!n,indeterminate:!1})),r.trySetState({checked:!n,indeterminate:!1}))}),_()(g()(g()(r)),"handleMouseDown",function(t){var e=r.state,n=e.checked,i=e.indeterminate;C()(r.props,"onMouseDown",t,N()({},r.props,{checked:!!n,indeterminate:!!i})),C()(r.inputRef,"focus"),t.preventDefault()}),_()(g()(g()(r)),"setIndeterminate",function(){var t=r.state.indeterminate;r.inputRef&&(r.inputRef.indeterminate=!!t)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.setIndeterminate()}},{key:"componentDidUpdate",value:function(){this.setIndeterminate()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.disabled,i=t.label,o=t.id,s=t.name,u=t.radio,c=t.readOnly,l=t.slider,f=t.toggle,h=t.type,p=t.value,d=this.state,v=d.checked,m=d.indeterminate,y=Qt()("ui",ct(v,"checked"),ct(r,"disabled"),ct(m,"indeterminate"),ct(Tt()(i),"fitted"),ct(u,"radio"),ct(c,"read-only"),ct(l,"slider"),ct(f,"toggle"),"checkbox",n),g=re(e,this.props),b=ie(e,this.props),_=ce(g,{htmlProps:se}),w=H()(_,2),E=w[0],T=w[1];return S.a.createElement(b,a()({},T,{className:y,onClick:this.handleContainerClick,onChange:this.handleContainerClick,onMouseDown:this.handleMouseDown}),S.a.createElement("input",a()({},E,{checked:v,className:"hidden",disabled:r,id:o,name:s,onClick:this.handleInputClick,readOnly:!0,ref:this.handleInputRef,tabIndex:this.computeTabIndex(),type:h,value:p})),ee(i,{defaultProps:{htmlFor:o},autoGenerateKey:!1})||S.a.createElement("label",{htmlFor:o}))}}]),e}(V);function $r(t){var e=t.slider,n=t.toggle,r=t.type,i=re($r,t),o=!(e||n)||void 0;return S.a.createElement(Xr,a()({},i,{type:r,radio:o,slider:e,toggle:n}))}_()(Xr,"defaultProps",{type:"checkbox"}),_()(Xr,"autoControlledProps",["checked","indeterminate"]),_()(Xr,"handledProps",["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","radio","readOnly","slider","tabIndex","toggle","type","value"]),Xr.propTypes={},$r.handledProps=["slider","toggle","type"],$r.propTypes={},$r.defaultProps={type:"radio"};var Jr=$r,Zr=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"fitsMaxWidth",function(){var t=n.props.maxWidth,e=n.state.width;return!!Tt()(t)||e<=t}),_()(g()(g()(n)),"fitsMinWidth",function(){var t=n.props.minWidth,e=n.state.width;return!!Tt()(t)||e>=t}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)}),_()(g()(g()(n)),"isVisible",function(){return n.fitsMinWidth()&&n.fitsMaxWidth()}),_()(g()(g()(n)),"handleResize",function(t){n.ticking||(n.ticking=!0,requestAnimationFrame(function(){return n.handleUpdate(t)}))}),_()(g()(g()(n)),"handleUpdate",function(t){n.ticking=!1;var e=C()(n.props,"getWidth");n.setSafeState({width:e}),C()(n.props,"onUpdate",t,N()({},n.props,{width:e}))}),n.state={width:C()(n.props,"getWidth")},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.fireOnMount;this.mounted=!0,Dt.sub("resize",this.handleResize,{target:"window"}),t&&this.handleUpdate()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,Dt.unsub("resize",this.handleResize,{target:"window"})}},{key:"shouldComponentUpdate",value:function(t,e){return this.state.width!==e.width||!En(this.props,t)}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return this.isVisible()?S.a.createElement(n,r,t):null}}]),e}(x.Component);_()(Zr,"defaultProps",{getWidth:function(){return St()?window.innerWidth:0}}),_()(Zr,"onlyMobile",{minWidth:320,maxWidth:767}),_()(Zr,"onlyTablet",{minWidth:768,maxWidth:991}),_()(Zr,"onlyComputer",{minWidth:992}),_()(Zr,"onlyLargeScreen",{minWidth:1200,maxWidth:1919}),_()(Zr,"onlyWidescreen",{minWidth:1920}),_()(Zr,"handledProps",["as","children","fireOnMount","getWidth","maxWidth","minWidth","onUpdate"]),Zr.propTypes={};var ti=n(140),ei=n.n(ti),ni=n(188),ri=n.n(ni),ii=n(274),oi=n.n(ii),ai=n(189),si=n.n(ai),ui=n(273),ci=n.n(ui),li=n(141),fi=n.n(li),hi=n(272),pi=n.n(hi),di=n(192),vi=n.n(di),mi=n(191),yi=n.n(mi),gi=n(20),bi=n.n(gi);function _i(t){var e=t.className,n=Qt()("divider",e),r=re(_i,t),i=ie(_i,t);return S.a.createElement(i,a()({},r,{className:n}))}_i.handledProps=["as","className"],_i.propTypes={};var wi=_i,Ei=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.name,i=Qt()(r,"flag",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}))}}]),e}(x.Component);_()(Ei,"defaultProps",{as:"i"}),_()(Ei,"handledProps",["as","className","name"]),Ei.propTypes={},Ei.create=Xt(Ei,function(t){return{name:t}});var Ti=Ei,Ci=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.description,l=t.flag,f=t.icon,h=t.image,p=t.label,d=t.selected,v=t.text,m=Qt()(ct(n,"active"),ct(u,"disabled"),ct(d,"selected"),"item",o),y=Tt()(f)?r.someByType(i,"DropdownMenu")&&"dropdown":f,g=re(e,this.props),b=ie(e,this.props),_={role:"option","aria-disabled":u,"aria-checked":n,"aria-selected":d};if(!r.isNil(i))return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),i);var w=Ti.create(l,{autoGenerateKey:!1}),E=Nn.create(y,{autoGenerateKey:!1}),T=Hn.create(h,{autoGenerateKey:!1}),C=Yn.create(p,{autoGenerateKey:!1}),x=Yt("span",function(t){return{children:t}},c,{defaultProps:{className:"description"},autoGenerateKey:!1}),k=Yt("span",function(t){return{children:t}},r.isNil(s)?v:s,{defaultProps:{className:"text"},autoGenerateKey:!1});return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),T,E,w,C,x,k)}}]),e}(x.Component);_()(Ci,"handledProps",["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"]),Ci.propTypes={},Ci.create=Xt(Ci,function(t){return t});var xi=Ci;function Si(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("header",n),u=re(Si,t),c=ie(Si,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}Si.handledProps=["as","children","className","content","icon"],Si.propTypes={},Si.create=Xt(Si,function(t){return{content:t}});var ki=Si;function Ni(t){var e=t.children,n=t.className,i=t.content,o=t.direction,s=t.open,u=t.scrolling,c=Qt()(o,ct(s,"visible"),ct(u,"scrolling"),"menu transition",n),l=re(Ni,t),f=ie(Ni,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Ni.handledProps=["as","children","className","content","direction","open","scrolling"],Ni.propTypes={};var Ai=Ni,Ii=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleRef",function(t){return C()(r.props,"inputRef",t)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.autoComplete,r=t.className,i=t.tabIndex,o=t.type,s=t.value,u=Qt()("search",r),c=re(e,this.props);return S.a.createElement("input",a()({},c,{"aria-autocomplete":"list",autoComplete:n,className:u,onChange:this.handleChange,ref:this.handleRef,tabIndex:i,type:o,value:s}))}}]),e}(x.Component);_()(Ii,"defaultProps",{autoComplete:"off",type:"text"}),_()(Ii,"handledProps",["as","autoComplete","className","inputRef","tabIndex","type","value"]),Ii.propTypes={},Ii.create=Xt(Ii,function(t){return{type:t}});var Oi=Ii,Pi=function(t,e){return Tt()(t)?e:t},Ri=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"handleChange",function(t,e){C()(i.props,"onChange",t,N()({},i.props,{value:e}))}),_()(g()(g()(i)),"closeOnChange",function(t){var e=i.props,n=e.closeOnChange,r=e.multiple;(P()(n)?!r:n)&&i.close(t)}),_()(g()(g()(i)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),i.close())}),_()(g()(g()(i)),"moveSelectionOnKeyDown",function(t){var e,n=i.props,r=n.multiple,o=n.selectOnNavigation,a=(e={},_()(e,In.a.ArrowDown,1),_()(e,In.a.ArrowUp,-1),e)[In.a.getCode(t)];void 0!==a&&(t.preventDefault(),i.moveSelectionBy(a),!r&&o&&i.makeSelectedItemActive(t))}),_()(g()(g()(i)),"openOnSpace",function(t){In.a.getCode(t)===In.a.Spacebar&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"openOnArrow",function(t){var e=In.a.getCode(t);ae()([In.a.ArrowDown,In.a.ArrowUp],e)&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"makeSelectedItemActive",function(t){var e=i.state.open,n=i.props.multiple,r=i.getSelectedItem(),o=bi()(r,"value");if(!Tt()(o)&&e){var a=n?yi()(i.state.value,[o]):o;i.setValue(a),i.setSelectedIndex(a),i.handleChange(t,a),r["data-additional"]&&C()(i.props,"onAddItem",t,N()({},i.props,{value:o}))}}),_()(g()(g()(i)),"selectItemOnEnter",function(t){var e=i.props.search;if(In.a.getCode(t)===In.a.Enter){t.preventDefault();var n=vi()(i.getMenuOptions());e&&0===n||(i.makeSelectedItemActive(t),i.closeOnChange(t),i.clearSearchQuery(),e&&i.searchRef&&i.searchRef.focus())}}),_()(g()(g()(i)),"removeItemOnBackspace",function(t){var e=i.props,n=e.multiple,r=e.search,o=i.state,a=o.searchQuery,s=o.value;if(In.a.getCode(t)===In.a.Backspace&&!a&&r&&n&&!L()(s)){t.preventDefault();var u=pi()(s);i.setValue(u),i.setSelectedIndex(u),i.handleChange(t,u)}}),_()(g()(g()(i)),"closeOnDocumentClick",function(t){i.props.closeOnBlur&&(i.ref&&de(i.ref,t)||i.close())}),_()(g()(g()(i)),"attachHandlersOnOpen",function(){Dt.sub("keydown",[i.closeOnEscape,i.moveSelectionOnKeyDown,i.selectItemOnEnter,i.removeItemOnBackspace]),Dt.sub("click",i.closeOnDocumentClick),Dt.unsub("keydown",[i.openOnArrow,i.openOnSpace])}),_()(g()(g()(i)),"handleMouseDown",function(t){i.isMouseDown=!0,Dt.sub("mouseup",i.handleDocumentMouseUp),C()(i.props,"onMouseDown",t,i.props)}),_()(g()(g()(i)),"handleDocumentMouseUp",function(){i.isMouseDown=!1,Dt.unsub("mouseup",i.handleDocumentMouseUp)}),_()(g()(g()(i)),"handleClick",function(t){var e=i.props,n=e.minCharacters,r=e.search,o=i.state,a=o.open,s=o.searchQuery;if(C()(i.props,"onClick",t,i.props),t.stopPropagation(),!r)return i.toggle(t);a||(s.length>=n||1===n?i.open(t):i.searchRef&&i.searchRef.focus())}),_()(g()(g()(i)),"handleIconClick",function(t){C()(i.props,"onClick",t,i.props),t.stopPropagation(),i.toggle(t)}),_()(g()(g()(i)),"handleItemClick",function(t,e){var n=i.props,r=n.multiple,o=n.search,a=e.value;if(t.stopPropagation(),(r||e.disabled)&&t.nativeEvent.stopImmediatePropagation(),!e.disabled){var s=e["data-additional"],u=r?yi()(i.state.value,[a]):a;i.setValue(u),i.setSelectedIndex(a);var c=vi()(i.getMenuOptions());r&&!s&&1!==c||i.clearSearchQuery(),i.handleChange(t,u),i.closeOnChange(t),s&&C()(i.props,"onAddItem",t,N()({},i.props,{value:a})),r&&o&&i.searchRef&&i.searchRef.focus()}}),_()(g()(g()(i)),"handleFocus",function(t){i.state.focus||(C()(i.props,"onFocus",t,i.props),i.setState({focus:!0}))}),_()(g()(g()(i)),"handleBlur",function(t){var e=bi()(t,"currentTarget");if(!e||!e.contains(document.activeElement)){var n=i.props,r=n.closeOnBlur,o=n.multiple,a=n.onBlur,s=n.selectOnBlur;i.isMouseDown||(a&&a(t,i.props),s&&!o&&(i.makeSelectedItemActive(t),r&&i.close()),i.setState({focus:!1}),i.clearSearchQuery())}}),_()(g()(g()(i)),"handleSearchChange",function(t,e){var n=e.value;t.stopPropagation();var r=i.props.minCharacters,o=i.state.open,a=n;C()(i.props,"onSearchChange",t,N()({},i.props,{searchQuery:a})),i.trySetState({searchQuery:a},{selectedIndex:0}),!o&&a.length>=r?i.open():o&&1!==r&&a.length<r&&i.close()}),_()(g()(g()(i)),"getMenuOptions",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,n=i.props,r=n.additionLabel,o=n.additionPosition,a=n.allowAdditions,s=n.deburr,u=n.multiple,c=n.search,l=i.state.searchQuery,f=e;if(u&&(f=D()(f,function(e){return!ae()(t,e.value)})),c&&l)if(Bt()(c))f=c(f,l);else{var h=s?fi()(l):l,p=new RegExp(ci()(h),"i");f=D()(f,function(t){return p.test(s?fi()(t.text):t.text)})}if(a&&c&&l&&!et()(f,{text:l})){var d={key:"addition",text:[S.a.isValidElement(r)?S.a.cloneElement(r,{key:"addition-label"}):r||"",S.a.createElement("b",{key:"addition-query"},l)],value:l,className:"addition","data-additional":!0};"top"===o?f.unshift(d):f.push(d)}return f}),_()(g()(g()(i)),"getSelectedItem",function(){var t=i.state.selectedIndex,e=i.getMenuOptions();return bi()(e,"[".concat(t,"]"))}),_()(g()(g()(i)),"getEnabledIndices",function(t){var e=t||i.getMenuOptions();return sr()(e,function(t,e,n){return e.disabled||t.push(n),t},[])}),_()(g()(g()(i)),"getItemByValue",function(t){var e=i.props.options;return Z()(e,{value:t})}),_()(g()(g()(i)),"getMenuItemIndexByValue",function(t,e){var n=e||i.getMenuOptions();return si()(n,["value",t])}),_()(g()(g()(i)),"getDropdownAriaOptions",function(){var t=i.props,e=t.loading,n=t.disabled,r=t.search,o=t.multiple,a=i.state.open,s={role:r?"combobox":"listbox","aria-busy":e,"aria-disabled":n,"aria-expanded":!!a};return"listbox"===s.role&&(s["aria-multiselectable"]=o),s}),_()(g()(g()(i)),"clearSearchQuery",function(){i.trySetState({searchQuery:""})}),_()(g()(g()(i)),"setValue",function(t){i.trySetState({value:t})}),_()(g()(g()(i)),"setSelectedIndex",function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,r=i.props.multiple,o=i.state.selectedIndex,a=i.getMenuOptions(e,n),s=i.getEnabledIndices(a);if(!o||o<0){var u=s[0];t=r?u:i.getMenuItemIndexByValue(e,a)||s[0]}else if(r)o>=a.length-1&&(t=s[s.length-1]);else{var c=i.getMenuItemIndexByValue(e,a);t=ae()(s,c)?c:void 0}(!t||t<0)&&(t=s[0]),i.setState({selectedIndex:t})}),_()(g()(g()(i)),"handleLabelClick",function(t,e){t.stopPropagation(),i.setState({selectedLabel:e.value});var n=i.props.onLabelClick;n&&n(t,e)}),_()(g()(g()(i)),"handleLabelRemove",function(t,e){t.stopPropagation();var n=i.state.value,r=Cn()(n,e.value);i.setValue(r),i.setSelectedIndex(r),i.handleChange(t,r)}),_()(g()(g()(i)),"moveSelectionBy",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.state.selectedIndex,n=i.getMenuOptions();if(void 0!==n&&!oi()(n,"disabled")){var r=n.length-1,o=e+t;!i.props.wrapSelection&&(o>r||o<0)?o=e:o>r?o=0:o<0&&(o=r),n[o].disabled?i.moveSelectionBy(t,o):(i.setState({selectedIndex:o}),i.scrollSelectedItemIntoView())}}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e,t),i.handleIconClick(e)}}}),_()(g()(g()(i)),"handleSearchRef",function(t){return i.searchRef=t}),_()(g()(g()(i)),"handleSizerRef",function(t){return i.sizerRef=t}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"computeSearchInputTabIndex",function(){var t=i.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(i)),"computeSearchInputWidth",function(){var t=i.state.searchQuery;if(i.sizerRef&&t){i.sizerRef.style.display="inline",i.sizerRef.textContent=t;var e=Math.ceil(i.sizerRef.getBoundingClientRect().width);return i.sizerRef.style.removeProperty("display"),e}}),_()(g()(g()(i)),"computeTabIndex",function(){var t=i.props,e=t.disabled,n=t.search,r=t.tabIndex;if(!n)return e?-1:Tt()(r)?0:r}),_()(g()(g()(i)),"scrollSelectedItemIntoView",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=t.querySelector(".item.selected");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}}),_()(g()(g()(i)),"setOpenDirection",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=i.ref.getBoundingClientRect(),n=t.clientHeight,r=document.documentElement.clientHeight-e.y-e.height-n,o=e.y-n,a=r<0&&o>r;!a!=!i.state.upward&&i.trySetState({upward:a})}}}),_()(g()(g()(i)),"open",function(t){var e=i.props,n=e.disabled,r=e.onOpen,o=e.search;n||(o&&i.searchRef&&i.searchRef.focus(),r&&r(t,i.props),i.trySetState({open:!0}),i.scrollSelectedItemIntoView())}),_()(g()(g()(i)),"close",function(t){var e=i.props.onClose;e&&e(t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleClose",function(){var t=document.activeElement===i.searchRef,e=document.activeElement===i.ref,n=t||e;t||i.ref.blur(),i.setState({focus:n})}),_()(g()(g()(i)),"toggle",function(t){return i.state.open?i.close(t):i.open(t)}),_()(g()(g()(i)),"renderText",function(){var t=i.props,e=t.multiple,n=t.placeholder,r=t.search,o=t.text,a=i.state,s=a.searchQuery,u=a.value,c=a.open,l=e?!L()(u):!Tt()(u)&&""!==u,f=Qt()(n&&!l&&"default","text",r&&s&&"filtered"),h=n;return s?h=null:o?h=o:c&&!e?h=bi()(i.getSelectedItem(),"text"):l&&(h=bi()(i.getItemByValue(u),"text")),S.a.createElement("div",{className:f,role:"alert","aria-live":"polite"},h)}),_()(g()(g()(i)),"renderSearchInput",function(){var t=i.props,e=t.search,n=t.searchInput,r=i.state.searchQuery;return e?Oi.create(n,{defaultProps:{inputRef:i.handleSearchRef,onChange:i.handleSearchChange,style:{width:i.computeSearchInputWidth()},tabIndex:i.computeSearchInputTabIndex(),value:r}}):null}),_()(g()(g()(i)),"renderSearchSizer",function(){var t=i.props,e=t.search,n=t.multiple;return e&&n?S.a.createElement("span",{className:"sizer",ref:i.handleSizerRef}):null}),_()(g()(g()(i)),"renderLabels",function(){var t=i.props,e=t.multiple,n=t.renderLabel,r=i.state,o=r.selectedLabel,a=r.value;if(e&&!L()(a)){var s=be()(a,i.getItemByValue);return be()(ri()(s),function(t,e){var r={active:t.value===o,as:"a",key:Pi(t.key,t.value),onClick:i.handleLabelClick,onRemove:i.handleLabelRemove,value:t.value};return Yn.create(n(t,e,r),{defaultProps:r})})}}),_()(g()(g()(i)),"renderOptions",function(){var t=i.props,e=t.multiple,n=t.search,r=t.noResultsMessage,o=i.state,a=o.selectedIndex,s=o.value,u=i.getMenuOptions();if(null!==r&&n&&L()(u))return S.a.createElement("div",{className:"message"},r);var c=e?function(t){return ae()(s,t)}:function(t){return t===s};return be()(u,function(t,e){return xi.create(N()({active:c(t.value),onClick:i.handleItemClick,selected:a===e},t,{key:Pi(t.key,t.value),style:N()({},t.style,{pointerEvents:"all"})}))})}),_()(g()(g()(i)),"renderMenu",function(){var t=i.props,e=t.children,n=t.direction,o=t.header,s=i.state.open,u=i.getDropdownMenuAriaOptions();if(!r.isNil(e)){var c=x.Children.only(e),l=Qt()(n,ct(s,"visible"),c.props.className);return Object(x.cloneElement)(c,N()({className:l},u))}return S.a.createElement(Ai,a()({},u,{direction:n,open:s}),ki.create(o,{autoGenerateKey:!1}),i.renderOptions())}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{searchQuery:""}}},{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),this.setSelectedIndex(n),e&&(this.open(),this.attachHandlersOnOpen())}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||(this.setValue(t.value),this.setSelectedIndex(t.value)),_n()(t.options,this.props.options)||this.setSelectedIndex(void 0,t.options)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){if(!e.focus&&this.state.focus){if(!this.isMouseDown){var n=this.props,r=n.minCharacters,i=n.openOnFocus,o=n.search,a=!o||o&&1===r&&!this.state.open;i&&a&&this.open()}this.state.open?Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter]):Dt.sub("keydown",[this.openOnArrow,this.openOnSpace]),Dt.sub("keydown",this.removeItemOnBackspace)}else if(e.focus&&!this.state.focus){var s=this.props.closeOnBlur;!this.isMouseDown&&s&&this.close(),Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace])}!e.open&&this.state.open?(this.attachHandlersOnOpen(),this.setOpenDirection(),this.scrollSelectedItemIntoView()):e.open&&!this.state.open&&(this.handleClose(),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]),Dt.unsub("click",this.closeOnDocumentClick),this.state.focus||Dt.unsub("keydown",this.removeItemOnBackspace))}},{key:"componentWillUnmount",value:function(){Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace,this.closeOnEscape]),Dt.unsub("click",this.closeOnDocumentClick)}},{key:"getDropdownMenuAriaOptions",value:function(){var t=this.props,e=t.search,n=t.multiple,r={};return e&&(r["aria-multiselectable"]=n,r.role="listbox"),r}},{key:"render",value:function(){var t=this.props,n=t.basic,r=t.button,i=t.className,o=t.compact,s=t.disabled,u=t.error,c=t.fluid,l=t.floating,f=t.icon,h=t.inline,p=t.item,d=t.labeled,v=t.loading,m=t.multiple,y=t.pointing,g=t.search,b=t.selection,_=t.scrolling,w=t.simple,E=t.trigger,T=this.state,C=T.open,x=T.upward,k=Qt()("ui",ct(C,"active visible"),ct(s,"disabled"),ct(u,"error"),ct(v,"loading"),ct(n,"basic"),ct(r,"button"),ct(o,"compact"),ct(c,"fluid"),ct(l,"floating"),ct(h,"inline"),ct(d,"labeled"),ct(p,"item"),ct(m,"multiple"),ct(g,"search"),ct(b,"selection"),ct(w,"simple"),ct(_,"scrolling"),ct(x,"upward"),ft(y,"pointing"),"dropdown",i),N=re(e,this.props),A=ie(e,this.props),I=this.getDropdownAriaOptions(A,this.props);return S.a.createElement(A,a()({},N,I,{className:k,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex(),ref:this.handleRef}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),E||this.renderText(),Nn.create(f,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu())}}]),e}(V);function Di(t){return S.a.createElement(Ri,a()({},t,{selection:!0}))}_()(Ri,"defaultProps",{additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:function(t){return t.text},searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0}),_()(Ri,"autoControlledProps",["open","searchQuery","selectedLabel","value","upward"]),_()(Ri,"Divider",wi),_()(Ri,"Header",ki),_()(Ri,"Item",xi),_()(Ri,"Menu",Ai),_()(Ri,"SearchInput",Oi),_()(Ri,"handledProps",["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","closeOnBlur","closeOnChange","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"]),Ri.propTypes={},Di.handledProps=["options"],Di.propTypes={},Di.Divider=Ri.Divider,Di.Header=Ri.Header,Di.Item=Ri.Item,Di.Menu=Ri.Menu;var Mi=Di,Li=n(187),Fi=n.n(Li),Ui=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"focus",function(){return r.ref.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleInput",function(t){var e=bi()(t,"target.value");C()(r.props,"onInput",t,N()({},r.props,{value:e})),r.updateHeight()}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"removeAutoHeightStyles",function(){r.ref.style.height=null,r.ref.style.resize=null}),_()(g()(g()(r)),"updateHeight",function(){var t=r.props.autoHeight;if(r.ref&&t){var e=window.getComputedStyle(r.ref),n=e.minHeight,i=e.borderBottomWidth,o=e.borderTopWidth,a=Fi()([i,o].map(function(t){return parseFloat(t)}));r.ref.style.height="auto",r.ref.style.overflowY="hidden",r.ref.style.height="".concat(Math.max(parseFloat(n),Math.ceil(r.ref.scrollHeight+a)),"px"),r.ref.style.overflowY=""}}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.updateHeight()}},{key:"componentDidUpdate",value:function(t){!this.props.autoHeight&&t.autoHeight&&this.removeAutoHeightStyles(),(this.props.autoHeight&&!t.autoHeight||t.value!==this.props.value)&&this.updateHeight()}},{key:"render",value:function(){var t=this.props,n=t.autoHeight,r=t.rows,i=t.style,o=t.value,s=re(e,this.props),u=ie(e,this.props),c=n?"none":"";return S.a.createElement(u,a()({},s,{onChange:this.handleChange,onInput:this.handleInput,ref:this.handleRef,rows:r,style:N()({resize:c},i),value:o}))}}]),e}(x.Component);_()(Ui,"defaultProps",{as:"textarea",rows:3}),_()(Ui,"handledProps",["as","autoHeight","onChange","onInput","rows","style","value"]),Ui.propTypes={};var ji=Ui,Bi=n(139),qi=n.n(Bi),Vi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"handleOnHide",function(t,e){var r=e.reactKey;n.setState(function(t){var e=N()({},t.children);return delete e[r],{children:e}})}),_()(g()(g()(n)),"wrapChild",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.props,i=r.animation,o=r.duration,a=t.key,s=e.visible,u=void 0===s||s,c=e.transitionOnMount,l=void 0!==c&&c;return S.a.createElement(Hi,{animation:i,duration:o,key:a,onHide:n.handleOnHide,reactKey:a,transitionOnMount:l,visible:u},t)});var a=n.props.children;return n.state={children:qi()(Y(a),function(t){return n.wrapChild(t)})},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.state.children,r=Y(t.children),i=$(n,r);K()(i,function(t,o){var a=E()(n,o),s=E()(r,o),u=n[o],c=!bi()(u,"props.visible");if(!s||a&&!c)if(s||!a||c){var l=u.props,f=l.visible,h=l.transitionOnMount;i[o]=e.wrapChild(t,{transitionOnMount:h,visible:f})}else i[o]=Object(x.cloneElement)(u,{visible:!1});else i[o]=e.wrapChild(t,{transitionOnMount:!0})}),this.setState({children:i})}},{key:"render",value:function(){var t=this.state.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,r,Ce()(t))}}]),e}(S.a.Component);_()(Vi,"defaultProps",{animation:"fade",duration:500}),_()(Vi,"handledProps",["animation","as","children","duration"]),Vi.propTypes={};var Wi={ENTERING:"show",EXITING:"hide"},Hi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(n)),"handleStart",function(){var t=n.props.duration,e=n.nextStatus;n.nextStatus=null,n.setSafeState({status:e,animating:!0},function(){var r=Wi[e],i=gn(t,r);C()(n.props,"onStart",null,N()({},n.props,{status:e})),setTimeout(n.handleComplete,i)})}),_()(g()(g()(n)),"handleComplete",function(){var t=n.state.status;if(C()(n.props,"onComplete",null,N()({},n.props,{status:t})),n.nextStatus)n.handleStart();else{var r=n.computeCompletedStatus(),i=t===e.ENTERING?"onShow":"onHide";n.setSafeState({status:r,animating:!1},function(){C()(n.props,i,null,N()({},n.props,{status:r}))})}}),_()(g()(g()(n)),"updateStatus",function(){var t=n.state.animating;n.nextStatus&&(n.nextStatus=n.computeNextStatus(),t||n.handleStart())}),_()(g()(g()(n)),"computeClasses",function(){var t=n.props,r=t.animation,o=t.children,a=n.state,s=a.animating,u=a.status,c=bi()(o,"props.className");return ae()(i.DIRECTIONAL_TRANSITIONS,r)?Qt()(r,c,ct(s,"animating"),ct(u===e.ENTERING,"in"),ct(u===e.EXITING,"out"),ct(u===e.EXITED,"hidden"),ct(u!==e.EXITED,"visible"),"transition"):Qt()(r,c,ct(s,"animating transition"))}),_()(g()(g()(n)),"computeCompletedStatus",function(){var t=n.props.unmountOnHide;return n.state.status===e.ENTERING?e.ENTERED:t?e.UNMOUNTED:e.EXITED}),_()(g()(g()(n)),"computeInitialStatuses",function(){var t=n.props,r=t.visible,i=t.mountOnShow,o=t.transitionOnMount,a=t.unmountOnHide;return r?o?{initial:e.EXITED,next:e.ENTERING}:{initial:e.ENTERED}:i||a?{initial:e.UNMOUNTED}:{initial:e.EXITED}}),_()(g()(g()(n)),"computeNextStatus",function(){var t=n.state,r=t.animating,i=t.status;return r?i===e.ENTERING?e.EXITING:e.ENTERING:i===e.ENTERED?e.EXITING:e.ENTERING}),_()(g()(g()(n)),"computeStatuses",function(t){var r=n.state.status;return t.visible?{current:r===e.UNMOUNTED&&e.EXITED,next:r!==e.ENTERING&&r!==e.ENTERED&&e.ENTERING}:{next:(r===e.ENTERING||r===e.ENTERED)&&e.EXITING}}),_()(g()(g()(n)),"computeStyle",function(){var t=n.props,e=t.children,r=t.duration,i=n.state.status,o=bi()(e,"props.style"),a=Wi[i],s=a&&"".concat(gn(r,a),"ms");return N()({},o,{animationDuration:s})}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)});var s=n.computeInitialStatuses(),c=s.initial,l=s.next;return n.nextStatus=l,n.state={status:c},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.updateStatus()}},{key:"componentWillReceiveProps",value:function(t){var e=this.computeStatuses(t),n=e.current,r=e.next;this.nextStatus=r,n&&this.setSafeState({status:n})}},{key:"componentDidUpdate",value:function(){this.updateStatus()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var t=this.props.children;return this.state.status===e.UNMOUNTED?null:Object(x.cloneElement)(t,{className:this.computeClasses(),style:this.computeStyle()})}}]),e}(x.Component);_()(Hi,"defaultProps",{animation:"fade",duration:500,visible:!0,mountOnShow:!0,transitionOnMount:!1,unmountOnHide:!1}),_()(Hi,"ENTERED","ENTERED"),_()(Hi,"ENTERING","ENTERING"),_()(Hi,"EXITED","EXITED"),_()(Hi,"EXITING","EXITING"),_()(Hi,"UNMOUNTED","UNMOUNTED"),_()(Hi,"Group",Vi),_()(Hi,"handledProps",["animation","children","duration","mountOnShow","onComplete","onHide","onShow","onStart","reactKey","transitionOnMount","unmountOnHide","visible"]),Hi.propTypes={};var zi=function(t){function e(t){var n;return u()(this,e),n=h()(this,d()(e).call(this,t)),_()(g()(g()(n)),"handlePortalClose",function(){n.setState({portalOpen:!1})}),_()(g()(g()(n)),"handlePortalOpen",function(){n.setState({portalOpen:!0})}),_()(g()(g()(n)),"handleTransitionHide",function(t,e){var r=n.state.portalOpen;n.setState({transitionVisible:!1}),C()(n.props,"onClose",null,N()({},e,{portalOpen:!1,transitionVisible:!1})),C()(n.props,"onHide",null,N()({},e,{portalOpen:r,transitionVisible:!1}))}),_()(g()(g()(n)),"handleTransitionStart",function(t,e){var r=n.state.portalOpen,i=e.status===Hi.ENTERING;C()(n.props,"onStart",null,N()({},e,{portalOpen:r,transitionVisible:i})),i&&(n.setState({transitionVisible:i}),C()(n.props,"onOpen",null,N()({},e,{transitionVisible:i,portalOpen:!0})))}),n.state={portalOpen:t.open},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.open;this.setState({portalOpen:e})}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.transition,i=this.state,o=i.portalOpen,s=i.transitionVisible,u=o||s,c=re(e,this.props);return S.a.createElement(Mn,a()({},c,{open:u,onOpen:this.handlePortalOpen,onClose:this.handlePortalClose}),S.a.createElement(Hi,a()({},r,{transitionOnMount:!0,onStart:this.handleTransitionStart,onHide:this.handleTransitionHide,visible:o}),n))}}]),e}(x.Component);_()(zi,"defaultProps",{transition:{animation:"scale",duration:400}}),_()(zi,"handledProps",["children","onClose","onHide","onOpen","onStart","open","transition"]),zi.propTypes={};var Ki=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"calculations",{bottomPassed:!1,bottomVisible:!1,fits:!1,passing:!1,offScreen:!1,onScreen:!1,topPassed:!1,topVisible:!1}),_()(g()(g()(r)),"firedCallbacks",[]),_()(g()(g()(r)),"fire",function(t,e){var n=t.callback,i=t.name,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=r.props,s=a.continuous,u=a.once,c=r.calculations[e]!==o,l=s||r.calculations[e]!==r.oldCalculations[e];c&&l&&r.execute(n,i),u||(r.firedCallbacks=Cn()(r.firedCallbacks,i))}),_()(g()(g()(r)),"handleUpdate",function(){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(r.update))}),_()(g()(g()(r)),"update",function(){if(r.mounted){r.ticking=!1,r.oldCalculations=r.calculations,r.calculations=r.computeCalculations(),r.pageYOffset=window.pageYOffset;var t=r.props,e=t.onBottomPassed,n=t.onBottomPassedReverse,i=t.onBottomVisible,o=t.onBottomVisibleReverse,a=t.onPassing,s=t.onPassingReverse,u=t.onTopPassed,c=t.onTopPassedReverse,l=t.onTopVisible,f=t.onTopVisibleReverse,h=t.onOffScreen,p=t.onOnScreen,d=t.updateOn,v={bottomPassed:{callback:e,name:"onBottomPassed"},bottomVisible:{callback:i,name:"onBottomVisible"},passing:{callback:a,name:"onPassing"},offScreen:{callback:h,name:"onOffScreen"},onScreen:{callback:p,name:"onOnScreen"},topPassed:{callback:u,name:"onTopPassed"},topVisible:{callback:l,name:"onTopVisible"}},m={bottomPassed:{callback:n,name:"onBottomPassedReverse"},bottomVisible:{callback:o,name:"onBottomVisibleReverse"},passing:{callback:s,name:"onPassingReverse"},topPassed:{callback:c,name:"onTopPassedReverse"},topVisible:{callback:f,name:"onTopVisibleReverse"}};C()(r.props,"onUpdate",null,N()({},r.props,{calculations:r.calculations})),r.fireOnPassed(),K()(m,function(t,e){return r.fire(t,e,!0)}),K()(v,function(t,e){return r.fire(t,e)}),"repaint"===d&&r.handleUpdate()}}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.continuous,n=t.once,r=t.context,i=t.updateOn;(e!==this.props.continuous||n!==this.props.once||i!==this.props.updateOn)&&(this.firedCallbacks=[]),r===this.props.context&&i===this.props.updateOn||(this.unattachHandlers(this.props.context),this.attachHandlers(r,i))}},{key:"componentDidMount",value:function(){if(this.mounted=!0,St()){var t=this.props,e=t.context,n=t.fireOnMount,r=t.updateOn;this.pageYOffset=window.pageYOffset,this.attachHandlers(e,r),n&&this.update()}}},{key:"componentWillUnmount",value:function(){var t=this.props.context;this.unattachHandlers(t),this.mounted=!1}},{key:"attachHandlers",value:function(t,e){"events"!==e?this.handleUpdate():t&&(Dt.sub("resize",this.handleUpdate,{target:t}),Dt.sub("scroll",this.handleUpdate,{target:t}))}},{key:"unattachHandlers",value:function(t){t&&(Dt.unsub("resize",this.handleUpdate,{target:t}),Dt.unsub("scroll",this.handleUpdate,{target:t})),this.frameId&&cancelAnimationFrame(this.frameId)}},{key:"execute",value:function(t,e){var n=this.props.continuous;t&&(!n&&ae()(this.firedCallbacks,e)||(t(null,N()({},this.props,{calculations:this.calculations})),this.firedCallbacks.push(e)))}},{key:"fireOnPassed",value:function(){var t=this,e=this.calculations,n=e.percentagePassed,r=e.pixelsPassed,i=this.props.onPassed;K()(i,function(e,i){var o=Number(i);if(o&&r>=o)t.execute(e,i);else{var a="".concat(i).match(/^(\d+)%$/);if(a){var s=Number(a[1])/100;n>=s&&t.execute(e,i)}}})}},{key:"computeCalculations",value:function(){var t,e=this.props.offset,n=this.ref.getBoundingClientRect(),r=n.bottom,i=n.height,o=n.top,a=n.width,s="number"==typeof(t=e)||"string"==typeof t?[t,t]:t,u=H()(s,2),c=u[0],l=u[1],f=window.pageYOffset>this.pageYOffset?"down":"up",h=o<c,p=r<l,d=p?0:Math.max(-1*o,0),v=d/i,m=r>=l&&r<=window.innerHeight,y=o>=c&&o<=window.innerHeight,g=(y||h)&&!p;return{bottomPassed:p,bottomVisible:m,direction:f,fits:y&&m,height:i,passing:h&&!p,percentagePassed:v,pixelsPassed:d,offScreen:!g,onScreen:g,topPassed:h,topVisible:y,width:a}}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,a()({},r,{ref:this.handleRef}),t)}}]),e}(x.Component);function Gi(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("divider",n),u=re(Gi,t),c=ie(Gi,t);return Tt()(o)?Tt()(i)?S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?"/":e):S.a.createElement(c,a()({},u,{className:s}),i):Nn.create(o,{defaultProps:N()({},u,{className:s}),autoGenerateKey:!1})}_()(Ki,"defaultProps",{context:St()?window:null,continuous:!1,offset:[0,0],once:!0,updateOn:"events"}),_()(Ki,"handledProps",["as","children","context","continuous","fireOnMount","offset","onBottomPassed","onBottomPassedReverse","onBottomVisible","onBottomVisibleReverse","onOffScreen","onOnScreen","onPassed","onPassing","onPassingReverse","onTopPassed","onTopPassedReverse","onTopVisible","onTopVisibleReverse","onUpdate","once","updateOn"]),Ki.propTypes={},Gi.handledProps=["as","children","className","content","icon"],Gi.propTypes={},Gi.create=Xt(Gi,function(t){return{icon:t}});var Qi=Gi,Yi=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){var t=r.props,e=t.link,n=t.onClick;if(e||n)return"a"}),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.href,c=Qt()(ct(n,"active"),"section",o),l=re(e,this.props),f=ie(e,this.props,this.computeElementType);return S.a.createElement(f,a()({},l,{className:c,href:u,onClick:this.handleClick}),r.isNil(i)?s:i)}}]),e}(x.Component);function Xi(t){var e=t.children,n=t.className,i=t.divider,o=t.icon,s=t.sections,u=t.size,c=Qt()("ui",u,"breadcrumb",n),l=re(Xi,t),f=ie(Xi,t);if(!r.isNil(e))return S.a.createElement(f,a()({},l,{className:c}),e);var h=[];return B()(s,function(t,e){var n=Yi.create(t);if(h.push(n),e!==s.length-1){var r="".concat(n.key,"_divider")||JSON.stringify(t);h.push(Qi.create({content:i,icon:o,key:r}))}}),S.a.createElement(f,a()({},l,{className:c}),h)}_()(Yi,"handledProps",["active","as","children","className","content","href","link","onClick"]),Yi.propTypes={},Yi.create=Xt(Yi,function(t){return{content:t,link:!0}}),Xi.handledProps=["as","children","className","divider","icon","sections","size"],Xi.propTypes={},Xi.Divider=Qi,Xi.Section=Yi;var $i=Xi;function Ji(t){var e=t.children,n=t.className,i=t.content,o=t.control,s=t.disabled,u=t.error,c=t.inline,l=t.label,f=t.required,h=t.type,p=t.width,d=Qt()(ct(s,"disabled"),ct(u,"error"),ct(c,"inline"),ct(f,"required"),vt(p,"wide"),"field",n),v=re(Ji,t),m=ie(Ji,t);if(Tt()(o))return Tt()(l)?S.a.createElement(m,a()({},v,{className:d}),r.isNil(e)?i:e):S.a.createElement(m,a()({},v,{className:d}),ee(l,{autoGenerateKey:!1}));var y=N()({},v,{content:i,children:e,disabled:s,required:f,type:h});return"input"!==o||"checkbox"!==h&&"radio"!==h?o===Xr||o===Jr?S.a.createElement(m,{className:d},Object(x.createElement)(o,N()({},y,{label:l}))):S.a.createElement(m,{className:d},ee(l,{defaultProps:{htmlFor:bi()(y,"id")},autoGenerateKey:!1}),Object(x.createElement)(o,y)):S.a.createElement(m,{className:d},S.a.createElement("label",null,Object(x.createElement)(o,y)," ",l))}Ji.handledProps=["as","children","className","content","control","disabled","error","inline","label","required","type","width"],Ji.propTypes={};var Zi=Ji;function to(t){var e=t.control,n=re(to,t),r=ie(to,t);return S.a.createElement(r,a()({},n,{control:e}))}to.handledProps=["as","control"],to.propTypes={},to.defaultProps={as:Zi,control:rr};var eo=to;function no(t){var e=t.control,n=re(no,t),r=ie(no,t);return S.a.createElement(r,a()({},n,{control:e}))}no.handledProps=["as","control"],no.propTypes={},no.defaultProps={as:Zi,control:Xr};var ro=no;function io(t){var e=t.control,n=re(io,t),r=ie(io,t);return S.a.createElement(r,a()({},n,{control:e}))}io.handledProps=["as","control"],io.propTypes={},io.defaultProps={as:Zi,control:Ri};var oo=io;function ao(t){var e=t.children,n=t.className,r=t.grouped,i=t.inline,o=t.unstackable,s=t.widths,u=Qt()(ct(r,"grouped"),ct(i,"inline"),ct(o,"unstackable"),vt(s,null,!0),"fields",n),c=re(ao,t),l=ie(ao,t);return S.a.createElement(l,a()({},c,{className:u}),e)}ao.handledProps=["as","children","className","grouped","inline","unstackable","widths"],ao.propTypes={};var so=ao,uo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeIcon",function(){var t=r.props,e=t.loading,n=t.icon;return Tt()(n)?e?"spinner":void 0:n}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:void 0:n}),_()(g()(g()(r)),"focus",function(){return r.inputRef.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleChildOverrides",function(t,e){return N()({},e,t.props,{ref:function(e){C()(t,"ref",e),r.handleInputRef(e)}})}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"partitionProps",function(){var t=r.props,n=t.disabled,i=t.type,o=r.computeTabIndex(),a=re(e,r.props),s=ce(a),u=H()(s,2),c=u[0],l=u[1];return[N()({},c,{disabled:n,type:i,tabIndex:o,onChange:r.handleChange,ref:r.handleInputRef}),l]}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.action,o=n.actionPosition,s=n.children,u=n.className,c=n.disabled,l=n.error,f=n.fluid,h=n.focus,p=n.icon,d=n.iconPosition,v=n.input,m=n.inverted,y=n.label,g=n.labelPosition,b=n.loading,_=n.size,w=n.transparent,E=n.type,T=Qt()("ui",_,ct(c,"disabled"),ct(l,"error"),ct(f,"fluid"),ct(h,"focus"),ct(m,"inverted"),ct(b,"loading"),ct(w,"transparent"),lt(o,"action")||ct(i,"action"),lt(d,"icon")||ct(p||b,"icon"),lt(g,"labeled")||ct(y,"labeled"),"input",u),C=ie(e,this.props),k=this.partitionProps(),N=H()(k,2),A=N[0],I=N[1];if(!r.isNil(s)){var O=be()(x.Children.toArray(s),function(e){return"input"!==e.type?e:Object(x.cloneElement)(e,t.handleChildOverrides(e,A))});return S.a.createElement(C,a()({},I,{className:T}),O)}var P=rr.create(i,{autoGenerateKey:!1}),R=Yn.create(y,{defaultProps:{className:Qt()("label",ae()(g,"corner")&&g)},autoGenerateKey:!1});return S.a.createElement(C,a()({},I,{className:T}),"left"===o&&P,"right"!==g&&R,te(v||E,{defaultProps:A,autoGenerateKey:!1}),"left"!==o&&P,Nn.create(this.computeIcon(),{autoGenerateKey:!1}),"right"===g&&R)}}]),e}(x.Component);_()(uo,"defaultProps",{type:"text"}),_()(uo,"handledProps",["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"]),uo.propTypes={},uo.create=Xt(uo,function(t){return{type:t}});var co=uo;function lo(t){var e=t.control,n=re(lo,t),r=ie(lo,t);return S.a.createElement(r,a()({},n,{control:e}))}lo.handledProps=["as","control"],lo.propTypes={},lo.defaultProps={as:Zi,control:co};var fo=lo;function ho(t){var e=t.control,n=re(ho,t),r=ie(ho,t);return S.a.createElement(r,a()({},n,{control:e}))}ho.handledProps=["as","control"],ho.propTypes={},ho.defaultProps={as:Zi,control:Jr};var po=ho;function vo(t){var e=t.control,n=t.options,r=re(vo,t),i=ie(vo,t);return S.a.createElement(i,a()({},r,{control:e,options:n}))}vo.handledProps=["as","control","options"],vo.propTypes={},vo.defaultProps={as:Zi,control:Mi};var mo=vo;function yo(t){var e=t.control,n=re(yo,t),r=ie(yo,t);return S.a.createElement(r,a()({},n,{control:e}))}yo.handledProps=["as","control"],yo.propTypes={},yo.defaultProps={as:Zi,control:ji};var go=yo,bo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleSubmit",function(t){"string"!=typeof r.props.action&&C()(t,"preventDefault");for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];C.a.apply(void 0,[r.props,"onSubmit",t,r.props].concat(n))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.action,r=t.children,i=t.className,o=t.error,s=t.inverted,u=t.loading,c=t.reply,l=t.size,f=t.success,h=t.unstackable,p=t.warning,d=t.widths,v=Qt()("ui",l,ct(o,"error"),ct(s,"inverted"),ct(u,"loading"),ct(c,"reply"),ct(f,"success"),ct(h,"unstackable"),ct(p,"warning"),vt(d,null,!0),"form",i),m=re(e,this.props),y=ie(e,this.props);return S.a.createElement(y,a()({},m,{action:n,className:v,onSubmit:this.handleSubmit}),r)}}]),e}(x.Component);_()(bo,"defaultProps",{as:"form"}),_()(bo,"Field",Zi),_()(bo,"Button",eo),_()(bo,"Checkbox",ro),_()(bo,"Dropdown",oo),_()(bo,"Group",so),_()(bo,"Input",fo),_()(bo,"Radio",po),_()(bo,"Select",mo),_()(bo,"TextArea",go),_()(bo,"handledProps",["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"]),bo.propTypes={};var _o=bo;function wo(t){var e=t.children,n=t.className,r=t.computer,i=t.color,o=t.floated,s=t.largeScreen,u=t.mobile,c=t.only,l=t.stretched,f=t.tablet,h=t.textAlign,p=t.verticalAlign,d=t.widescreen,v=t.width,m=Qt()(i,ct(l,"stretched"),ht(c,"only"),pt(h),lt(o,"floated"),dt(p),vt(r,"wide computer"),vt(s,"wide large screen"),vt(u,"wide mobile"),vt(f,"wide tablet"),vt(d,"wide widescreen"),vt(v,"wide"),"column",n),y=re(wo,t),g=ie(wo,t);return S.a.createElement(g,a()({},y,{className:m}),e)}wo.handledProps=["as","children","className","color","computer","floated","largeScreen","mobile","only","stretched","tablet","textAlign","verticalAlign","widescreen","width"],wo.propTypes={},wo.create=Xt(wo,function(t){return{children:t}});var Eo=wo;function To(t){var e=t.centered,n=t.children,r=t.className,i=t.color,o=t.columns,s=t.divided,u=t.only,c=t.reversed,l=t.stretched,f=t.textAlign,h=t.verticalAlign,p=Qt()(i,ct(e,"centered"),ct(s,"divided"),ct(l,"stretched"),ht(u,"only"),ht(c,"reversed"),pt(f),dt(h),vt(o,"column",!0),"row",r),d=re(To,t),v=ie(To,t);return S.a.createElement(v,a()({},d,{className:p}),n)}To.handledProps=["as","centered","children","className","color","columns","divided","only","reversed","stretched","textAlign","verticalAlign"],To.propTypes={};var Co=To;function xo(t){var e=t.celled,n=t.centered,r=t.children,i=t.className,o=t.columns,s=t.container,u=t.divided,c=t.doubling,l=t.inverted,f=t.padded,h=t.relaxed,p=t.reversed,d=t.stackable,v=t.stretched,m=t.textAlign,y=t.verticalAlign,g=Qt()("ui",ct(n,"centered"),ct(s,"container"),ct(c,"doubling"),ct(l,"inverted"),ct(d,"stackable"),ct(v,"stretched"),ft(e,"celled"),ft(u,"divided"),ft(f,"padded"),ft(h,"relaxed"),ht(p,"reversed"),pt(m),dt(y),vt(o,"column",!0),"grid",i),b=re(xo,t),_=ie(xo,t);return S.a.createElement(_,a()({},b,{className:g}),r)}xo.handledProps=["as","celled","centered","children","className","columns","container","divided","doubling","inverted","padded","relaxed","reversed","stackable","stretched","textAlign","verticalAlign"],xo.Column=Eo,xo.Row=Co,xo.propTypes={};var So=xo;function ko(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(ko,t),u=ie(ko,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ko.handledProps=["as","children","className","content"],ko.propTypes={};var No=ko;function Ao(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ao,t),u=ie(Ao,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ao.handledProps=["as","children","className","content"],Ao.propTypes={},Ao.create=Xt(Ao,function(t){return{content:t}});var Io=Ao;function Oo(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Oo,t),u=ie(Oo,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Oo.handledProps=["as","children","className","content"],Oo.propTypes={},Oo.defaultProps={as:"li"},Oo.create=Xt(Oo,function(t){return{content:t}});var Po=Oo;function Ro(t){var e=t.children,n=t.className,i=t.items,o=Qt()("list",n),s=re(Ro,t),u=ie(Ro,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?be()(i,Po.create):e)}Ro.handledProps=["as","children","className","items"],Ro.propTypes={},Ro.defaultProps={as:"ul"},Ro.create=Xt(Ro,function(t){return{items:t}});var Do=Ro,Mo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDismiss",function(t){var e=r.props.onDismiss;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.attached,i=t.children,o=t.className,s=t.color,u=t.compact,c=t.content,l=t.error,f=t.floating,h=t.header,p=t.hidden,d=t.icon,v=t.info,m=t.list,y=t.negative,g=t.onDismiss,b=t.positive,_=t.size,w=t.success,E=t.visible,T=t.warning,C=Qt()("ui",s,_,ct(u,"compact"),ct(l,"error"),ct(f,"floating"),ct(p,"hidden"),ct(d,"icon"),ct(v,"info"),ct(y,"negative"),ct(b,"positive"),ct(w,"success"),ct(E,"visible"),ct(T,"warning"),ft(n,"attached"),"message",o),x=g&&S.a.createElement(Nn,{name:"close",onClick:this.handleDismiss}),k=re(e,this.props),N=ie(e,this.props);return r.isNil(i)?S.a.createElement(N,a()({},k,{className:C}),x,Nn.create(d,{autoGenerateKey:!1}),(!Tt()(h)||!Tt()(c)||!Tt()(m))&&S.a.createElement(No,null,Io.create(h,{autoGenerateKey:!1}),Do.create(m,{autoGenerateKey:!1}),ne(c,{autoGenerateKey:!1}))):S.a.createElement(N,a()({},k,{className:C}),x,i)}}]),e}(x.Component);function Lo(t){var e=t.children,n=t.className,r=Qt()(n),i=re(Lo,t),o=ie(Lo,t);return S.a.createElement(o,a()({},i,{className:r}),e)}_()(Mo,"Content",No),_()(Mo,"Header",Io),_()(Mo,"List",Do),_()(Mo,"Item",Po),_()(Mo,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),Mo.propTypes={},Lo.handledProps=["as","children","className"],Lo.defaultProps={as:"tbody"},Lo.propTypes={};var Fo=Lo;function Uo(t){var e=t.active,n=t.children,i=t.className,o=t.collapsing,s=t.content,u=t.disabled,c=t.error,l=t.icon,f=t.negative,h=t.positive,p=t.selectable,d=t.singleLine,v=t.textAlign,m=t.verticalAlign,y=t.warning,g=t.width,b=Qt()(ct(e,"active"),ct(o,"collapsing"),ct(u,"disabled"),ct(c,"error"),ct(f,"negative"),ct(h,"positive"),ct(p,"selectable"),ct(d,"single line"),ct(y,"warning"),pt(v),dt(m),vt(g,"wide"),i),_=re(Uo,t),w=ie(Uo,t);return r.isNil(n)?S.a.createElement(w,a()({},_,{className:b}),Nn.create(l),s):S.a.createElement(w,a()({},_,{className:b}),n)}Uo.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],Uo.defaultProps={as:"td"},Uo.propTypes={},Uo.create=Xt(Uo,function(t){return{content:t}});var jo=Uo;function Bo(t){var e=t.children,n=t.className,i=t.content,o=t.fullWidth,s=Qt()(ct(o,"full-width"),n),u=re(Bo,t),c=ie(Bo,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bo.handledProps=["as","children","className","content","fullWidth"],Bo.defaultProps={as:"thead"},Bo.propTypes={};var qo=Bo;function Vo(t){var e=t.as,n=re(Vo,t);return S.a.createElement(qo,a()({},n,{as:e}))}Vo.handledProps=["as"],Vo.propTypes={},Vo.defaultProps={as:"tfoot"};var Wo=Vo;function Ho(t){var e=t.as,n=t.className,r=t.sorted,i=Qt()(lt(r,"sorted"),n),o=re(Ho,t);return S.a.createElement(jo,a()({},o,{as:e,className:i}))}Ho.handledProps=["as","className","sorted"],Ho.propTypes={},Ho.defaultProps={as:"th"};var zo=Ho;function Ko(t){var e=t.active,n=t.cellAs,i=t.cells,o=t.children,s=t.className,u=t.disabled,c=t.error,l=t.negative,f=t.positive,h=t.textAlign,p=t.verticalAlign,d=t.warning,v=Qt()(ct(e,"active"),ct(u,"disabled"),ct(c,"error"),ct(l,"negative"),ct(f,"positive"),ct(d,"warning"),pt(h),dt(p),s),m=re(Ko,t),y=ie(Ko,t);return r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(i,function(t){return jo.create(t,{defaultProps:{as:n}})})):S.a.createElement(y,a()({},m,{className:v}),o)}Ko.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],Ko.defaultProps={as:"tr",cellAs:"td"},Ko.propTypes={},Ko.create=Xt(Ko,function(t){return{cells:t}});var Go=Ko;function Qo(t){var e=t.attached,n=t.basic,i=t.celled,o=t.children,s=t.className,u=t.collapsing,c=t.color,l=t.columns,f=t.compact,h=t.definition,p=t.fixed,d=t.footerRow,v=t.headerRow,m=t.inverted,y=t.padded,g=t.renderBodyRow,b=t.selectable,_=t.singleLine,w=t.size,E=t.sortable,T=t.stackable,C=t.striped,x=t.structured,k=t.tableData,N=t.textAlign,A=t.unstackable,I=t.verticalAlign,O=Qt()("ui",c,w,ct(i,"celled"),ct(u,"collapsing"),ct(h,"definition"),ct(p,"fixed"),ct(m,"inverted"),ct(b,"selectable"),ct(_,"single line"),ct(E,"sortable"),ct(T,"stackable"),ct(C,"striped"),ct(x,"structured"),ct(A,"unstackable"),ft(e,"attached"),ft(n,"basic"),ft(f,"compact"),ft(y,"padded"),pt(N),dt(I),vt(l,"column"),"table",s),P=re(Qo,t),R=ie(Qo,t);return r.isNil(o)?S.a.createElement(R,a()({},P,{className:O}),v&&S.a.createElement(qo,null,Go.create(v,{defaultProps:{cellAs:"th"}})),S.a.createElement(Fo,null,g&&be()(k,function(t,e){return Go.create(g(t,e))})),d&&S.a.createElement(Wo,null,Go.create(d))):S.a.createElement(R,a()({},P,{className:O}),o)}Qo.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],Qo.defaultProps={as:"table"},Qo.propTypes={},Qo.Body=Fo,Qo.Cell=jo,Qo.Footer=Wo,Qo.Header=qo,Qo.HeaderCell=zo,Qo.Row=Go;var Yo=Qo;function Xo(t){var e=t.children,n=t.className,i=t.content,o=t.fluid,s=t.text,u=t.textAlign,c=Qt()("ui",ct(s,"text"),ct(o,"fluid"),pt(u),"container",n),l=re(Xo,t),f=ie(Xo,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Xo.handledProps=["as","children","className","content","fluid","text","textAlign"],Xo.propTypes={};var $o=Xo;function Jo(t){var e=t.children,n=t.className,i=t.clearing,o=t.content,s=t.fitted,u=t.hidden,c=t.horizontal,l=t.inverted,f=t.section,h=t.vertical,p=Qt()("ui",ct(i,"clearing"),ct(s,"fitted"),ct(u,"hidden"),ct(c,"horizontal"),ct(l,"inverted"),ct(f,"section"),ct(h,"vertical"),"divider",n),d=re(Jo,t),v=ie(Jo,t);return S.a.createElement(v,a()({},d,{className:p}),r.isNil(e)?o:e)}Jo.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],Jo.propTypes={};var Zo=Jo;function ta(t){var e=t.children,n=t.className,i=t.content,o=Qt()("sub header",n),s=re(ta,t),u=ie(ta,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ta.handledProps=["as","children","className","content"],ta.propTypes={},ta.create=Xt(ta,function(t){return{content:t}});var ea=ta;function na(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(na,t),u=ie(na,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}na.handledProps=["as","children","className","content"],na.propTypes={};var ra=na;function ia(t){var e=t.attached,n=t.block,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.dividing,f=t.floated,h=t.icon,p=t.image,d=t.inverted,v=t.size,m=t.sub,y=t.subheader,g=t.textAlign,b=Qt()("ui",s,v,ct(n,"block"),ct(c,"disabled"),ct(l,"dividing"),lt(f,"floated"),ct(!0===h,"icon"),ct(!0===p,"image"),ct(d,"inverted"),ct(m,"sub"),ft(e,"attached"),pt(g),"header",o),_=re(ia,t),w=ie(ia,t);if(!r.isNil(i))return S.a.createElement(w,a()({},_,{className:b}),i);var E=Nn.create(h,{autoGenerateKey:!1}),T=Hn.create(p,{autoGenerateKey:!1}),C=ea.create(y,{autoGenerateKey:!1});return E||T?S.a.createElement(w,a()({},_,{className:b}),E||T,(u||C)&&S.a.createElement(ra,null,u,C)):S.a.createElement(w,a()({},_,{className:b}),u,C)}ia.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],ia.propTypes={},ia.Content=ra,ia.Subheader=ea;var oa=ia;function aa(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"description"),s=re(aa,t),u=ie(aa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}aa.handledProps=["as","children","className","content"],aa.propTypes={},aa.create=Xt(aa,function(t){return{content:t}});var sa=aa;function ua(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(ua,t),u=ie(ua,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ua.handledProps=["as","children","className","content"],ua.propTypes={},ua.create=Xt(ua,function(t){return{content:t}});var ca=ua;function la(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.floated,u=t.header,c=t.verticalAlign,l=Qt()(lt(s,"floated"),dt(c),"content",n),f=re(la,t),h=ie(la,t);return r.isNil(e)?S.a.createElement(h,a()({},f,{className:l}),ca.create(u),sa.create(o),i):S.a.createElement(h,a()({},f,{className:l}),e)}la.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],la.propTypes={},la.create=Xt(la,function(t){return{content:t}});var fa=la;function ha(t){var e=t.className,n=t.verticalAlign,r=Qt()(dt(n),e),i=re(ha,t);return S.a.createElement(Nn,a()({},i,{className:r}))}ha.handledProps=["className","verticalAlign"],ha.propTypes={},ha.create=Xt(ha,function(t){return{name:t}});var pa=ha,da=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.description,c=t.disabled,l=t.header,f=t.icon,h=t.image,p=t.value,d=ie(e,this.props),v=Qt()(ct(n,"active"),ct(c,"disabled"),ct("li"!==d,"item"),o),m=re(e,this.props),y="li"===d?{value:p}:{"data-value":p};if(!r.isNil(i))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),i);var g=pa.create(f,{autoGenerateKey:!1}),b=Hn.create(h,{autoGenerateKey:!1});if(!Object(x.isValidElement)(s)&&Ut()(s))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,fa.create(s,{autoGenerateKey:!1,defaultProps:{header:l,description:u}}));var _=ca.create(l,{autoGenerateKey:!1}),w=sa.create(u,{autoGenerateKey:!1});return g||b?S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,(s||_||w)&&S.a.createElement(fa,null,_,w,s)):S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),_,w,s)}}]),e}(x.Component);_()(da,"handledProps",["active","as","children","className","content","description","disabled","header","icon","image","onClick","value"]),da.propTypes={},da.create=Xt(da,function(t){return{content:t}});var va=da;function ma(t){var e=t.children,n=t.className,i=t.content,o=re(ma,t),s=ie(ma,t),u=Qt()(ct("ul"!==s&&"ol"!==s,"list"),n);return S.a.createElement(s,a()({},o,{className:u}),r.isNil(e)?i:e)}ma.handledProps=["as","children","className","content"],ma.propTypes={};var ya=ma,ga=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.animated,o=n.bulleted,s=n.celled,u=n.children,c=n.className,l=n.content,f=n.divided,h=n.floated,p=n.horizontal,d=n.inverted,v=n.items,m=n.link,y=n.ordered,g=n.relaxed,b=n.selection,_=n.size,w=n.verticalAlign,E=Qt()("ui",_,ct(i,"animated"),ct(o,"bulleted"),ct(s,"celled"),ct(f,"divided"),ct(p,"horizontal"),ct(d,"inverted"),ct(m,"link"),ct(y,"ordered"),ct(b,"selection"),ft(g,"relaxed"),lt(h,"floated"),dt(w),"list",c),T=re(e,this.props),C=ie(e,this.props);return r.isNil(u)?r.isNil(l)?S.a.createElement(C,a()({},T,{role:"list",className:E}),be()(v,function(e){return va.create(e,{overrideProps:t.handleItemOverrides})})):S.a.createElement(C,a()({},T,{role:"list",className:E}),l):S.a.createElement(C,a()({},T,{role:"list",className:E}),u)}}]),e}(x.Component);_()(ga,"Content",fa),_()(ga,"Description",sa),_()(ga,"Header",ca),_()(ga,"Icon",pa),_()(ga,"Item",va),_()(ga,"List",ya),_()(ga,"handledProps",["animated","as","bulleted","celled","children","className","content","divided","floated","horizontal","inverted","items","link","onItemClick","ordered","relaxed","selection","size","verticalAlign"]),ga.propTypes={};var ba=ga;function _a(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.disabled,u=t.indeterminate,c=t.inline,l=t.inverted,f=t.size,h=Qt()("ui",f,ct(e,"active"),ct(s,"disabled"),ct(u,"indeterminate"),ct(l,"inverted"),ct(n||o,"text"),ft(c,"inline"),"loader",i),p=re(_a,t),d=ie(_a,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?o:n)}_a.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"],_a.propTypes={};var wa=_a;function Ea(t){var e=t.attached,n=t.children,i=t.className,o=t.close,s=t.content,u=t.dividing,c=t.internal,l=t.position,f=t.size,h=Qt()("ui",l,f,ct(e,"attached"),ct(u,"dividing"),ct(c,"internal"),ft(o,"close"),"rail",i),p=re(Ea,t),d=ie(Ea,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?s:n)}Ea.handledProps=["as","attached","children","className","close","content","dividing","internal","position","size"],Ea.propTypes={};var Ta=Ea;function Ca(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()("ui",ct(o,"hidden"),ct(s,"visible"),"content",n),c=re(Ca,t),l=ie(Ca,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ca.handledProps=["as","children","className","content","hidden","visible"],Ca.propTypes={};var xa=Ca;function Sa(t){var e=t.active,n=t.animated,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.instant,l=Qt()("ui",n,ct(e,"active"),ct(u,"disabled"),ct(c,"instant"),"reveal",o),f=re(Sa,t),h=ie(Sa,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(i)?s:i)}Sa.handledProps=["active","animated","as","children","className","content","disabled","instant"],Sa.propTypes={},Sa.Content=xa;var ka=Sa;function Na(t){var e=t.children,n=t.className,i=t.compact,o=t.content,s=t.horizontal,u=t.piled,c=t.raised,l=t.size,f=t.stacked,h=Qt()("ui",l,ct(i,"compact"),ct(s,"horizontal"),ct(u,"piled"),ct(c,"raised"),ct(f,"stacked"),"segments",n),p=re(Na,t),d=ie(Na,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(e)?o:e)}Na.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],Na.propTypes={};var Aa=Na;function Ia(t){var e=t.attached,n=t.basic,i=t.children,o=t.circular,s=t.className,u=t.clearing,c=t.color,l=t.compact,f=t.content,h=t.disabled,p=t.floated,d=t.inverted,v=t.loading,m=t.padded,y=t.piled,g=t.raised,b=t.secondary,_=t.size,w=t.stacked,E=t.tertiary,T=t.textAlign,C=t.vertical,x=Qt()("ui",c,_,ct(n,"basic"),ct(o,"circular"),ct(u,"clearing"),ct(l,"compact"),ct(h,"disabled"),ct(d,"inverted"),ct(v,"loading"),ct(y,"piled"),ct(g,"raised"),ct(b,"secondary"),ct(w,"stacked"),ct(E,"tertiary"),ct(C,"vertical"),ft(e,"attached"),ft(m,"padded"),pt(T),lt(p,"floated"),"segment",s),k=re(Ia,t),N=ie(Ia,t);return S.a.createElement(N,a()({},k,{className:x}),r.isNil(i)?f:i)}Ia.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","raised","secondary","size","stacked","tertiary","textAlign","vertical"],Ia.Group=Aa,Ia.propTypes={};var Oa=Ia;function Pa(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pa,t),u=ie(Pa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Pa.handledProps=["as","children","className","content"],Pa.propTypes={},Pa.create=Xt(Pa,function(t){return{content:t}});var Ra=Pa;function Da(t){var e=t.children,n=t.className,i=t.content,o=Qt()("title",n),s=re(Da,t),u=ie(Da,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Da.handledProps=["as","children","className","content"],Da.propTypes={},Da.create=Xt(Da,function(t){return{content:t}});var Ma=Da;function La(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.title,u=Qt()("content",n),c=re(La,t),l=ie(La,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(l,a()({},c,{className:u}),Ma.create(s,{autoGenerateKey:!1}),Ra.create(o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),i):S.a.createElement(l,a()({},c,{className:u}),e)}La.handledProps=["as","children","className","content","description","title"],La.propTypes={},La.create=Xt(La,function(t){return{content:t}});var Fa=La,Ua=n(271);n.n(Ua)()(st,function(t,e){return e<=8});function ja(t){var e=t.attached,n=t.children,i=t.className,o=t.content,s=t.fluid,u=t.items,c=t.ordered,l=t.size,f=t.stackable,h=t.unstackable,p=t.vertical,d=t.widths,v=Qt()("ui",l,ct(s,"fluid"),ct(c,"ordered"),ct(h,"unstackable"),ct(p,"vertical"),ft(e,"attached"),lt(f,"stackable"),vt(d),"steps",i),m=re(ja,t),y=ie(ja,t);return r.isNil(n)?r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(u,function(t){return Va.create(t)})):S.a.createElement(y,a()({},m,{className:v}),o):S.a.createElement(y,a()({},m,{className:v}),n)}ja.handledProps=["as","attached","children","className","content","fluid","items","ordered","size","stackable","unstackable","vertical","widths"],ja.propTypes={};var Ba=ja,qa=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){if(r.props.onClick)return"a"}),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.completed,u=t.content,c=t.description,l=t.disabled,f=t.href,h=t.icon,p=t.link,d=t.title,v=Qt()(ct(n,"active"),ct(s,"completed"),ct(l,"disabled"),ct(p,"link"),"step",o),m=re(e,this.props),y=ie(e,this.props,this.computeElementType);return r.isNil(i)?r.isNil(u)?S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),Fa.create({description:c,title:d},{autoGenerateKey:!1})):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),u):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),i)}}]),e}(x.Component);_()(qa,"Content",Fa),_()(qa,"Description",Ra),_()(qa,"Group",Ba),_()(qa,"Title",Ma),_()(qa,"handledProps",["active","as","children","className","completed","content","description","disabled","href","icon","link","onClick","ordered","title"]),qa.propTypes={},qa.create=Xt(qa,function(t){return{content:t}});var Va=qa;function Wa(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=Qt()("content",ct(e,"active"),i),u=re(Wa,t),c=ie(Wa,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}Wa.handledProps=["active","as","children","className","content"],Wa.propTypes={},Wa.create=Xt(Wa,function(t){return{content:t}});var Ha=Wa,za=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.children,i=t.className,o=t.content,s=Qt()(ct(n,"active"),"title",i),u=re(e,this.props),c=ie(e,this.props);return Tt()(o)?S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),r):S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),S.a.createElement(Nn,{name:"dropdown"}),o)}}]),e}(x.Component);_()(za,"handledProps",["active","as","children","className","content","index","onClick"]),za.propTypes={},za.create=Xt(za,function(t){return{content:t}});var Ka=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeNewIndex",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?t===n?-1:t:ae()(n,t)?Cn()(n,t):yt()(n).concat([t])}),_()(g()(g()(r)),"handleTitleOverrides",function(t){return{onClick:function(e,n){var i=n.index,o=r.computeNewIndex(i);r.trySetState({activeIndex:o}),C()(t,"onClick",e,n),C()(r.props,"onTitleClick",e,n)}}}),_()(g()(g()(r)),"isIndexActive",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?n===t:ae()(n,t)}),_()(g()(g()(r)),"renderPanels",function(){var t=[],e=r.props.panels;return B()(e,function(e,n){var i=e.content,o=e.title,a=r.isIndexActive(n);t.push(za.create(o,{defaultProps:{active:a,index:n},overrideProps:r.handleTitleOverrides})),t.push(Ha.create(i,{defaultProps:{active:a}}))}),t}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(t){return{activeIndex:t.exclusive?-1:[-1]}}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children,i=Qt()("accordion",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}),Tt()(r)?this.renderPanels():r)}}]),e}(V);function Ga(t){var e=t.className,n=t.fluid,r=t.inverted,i=t.styled,o=Qt()("ui",ct(n,"fluid"),ct(r,"inverted"),ct(i,"styled"),e),s=re(Ga,t);return S.a.createElement(Ka,a()({},s,{className:o}))}_()(Ka,"defaultProps",{exclusive:!0}),_()(Ka,"autoControlledProps",["activeIndex"]),_()(Ka,"handledProps",["activeIndex","as","children","className","defaultActiveIndex","exclusive","onTitleClick","panels"]),Ka.propTypes={},Ka.create=Xt(Ka,function(t){return{content:t}}),Ga.handledProps=["className","fluid","inverted","styled"],Ga.propTypes={},Ga.Accordion=Ka,Ga.Content=Ha,Ga.Title=za;var Qa=Ga,Ya=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick,n=r.state.active;e&&e(t,N()({},r.props,{active:!0})),n||r.trySetState({active:!0})}),n))}return m()(e,t),l()(e,[{key:"getSrc",value:function(){var t=this.props,e=t.autoplay,n=void 0===e||e,r=t.brandedUI,i=void 0!==r&&r,o=t.color,a=void 0===o?"#444444":o,s=t.hd,u=void 0===s||s,c=t.id,l=t.source,f=t.url;return"youtube"===l?["//www.youtube.com/embed/".concat(c),"?autohide=true","&amp;autoplay=".concat(n),"&amp;color=".concat(encodeURIComponent(a)),"&amp;hq=".concat(u),"&amp;jsapi=false","&amp;modestbranding=".concat(i),"&amp;rel=".concat(i?0:1)].join(""):"vimeo"===l?["//player.vimeo.com/video/".concat(c),"?api=false","&amp;autoplay=".concat(n),"&amp;byline=false","&amp;color=".concat(encodeURIComponent(a)),"&amp;portrait=false","&amp;title=false"].join(""):f}},{key:"render",value:function(){var t=this.props,n=t.aspectRatio,r=t.className,i=t.icon,o=t.placeholder,s=this.state.active,u=Qt()("ui",n,ct(s,"active"),"embed",r),c=re(e,this.props),l=ie(e,this.props),f=void 0!==i?i:"video play";return S.a.createElement(l,a()({},c,{className:u,onClick:this.handleClick}),Nn.create(f,{autoGenerateKey:!1}),o&&S.a.createElement("img",{className:"placeholder",src:o}),this.renderEmbed())}},{key:"renderEmbed",value:function(){var t=this.props,e=t.children,n=t.content,i=t.iframe,o=t.source;return this.state.active?r.isNil(e)?r.isNil(n)?S.a.createElement("div",{className:"embed"},Jt(r.isNil(i)?this.getSrc():i,{defaultProps:{allowFullScreen:!1,frameBorder:0,height:"100%",scrolling:"no",src:this.getSrc(),title:"Embedded content from ".concat(o,"."),width:"100%"},autoGenerateKey:!1})):S.a.createElement("div",{className:"embed"},n):S.a.createElement("div",{className:"embed"},e):null}}]),e}(V);_()(Ya,"autoControlledProps",["active"]),_()(Ya,"handledProps",["active","as","aspectRatio","autoplay","brandedUI","children","className","color","content","defaultActive","hd","icon","id","iframe","onClick","placeholder","source","url"]),Ya.propTypes={};var Xa=n(270),$a=n.n(Xa);function Ja(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Ja,t),u=ie(Ja,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}function Za(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Za,t),u=ie(Za,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ja.handledProps=["as","children","className","content"],Ja.propTypes={},Ja.create=Xt(Ja,function(t){return{children:t}}),Za.handledProps=["as","children","className","content"],Za.propTypes={},Za.create=Xt(Za,function(t){return{children:t}});var ts=["top left","top right","bottom right","bottom left","right center","left center","top center","bottom center"],es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{}),_()(g()(g()(r)),"hideOnScroll",function(t){r.setState({closed:!0}),Dt.unsub("scroll",r.hideOnScroll,{target:window}),setTimeout(function(){r.mounted&&r.setState({closed:!1})},50),r.handleClose(t)}),_()(g()(g()(r)),"handleClose",function(t){C()(r.props,"onClose",t,r.props)}),_()(g()(g()(r)),"handleOpen",function(t){r.coords=t.currentTarget.getBoundingClientRect();var e=r.props.onOpen;e&&e(t,r.props)}),_()(g()(g()(r)),"handlePortalMount",function(t){r.props.hideOnScroll&&Dt.sub("scroll",r.hideOnScroll,{target:window}),r.setPosition(),C()(r.props,"onMount",t,r.props)}),_()(g()(g()(r)),"handlePortalUnmount",function(t){var e=r.props.hideOnScroll;cancelAnimationFrame(r.animationRequestId),e&&Dt.unsub("scroll",r.hideOnScroll,{target:window}),C()(r.props,"onUnmount",t,r.props)}),_()(g()(g()(r)),"handlePopupRef",function(t){r.popupCoords=t?t.getBoundingClientRect():null,r.setPopupStyle()}),_()(g()(g()(r)),"handleTriggerRef",function(t){t&&(r.triggerRef=t)}),_()(g()(g()(r)),"setPosition",function(){r.triggerRef&&r.setPopupStyle(r.props.position),r.animationRequestId=requestAnimationFrame(r.setPosition)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"computePopupStyle",value:function(t){var e={position:"absolute"};if(!St())return e;var n=this.props,r=n.horizontalOffset,i=n.verticalOffset,o=window,a=o.pageYOffset,s=o.pageXOffset,u=document.documentElement,c=u.clientWidth,l=u.clientHeight,f=this.coords||this.triggerRef.getBoundingClientRect();if(ae()(t,"right"))e.right=Math.round(c-(f.right+s)),e.left="auto";else if(ae()(t,"left"))e.left=Math.round(f.left+s),e.right="auto";else{var h=(f.width-this.popupCoords.width)/2;e.left=Math.round(f.left+h+s),e.right="auto"}if(ae()(t,"top"))e.bottom=Math.round(l-(f.top+a)),e.top="auto";else if(ae()(t,"bottom"))e.top=Math.round(f.bottom+a),e.bottom="auto";else{var p=(f.height+this.popupCoords.height)/2;e.top=Math.round(f.bottom+a-p),e.bottom="auto";var d=this.popupCoords.width+8;ae()(t,"right")?e.right-=d:e.left-=d}return r&&(Vt()(e.right)?e.right-=r:e.left-=r),i&&(Vt()(e.top)?e.top+=i:e.bottom+=i),e}},{key:"isStyleInViewport",value:function(t){var e=window,n=e.pageYOffset,r=e.pageXOffset,i=document.documentElement,o=i.clientWidth,a=i.clientHeight,s={top:t.top,left:t.left,width:this.popupCoords.width,height:this.popupCoords.height};return Vt()(t.right)&&(s.left=o-t.right-s.width),Vt()(t.bottom)&&(s.top=a-t.bottom-s.height),!(s.top<n)&&(!(s.top+s.height>n+a)&&(!(s.left<r)&&!(s.left+s.width>r+o)))}},{key:"setPopupStyle",value:function(){if((this.coords||this.triggerRef)&&this.popupCoords){var t=this.props.position,e=this.computePopupStyle(t);if(this.props.keepInViewPort)for(var n=Cn()(ts,t).concat([t]),r=0;!this.isStyleInViewport(e)&&r<n.length;r+=1)e=this.computePopupStyle(n[r]),t=n[r];e=qi()(e,function(t){return Vt()(t)?"".concat(t,"px"):t}),this.setState({style:e,position:t})}}},{key:"getPortalProps",value:function(){var t={},e=this.props,n=e.on,r=e.hoverable,i=Ot()(n)?n:[n];return r&&(t.closeOnPortalMouseLeave=!0,t.mouseLeaveDelay=300),ae()(i,"click")&&(t.openOnTriggerClick=!0,t.closeOnTriggerClick=!0,t.closeOnDocumentClick=!0),ae()(i,"focus")&&(t.openOnTriggerFocus=!0,t.closeOnTriggerBlur=!0),ae()(i,"hover")&&(t.openOnTriggerMouseEnter=!0,t.closeOnTriggerMouseLeave=!0,t.mouseLeaveDelay=70,t.mouseEnterDelay=50),t}},{key:"render",value:function(){var t=this.props,n=t.basic,i=t.children,o=t.className,s=t.content,u=t.flowing,c=t.header,l=t.inverted,f=t.size,h=t.trigger,p=t.wide,d=this.state,v=d.position,m=d.closed,y=$a()({},this.state.style,this.props.style),g=Qt()("ui",v,f,ft(p,"wide"),ct(n,"basic"),ct(u,"flowing"),ct(l,"inverted"),"popup transition visible",o);if(m)return h;var b=re(e,this.props),_=Mn.handledProps,w=sr()(b,function(t,e,n){return ae()(_,n)||(t[n]=e),t},{}),E=or()(b,_),T=ie(e,this.props),C=S.a.createElement(T,a()({},w,{className:g,style:y,ref:this.handlePopupRef}),i,r.isNil(i)&&Za.create(c,{autoGenerateKey:!1}),r.isNil(i)&&Ja.create(s,{autoGenerateKey:!1})),x=N()({},this.getPortalProps(),E);return S.a.createElement(Rn,{innerRef:this.handleTriggerRef},S.a.createElement(Mn,a()({},x,{trigger:h,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),C))}}]),e}(x.Component);_()(es,"defaultProps",{position:"top left",on:"hover",keepInViewPort:!0}),_()(es,"Content",Ja),_()(es,"Header",Za),_()(es,"handledProps",["as","basic","children","className","content","flowing","header","hideOnScroll","horizontalOffset","hoverable","inverted","keepInViewPort","on","onClose","onMount","onOpen","onUnmount","position","size","style","trigger","verticalOffset","wide"]),es.propTypes={};var ns=n(269),rs=n.n(ns),is=n(268),os=n.n(is),as=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"calculatePercent",function(){var t=i.props,e=t.percent,n=t.total,r=t.value;return P()(e)?P()(n)||P()(r)?void 0:r/n*100:e}),_()(g()(g()(i)),"computeValueText",function(t){var e=i.props,n=e.progress,r=e.total,o=e.value;return"value"===n?o:"ratio"===n?"".concat(o,"/").concat(r):"".concat(t,"%")}),_()(g()(g()(i)),"getPercent",function(){var t=i.props,e=t.precision,n=t.progress,r=t.total,o=t.value,a=os()(i.calculatePercent(),0,100);return P()(r)||P()(o)||"value"!==n?"value"===n?o:P()(e)?a:rs()(a,e):o/r*100}),_()(g()(g()(i)),"isAutoSuccess",function(){var t=i.props,e=t.autoSuccess,n=t.percent,r=t.total,o=t.value;return e&&(n>=100||o>=r)}),_()(g()(g()(i)),"renderLabel",function(){var t=i.props,e=t.children,n=t.content,o=t.label;return r.isNil(e)?r.isNil(n)?$t(o,{autoGenerateKey:!1,defaultProps:{className:"label"}}):S.a.createElement("div",{className:"label"},n):S.a.createElement("div",{className:"label"},e)}),_()(g()(g()(i)),"renderProgress",function(t){var e=i.props,n=e.precision;if(e.progress||!P()(n))return S.a.createElement("div",{className:"progress"},i.computeValueText(t))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.attached,i=t.className,o=t.color,s=t.disabled,u=t.error,c=t.indicating,l=t.inverted,f=t.size,h=t.success,p=t.warning,d=Qt()("ui",o,f,ct(n||c,"active"),ct(s,"disabled"),ct(u,"error"),ct(c,"indicating"),ct(l,"inverted"),ct(h||this.isAutoSuccess(),"success"),ct(p,"warning"),lt(r,"attached"),"progress",i),v=re(e,this.props),m=ie(e,this.props),y=this.getPercent()||0;return S.a.createElement(m,a()({},v,{className:d,"data-percent":Math.floor(y)}),S.a.createElement("div",{className:"bar",style:{width:"".concat(y,"%")}},this.renderProgress(y)),this.renderLabel())}}]),e}(x.Component);_()(as,"handledProps",["active","as","attached","autoSuccess","children","className","color","content","disabled","error","indicating","inverted","label","percent","precision","progress","size","success","total","value","warning"]),as.propTypes={};var ss=as,us=n(267),cs=n.n(us),ls=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleKeyUp",function(t){var e=r.props,n=e.onClick,i=e.onKeyUp;if(i&&i(t,r.props),n)switch(In.a.getCode(t)){case In.a.Enter:case In.a.Spacebar:t.preventDefault(),n(t,r.props)}}),_()(g()(g()(r)),"handleMouseEnter",function(t){var e=r.props.onMouseEnter;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.selected,o=Qt()(ct(n,"active"),ct(i,"selected"),"icon",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick,onKeyUp:this.handleKeyUp,onMouseEnter:this.handleMouseEnter,tabIndex:0,role:"radio"}))}}]),e}(x.Component);_()(ls,"defaultProps",{as:"i"}),_()(ls,"handledProps",["active","as","className","index","onClick","onKeyUp","onMouseEnter","selected"]),ls.propTypes={};var fs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleIconClick",function(t,e){var n=e.index,i=r.props,o=i.clearable,a=i.disabled,s=i.maxRating,u=i.onRate,c=r.state.rating;if(!a){var l=n+1;"auto"===o&&1===s?l=+!c:!0===o&&l===c&&(l=0),r.trySetState({rating:l},{isSelecting:!1}),u&&u(t,N()({},r.props,{rating:l}))}}),_()(g()(g()(r)),"handleIconMouseEnter",function(t,e){var n=e.index;r.props.disabled||r.setState({selectedIndex:n,isSelecting:!0})}),_()(g()(g()(r)),"handleMouseLeave",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];C.a.apply(void 0,[r.props,"onMouseLeave"].concat(e)),r.props.disabled||r.setState({selectedIndex:-1,isSelecting:!1})}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n.className,i=n.disabled,o=n.icon,s=n.maxRating,u=n.size,c=this.state,l=c.rating,f=c.selectedIndex,h=c.isSelecting,p=Qt()("ui",o,u,ct(i,"disabled"),ct(h&&!i&&f>=0,"selected"),"rating",r),d=re(e,this.props),v=ie(e,this.props);return S.a.createElement(v,a()({},d,{className:p,role:"radiogroup",onMouseLeave:this.handleMouseLeave}),cs()(s,function(e){return S.a.createElement(ls,{active:l>=e+1,"aria-checked":l===e+1,"aria-posinset":e+1,"aria-setsize":s,index:e,key:e,onClick:t.handleIconClick,onMouseEnter:t.handleIconMouseEnter,selected:f>=e&&h})}))}}]),e}(V);_()(fs,"autoControlledProps",["rating"]),_()(fs,"defaultProps",{clearable:"auto",maxRating:1}),_()(fs,"Icon",ls),_()(fs,"handledProps",["as","className","clearable","defaultRating","disabled","icon","maxRating","onRate","rating","size"]),fs.propTypes={};var hs=n(51),ps=n.n(hs),ds=n(266),vs=n.n(ds);function ms(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.renderer,u=Qt()(ct(e,"active"),"category",i),c=re(ms,t),l=ie(ms,t);return S.a.createElement(l,a()({},c,{className:u}),S.a.createElement("div",{className:"name"},s(t)),r.isNil(n)?o:n)}ms.handledProps=["active","as","children","className","content","name","renderer","results"],ms.defaultProps={renderer:function(t){return t.name}},ms.propTypes={};var ys=ms,gs=function(t){var e=t.image,n=t.price,r=t.title,i=t.description;return[e&&S.a.createElement("div",{key:"image",className:"image"},Zt(e,{autoGenerateKey:!1})),S.a.createElement("div",{key:"content",className:"content"},n&&S.a.createElement("div",{className:"price"},n),r&&S.a.createElement("div",{className:"title"},r),i&&S.a.createElement("div",{className:"description"},i))]};gs.handledProps=[];var bs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.renderer,o=Qt()(ct(n,"active"),"result",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick}),i(this.props))}}]),e}(x.Component);function _s(t){var e=t.children,n=t.className,i=t.content,o=Qt()("results transition",n),s=re(_s,t),u=ie(_s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(bs,"defaultProps",{renderer:gs}),_()(bs,"handledProps",["active","as","className","content","description","id","image","onClick","price","renderer","title"]),bs.propTypes={},_s.handledProps=["as","children","className","content"],_s.propTypes={};var ws=_s,Es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleResultSelect",function(t,e){C()(r.props,"onResultSelect",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"handleSelectionChange",function(t){var e=r.getSelectedResult();C()(r.props,"onSelectionChange",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),r.close())}),_()(g()(g()(r)),"moveSelectionOnKeyDown",function(t){switch(In.a.getCode(t)){case In.a.ArrowDown:t.preventDefault(),r.moveSelectionBy(t,1);break;case In.a.ArrowUp:t.preventDefault(),r.moveSelectionBy(t,-1)}}),_()(g()(g()(r)),"selectItemOnEnter",function(t){if(In.a.getCode(t)===In.a.Enter){var e=r.getSelectedResult();e&&(t.preventDefault(),r.setValue(e.title),r.handleResultSelect(t,e),r.close())}}),_()(g()(g()(r)),"closeOnDocumentClick",function(t){r.close()}),_()(g()(g()(r)),"handleMouseDown",function(t){r.isMouseDown=!0,C()(r.props,"onMouseDown",t,r.props),Dt.sub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleDocumentMouseUp",function(){r.isMouseDown=!1,Dt.unsub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleInputClick",function(t){t.nativeEvent.stopImmediatePropagation(),r.tryOpen()}),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.id,i=r.getSelectedResult(n);t.nativeEvent.stopImmediatePropagation(),r.setValue(i.title),r.handleResultSelect(t,i),r.close()}),_()(g()(g()(r)),"handleFocus",function(t){var e=r.props.onFocus;e&&e(t,r.props),r.setState({focus:!0})}),_()(g()(g()(r)),"handleBlur",function(t){var e=r.props.onBlur;e&&e(t,r.props),r.setState({focus:!1})}),_()(g()(g()(r)),"handleSearchChange",function(t){t.stopPropagation();var e=r.props.minCharacters,n=r.state.open,i=t.target.value;C()(r.props,"onSearchChange",t,N()({},r.props,{value:i})),i.length<e?r.close():n||r.tryOpen(i),r.setValue(i)}),_()(g()(g()(r)),"getFlattenedResults",function(){var t=r.props,e=t.category,n=t.results;return e?sr()(n,function(t,e){return t.concat(e.results)},[]):n}),_()(g()(g()(r)),"getSelectedResult",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.selectedIndex,e=r.getFlattenedResults();return bi()(e,t)}),_()(g()(g()(r)),"setValue",function(t){var e=r.props.selectFirstResult;r.trySetState({value:t},{selectedIndex:e?0:-1})}),_()(g()(g()(r)),"moveSelectionBy",function(t,e){var n=r.state.selectedIndex,i=r.getFlattenedResults().length-1,o=n+e;o>i?o=0:o<0&&(o=i),r.setState({selectedIndex:o}),r.scrollSelectedItemIntoView(),r.handleSelectionChange(t)}),_()(g()(g()(r)),"scrollSelectedItemIntoView",function(){if(St()){var t=document.querySelector(".ui.search.active.visible .results.visible"),e=t.querySelector(".result.active");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}),_()(g()(g()(r)),"tryOpen",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.value,e=r.props.minCharacters;t.length<e||r.open()}),_()(g()(g()(r)),"open",function(){r.trySetState({open:!0})}),_()(g()(g()(r)),"close",function(){r.trySetState({open:!1})}),_()(g()(g()(r)),"renderSearchInput",function(t){var e=r.props,n=e.icon,i=e.input,o=r.state.value;return co.create(i,{autoGenerateKey:!1,defaultProps:N()({},t,{icon:n,input:{className:"prompt",tabIndex:"0",autoComplete:"off"},onChange:r.handleSearchChange,onClick:r.handleInputClick,value:o})})}),_()(g()(g()(r)),"renderNoResults",function(){var t=r.props,e=t.noResultsDescription,n=t.noResultsMessage;return S.a.createElement("div",{className:"message empty"},S.a.createElement("div",{className:"header"},n),e&&S.a.createElement("div",{className:"description"},e))}),_()(g()(g()(r)),"renderResult",function(t,e,n){var i=t.childKey,o=ps()(t,["childKey"]),s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=r.props.resultRenderer,c=r.state.selectedIndex,l=e+s;return S.a.createElement(bs,a()({key:i||o.title,active:c===l,onClick:r.handleItemClick,renderer:u},o,{id:l}))}),_()(g()(g()(r)),"renderResults",function(){var t=r.props.results;return be()(t,r.renderResult)}),_()(g()(g()(r)),"renderCategories",function(){var t=r.props,e=t.categoryRenderer,n=t.results,i=r.state.selectedIndex,o=0;return be()(n,function(t){var n=t.childKey,a=ps()(t,["childKey"]),s=N()({key:n||a.name,active:fe()(i,o,o+a.results.length),renderer:e},a),u=vs()(r.renderResult,o);return o+=a.results.length,S.a.createElement(ys,s,a.results.map(u))})}),_()(g()(g()(r)),"renderMenuContent",function(){var t=r.props,e=t.category,n=t.showNoResults,i=t.results;return L()(i)?n?r.renderNoResults():null:e?r.renderCategories():r.renderResults()}),_()(g()(g()(r)),"renderResultsMenu",function(){var t=r.state.open?"visible":"",e=r.renderMenuContent();if(e)return S.a.createElement(ws,{className:t},e)}),n))}return m()(e,t),l()(e,[{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),e&&this.open()}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||this.setValue(t.value)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){!e.focus&&this.state.focus?(this.isMouseDown||this.tryOpen(),this.state.open&&Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.focus&&!this.state.focus&&(this.isMouseDown||this.close(),Dt.unsub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])),!e.open&&this.state.open?(this.open(),Dt.sub("click",this.closeOnDocumentClick),Dt.sub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.open&&!this.state.open&&(this.close(),Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]))}},{key:"componentWillUnmount",value:function(){Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])}},{key:"render",value:function(){var t=this.state,n=t.searchClasses,r=t.focus,i=t.open,o=this.props,s=o.aligned,u=o.category,c=o.className,l=o.fluid,f=o.loading,h=o.size,p=Qt()("ui",i&&"active visible",h,n,ct(u,"category"),ct(r,"focus"),ct(l,"fluid"),ct(f,"loading"),lt(s,"aligned"),"search",c),d=re(e,this.props),v=ie(e,this.props),m=ce(d,{htmlProps:se}),y=H()(m,2),g=y[0],b=y[1];return S.a.createElement(v,a()({},b,{className:p,onBlur:this.handleBlur,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown}),this.renderSearchInput(g),this.renderResultsMenu())}}]),e}(V);function Ts(t){var e=t.className,n=t.children,i=t.content,o=Qt()("pushable",e),s=re(Ts,t),u=ie(Ts,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}_()(Es,"defaultProps",{icon:"search",input:"text",minCharacters:1,noResultsMessage:"No results found.",showNoResults:!0}),_()(Es,"autoControlledProps",["open","value"]),_()(Es,"Category",ys),_()(Es,"Result",bs),_()(Es,"Results",ws),_()(Es,"handledProps",["aligned","as","category","categoryRenderer","className","defaultOpen","defaultValue","fluid","icon","input","loading","minCharacters","noResultsDescription","noResultsMessage","onBlur","onFocus","onMouseDown","onResultSelect","onSearchChange","onSelectionChange","open","resultRenderer","results","selectFirstResult","showNoResults","size","value"]),Es.propTypes={},Ts.handledProps=["as","children","className","content"],Ts.propTypes={};var Cs=Ts;function xs(t){var e=t.className,n=t.dimmed,i=t.children,o=t.content,s=Qt()("pusher",ct(n,"dimmed"),e),u=re(xs,t),c=ie(xs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}xs.handledProps=["as","children","className","content","dimmed"],xs.propTypes={};var Ss=xs,ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"startAnimating",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;clearTimeout(r.stopAnimatingTimer),r.setState({animating:!0}),r.stopAnimatingTimer=setTimeout(function(){return r.setState({animating:!1})},t)}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){t.visible!==this.props.visible&&this.startAnimating()}},{key:"render",value:function(){var t=this.props,n=t.animation,i=t.className,o=t.children,s=t.content,u=t.direction,c=t.visible,l=t.width,f=this.state.animating,h=Qt()("ui",n,u,l,ct(f,"animating"),ct(c,"visible"),"sidebar",i),p=re(e,this.props),d=ie(e,this.props);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(o)?s:o)}}]),e}(V);_()(ks,"defaultProps",{direction:"left"}),_()(ks,"autoControlledProps",["visible"]),_()(ks,"Pushable",Cs),_()(ks,"Pusher",Ss),_()(ks,"handledProps",["animation","as","children","className","content","defaultVisible","direction","visible","width"]),ks.propTypes={};var Ns=ks,As=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{sticky:!1}),_()(g()(g()(r)),"addListeners",function(t){var e=t.scrollContext;e&&(Dt.sub("resize",r.handleUpdate,{target:e}),Dt.sub("scroll",r.handleUpdate,{target:e}))}),_()(g()(g()(r)),"removeListeners",function(){var t=r.props.scrollContext;t&&(Dt.unsub("resize",r.handleUpdate,{target:t}),Dt.unsub("scroll",r.handleUpdate,{target:t}))}),_()(g()(g()(r)),"update",function(t){var e=r.state.pushing;if(r.ticking=!1,r.assignRects(),e)return r.didReachStartingPoint()?r.stickToContextTop(t):r.didTouchScreenBottom()?r.stickToScreenBottom(t):r.stickToContextBottom(t);if(r.isOversized()){if(r.contextRect.top>0)return r.stickToContextTop(t);if(r.contextRect.bottom<window.innerHeight)return r.stickToContextBottom(t)}return r.didTouchScreenTop()?r.didReachContextBottom()?r.stickToContextBottom(t):r.stickToScreenTop(t):r.stickToContextTop(t)}),_()(g()(g()(r)),"handleUpdate",function(t){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(function(){return r.update(t)}))}),_()(g()(g()(r)),"assignRects",function(){var t=r.props.context;r.triggerRect=r.triggerRef.getBoundingClientRect(),r.contextRect=(t||document.body).getBoundingClientRect(),r.stickyRect=r.stickyRef.getBoundingClientRect()}),_()(g()(g()(r)),"didReachContextBottom",function(){var t=r.props.offset;return r.stickyRect.height+t>=r.contextRect.bottom}),_()(g()(g()(r)),"didReachStartingPoint",function(){return r.stickyRect.top<=r.triggerRect.top}),_()(g()(g()(r)),"didTouchScreenTop",function(){return r.triggerRect.top<r.props.offset}),_()(g()(g()(r)),"didTouchScreenBottom",function(){var t=r.props.bottomOffset;return r.contextRect.bottom+t>window.innerHeight}),_()(g()(g()(r)),"isOversized",function(){return r.stickyRect.height>window.innerHeight}),_()(g()(g()(r)),"pushing",function(t){r.props.pushing&&r.setState({pushing:t})}),_()(g()(g()(r)),"stick",function(t){r.setState({sticky:!0}),C()(r.props,"onStick",t,r.props)}),_()(g()(g()(r)),"unstick",function(t){r.setState({sticky:!1}),C()(r.props,"onUnstick",t,r.props)}),_()(g()(g()(r)),"stickToContextBottom",function(t){var e=r.contextRect.bottom-r.stickyRect.height;C()(r.props,"onBottom",t,r.props),r.stick(t),r.setState({top:e,bottom:null}),r.pushing(!0)}),_()(g()(g()(r)),"stickToContextTop",function(t){C()(r.props,"onTop",t,r.props),r.unstick(t),r.pushing(!1)}),_()(g()(g()(r)),"stickToScreenBottom",function(t){var e=r.props.bottomOffset;r.stick(t),r.setState({bottom:e,top:null})}),_()(g()(g()(r)),"stickToScreenTop",function(t){var e=r.props.offset;r.stick(t),r.setState({top:e,bottom:null})}),_()(g()(g()(r)),"handleStickyRef",function(t){return r.stickyRef=t}),_()(g()(g()(r)),"handleTriggerRef",function(t){return r.triggerRef=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){St()&&(this.props.active&&(this.handleUpdate(),this.addListeners(this.props)))}},{key:"componentWillReceiveProps",value:function(t){var e=this.props,n=e.active,r=e.scrollContext,i=t.active,o=t.scrollContext;if(n!==i){if(i)return this.handleUpdate(),void this.addListeners(t);this.removeListeners(),this.setState({sticky:!1})}else r!==o&&(this.removeListeners(),this.addListeners(t))}},{key:"componentWillUnmount",value:function(){St()&&(this.props.active&&(this.removeListeners(),cancelAnimationFrame(this.frameId)))}},{key:"computeStyle",value:function(){var t=this.state,e=t.bottom,n=t.sticky,r=t.top;return n?{bottom:e,top:r,position:"fixed",width:this.triggerRect.width}:{}}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.className,i=re(e,this.props),o=ie(e,this.props);return S.a.createElement(o,a()({},i,{className:r}),S.a.createElement("div",{ref:this.handleTriggerRef}),S.a.createElement("div",{ref:this.handleStickyRef,style:this.computeStyle()},n))}}]),e}(x.Component);function Is(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.loading,u=Qt()(ct(e,"active"),ct(s,"loading"),"tab",i),c=re(Is,t),l=ie(Is,t),f={};return l===Oa&&(f.attached="bottom"),S.a.createElement(l,a()({},f,c,{className:u}),r.isNil(n)?o:n)}_()(As,"defaultProps",{active:!0,bottomOffset:0,offset:0,scrollContext:St()?window:null}),_()(As,"handledProps",["active","as","bottomOffset","children","className","context","offset","onBottom","onStick","onTop","onUnstick","pushing","scrollContext"]),As.propTypes={},Is.handledProps=["active","as","children","className","content","loading"],Is.defaultProps={as:Oa,active:!0},Is.propTypes={},Is.create=Xt(Is,function(t){return{content:t}});var Os=Is,Ps=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.index;C()(r.props,"onTabChange",t,N()({},r.props,{activeIndex:n})),r.trySetState({activeIndex:n})}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{activeIndex:0}}},{key:"renderItems",value:function(){var t=this.props,e=t.panes,n=t.renderActiveOnly,r=this.state.activeIndex;return n?C()(bi()(e,"[".concat(r,"]")),"render",this.props):be()(e,function(t,e){var n=t.pane;return Os.create(n,{overrideProps:{active:e===r}})})}},{key:"renderMenu",value:function(){var t=this.props,e=t.menu,n=t.panes,r=t.menuPosition,i=this.state.activeIndex;return!0===e.tabular&&"right"===r&&(e.tabular="right"),Kr.create(e,{autoGenerateKey:!1,overrideProps:{items:be()(n,"menuItem"),onItemClick:this.handleItemClick,activeIndex:i}})}},{key:"renderVertical",value:function(t){var e=this.props,n=e.grid,r=e.menuPosition,i=n.paneWidth,o=n.tabWidth,a=ps()(n,["paneWidth","tabWidth"]),s=r||"right"===t.props.tabular&&"right"||"left";return S.a.createElement(So,a,"left"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}),Eo.create({width:i,children:this.renderItems(),stretched:!0},{autoGenerateKey:!1}),"right"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}))}},{key:"render",value:function(){var t=this.renderMenu(),n=re(e,this.props),r=ie(e,this.props);return t.props.vertical?S.a.createElement(r,n,this.renderVertical(t)):S.a.createElement(r,n,"bottom"!==t.props.attached&&t,this.renderItems(),"bottom"===t.props.attached&&t)}}]),e}(V);_()(Ps,"autoControlledProps",["activeIndex"]),_()(Ps,"defaultProps",{grid:{paneWidth:12,tabWidth:4},menu:{attached:!0,tabular:!0},renderActiveOnly:!0}),_()(Ps,"Pane",Os),_()(Ps,"handledProps",["activeIndex","as","defaultActiveIndex","grid","menu","menuPosition","onTabChange","panes","renderActiveOnly"]),Ps.propTypes={};var Rs=Ps;function Ds(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.test,u=t.unit,c=Qt()("ui",u,ct(e,"centered"),ct(s,"test"),"ad",i),l=re(Ds,t),f=ie(Ds,t);return S.a.createElement(f,a()({},l,{className:c,"data-text":s}),r.isNil(n)?o:n)}Ds.handledProps=["as","centered","children","className","content","test","unit"],Ds.propTypes={};var Ms=Ds;function Ls(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"description",n),u=re(Ls,t),c=ie(Ls,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Ls.handledProps=["as","children","className","content","textAlign"],Ls.propTypes={};var Fs=Ls;function Us(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"header",n),u=re(Us,t),c=ie(Us,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Us.handledProps=["as","children","className","content","textAlign"],Us.propTypes={};var js=Us;function Bs(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"meta",n),u=re(Bs,t),c=ie(Bs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bs.handledProps=["as","children","className","content","textAlign"],Bs.propTypes={};var qs=Bs;function Vs(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.textAlign,f=Qt()(ct(s,"extra"),pt(l),"content",n),h=re(Vs,t),p=ie(Vs,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(p,a()({},h,{className:f}),Yt(js,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(qs,function(t){return{content:t}},c,{autoGenerateKey:!1}),Yt(Fs,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),i):S.a.createElement(p,a()({},h,{className:f}),e)}Vs.handledProps=["as","children","className","content","description","extra","header","meta","textAlign"],Vs.propTypes={};var Ws=Vs;function Hs(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.doubling,u=t.items,c=t.itemsPerRow,l=t.stackable,f=t.textAlign,h=Qt()("ui",ct(e,"centered"),ct(s,"doubling"),ct(l,"stackable"),pt(f),vt(c),"cards",i),p=re(Hs,t),d=ie(Hs,t);if(!r.isNil(n))return S.a.createElement(d,a()({},p,{className:h}),n);if(!r.isNil(o))return S.a.createElement(d,a()({},p,{className:h}),o);var v=be()(u,function(t){var e=t.key||[t.header,t.description].join("-");return S.a.createElement(Ks,a()({key:e},t))});return S.a.createElement(d,a()({},p,{className:h}),v)}Hs.handledProps=["as","centered","children","className","content","doubling","items","itemsPerRow","stackable","textAlign"],Hs.propTypes={};var zs=Hs,Ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.centered,i=t.children,o=t.className,s=t.color,u=t.content,c=t.description,l=t.extra,f=t.fluid,h=t.header,p=t.href,d=t.image,v=t.link,m=t.meta,y=t.onClick,g=t.raised,b=Qt()("ui",s,ct(n,"centered"),ct(f,"fluid"),ct(v,"link"),ct(g,"raised"),"card",o),_=re(e,this.props),w=ie(e,this.props,function(){if(y)return"a"});return r.isNil(i)?r.isNil(u)?S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),Hn.create(d,{autoGenerateKey:!1}),(c||h||m)&&S.a.createElement(Ws,{description:c,header:h,meta:m}),l&&S.a.createElement(Ws,{extra:!0},l)):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),u):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),i)}}]),e}(x.Component);function Gs(t){var e=t.active,n=t.className,i=t.children,o=t.content,s=Qt()(ct(e,"active"),n),u=re(Gs,t),c=ie(Gs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}_()(Ks,"Content",Ws),_()(Ks,"Description",Fs),_()(Ks,"Group",zs),_()(Ks,"Header",js),_()(Ks,"Meta",qs),_()(Ks,"handledProps",["as","centered","children","className","color","content","description","extra","fluid","header","href","image","link","meta","onClick","raised"]),Ks.propTypes={},Gs.handledProps=["active","as","children","className","content"],Gs.defaultProps={as:"a"},Gs.propTypes={};var Qs=Gs;function Ys(t){var e=t.className,n=t.children,i=t.content,o=Qt()("actions",e),s=re(Ys,t),u=ie(Ys,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}Ys.handledProps=["as","children","className","content"],Ys.propTypes={};var Xs=Ys;function $s(t){var e=t.className,n=t.children,i=t.content,o=Qt()("author",e),s=re($s,t),u=ie($s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}$s.handledProps=["as","children","className","content"],$s.propTypes={};var Js=$s;function Zs(t){var e=t.className,n=t.src,r=Qt()("avatar",e),i=re(Zs,t),o=ie(Zs,t);return S.a.createElement(o,a()({},i,{className:r}),Zt(n,{autoGenerateKey:!1}))}Zs.handledProps=["as","className","src"],Zs.propTypes={};var tu=Zs;function eu(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"content"),s=re(eu,t),u=ie(eu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}eu.handledProps=["as","children","className","content"],eu.propTypes={};var nu=eu;function ru(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=t.minimal,u=t.size,c=t.threaded,l=Qt()("ui",u,ct(i,"collapsed"),ct(s,"minimal"),ct(c,"threaded"),"comments",e),f=re(ru,t),h=ie(ru,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(n)?o:n)}ru.handledProps=["as","children","className","collapsed","content","minimal","size","threaded"],ru.propTypes={};var iu=ru;function ou(t){var e=t.className,n=t.children,i=t.content,o=Qt()("metadata",e),s=re(ou,t),u=ie(ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}ou.handledProps=["as","children","className","content"],ou.propTypes={};var au=ou;function su(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"text"),s=re(su,t),u=ie(su,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}su.handledProps=["as","children","className","content"],su.propTypes={};var uu=su;function cu(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=Qt()(ct(i,"collapsed"),"comment",e),u=re(cu,t),c=ie(cu,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}cu.handledProps=["as","children","className","collapsed","content"],cu.propTypes={},cu.Author=Js,cu.Action=Qs,cu.Actions=Xs,cu.Avatar=tu,cu.Content=nu,cu.Group=iu,cu.Metadata=au,cu.Text=uu;var lu=cu;function fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("date",n),s=re(fu,t),u=ie(fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}fu.handledProps=["as","children","className","content"],fu.propTypes={};var hu=fu;function pu(t){var e=t.children,n=t.className,i=t.content,o=t.images,s=t.text,u=Qt()(ct(o,"images"),ct(i||s,"text"),"extra",n),c=re(pu,t),l=ie(pu,t);if(!r.isNil(e))return S.a.createElement(l,a()({},c,{className:u}),e);var f=be()(o,function(t,e){var n=[e,t].join("-");return Zt(t,{key:n})});return S.a.createElement(l,a()({},c,{className:u}),i,f)}pu.handledProps=["as","children","className","content","images","text"],pu.propTypes={};var du=pu;function vu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("like",n),u=re(vu,t),c=ie(vu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}vu.handledProps=["as","children","className","content","icon"],vu.defaultProps={as:"a"},vu.propTypes={};var mu=vu;function yu(t){var e=t.children,n=t.className,i=t.content,o=t.like,s=Qt()("meta",n),u=re(yu,t),c=ie(yu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Yt(mu,function(t){return{content:t}},o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}yu.handledProps=["as","children","className","content","like"],yu.propTypes={};var gu=yu;function bu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("user",n),s=re(bu,t),u=ie(bu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}bu.handledProps=["as","children","className","content"],bu.propTypes={},bu.defaultProps={as:"a"};var _u=bu;function wu(t){var e=t.children,n=t.className,i=t.content,o=t.date,s=t.user,u=Qt()("summary",n),c=re(wu,t),l=ie(wu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),Yt(_u,function(t){return{content:t}},s,{autoGenerateKey:!1}),i,Yt(hu,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),e)}wu.handledProps=["as","children","className","content","date","user"],wu.propTypes={};var Eu=wu;function Tu(t){var e=t.children,n=t.className,i=t.content,o=t.extraImages,s=t.extraText,u=t.date,c=t.meta,l=t.summary,f=Qt()("content",n),h=re(Tu,t),p=ie(Tu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Yt(hu,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(Eu,function(t){return{content:t}},l,{autoGenerateKey:!1}),i,Yt(du,function(t){return{text:!0,content:t}},s,{autoGenerateKey:!1}),Yt(du,function(t){return{images:t}},o,{autoGenerateKey:!1}),Yt(gu,function(t){return{content:t}},c,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),e)}Tu.handledProps=["as","children","className","content","date","extraImages","extraText","meta","summary"],Tu.propTypes={};var Cu=Tu;function xu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=t.image,u=Qt()("label",n),c=re(xu,t),l=ie(xu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),i,Nn.create(o,{autoGenerateKey:!1}),Zt(s)):S.a.createElement(l,a()({},c,{className:u}),e)}xu.handledProps=["as","children","className","content","icon","image"],xu.propTypes={};var Su=xu;function ku(t){var e=t.content,n=t.children,r=t.className,i=t.date,o=t.extraImages,s=t.extraText,u=t.image,c=t.icon,l=t.meta,f=t.summary,h=Qt()("event",r),p=re(ku,t),d=ie(ku,t),v=e||i||o||s||l||f,m={content:e,date:i,extraImages:o,extraText:s,meta:l,summary:f};return S.a.createElement(d,a()({},p,{className:h}),Yt(Su,function(t){return{icon:t}},c,{autoGenerateKey:!1}),Yt(Su,function(t){return{image:t}},u,{autoGenerateKey:!1}),v&&S.a.createElement(Cu,m),n)}ku.handledProps=["as","children","className","content","date","extraImages","extraText","icon","image","meta","summary"],ku.propTypes={};var Nu=ku;function Au(t){var e=t.children,n=t.className,i=t.events,o=t.size,s=Qt()("ui",o,"feed",n),u=re(Au,t),c=ie(Au,t);if(!r.isNil(e))return S.a.createElement(c,a()({},u,{className:s}),e);var l=be()(i,function(t){var e=t.childKey,n=t.date,r=t.meta,i=t.summary,o=ps()(t,["childKey","date","meta","summary"]),s=e||[n,r,i].join("-");return S.a.createElement(Nu,a()({date:n,key:s,meta:r,summary:i},o))});return S.a.createElement(c,a()({},u,{className:s}),l)}Au.handledProps=["as","children","className","events","size"],Au.propTypes={},Au.Content=Cu,Au.Date=hu,Au.Event=Nu,Au.Extra=du,Au.Label=Su,Au.Like=mu,Au.Meta=gu,Au.Summary=Eu,Au.User=_u;var Iu=Au;function Ou(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ou,t),u=ie(Ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ou.handledProps=["as","children","className","content"],Ou.propTypes={},Ou.create=Xt(Ou,function(t){return{content:t}});var Pu=Ou;function Ru(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Ru,t),u=ie(Ru,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ru.handledProps=["as","children","className","content"],Ru.propTypes={},Ru.create=Xt(Ru,function(t){return{content:t}});var Du=Ru;function Mu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("extra",n),s=re(Mu,t),u=ie(Mu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Mu.handledProps=["as","children","className","content"],Mu.propTypes={},Mu.create=Xt(Mu,function(t){return{content:t}});var Lu=Mu;function Fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("meta",n),s=re(Fu,t),u=ie(Fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Fu.handledProps=["as","children","className","content"],Fu.propTypes={},Fu.create=Xt(Fu,function(t){return{content:t}});var Uu=Fu;function ju(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.verticalAlign,f=Qt()(dt(l),"content",n),h=re(ju,t),p=ie(ju,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Pu.create(u,{autoGenerateKey:!1}),Uu.create(c,{autoGenerateKey:!1}),Du.create(o,{autoGenerateKey:!1}),Lu.create(s,{autoGenerateKey:!1}),i):S.a.createElement(p,a()({},h,{className:f}),e)}ju.handledProps=["as","children","className","content","description","extra","header","meta","verticalAlign"],ju.propTypes={};var Bu=ju;function qu(t){var e=t.children,n=t.className,i=t.content,o=t.divided,s=t.items,u=t.link,c=t.relaxed,l=t.unstackable,f=Qt()("ui",ct(o,"divided"),ct(u,"link"),ct(l,"unstackable"),ft(c,"relaxed"),"items",n),h=re(qu,t),p=ie(qu,t);if(!r.isNil(e))return S.a.createElement(p,a()({},h,{className:f}),e);if(!r.isNil(i))return S.a.createElement(p,a()({},h,{className:f}),i);var d=be()(s,function(t){var e=t.childKey,n=ps()(t,["childKey"]),r=e||[n.content,n.description,n.header,n.meta].join("-");return S.a.createElement(Ku,a()({},n,{key:r}))});return S.a.createElement(p,a()({},h,{className:f}),d)}qu.handledProps=["as","children","className","content","divided","items","link","relaxed","unstackable"],qu.propTypes={};var Vu=qu;function Wu(t){var e=t.size,n=re(Wu,t);return S.a.createElement(Hn,a()({},n,{size:e,ui:!!e,wrapped:!0}))}Wu.handledProps=["size"],Wu.propTypes={},Wu.create=Xt(Wu,function(t){return{src:t}});var Hu=Wu;function zu(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.image,l=t.meta,f=Qt()("item",n),h=re(zu,t),p=ie(zu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Hu.create(c,{autoGenerateKey:!1}),S.a.createElement(Bu,{content:i,description:o,extra:s,header:u,meta:l})):S.a.createElement(p,a()({},h,{className:f}),e)}zu.handledProps=["as","children","className","content","description","extra","header","image","meta"],zu.Content=Bu,zu.Description=Du,zu.Extra=Lu,zu.Group=Vu,zu.Header=Pu,zu.Image=Hu,zu.Meta=Uu,zu.propTypes={};var Ku=zu;function Gu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.horizontal,u=t.inverted,c=t.items,l=t.size,f=t.widths,h=Qt()("ui",i,l,ct(s,"horizontal"),ct(u,"inverted"),vt(f),"statistics",n),p=re(Gu,t),d=ie(Gu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(d,a()({},p,{className:h}),be()(c,function(t){return tc.create(t)})):S.a.createElement(d,a()({},p,{className:h}),o):S.a.createElement(d,a()({},p,{className:h}),e)}Gu.handledProps=["as","children","className","color","content","horizontal","inverted","items","size","widths"],Gu.propTypes={};var Qu=Gu;function Yu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("label",n),s=re(Yu,t),u=ie(Yu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Yu.handledProps=["as","children","className","content"],Yu.propTypes={},Yu.create=Xt(Yu,function(t){return{content:t}});var Xu=Yu;function $u(t){var e=t.children,n=t.className,i=t.content,o=t.text,s=Qt()(ct(o,"text"),"value",n),u=re($u,t),c=ie($u,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}$u.handledProps=["as","children","className","content","text"],$u.propTypes={},$u.create=Xt($u,function(t){return{content:t}});var Ju=$u;function Zu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.floated,u=t.horizontal,c=t.inverted,l=t.label,f=t.size,h=t.text,p=t.value,d=Qt()("ui",i,f,lt(s,"floated"),ct(u,"horizontal"),ct(c,"inverted"),"statistic",n),v=re(Zu,t),m=ie(Zu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(m,a()({},v,{className:d}),Ju.create(p,{defaultProps:{text:h},autoGenerateKey:!1}),Xu.create(l,{autoGenerateKey:!1})):S.a.createElement(m,a()({},v,{className:d}),o):S.a.createElement(m,a()({},v,{className:d}),e)}Zu.handledProps=["as","children","className","color","content","floated","horizontal","inverted","label","size","text","value"],Zu.propTypes={},Zu.Group=Qu,Zu.Label=Xu,Zu.Value=Ju,Zu.create=Xt(Zu,function(t){return{content:t}});var tc=Zu;n.d(e,"Confirm",function(){return Fr}),n.d(e,"MountNode",function(){return Sr}),n.d(e,"Pagination",function(){return Yr}),n.d(e,"PaginationItem",function(){return Qr}),n.d(e,"Portal",function(){return Mn}),n.d(e,"Radio",function(){return Jr}),n.d(e,"Ref",function(){return Rn}),n.d(e,"Responsive",function(){return Zr}),n.d(e,"Select",function(){return Mi}),n.d(e,"TextArea",function(){return ji}),n.d(e,"TransitionablePortal",function(){return zi}),n.d(e,"Visibility",function(){return Ki}),n.d(e,"Breadcrumb",function(){return $i}),n.d(e,"BreadcrumbDivider",function(){return Qi}),n.d(e,"BreadcrumbSection",function(){return Yi}),n.d(e,"Form",function(){return _o}),n.d(e,"FormButton",function(){return eo}),n.d(e,"FormCheckbox",function(){return ro}),n.d(e,"FormDropdown",function(){return oo}),n.d(e,"FormField",function(){return Zi}),n.d(e,"FormGroup",function(){return so}),n.d(e,"FormInput",function(){return fo}),n.d(e,"FormRadio",function(){return po}),n.d(e,"FormSelect",function(){return mo}),n.d(e,"FormTextArea",function(){return go}),n.d(e,"Grid",function(){return So}),n.d(e,"GridColumn",function(){return Eo}),n.d(e,"GridRow",function(){return Co}),n.d(e,"Menu",function(){return Kr}),n.d(e,"MenuHeader",function(){return jr}),n.d(e,"MenuItem",function(){return Vr}),n.d(e,"MenuMenu",function(){return Hr}),n.d(e,"Message",function(){return Mo}),n.d(e,"MessageContent",function(){return No}),n.d(e,"MessageHeader",function(){return Io}),n.d(e,"MessageItem",function(){return Po}),n.d(e,"MessageList",function(){return Do}),n.d(e,"Table",function(){return Yo}),n.d(e,"TableBody",function(){return Fo}),n.d(e,"TableCell",function(){return jo}),n.d(e,"TableFooter",function(){return Wo}),n.d(e,"TableHeader",function(){return qo}),n.d(e,"TableHeaderCell",function(){return zo}),n.d(e,"TableRow",function(){return Go}),n.d(e,"Button",function(){return rr}),n.d(e,"ButtonContent",function(){return $n}),n.d(e,"ButtonGroup",function(){return Zn}),n.d(e,"ButtonOr",function(){return er}),n.d(e,"Container",function(){return $o}),n.d(e,"Divider",function(){return Zo}),n.d(e,"Flag",function(){return Ti}),n.d(e,"Header",function(){return oa}),n.d(e,"HeaderContent",function(){return ra}),n.d(e,"HeaderSubheader",function(){return ea}),n.d(e,"Icon",function(){return Nn}),n.d(e,"IconGroup",function(){return Sn}),n.d(e,"Image",function(){return Hn}),n.d(e,"ImageGroup",function(){return qn}),n.d(e,"Input",function(){return co}),n.d(e,"Label",function(){return Yn}),n.d(e,"LabelDetail",function(){return Kn}),n.d(e,"LabelGroup",function(){return Qn}),n.d(e,"List",function(){return ba}),n.d(e,"ListContent",function(){return fa}),n.d(e,"ListDescription",function(){return sa}),n.d(e,"ListHeader",function(){return ca}),n.d(e,"ListIcon",function(){return pa}),n.d(e,"ListItem",function(){return va}),n.d(e,"ListList",function(){return ya}),n.d(e,"Loader",function(){return wa}),n.d(e,"Rail",function(){return Ta}),n.d(e,"Reveal",function(){return ka}),n.d(e,"RevealContent",function(){return xa}),n.d(e,"Segment",function(){return Oa}),n.d(e,"SegmentGroup",function(){return Aa}),n.d(e,"Step",function(){return Va}),n.d(e,"StepContent",function(){return Fa}),n.d(e,"StepDescription",function(){return Ra}),n.d(e,"StepGroup",function(){return Ba}),n.d(e,"StepTitle",function(){return Ma}),n.d(e,"Accordion",function(){return Qa}),n.d(e,"AccordionAccordion",function(){return Ka}),n.d(e,"AccordionContent",function(){return Ha}),n.d(e,"AccordionTitle",function(){return za}),n.d(e,"Checkbox",function(){return Xr}),n.d(e,"Dimmer",function(){return jn}),n.d(e,"DimmerDimmable",function(){return Fn}),n.d(e,"DimmerInner",function(){return Un}),n.d(e,"Dropdown",function(){return Ri}),n.d(e,"DropdownDivider",function(){return wi}),n.d(e,"DropdownHeader",function(){return ki}),n.d(e,"DropdownItem",function(){return xi}),n.d(e,"DropdownMenu",function(){return Ai}),n.d(e,"DropdownSearchInput",function(){return Oi}),n.d(e,"Embed",function(){return Ya}),n.d(e,"Modal",function(){return Mr}),n.d(e,"ModalActions",function(){return Or}),n.d(e,"ModalContent",function(){return Ir}),n.d(e,"ModalDescription",function(){return Rr}),n.d(e,"ModalHeader",function(){return Nr}),n.d(e,"Popup",function(){return es}),n.d(e,"PopupContent",function(){return Ja}),n.d(e,"PopupHeader",function(){return Za}),n.d(e,"Progress",function(){return ss}),n.d(e,"Rating",function(){return fs}),n.d(e,"RatingIcon",function(){return ls}),n.d(e,"Search",function(){return Es}),n.d(e,"SearchCategory",function(){return ys}),n.d(e,"SearchResult",function(){return bs}),n.d(e,"SearchResults",function(){return ws}),n.d(e,"Sidebar",function(){return Ns}),n.d(e,"SidebarPushable",function(){return Cs}),n.d(e,"SidebarPusher",function(){return Ss}),n.d(e,"Sticky",function(){return As}),n.d(e,"Tab",function(){return Rs}),n.d(e,"TabPane",function(){return Os}),n.d(e,"Transition",function(){return Hi}),n.d(e,"TransitionGroup",function(){return Vi}),n.d(e,"Advertisement",function(){return Ms}),n.d(e,"Card",function(){return Ks}),n.d(e,"CardContent",function(){return Ws}),n.d(e,"CardDescription",function(){return Fs}),n.d(e,"CardGroup",function(){return zs}),n.d(e,"CardHeader",function(){return js}),n.d(e,"CardMeta",function(){return qs}),n.d(e,"Comment",function(){return lu}),n.d(e,"CommentAction",function(){return Qs}),n.d(e,"CommentActions",function(){return Xs}),n.d(e,"CommentAuthor",function(){return Js}),n.d(e,"CommentAvatar",function(){return tu}),n.d(e,"CommentContent",function(){return nu}),n.d(e,"CommentGroup",function(){return iu}),n.d(e,"CommentMetadata",function(){return au}),n.d(e,"CommentText",function(){return uu}),n.d(e,"Feed",function(){return Iu}),n.d(e,"FeedContent",function(){return Cu}),n.d(e,"FeedDate",function(){return hu}),n.d(e,"FeedEvent",function(){return Nu}),n.d(e,"FeedExtra",function(){return du}),n.d(e,"FeedLabel",function(){return Su}),n.d(e,"FeedLike",function(){return mu}),n.d(e,"FeedMeta",function(){return gu}),n.d(e,"FeedSummary",function(){return Eu}),n.d(e,"FeedUser",function(){return _u}),n.d(e,"Item",function(){return Ku}),n.d(e,"ItemContent",function(){return Bu}),n.d(e,"ItemDescription",function(){return Du}),n.d(e,"ItemExtra",function(){return Lu}),n.d(e,"ItemGroup",function(){return Vu}),n.d(e,"ItemHeader",function(){return Pu}),n.d(e,"ItemImage",function(){return Hu}),n.d(e,"ItemMeta",function(){return Uu}),n.d(e,"Statistic",function(){return tc}),n.d(e,"StatisticGroup",function(){return Qu}),n.d(e,"StatisticLabel",function(){return Xu}),n.d(e,"StatisticValue",function(){return Ju})},function(t,e,n){var r=n(44),i=n(165);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){t.exports={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}},function(t,e,n){var r=n(67),i=n(515),o=n(514),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(178)("wks"),i=n(137),o=n(57).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(128);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(41),i=n(39),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==a||e==s||e==o||e==u}},function(t,e,n){var r=n(114),i=n(52),o=n(127),a=n(18),s=n(38),u=n(89),c=n(88),l=n(116),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||o(t)))return!t.length;var e=i(t);if(e==f||e==h)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},function(t,e,n){var r=n(161);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(57),i=n(26),o=n(184),a=n(80),s=n(54),u=function(t,e,n){var c,l,f,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,m=t&u.B,y=t&u.W,g=p?i:i[e]||(i[e]={}),b=g.prototype,_=p?r:d?r[e]:(r[e]||{}).prototype;for(c in p&&(n=e),n)(l=!h&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:n[c],g[c]=p&&"function"!=typeof _[c]?n[c]:m&&l?o(f,r):y&&_[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((g.virtual||(g.virtual={}))[c]=f,t&u.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(544),i=n(535);function o(t){return(o="function"==typeof i&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t})(t)}function a(e){return"function"==typeof i&&"symbol"===o(r)?t.exports=a=function(t){return o(t)}:t.exports=a=function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":o(t)},a(e)}t.exports=a},function(t,e,n){var r=n(243),i=n(242);t.exports=function(t,e){if(null==t)return{};var n,o,a={},s=i(t);for(o=0;o<s.length;o++)n=s[o],e.indexOf(n)>=0||(a[n]=t[n]);if(r){var u=r(t);for(o=0;o<u.length;o++)n=u[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},function(t,e,n){var r=n(457),i=n(166),o=n(456),a=n(227),s=n(226),u=n(41),c=n(248),l=c(r),f=c(i),h=c(o),p=c(a),d=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,n){var r=n(47),i=n(247),o=n(164);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(71);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(55),i=n(263),o=n(183),a=Object.defineProperty;e.f=n(70)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(199),i=n(62),o=n(34),a=n(357),s=n(18);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e,n){var r=n(233),i=n(34),o=n(437),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&s(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r=n(41),i=n(30),o="[object Number]";t.exports=function(t){return"number"==typeof t||i(t)&&r(t)==o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"PageCard"]},o.default.createElement(s.Container,{style:this.props.containerStyle,className:a.default.container},this.props.children))}}]),e}();e.default=c},function(t,e,n){var r=n(160),i=n(468)(r);t.exports=i},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){var r=n(68),i=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e,n){var r=n(509),i=n(506);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(33).Symbol;t.exports=r},function(t,e,n){var r=n(41),i=n(30),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(260),i=n(181);t.exports=function(t){return r(i(t))}},function(t,e,n){t.exports=!n(79)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(362),i=n(28);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(238),i=n(474),o=n(34),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(200);t.exports=function(t){return t&&t.length?r(t):[]}},function(t,e,n){var r=n(23)("flow",n(365));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(s.Container,{text:!0},o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageHeader},this.props.header),o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageSubHeader},this.props.subheader),o.default.createElement("div",{class:a.default.footer},o.default.createElement(s.Button,{className:a.default.pageDown,circular:!0,onClick:this.props.scrollTarget},"Scroll Down")))}}]),e}();e.default=c},function(t,e,n){var r=n(130),i=n(38),o=n(91),a=n(39);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(56),i=n(95);t.exports=n(70)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(41),i=n(107),o=n(30),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!o(t)||r(t)!=a)return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!=s){var l=a<<4&240|s>>2;if(r.push(l),64!=u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},c=function(t){try{return u.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function l(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=l(t[n],e[n]));return t}var f=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}(),h=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},p="FirebaseError",d=Error.captureStackTrace;var v=function(){return function(t,e){if(this.code=t,this.message=e,d)d(this,m.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=p,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.name=p;var m=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new v(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}();function y(t){return JSON.parse(t)}var g=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=y(c(o[0])||""),n=y(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}},b=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},_=function(t,e){return b(e,function(e,n){t[e]=n}),t},w=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},E=function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}return r.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},e}(function(){return function(){this.blockSize=-1}}());var T=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=C),void 0===r.error&&(r.error=C),void 0===r.complete&&(r.complete=C);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}}),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}();function C(){}function x(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}e.assert=o,e.assertionError=a,e.base64=u,e.base64Decode=c,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.CONSTANTS=i,e.deepCopy=function(t){return l(void 0,t)},e.deepExtend=l,e.patchProperty=function(t,e,n){t[e]=n},e.Deferred=f,e.getUA=h,e.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},e.ErrorFactory=m,e.FirebaseError=v,e.patchCapture=function(t){var e=d;return d=t,e},e.jsonEval=y,e.stringify=function(t){return JSON.stringify(t)},e.decode=g,e.isAdmin=function(t){var e=g(t).claims;return"object"==typeof e&&!0===e.admin},e.issuedAtTime=function(t){var e=g(t).claims;return"object"==typeof e&&e.hasOwnProperty("iat")?e.iat:null},e.isValidFormat=function(t){var e=g(t),n=e.claims;return!!e.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e,n,r=g(t).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?e=r.nbf:r.hasOwnProperty("iat")&&(e=r.iat),n=r.hasOwnProperty("exp")?r.exp:e+86400),i&&e&&n&&i>=e&&i<=n},e.clone=function(t){return _({},t)},e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.every=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0},e.extend=_,e.findKey=w,e.findValue=function(t,e,n){var r=w(t,e,n);return r&&t[r]},e.forEach=b,e.getAnyKey=function(t){for(var e in t)return e},e.getCount=function(t){var e=0;for(var n in t)e++;return e},e.getValues=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},e.isEmpty=function(t){for(var e in t)return!1;return!0},e.isNonNullObject=function(t){return"object"==typeof t&&null!==t},e.map=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},e.safeGet=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},e.querystring=function(t){var e=[];return b(t,function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e},e.Sha1=E,e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&&e(t)})}},e.createSubscribe=function(t,e){var n=new T(t,e);return n.subscribe.bind(n)},e.errorPrefix=x,e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(x(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(x(t,e,r)+"must be a valid context object.")},e.validateNamespace=function(t,e,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(x(t,e,r)+"must be a valid firebase namespace.")},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;o(++r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e}},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(564)},function(t,e,n){var r=n(108),i=n(112);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(39),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){(function(t){var r=n(33),i=n(471),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(117)(t))},function(t,e,n){var r=n(162),i=n(476);t.exports=function t(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(18),i=n(168),o=n(250),a=n(43);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,n){var r=n(181);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(261),i=n(177);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41),i=n(18),o=n(30),a="[object String]";t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&r(t)==a}},function(t,e,n){var r=n(377),i=n(150)(function(t,e){return null==t?{}:r(t,e)});t.exports=i},function(t,e,n){t.exports=n(29)},function(t,e,n){var r=n(241),i=n(90),o=n(53),a=n(119),s=o(function(t,e){return a(t)?r(t,i(e,1,a,!0)):[]});t.exports=s},function(t,e,n){var r=n(361),i=n(161),o=n(118);t.exports=function(t,e,n){return e=i(e),void 0===n?(n=e,e=0):n=i(n),t=o(t),r(t,e,n)}},function(t,e,n){"use strict";n.r(e);var r=n(24),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),c=n(27),l=n.n(c),f=n(25),h=n.n(f);function p(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],i=t&&p(t),o=e&&p(e),a=i||o;if(t&&p(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var c=0,l=r.length;l>=0;l--){var f=r[l];"."===f?d(r,l):".."===f?(d(r,l),c++):c&&(d(r,l),c--)}if(!a)for(;c--;c)r.unshift("..");!a||""===r[0]||r[0]&&p(r[0])||r.unshift("");var h=r.join("/");return s&&"/"!==h.substr(-1)&&(h+="/"),h},m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var y=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var r=void 0===e?"undefined":m(e);if(r!==(void 0===n?"undefined":m(n)))return!1;if("object"===r){var i=e.valueOf(),o=n.valueOf();if(i!==e||o!==n)return t(i,o);var a=Object.keys(e),s=Object.keys(n);return a.length===s.length&&a.every(function(r){return t(e[r],n[r])})}return!1},g=function(t){return"/"===t.charAt(0)?t:"/"+t},b=function(t){return"/"===t.charAt(0)?t.substr(1):t},_=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},w=function(t,e){return _(t,e)?t.substr(e.length):t},E=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},T=function(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i},C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},x=function(t,e,n,r){var i=void 0;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=C({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=v(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},S=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&y(t.state,e.state)},k=function(){var t=null,e=[];return{setPrompt:function(e){return l()(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):(l()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}},N=!("undefined"==typeof window||!window.document||!window.document.createElement),A=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},I=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},O=function(t,e){return e(window.confirm(t))},P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},D=function(){try{return window.history.state||{}}catch(t){return{}}},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Browser history needs a DOM");var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t.forceRefresh,a=void 0!==o&&o,s=t.getUserConfirmation,u=void 0===s?O:s,c=t.keyLength,f=void 0===c?6:c,p=t.basename?E(g(t.basename)):"",d=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return l()(!p||_(o,p),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+p+'".'),p&&(o=w(o,p)),x(o,r,n)},v=function(){return Math.random().toString(36).substr(2,f)},m=k(),y=function(t){R(H,t),H.length=n.length,m.notifyListeners(H.location,H.action)},b=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||M(d(t.state))},C=function(){M(d(D()))},S=!1,M=function(t){S?(S=!1,y()):m.confirmTransitionTo(t,"POP",u,function(e){e?y({action:"POP",location:t}):L(t)})},L=function(t){var e=H.location,n=U.indexOf(e.key);-1===n&&(n=0);var r=U.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(S=!0,B(i))},F=d(D()),U=[F.key],j=function(t){return p+T(t)},B=function(t){n.go(t)},q=0,V=function(t){1===(q+=t)?(A(window,"popstate",b),i&&A(window,"hashchange",C)):0===q&&(I(window,"popstate",b),i&&I(window,"hashchange",C))},W=!1,H={length:n.length,action:"POP",location:F,createHref:j,push:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"PUSH",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.pushState({key:o,state:s},null,e),a)window.location.href=e;else{var u=U.indexOf(H.location.key),c=U.slice(0,-1===u?0:u+1);c.push(i.key),U=c,y({action:"PUSH",location:i})}else l()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"REPLACE",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.replaceState({key:o,state:s},null,e),a)window.location.replace(e);else{var u=U.indexOf(H.location.key);-1!==u&&(U[u]=i.key),y({action:"REPLACE",location:i})}else l()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:B,goBack:function(){return B(-1)},goForward:function(){return B(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=m.setPrompt(t);return W||(V(1),W=!0),function(){return W&&(W=!1,V(-1)),e()}},listen:function(t){var e=m.appendListener(t);return V(1),function(){V(-1),e()}}};return H},L=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+b(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:b,decodePath:g},slash:{encodePath:g,decodePath:g}},U=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},j=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Hash history needs a DOM");var e=window.history,n=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?O:r,o=t.hashType,a=void 0===o?"slash":o,s=t.basename?E(g(t.basename)):"",u=F[a],c=u.encodePath,f=u.decodePath,p=function(){var t=f(U());return l()(!s||_(t,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+s+'".'),s&&(t=w(t,s)),x(t)},d=k(),v=function(t){L(z,t),z.length=e.length,d.notifyListeners(z.location,z.action)},m=!1,y=null,b=function(){var t=U(),e=c(t);if(t!==e)j(e);else{var n=p(),r=z.location;if(!m&&S(r,n))return;if(y===T(n))return;y=null,C(n)}},C=function(t){m?(m=!1,v()):d.confirmTransitionTo(t,"POP",i,function(e){e?v({action:"POP",location:t}):P(t)})},P=function(t){var e=z.location,n=B.lastIndexOf(T(e));-1===n&&(n=0);var r=B.lastIndexOf(T(t));-1===r&&(r=0);var i=n-r;i&&(m=!0,q(i))},R=U(),D=c(R);R!==D&&j(D);var M=p(),B=[T(M)],q=function(t){l()(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},V=0,W=function(t){1===(V+=t)?A(window,"hashchange",b):0===V&&I(window,"hashchange",b)},H=!1,z={length:e.length,action:"POP",location:M,createHref:function(t){return"#"+c(s+T(t))},push:function(t,e){l()(void 0===e,"Hash history cannot push state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"PUSH",i,function(t){if(t){var e=T(n),r=c(s+e);if(U()!==r){y=e,function(t){window.location.hash=t}(r);var i=B.lastIndexOf(T(z.location)),o=B.slice(0,-1===i?0:i+1);o.push(e),B=o,v({action:"PUSH",location:n})}else l()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),v()}})},replace:function(t,e){l()(void 0===e,"Hash history cannot replace state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"REPLACE",i,function(t){if(t){var e=T(n),r=c(s+e);U()!==r&&(y=e,j(r));var i=B.indexOf(T(z.location));-1!==i&&(B[i]=e),v({action:"REPLACE",location:n})}})},go:q,goBack:function(){return q(-1)},goForward:function(){return q(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=d.setPrompt(t);return H||(W(1),H=!0),function(){return H&&(H=!1,W(-1)),e()}},listen:function(t){var e=d.appendListener(t);return W(1),function(){W(-1),e()}}};return z},q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},W=function(t,e,n){return Math.min(Math.max(t,e),n)},H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,o=void 0===i?0:i,a=t.keyLength,s=void 0===a?6:a,u=k(),c=function(t){V(m,t),m.length=m.entries.length,u.notifyListeners(m.location,m.action)},f=function(){return Math.random().toString(36).substr(2,s)},h=W(o,0,r.length-1),p=r.map(function(t){return x(t,void 0,"string"==typeof t?f():t.key||f())}),d=T,v=function(t){var n=W(m.index+t,0,m.entries.length-1),r=m.entries[n];u.confirmTransitionTo(r,"POP",e,function(t){t?c({action:"POP",location:r,index:n}):c()})},m={length:p.length,action:"POP",location:p[h],index:h,entries:p,createHref:d,push:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),c({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(m.entries[m.index]=r,c({action:"REPLACE",location:r}))})},go:v,goBack:function(){return v(-1)},goForward:function(){return v(1)},canGo:function(t){var e=m.index+t;return e>=0&&e<m.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.setPrompt(t)},listen:function(t){return u.appendListener(t)}};return m},z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function K(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var G=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=K(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props.history.location.pathname)},K(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:z({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,r=e.history;h()(null==n||1===a.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){i()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?a.a.Children.only(t):null},e}(a.a.Component);G.propTypes={history:u.a.object.isRequired,children:u.a.node},G.contextTypes={router:u.a.object},G.childContextTypes={router:u.a.object.isRequired};var Q=G,Y=Q;function X(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var $=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=X(this,t.call.apply(t,[this].concat(o))),r.history=M(r.props),X(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);$.propTypes={basename:u.a.string,forceRefresh:u.a.bool,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var J=$;function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var tt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Z(this,t.call.apply(t,[this].concat(o))),r.history=B(r.props),Z(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);tt.propTypes={basename:u.a.string,getUserConfirmation:u.a.func,hashType:u.a.oneOf(["hashbang","noslash","slash"]),children:u.a.node};var et=tt,nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function rt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var it=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},ot=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=rt(this,t.call.apply(t,[this].concat(o))),r.handleClick=function(t){if(r.props.onClick&&r.props.onClick(t),!t.defaultPrevented&&0===t.button&&!r.props.target&&!it(t)){t.preventDefault();var e=r.context.router.history,n=r.props,i=n.replace,o=n.to;i?e.replace(o):e.push(o)}},rt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=t.innerRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["replace","to","innerRef"]);h()(this.context.router,"You should not use <Link> outside a <Router>"),h()(void 0!==e,'You must specify the "to" property');var i=this.context.router.history,o="string"==typeof e?x(e,null,null,i.location):e,s=i.createHref(o);return a.a.createElement("a",nt({},r,{onClick:this.handleClick,href:s,ref:n}))},e}(a.a.Component);ot.propTypes={onClick:u.a.func,target:u.a.string,replace:u.a.bool,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired,innerRef:u.a.oneOfType([u.a.string,u.a.func])},ot.defaultProps={replace:!1},ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired,createHref:u.a.func.isRequired}).isRequired}).isRequired};var at=ot;function st(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var ut=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=st(this,t.call.apply(t,[this].concat(o))),r.history=H(r.props),st(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Q,{history:this.history,children:this.props.children})},e}(a.a.Component);ut.propTypes={initialEntries:u.a.array,initialIndex:u.a.number,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var ct=ut,lt=n(144),ft=n.n(lt),ht={},pt=0,dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var r=e,i=r.path,o=r.exact,a=void 0!==o&&o,s=r.strict,u=void 0!==s&&s,c=r.sensitive,l=void 0!==c&&c;if(null==i)return n;var f=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=ht[n]||(ht[n]={});if(r[t])return r[t];var i=[],o={re:ft()(t,i,e),keys:i};return pt<1e4&&(r[t]=o,pt++),o}(i,{end:a,strict:u,sensitive:l}),h=f.re,p=f.keys,d=h.exec(t);if(!d)return null;var v=d[0],m=d.slice(1),y=t===v;return a&&!y?null:{path:i,url:"/"===i&&""===v?"/":v,isExact:y,params:p.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var yt=function(t){return 0===a.a.Children.count(t)},gt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=mt(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props,r.context.router)},mt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:vt({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,i=t.path,o=t.strict,a=t.exact,s=t.sensitive;if(n)return n;h()(e,"You should not use <Route> or withRouter() outside a <Router>");var u=e.route,c=(r||u.location).pathname;return dt(c,{path:i,strict:o,exact:a,sensitive:s},u.match)},e.prototype.componentWillMount=function(){i()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),i()(!(this.props.component&&this.props.children&&!yt(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),i()(!(this.props.render&&this.props.children&&!yt(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){i()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,r=e.component,i=e.render,o=this.context.router,s=o.history,u=o.route,c=o.staticContext,l={match:t,location:this.props.location||u.location,history:s,staticContext:c};return r?t?a.a.createElement(r,l):null:i?t?i(l):null:"function"==typeof n?n(l):n&&!yt(n)?a.a.Children.only(n):null},e}(a.a.Component);gt.propTypes={computedMatch:u.a.object,path:u.a.string,exact:u.a.bool,strict:u.a.bool,sensitive:u.a.bool,component:u.a.func,render:u.a.func,children:u.a.oneOfType([u.a.func,u.a.node]),location:u.a.object},gt.contextTypes={router:u.a.shape({history:u.a.object.isRequired,route:u.a.object.isRequired,staticContext:u.a.object})},gt.childContextTypes={router:u.a.object.isRequired};var bt=gt,_t=bt,wt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var Tt=function(t){var e=t.to,n=t.exact,r=t.strict,i=t.location,o=t.activeClassName,s=t.className,u=t.activeStyle,c=t.style,l=t.isActive,f=t["aria-current"],h=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),p="object"===(void 0===e?"undefined":Et(e))?e.pathname:e,d=p&&p.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return a.a.createElement(_t,{path:d,exact:n,strict:r,location:i,children:function(t){var n=t.location,r=t.match,i=!!(l?l(r,n):r);return a.a.createElement(at,wt({to:e,className:i?[s,o].filter(function(t){return t}).join(" "):s,style:i?wt({},c,u):c,"aria-current":i&&f||null},h))}})};Tt.propTypes={to:at.propTypes.to,exact:u.a.bool,strict:u.a.bool,location:u.a.object,activeClassName:u.a.string,className:u.a.string,activeStyle:u.a.object,style:u.a.object,isActive:u.a.func,"aria-current":u.a.oneOf(["page","step","location","date","time","true"])},Tt.defaultProps={activeClassName:"active","aria-current":"page"};var Ct=Tt;var xt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(a.a.Component);xt.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},xt.defaultProps={when:!0},xt.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired};var St=xt,kt={},Nt=0,At=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=kt[e]||(kt[e]={});if(n[t])return n[t];var r=ft.a.compile(t);return Nt<1e4&&(n[t]=r,Nt++),r}(t)(e,{pretty:!0})},It=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Ot=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=x(t.to),n=x(this.props.to);S(e,n)?i()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?At(n,e.params):It({},n,{pathname:At(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(a.a.Component);Ot.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},Ot.defaultProps={push:!1},Ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired};var Pt=Ot,Rt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function Dt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Mt=function(t){return"/"===t.charAt(0)?t:"/"+t},Lt=function(t,e){return t?Rt({},e,{pathname:Mt(t)+e.pathname}):e},Ft=function(t){return"string"==typeof t?t:T(t)},Ut=function(t){return function(){h()(!1,"You cannot %s with <StaticRouter>",t)}},jt=function(){},Bt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Dt(this,t.call.apply(t,[this].concat(o))),r.createHref=function(t){return Mt(r.props.basename+Ft(t))},r.handlePush=function(t){var e=r.props,n=e.basename,i=e.context;i.action="PUSH",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,i=e.context;i.action="REPLACE",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleListen=function(){return jt},r.handleBlock=function(){return jt},Dt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.componentWillMount=function(){i()(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Mt(t);return 0!==e.pathname.indexOf(n)?e:Rt({},e,{pathname:e.pathname.substr(n.length)})}(e,x(n)),push:this.handlePush,replace:this.handleReplace,go:Ut("go"),goBack:Ut("goBack"),goForward:Ut("goForward"),listen:this.handleListen,block:this.handleBlock};return a.a.createElement(Q,Rt({},r,{history:i}))},e}(a.a.Component);Bt.propTypes={basename:u.a.string,context:u.a.object.isRequired,location:u.a.oneOfType([u.a.string,u.a.object])},Bt.defaultProps={basename:"",location:"/"},Bt.childContextTypes={router:u.a.object.isRequired};var qt=Bt;var Vt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Switch> outside a <Router>")},e.prototype.componentWillReceiveProps=function(t){i()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,r=void 0,i=void 0;return a.a.Children.forEach(e,function(e){if(null==r&&a.a.isValidElement(e)){var o=e.props,s=o.path,u=o.exact,c=o.strict,l=o.sensitive,f=o.from,h=s||f;i=e,r=dt(n.pathname,{path:h,exact:u,strict:c,sensitive:l},t.match)}}),r?a.a.cloneElement(i,{location:n,computedMatch:r}):null},e}(a.a.Component);Vt.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},Vt.propTypes={children:u.a.node,location:u.a.object};var Wt=Vt,Ht=At,zt=dt,Kt=n(296),Gt=n.n(Kt),Qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Yt=function(t){var e=function(e){var n=e.wrappedComponentRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["wrappedComponentRef"]);return a.a.createElement(bt,{children:function(e){return a.a.createElement(t,Qt({},r,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:u.a.func},Gt()(e,t)};n.d(e,"BrowserRouter",function(){return J}),n.d(e,"HashRouter",function(){return et}),n.d(e,"Link",function(){return at}),n.d(e,"MemoryRouter",function(){return ct}),n.d(e,"NavLink",function(){return Ct}),n.d(e,"Prompt",function(){return St}),n.d(e,"Redirect",function(){return Pt}),n.d(e,"Route",function(){return _t}),n.d(e,"Router",function(){return Y}),n.d(e,"StaticRouter",function(){return qt}),n.d(e,"Switch",function(){return Wt}),n.d(e,"generatePath",function(){return Ht}),n.d(e,"matchPath",function(){return zt}),n.d(e,"withRouter",function(){return Yt})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=u(n(308)),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"Jumbotron"]},o.default.createElement(s.Container,null,this.props.children))}}]),e}();e.default=c},function(t,e,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),u=null,c=0,l=[],f=n(313);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(g(r.parts[a],e))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(g(r.parts[a],e));o[r.id]={id:r.id,refs:1,parts:s}}}}function p(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),d(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;n=u||(u=m(e)),r=w.bind(null,n,a,!1),i=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),d(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return h(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}t&&h(p(t,e),e);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}};var b,_=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e,n){var r=n(379),i=n(105),o=n(378);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(235)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(112),i=n(130),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e){var n="__lodash_placeholder__";t.exports=function(t,e){for(var r=-1,i=t.length,o=0,a=[];++r<i;){var s=t[r];s!==e&&s!==n||(t[r]=n,a[o++]=r)}return a}},function(t,e,n){var r=n(86),i=n(39);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=r(t.prototype),o=t.apply(n,e);return i(o)?o:n}}},function(t,e,n){var r=n(218),i=n(419),o=n(418),a=n(216),s=n(409),u=n(154),c=n(408),l=n(209),f=n(208),h=n(46),p="Expected a function",d=1,v=2,m=8,y=16,g=32,b=64,_=Math.max;t.exports=function(t,e,n,w,E,T,C,x){var S=e&v;if(!S&&"function"!=typeof t)throw new TypeError(p);var k=w?w.length:0;if(k||(e&=~(g|b),w=E=void 0),C=void 0===C?C:_(h(C),0),x=void 0===x?x:h(x),k-=E?E.length:0,e&b){var N=w,A=E;w=E=void 0}var I=S?void 0:u(t),O=[t,e,n,w,E,N,A,T,C,x];if(I&&c(O,I),t=O[0],e=O[1],n=O[2],w=O[3],E=O[4],!(x=O[9]=void 0===O[9]?S?0:t.length:_(O[9]-k,0))&&e&(m|y)&&(e&=~(m|y)),e&&e!=d)P=e==m||e==y?o(t,e,x):e!=g&&e!=(d|g)||E.length?a.apply(void 0,O):s(t,e,n,w);else var P=i(t,e,n);return f((I?r:l)(P,O),t,e)}},function(t,e,n){var r=n(246);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(88),i=n(469),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){(function(t){var r=n(251),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(117)(t))},function(t,e,n){var r=n(470),i=n(63),o=n(115),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(39),i=n(68),o=NaN,a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=u.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):s.test(t)?o:+t}},function(t,e,n){var r=n(38),i=n(30);t.exports=function(t){return i(t)&&r(t)}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(240),i=n(478),o=n(477);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e,n){var r=n(121);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(167),i=n(480),o=n(479);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}},function(t,e,n){var r=n(92),i=n(64);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(491),i=n(30),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(67),i=n(48),o=n(18),a=n(68),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e,n){var r=n(495);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(130);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(501),i=n(500),o=n(499),a=n(498),s=n(497);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(65)(Object,"create");t.exports=r},function(t,e,n){var r=n(136),i=n(95),o=n(69),a=n(183),s=n(54),u=n(263),c=Object.getOwnPropertyDescriptor;e.f=n(70)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r=n(542)(!0);n(257)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(112),i=n(160),o=n(34);t.exports=function(t,e){var n={};return e=o(e,3),i(t,function(t,i,o){r(n,i,e(t,i,o))}),n}},function(t,e,n){var r=n(244),i=n(341),o=(n(10),n(338));function a(e,n,s){return"undefined"!=typeof Reflect&&i?t.exports=a=i:t.exports=a=function(t,e,n){var i=o(t,e);if(i){var a=r(i,e);return a.get?a.get.call(n):a.value}},a(e,n,s||e)}t.exports=a},function(t,e,n){var r=n(349),i=n(43),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(o,r).replace(a,"")}},function(t,e,n){var r=n(158);t.exports=function(t,e){return r(t,e)}},function(t,e,n){var r=n(438)(n(189));t.exports=r},function(t,e,n){var r=n(554);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e))},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],p=n.index;if(s+=t.slice(a,p),a=p+f.length,h)s+=h[1];else{var d=t[a],v=n[2],m=n[3],y=n[4],g=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,C=n[2]||l,x=y||g;r.push({name:m||o++,prefix:v||"",delimiter:C,optional:T,repeat:E,partial:w,asterisk:!!_,pattern:x?c(x):_?".*":"[^"+u(C)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function s(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,i){for(var o="",s=n||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!=typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=u(h[p]),!e[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):u(h),!e[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"==typeof c)a+=u(c);else{var h=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){var r=n(23)("isNil",n(13),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("keys",n(28),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){(function(t,r){var i;
+
!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&t.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}void 0!==t&&t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){t.exports=n(556)()},function(t,e,n){var r=n(50),i=n(1);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(490),i=n(53)(r);t.exports=i},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(259);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(t,i.key,i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}},function(t,e,n){var r=n(526),i=n(254);function o(e){return t.exports=o=i?r:function(t){return t.__proto__||r(t)},o(e)}t.exports=o},function(t,e,n){var r=n(520),i=n(517);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},function(t,e,n){var r=n(245),i=n(244),o=n(243),a=n(2);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},s=o(n);"function"==typeof i&&(s=s.concat(i(n).filter(function(t){return r(n,t).enumerable}))),s.forEach(function(e){a(t,e,n[e])})}return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82),i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o="[DEFAULT]",a=[],s=function(){function t(t,e,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(t),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(t){a.push(t),setTimeout(function(){return t(null)},0)},removeAuthTokenListener:function(t){a=a.filter(function(e){return e!==t})}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(t){this.checkDestroyed_(),this._automaticDataCollectionEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){t.firebase_.INTERNAL.removeApp(t.name_);var e=[];return Object.keys(t.services_).forEach(function(n){Object.keys(t.services_[n]).forEach(function(r){e.push(t.services_[n][r])})}),Promise.all(e.map(function(t){return t.INTERNAL.delete()}))}).then(function(){t.isDeleted_=!0,t.services_={}})},t.prototype._getService=function(t,e){if(void 0===e&&(e=o),this.checkDestroyed_(),this.services_[t]||(this.services_[t]={}),!this.services_[t][e]){var n=e!==o?e:void 0,r=this.firebase_.INTERNAL.factories[t](this,this.extendApp.bind(this),n);this.services_[t][e]=r}return this.services_[t][e]},t.prototype.extendApp=function(t){var e=this;r.deepExtend(this,t),t.INTERNAL&&t.INTERNAL.addAuthTokenListener&&(a.forEach(function(t){e.INTERNAL.addAuthTokenListener(t)}),a=[])},t.prototype.checkDestroyed_=function(){this.isDeleted_&&u("app-deleted",{name:this.name_})},t}();function u(t,e){throw c.create(t,e)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),l=function t(){var e={},n={},a={},c={__esModule:!0,initializeApp:function(t,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var a=n;void 0===a.name&&(a.name=o);var l=a.name;"string"==typeof l&&l||u("bad-app-name",{name:l+""}),i(e,l)&&u("duplicate-app",{name:l});var f=new s(t,a,c);return e[l]=f,h(f,"create"),f},app:l,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(t,e,i,o,h){n[t]&&u("duplicate-service",{name:t}),n[t]=e,o&&(a[t]=o,f().forEach(function(t){o("create",t)}));var p=function(e){return void 0===e&&(e=l()),"function"!=typeof e[t]&&u("invalid-app-argument",{name:t}),e[t]()};return void 0!==i&&r.deepExtend(p,i),c[t]=p,s.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,h?e:[])},p},createFirebaseNamespace:t,extendNamespace:function(t){r.deepExtend(c,t)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(t){h(e[t],"delete"),delete e[t]},factories:n,useAsService:p,Promise:Promise,deepExtend:r.deepExtend}};function l(t){return i(e,t=t||o)||u("no-app",{name:t}),e[t]}function f(){return Object.keys(e).map(function(t){return e[t]})}function h(t,e){Object.keys(n).forEach(function(n){var r=p(t,n);null!==r&&a[r]&&a[r](e,t)})}function p(t,e){if("serverAuth"===e)return null;var n=e;return t.options,n}return r.patchProperty(c,"default",c),Object.defineProperty(c,"apps",{get:f}),r.patchProperty(l,"App",s),c}();e.firebase=l,e.default=l},function(t,e,n){var r=n(48),i=n(34),o=n(202),a=n(18);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(242),i=n(53),o=n(119),a=i(function(t,e){return o(t)?r(t,e):[]});t.exports=a},function(t,e,n){"use strict";for(var r=function(t){return null!==t&&!Array.isArray(t)&&"object"==typeof t},i={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},o=0;o<24;o+=1)i[112+o]="F"+(o+1);for(var a=0;a<26;a+=1){var s=a+65;i[s]=[String.fromCharCode(s+32),String.fromCharCode(s)]}var u={codes:i,getCode:function(t){return r(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var e=r(t),n=i[e?t.keyCode||t.which:t];return Array.isArray(n)&&(n=e?n[t.shiftKey?1:0]:n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};u.Spacebar=u[" "],u.Digit0=u[0],u.Digit1=u[1],u.Digit2=u[2],u.Digit3=u[3],u.Digit4=u[4],u.Digit5=u[5],u.Digit6=u[6],u.Digit7=u[7],u.Digit8=u[8],u.Digit9=u[9],u.Tilde=u["~"],u.GraveAccent=u["`"],u.ExclamationPoint=u["!"],u.AtSign=u["@"],u.PoundSign=u["#"],u.PercentSign=u["%"],u.Caret=u["^"],u.Ampersand=u["&"],u.PlusSign=u["+"],u.MinusSign=u["-"],u.EqualsSign=u["="],u.DivisionSign=u["/"],u.MultiplicationSign=u["*"],u.Comma=u[","],u.Decimal=u["."],u.Colon=u[":"],u.Semicolon=u[";"],u.Pipe=u["|"],u.BackSlash=u["\\"],u.QuestionMark=u["?"],u.SingleQuote=u["'"],u.DoubleQuote=u['"'],u.LeftCurlyBrace=u["{"],u.RightCurlyBrace=u["}"],u.LeftParenthesis=u["("],u.RightParenthesis=u[")"],u.LeftAngleBracket=u["<"],u.RightAngleBracket=u[">"],u.LeftSquareBracket=u["["],u.RightSquareBracket=u["]"],t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(121),i=n(38),o=n(96),a=n(46),s=n(72),u=Math.max;t.exports=function(t,e,n,c){t=i(t)?t:s(t),n=n&&!c?a(n):0;var l=t.length;return n<0&&(n=u(l+n,0)),o(t)?n<=l&&t.indexOf(e,n)>-1:!!l&&r(t,e,n)>-1}},function(t,e,n){var r=n(125);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e){t.exports={}},function(t,e,n){var r=n(436),i=n(435),o=n(424);t.exports=function(t){return r(t)||i(t)||o()}},function(t,e,n){var r=n(423),i=n(421);t.exports=function(t,e,n){return r(i,t,e,n)}},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;(u=new Error(e.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){var r=n(238),i=n(114),o=n(38);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(87),i=n(62),o=n(222),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(447),i=n(446),o=n(442);t.exports=function(t,e){return r(t)||i(t,e)||o()}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(252),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(467),i=n(454),o=n(47),a=n(18),s=n(452);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(516),i=n(253);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(23)("map",n(15));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"someByType",function(){return nt}),n.d(r,"findByType",function(){return rt}),n.d(r,"isNil",function(){return it});var i={};n.r(i),n.d(i,"COLORS",function(){return xe}),n.d(i,"FLOATS",function(){return Se}),n.d(i,"SIZES",function(){return ke}),n.d(i,"TEXT_ALIGNMENTS",function(){return Ne}),n.d(i,"VERTICAL_ALIGNMENTS",function(){return Ae}),n.d(i,"VISIBILITY",function(){return Ie}),n.d(i,"WIDTHS",function(){return Oe}),n.d(i,"DIRECTIONAL_TRANSITIONS",function(){return Pe}),n.d(i,"STATIC_TRANSITIONS",function(){return Re}),n.d(i,"TRANSITIONS",function(){return De}),n.d(i,"ACCESSIBILITY",function(){return Me}),n.d(i,"ARROWS",function(){return Le}),n.d(i,"AUDIO_VIDEO",function(){return Fe}),n.d(i,"BUSINESS",function(){return Ue}),n.d(i,"CHESS",function(){return je}),n.d(i,"CODE",function(){return Be}),n.d(i,"COMMUNICATION",function(){return qe}),n.d(i,"COMPUTERS",function(){return Ve}),n.d(i,"CURRENCY",function(){return We}),n.d(i,"DATE_TIME",function(){return He}),n.d(i,"DESIGN",function(){return ze}),n.d(i,"EDITORS",function(){return Ke}),n.d(i,"FILES",function(){return Ge}),n.d(i,"GENDERS",function(){return Qe}),n.d(i,"HANDS_GESTURES",function(){return Ye}),n.d(i,"HEALTH",function(){return Xe}),n.d(i,"IMAGES",function(){return $e}),n.d(i,"INTERFACES",function(){return Je}),n.d(i,"LOGISTICS",function(){return Ze}),n.d(i,"MAPS",function(){return tn}),n.d(i,"MEDICAL",function(){return en}),n.d(i,"OBJECTS",function(){return nn}),n.d(i,"PAYMENTS_SHOPPING",function(){return rn}),n.d(i,"SHAPES",function(){return on}),n.d(i,"SPINNERS",function(){return an}),n.d(i,"SPORTS",function(){return sn}),n.d(i,"STATUS",function(){return un}),n.d(i,"USERS_PEOPLE",function(){return cn}),n.d(i,"VEHICLES",function(){return ln}),n.d(i,"WRITING",function(){return fn}),n.d(i,"BRANDS",function(){return hn}),n.d(i,"ICONS",function(){return pn}),n.d(i,"ICON_ALIASES",function(){return dn}),n.d(i,"ICONS_AND_ALIASES",function(){return vn}),n.d(i,"COMPONENT_CONTEXT_SPECIFIC_ICONS",function(){return mn}),n.d(i,"ALL_ICONS_IN_ALL_CONTEXTS",function(){return yn});var o=n(3),a=n.n(o),s=n(8),u=n.n(s),c=n(9),l=n.n(c),f=n(6),h=n.n(f),p=n(10),d=n.n(p),v=n(11),m=n.n(v),y=n(1),g=n.n(y),b=n(2),_=n.n(b),w=n(35),E=n.n(w),T=n(7),C=n.n(T),x=(n(5),n(0)),S=n.n(x),k=n(12),N=n.n(k),A=n(99),I=n.n(A),O=n(32),P=n.n(O),R=(n(475),n(73)),D=n.n(R),M=n(45),L=n.n(M),F=n(28),U=n.n(F),j=(n(450),n(98)),B=n.n(j),q=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e[t];if(void 0!==o)return o;if(i){var a=e[(r=t,"default".concat(r[0].toUpperCase()+r.slice(1)))];if(void 0!==a)return a;if(n){var s=n[t];if(void 0!==s)return s}}return"checked"!==t&&("value"===t?e.multiple?[]:"":void 0)},V=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"trySetState",function(t,e){var r=n.constructor.autoControlledProps,i=Object.keys(t).reduce(function(e,i){return void 0!==n.props[i]?e:-1===r.indexOf(i)?e:(e[i]=t[i],e)},{});e&&(i=N()({},i,e)),Object.keys(i).length>0&&n.setState(i)});var a=n.constructor.autoControlledProps,s=C()(g()(g()(n)),"getInitialAutoControlledState",n.props)||{},c=a.reduce(function(t,e){return t[e]=q(e,n.props,s,!0),t},{});return n.state=N()({},s,c),n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.constructor.autoControlledProps.reduce(function(n,r){var i=P()(t[r]),o=!P()(e.props[r])&&i;return i?o&&(n[r]=q(r,t)):n[r]=t[r],n},{});Object.keys(n).length>0&&this.setState(n)}}]),e}(x.Component),W=n(31),H=n.n(W),z=n(29),K=n.n(z),G=n(296),Q=n.n(G),Y=function(t){return Q()(D()(x.Children.toArray(t),x.isValidElement),"key")},X=function(t,e,n){return E()(n,t)?n[t]:e[t]},$=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=function(t,e){var n={},r=[];return K()(U()(t),function(t){E()(e,t)?r.length&&(n[t]=r,r=[]):r.push(t)}),[n,r]}(t,e),i=H()(r,2),o=i[0],a=i[1];return K()(U()(e),function(r){E()(o,r)&&K()(o[r],function(r){n[r]=X(r,t,e)}),n[r]=X(r,t,e)}),K()(a,function(r){n[r]=X(r,t,e)}),n},J=n(143),Z=n.n(J),tt=n(59),et=n.n(tt),nt=function(t,e){return et()(x.Children.toArray(t),{type:e})},rt=function(t,e){return Z()(x.Children.toArray(t),{type:e})},it=function(t){return null===t||void 0===t||Array.isArray(t)&&0===t.length},ot=n(50),at=n.n(ot),st={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function ut(t){var e=at()(t);return"string"===e||"number"===e?st[t]||t:""}var ct=function(t,e){return t&&e},lt=function(t,e){return t&&!0!==t&&"".concat(t," ").concat(e)},ft=function(t,e){return t&&(!0===t?e:"".concat(t," ").concat(e))},ht=function(t,e){return t&&!0!==t?t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(t){return"".concat(t.replace("-"," ")," ").concat(e)}).join(" "):null},pt=function(t){return"justified"===t?"justified":lt(t,"aligned")},dt=function(t){return lt(t,"aligned")},vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&"equal"===t)return"equal width";var n=at()(t);return"string"!==n&&"number"!==n||!e?ut(t):"".concat(ut(t)," ").concat(e)},mt=n(22),yt=n.n(mt),gt=(n(295),n(294),n(293),n(292),n(146),n(291),n(290),n(195),n(145),n(289),n(288),n(194),n(193),n(36)),bt=n.n(gt),_t=n(75),wt=n.n(_t),Et=(n(287),n(13)),Tt=n.n(Et),Ct="object"===("undefined"==typeof document?"undefined":at()(document))&&null!==document,xt="object"===("undefined"==typeof window?"undefined":at()(window))&&null!==window&&window.self===window,St=function t(){return Tt()(t.override)?Ct&&xt:t.override};St();var kt=function(){function t(e){u()(this,t),this.handlers=new Set(e)}return l()(t,[{key:"addHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t),n.add(t)}),new t(n)}},{key:"dispatchEvent",value:function(t,e){e?this.handlers.forEach(function(e){e(t)}):yt()(this.handlers).pop()(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t)}),new t(n)}}]),t}(),Nt=function(){function t(e,n){u()(this,t),this.handlerSets=n,this.poolName=e}return l()(t,[{key:"addHandlers",value:function(e,n){var r=new Map(this.handlerSets);return r.has(e)?r.set(e,r.get(e).addHandlers(n)):r.set(e,new kt(n)),new t(this.poolName,r)}},{key:"dispatchEvent",value:function(t,e){var n=this.handlerSets.get(t);n&&n.dispatchEvent(e,"default"===this.poolName)}},{key:"hasHandlers",value:function(t){var e=this.handlerSets.get(t);return!!e&&e.hasHandlers()}},{key:"removeHandlers",value:function(e,n){var r=new Map(this.handlerSets);if(!r.has(e))return new t(this.poolName,r);var i=r.get(e).removeHandlers(n);return i.hasHandlers()?r.set(e,i):r.delete(e),new t(this.poolName,r)}}]),t}();_()(Nt,"createByType",function(t,e,n){var r=new Map;return r.set(e,new kt(n)),new Nt(t,r)});var At=function(){function t(e){u()(this,t),_()(this,"handlers",new Map),_()(this,"pools",new Map),_()(this,"createEmitter",function(t,e){return function(n){e.forEach(function(e){e.dispatchEvent(t,n)})}}),this.target=e}return l()(t,[{key:"addHandlers",value:function(t,e,n){this.removeTargetHandler(e),this.pools.has(t)?this.pools.set(t,this.pools.get(t).addHandlers(e,n)):this.pools.set(t,Nt.createByType(t,e,n)),this.addTargetHandler(e)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,e,n){var r=this.pools.get(t);if(r){var i=r.removeHandlers(e,n);i.hasHandlers(e)?(this.removeTargetHandler(e),this.pools.set(t,i)):(this.removeTargetHandler(e),this.pools.delete(t)),this.pools.size>0&&this.addTargetHandler(e)}}},{key:"addTargetHandler",value:function(t){var e=this.createEmitter(t,this.pools);this.handlers.set(t,e),this.target.addEventListener(t,e)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t)),this.handlers.delete(t))}}]),t}(),It=n(18),Ot=n.n(It),Pt=function(t){return Ot()(t)?t:[t]},Rt=function(t){return"document"===t?document:"window"===t?window:t||document},Dt=new(function(){function t(){var e=this;u()(this,t),_()(this,"targets",new Map),_()(this,"getTarget",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Rt(t);if(e.targets.has(r))return e.targets.get(r);if(!n)return null;var i=new At(r);return e.targets.set(r,i),i}),_()(this,"removeTarget",function(t){e.targets.delete(Rt(t))})}return l()(t,[{key:"sub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o;this.getTarget(i).addHandlers(a,t,Pt(e))}}},{key:"unsub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o,s=this.getTarget(i,!1);s&&(s.removeHandlers(a,t,Pt(e)),s.hasHandlers()||this.removeTarget(i))}}}]),t}()),Mt=n(74),Lt=n.n(Mt),Ft=n(81),Ut=n.n(Ft),jt=n(44),Bt=n.n(jt),qt=n(60),Vt=n.n(qt),Wt=n(96),Ht=n.n(Wt),zt=n(286),Kt=n.n(zt),Gt=n(4),Qt=n.n(Gt);function Yt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthand() Component must be a string or function.");if(Tt()(n)||Kt()(n))return null;var i=Ht()(n),o=Vt()(n),a=Bt()(n),s=Object(x.isValidElement)(n),u=Ut()(n),c=i||o||Ot()(n);if(!(a||s||u||c))return null;var l=r.defaultProps,f=void 0===l?{}:l,h=s&&n.props||u&&n||c&&e(n),p=r.overrideProps,d=void 0===p?{}:p;d=Bt()(d)?d(N()({},f,h)):d;var v=N()({},f,h,d);if(f.className||d.className||h.className){var m=Qt()(f.className,d.className,h.className);v.className=Lt()(m.split(" ")).join(" ")}if((f.style||d.style||h.style)&&(v.style=N()({},f.style,h.style,d.style)),Tt()(v.key)){var y=v.childKey,g=r.autoGenerateKey,b=void 0===g||g;Tt()(y)?b&&(i||o)&&(v.key=n):(v.key="function"==typeof y?y(v):y,delete v.childKey)}return s?Object(x.cloneElement)(n,v):c||u?S.a.createElement(t,v):a?n(t,v,v.children):void 0}function Xt(t,e){if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthandFactory() Component must be a string or function.");return function(n,r){return Yt(t,e,n,r)}}Yt.handledProps=[];var $t=Xt("div",function(t){return{children:t}}),Jt=Xt("iframe",function(t){return{src:t}}),Zt=Xt("img",function(t){return{src:t}}),te=Xt("input",function(t){return{type:t}}),ee=Xt("label",function(t){return{children:t}}),ne=Xt("p",function(t){return{children:t}}),re=function(t,e){var n=t.handledProps,r=void 0===n?[]:n;return Object.keys(e).reduce(function(t,n){return"childKey"===n?t:(-1===r.indexOf(n)&&(t[n]=e[n]),t)},{})};var ie=function(t,e,n){var r=t.defaultProps,i=void 0===r?{}:r;if(e.as&&e.as!==i.as)return e.as;if(n){var o=n();if(o)return o}return e.href?"a":i.as||"div"},oe=n(19),ae=n.n(oe),se=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","type","value"],ue=se.concat(["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]),ce=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.htmlProps,r=void 0===n?ue:n,i=e.includeAria,o=void 0===i||i,a={},s={};return K()(t,function(t,e){var n=o&&(/^aria-.*$/.test(e)||"role"===e);(ae()(r,e)||n?a:s)[e]=t}),[a,s]},le=n(100),fe=n.n(le),he=n(285),pe=n.n(he),de=function(t,e){if(et()([e,t],Tt.a))return!1;if(e.target&&(C()(e.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return C()(e.target,"removeAttribute","data-suir-click-target"),t.contains(e.target);var n=e.clientX,r=e.clientY;if(et()([n,r],Tt.a))return!1;var i=t.getClientRects();if(!(t.offsetWidth&&t.offsetHeight&&i&&i.length))return!1;var o=pe()(i),a=o.top,s=o.bottom,u=o.left,c=o.right;return!et()([a,s,u,c],Tt.a)&&fe()(r,a,s+.001)&&fe()(n,u,c+.001)},ve=function(t){return{active:!1,type:"ellipsisItem",value:t}},me=n(284),ye=n.n(me),ge=n(15),be=n.n(ge),_e=function(t,e,n){return be()(ye()(t,e+1),n)},we=function(t,e){var n=t.activePage,r=t.boundaryRange,i=t.siblingRange,o=t.totalPages,a=r,s=_e(1,a,e),u=o+1-r,c=_e(u,o,e),l=Math.min(Math.max(n-i,a+2),u-1-2*i-1),f=l+2*i,h=_e(l,f,e);return yt()(s).concat([function(t,e,n){var r=e-1;return(r!==t+1?ve:n)(r)}(a,l,e)],yt()(h),[function(t,e,n){var r=t+1;return(r!==e-1?ve:n)(r)}(f,u,e)],yt()(c)).filter(Boolean)},Ee=function(t){var e,n,r,i={activePage:+(e=t).activePage,boundaryRange:+e.boundaryRange,siblingRange:+e.siblingRange,totalPages:+e.totalPages},o=i.activePage,a=i.totalPages,s=function(t){return function(e){return{active:t===e,type:"pageItem",value:e}}}(o),u=(r=(n=i).boundaryRange,3+2*n.siblingRange+2*r>=n.totalPages?_e(1,a,s):we(i,s));return[{active:!1,type:"firstItem",value:1},function(t){return{active:!1,type:"prevItem",value:Math.max(1,t-1)}}(o)].concat(yt()(u),[function(t,e){return{active:!1,type:"nextItem",value:Math.min(t+1,e)}}(o,a),function(t){return{active:!1,type:"lastItem",value:t}}(a)])},Te=n(72),Ce=n.n(Te),xe=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],Se=["left","right"],ke=["mini","tiny","small","medium","large","big","huge","massive"],Ne=["left","center","right","justified"],Ae=["bottom","middle","top"],Ie=["mobile","tablet","computer","large screen","widescreen"],Oe=yt()(U()(st)).concat(yt()(U()(st).map(Number)),yt()(Ce()(st))),Pe=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"],Re=["jiggle","flash","shake","pulse","tada","bounce","glow"],De=Pe.concat(Re),Me=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"],Le=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign in alternate","sign out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload"],Fe=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"],Ue=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"],je=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"],Be=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"],qe=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"],Ve=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"],We=["dollar sign","euro sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"],He=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"],ze=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"],Ke=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"],Ge=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"],Qe=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"],Ye=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"],Xe=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"],$e=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"],Je=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign in alternate","sign out alternate","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"],Ze=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"],tn=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"],en=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"],nn=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"],rn=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"],on=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"],an=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"],sn=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"],un=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"],cn=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"],ln=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"],fn=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"],hn=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin in","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"],pn=Lt()(Me.concat(Le,Fe,Ue,je,Be,qe,Ve,We,He,ze,Ke,Ge,Qe,Ye,Xe,$e,Je,Ze,tn,en,nn,rn,on,an,sn,un,cn,ln,fn,hn)),dn=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","credit card amazon pay","credit card american express","credit card diners club","credit card discover","credit card jcb","credit card mastercard","credit card paypal","credit card stripe","credit card visa","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","american express card","american express","amex","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery medium","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","diners club card","diners club","discover card","discover","discussions","doctor","dollar","dont","dribble","drivers license","dropdown","eercast","emergency","envira gallery","erase","eur","euro","eyedropper","fa","factory","favorite","feed","female homosexual","file text","find","first aid","five hundred pixels","fork","game","gay","gbp","gittip","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","japan credit bureau card","japan credit bureau","jcb","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","mastercard card","mastercard","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","optinmonster","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","pocket","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme isle","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","visa card","visa","volume control phone","wait","warning circle","warning sign","warning","wechat","wi-fi","wikipedia","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yc","ycombinator","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"],vn=Lt()(yt()(pn).concat(dn)),mn=["left dropdown"],yn=Lt()(yt()(vn).concat(mn)),gn=function(t,e){return"number"==typeof t||"string"==typeof t?t:t[e]},bn=n(142),_n=n.n(bn),wn=(n(283),n(190)),En=n.n(wn).a,Tn=n(16),Cn=n.n(Tn);function xn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()(o,"icons",n),u=re(xn,t),c=ie(xn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}xn.handledProps=["as","children","className","content","size"],xn.propTypes={},xn.defaultProps={as:"i"};var Sn=xn,kn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"getIconAriaOptions",value:function(){var t={};return this.props["aria-label"]||(t["aria-hidden"]="true"),t}},{key:"render",value:function(){var t=this.props,n=t.bordered,r=t.circular,i=t.className,o=t.color,s=t.corner,u=t.disabled,c=t.fitted,l=t.flipped,f=t.inverted,h=t.link,p=t.loading,d=t.name,v=t.rotated,m=t.size,y=Qt()(o,d,m,ct(n,"bordered"),ct(r,"circular"),ct(s,"corner"),ct(u,"disabled"),ct(c,"fitted"),ct(f,"inverted"),ct(h,"link"),ct(p,"loading"),lt(l,"flipped"),lt(v,"rotated"),"icon",i),g=re(e,this.props),b=ie(e,this.props),_=this.getIconAriaOptions();return S.a.createElement(b,a()({},g,_,{className:y}))}}]),e}(x.Component);_()(kn,"defaultProps",{as:"i"}),_()(kn,"Group",Sn),_()(kn,"handledProps",["aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"]),kn.propTypes={},kn.create=Xt(kn,function(t){return{name:t}});var Nn=kn,An=n(17),In=n.n(An),On=n(83),Pn=n.n(On),Rn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.innerRef;t&&t(Object(On.findDOMNode)(this))}},{key:"render",value:function(){var t=this.props.children;return x.Children.only(t)}}]),e}(x.Component);_()(Rn,"handledProps",["children","innerRef"]),Rn.propTypes={};var Dn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDocumentClick",function(t){var e=r.props,n=e.closeOnDocumentClick,i=e.closeOnRootNodeClick;if(r.rootNode&&r.portalNode&&!de(r.triggerNode,t)&&!de(r.portalNode,t)){var o=de(r.rootNode,t);(n&&!o||i&&o)&&r.close(t)}}),_()(g()(g()(r)),"handleEscape",function(t){r.props.closeOnEscape&&In.a.getCode(t)===In.a.Escape&&r.close(t)}),_()(g()(g()(r)),"handlePortalMouseLeave",function(t){var e=r.props,n=e.closeOnPortalMouseLeave,i=e.mouseLeaveDelay;n&&(r.mouseLeaveTimer=r.closeWithTimeout(t,i))}),_()(g()(g()(r)),"handlePortalMouseEnter",function(){r.props.closeOnPortalMouseLeave&&clearTimeout(r.mouseLeaveTimer)}),_()(g()(g()(r)),"handleTriggerBlur",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerBlur,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onBlur",t].concat(a));var u=C()(g()(g()(r)),"rootNode.contains",t.relatedTarget);i&&!u&&r.close(t)}),_()(g()(g()(r)),"handleTriggerClick",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerClick,o=e.openOnTriggerClick,a=r.state.open,s=arguments.length,u=new Array(s>1?s-1:0),c=1;c<s;c++)u[c-1]=arguments[c];C.a.apply(void 0,[n,"props.onClick",t].concat(u)),a&&i?r.close(t):!a&&o&&r.open(t)}),_()(g()(g()(r)),"handleTriggerFocus",function(t){for(var e=r.props,n=e.trigger,i=e.openOnTriggerFocus,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onFocus",t].concat(a)),i&&r.open(t)}),_()(g()(g()(r)),"handleTriggerMouseLeave",function(t){clearTimeout(r.mouseEnterTimer);for(var e=r.props,n=e.trigger,i=e.closeOnTriggerMouseLeave,o=e.mouseLeaveDelay,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseLeave",t].concat(s)),i&&(r.mouseLeaveTimer=r.closeWithTimeout(t,o))}),_()(g()(g()(r)),"handleTriggerMouseEnter",function(t){clearTimeout(r.mouseLeaveTimer);for(var e=r.props,n=e.trigger,i=e.mouseEnterDelay,o=e.openOnTriggerMouseEnter,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseEnter",t].concat(s)),o&&(r.mouseEnterTimer=r.openWithTimeout(t,i))}),_()(g()(g()(r)),"open",function(t){var e=r.props.onOpen;e&&e(t,r.props),r.trySetState({open:!0})}),_()(g()(g()(r)),"openWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.open(n)},e||0)}),_()(g()(g()(r)),"close",function(t){var e=r.props.onClose;e&&e(t,r.props),r.trySetState({open:!1})}),_()(g()(g()(r)),"closeWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.close(n)},e||0)}),_()(g()(g()(r)),"attachRenderSubTreeSubscribers",function(t){if(!r.rootNode)return null;r.portalNode=r.rootNode.firstElementChild,Dt.sub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.sub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode})}),_()(g()(g()(r)),"mountPortal",function(){if(St()&&!r.rootNode){var t=r.props,e=t.eventPool,n=t.mountNode,i=void 0===n?St()?document.body:null:n,o=t.prepend;r.rootNode=document.createElement("div"),o?i.insertBefore(r.rootNode,i.firstElementChild):i.appendChild(r.rootNode),Dt.sub("click",r.handleDocumentClick,{pool:e}),Dt.sub("keydown",r.handleEscape,{pool:e}),C()(r.props,"onMount",null,r.props)}}),_()(g()(g()(r)),"unmountPortal",function(){if(St()&&r.rootNode){var t=r.props.eventPool;Pn.a.unmountComponentAtNode(r.rootNode),r.rootNode.parentNode.removeChild(r.rootNode),Dt.unsub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.unsub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode}),r.rootNode=null,r.portalNode=null,Dt.unsub("click",r.handleDocumentClick,{pool:t}),Dt.unsub("keydown",r.handleEscape,{pool:t}),C()(r.props,"onUnmount",null,r.props)}}),_()(g()(g()(r)),"handleRef",function(t){return r.triggerNode=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(t,e){this.renderPortal(),e.open&&!this.state.open&&this.unmountPortal()}},{key:"componentWillUnmount",value:function(){this.unmountPortal(),clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"renderPortal",value:function(){var t=this;if(this.state.open){var e=this.props,n=e.children,r=e.className,i=e.eventPool,o=e.style;if(this.mountPortal(),!St())return null;this.rootNode.className=r||"",this.rootNode.style=o||"",this.portalNode&&(Dt.unsub("mouseleave",this.handlePortalMouseLeave,{pool:i,target:this.portalNode}),Dt.unsub("mouseenter",this.handlePortalMouseEnter,{pool:i,target:this.portalNode})),Pn.a.unstable_renderSubtreeIntoContainer(this,x.Children.only(n),this.rootNode,function(){return t.attachRenderSubTreeSubscribers(i)})}}},{key:"render",value:function(){var t=this.props.trigger;return t?S.a.createElement(Rn,{innerRef:this.handleRef},Object(x.cloneElement)(t,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})):null}}]),e}(V);_()(Dn,"defaultProps",{closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0}),_()(Dn,"autoControlledProps",["open"]),_()(Dn,"handledProps",["children","className","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnRootNodeClick","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","prepend","style","trigger"]),Dn.propTypes={};var Mn=Dn;function Ln(t){var e=t.blurring,n=t.className,i=t.children,o=t.content,s=t.dimmed,u=Qt()(ct(e,"blurring"),ct(s,"dimmed"),"dimmable",n),c=re(Ln,t),l=ie(Ln,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(i)?o:i)}Ln.handledProps=["as","blurring","children","className","content","dimmed"],Ln.propTypes={};var Fn=Ln,Un=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){C()(r.props,"onClick",t,r.props),r.contentRef&&r.contentRef!==t.target&&de(r.contentRef,t)||C()(r.props,"onClickOutside",t,r.props)}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"handleContentRef",function(t){return r.contentRef=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.active;this.props.active!==e&&this.toggleStyles(e)}},{key:"componentDidMount",value:function(){var t=this.props.active;this.toggleStyles(t)}},{key:"toggleStyles",value:function(t){this.ref&&(t?this.ref.style.setProperty("display","flex","important"):this.ref.style.removeProperty("display"))}},{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.inverted,l=t.page,f=t.simple,h=t.verticalAlign,p=Qt()("ui",ct(n,"active transition visible"),ct(u,"disabled"),ct(c,"inverted"),ct(l,"page"),ct(f,"simple"),dt(h),"dimmer",o),d=re(e,this.props),v=ie(e,this.props),m=r.isNil(i)?s:i;return S.a.createElement(v,a()({},d,{className:p,onClick:this.handleClick,ref:this.handleRef}),m&&S.a.createElement("div",{className:"content",ref:this.handleContentRef},m))}}]),e}(x.Component);_()(Un,"handledProps",["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"]),Un.propTypes={};var jn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handlePortalMount",function(){St()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))}),_()(g()(g()(r)),"handlePortalUnmount",function(){St()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.page,i=re(e,this.props);return r?S.a.createElement(Mn,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:n,openOnTriggerClick:!1},S.a.createElement(Un,a()({},i,{active:n,page:r}))):S.a.createElement(Un,a()({},i,{active:n,page:r}))}}]),e}(x.Component);function Bn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()("ui",o,n,"images"),u=re(Bn,t),c=ie(Bn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(jn,"Dimmable",Fn),_()(jn,"Inner",Un),_()(jn,"handledProps",["active","page"]),jn.propTypes={},jn.create=Xt(jn,function(t){return{content:t}}),Bn.handledProps=["as","children","className","content","size"],Bn.propTypes={};var qn=Bn,Vn=["alt","height","src","srcSet","width"];function Wn(t){var e=t.avatar,n=t.bordered,i=t.centered,o=t.children,s=t.circular,u=t.className,c=t.content,l=t.dimmer,f=t.disabled,h=t.floated,p=t.fluid,d=t.hidden,v=t.href,m=t.inline,y=t.label,g=t.rounded,b=t.size,_=t.spaced,w=t.verticalAlign,E=t.wrapped,T=t.ui,C=Qt()(ct(T,"ui"),b,ct(e,"avatar"),ct(n,"bordered"),ct(s,"circular"),ct(i,"centered"),ct(f,"disabled"),ct(p,"fluid"),ct(d,"hidden"),ct(m,"inline"),ct(g,"rounded"),ft(_,"spaced"),lt(h,"floated"),dt(w,"aligned"),"image",u),x=re(Wn,t),k=ce(x,{htmlProps:Vn}),N=H()(k,2),A=N[0],I=N[1],O=ie(Wn,t,function(){if(!(Tt()(l)&&Tt()(y)&&Tt()(E)&&r.isNil(o)))return"div"});return r.isNil(o)?r.isNil(c)?"img"===O?S.a.createElement(O,a()({},I,A,{className:C})):S.a.createElement(O,a()({},I,{className:C,href:v}),jn.create(l,{autoGenerateKey:!1}),Yn.create(y,{autoGenerateKey:!1}),S.a.createElement("img",A)):S.a.createElement(O,a()({},x,{className:C}),c):S.a.createElement(O,a()({},x,{className:C}),o)}Wn.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],Wn.Group=qn,Wn.propTypes={},Wn.defaultProps={as:"img",ui:!0},Wn.create=Xt(Wn,function(t){return{src:t}});var Hn=Wn;function zn(t){var e=t.children,n=t.className,i=t.content,o=Qt()("detail",n),s=re(zn,t),u=ie(zn,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}zn.handledProps=["as","children","className","content"],zn.propTypes={},zn.create=Xt(zn,function(t){return{content:t}});var Kn=zn;function Gn(t){var e=t.children,n=t.circular,i=t.className,o=t.color,s=t.content,u=t.size,c=t.tag,l=Qt()("ui",o,u,ct(n,"circular"),ct(c,"tag"),"labels",i),f=re(Gn,t),h=ie(Gn,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(e)?s:e)}Gn.handledProps=["as","children","circular","className","color","content","size","tag"],Gn.propTypes={};var Qn=Gn,Yn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),C()(r.props,"onRemove",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.attached,o=t.basic,s=t.children,u=t.circular,c=t.className,l=t.color,f=t.content,h=t.corner,p=t.detail,d=t.empty,v=t.floating,m=t.horizontal,y=t.icon,g=t.image,b=t.onRemove,_=t.pointing,w=t.removeIcon,E=t.ribbon,T=t.size,C=t.tag,x=(!0===_?"pointing":("left"===_||"right"===_)&&"".concat(_," pointing"))||("above"===_||"below"===_)&&"pointing ".concat(_),k=Qt()("ui",l,x,T,ct(n,"active"),ct(o,"basic"),ct(u,"circular"),ct(d,"empty"),ct(v,"floating"),ct(m,"horizontal"),ct(!0===g,"image"),ct(C,"tag"),ft(h,"corner"),ft(E,"ribbon"),lt(i,"attached"),"label",c),N=re(e,this.props),A=ie(e,this.props);if(!r.isNil(s))return S.a.createElement(A,a()({},N,{className:k,onClick:this.handleClick}),s);var I=P()(w)?"delete":w;return S.a.createElement(A,a()({className:k,onClick:this.handleClick},N),Nn.create(y,{autoGenerateKey:!1}),"boolean"!=typeof g&&Hn.create(g,{autoGenerateKey:!1}),f,Kn.create(p,{autoGenerateKey:!1}),b&&Nn.create(I,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))}}]),e}(x.Component);function Xn(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()(ct(s,"visible"),ct(o,"hidden"),"content",n),c=re(Xn,t),l=ie(Xn,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}_()(Yn,"Detail",Kn),_()(Yn,"Group",Qn),_()(Yn,"handledProps",["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","removeIcon","ribbon","size","tag"]),Yn.propTypes={},Yn.create=Xt(Yn,function(t){return{content:t}}),Xn.handledProps=["as","children","className","content","hidden","visible"],Xn.propTypes={};var $n=Xn;function Jn(t){var e=t.attached,n=t.basic,i=t.buttons,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.content,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.labeled,m=t.negative,y=t.positive,g=t.primary,b=t.secondary,_=t.size,w=t.toggle,E=t.vertical,T=t.widths,C=Qt()("ui",u,_,ct(n,"basic"),ct(c,"compact"),ct(h,"fluid"),ct(p,"icon"),ct(d,"inverted"),ct(v,"labeled"),ct(m,"negative"),ct(y,"positive"),ct(g,"primary"),ct(b,"secondary"),ct(w,"toggle"),ct(E,"vertical"),ft(e,"attached"),lt(f,"floated"),vt(T),"buttons",s),x=re(Jn,t),k=ie(Jn,t);return Tt()(i)?S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?l:o):S.a.createElement(k,a()({},x,{className:C}),be()(i,function(t){return rr.create(t)}))}Jn.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],Jn.propTypes={};var Zn=Jn;function tr(t){var e=t.className,n=t.text,r=Qt()("or",e),i=re(tr,t),o=ie(tr,t);return S.a.createElement(o,a()({},i,{className:r,"data-text":n}))}tr.handledProps=["as","className","text"],tr.propTypes={};var er=tr,nr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"computeElementType",function(){var t=i.props,e=t.attached,n=t.label;if(!Tt()(e)||!Tt()(n))return"div"}),_()(g()(g()(i)),"computeTabIndex",function(t){var e=i.props,n=e.disabled,r=e.tabIndex;return Tt()(r)?n?-1:"div"===t?0:void 0:r}),_()(g()(g()(i)),"focus",function(){return C()(i.ref,"focus")}),_()(g()(g()(i)),"handleClick",function(t){i.props.disabled?t.preventDefault():C()(i.props,"onClick",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"hasIconClass",function(){var t=i.props,e=t.labelPosition,n=t.children,o=t.content,a=t.icon;return!0===a||a&&(e||r.isNil(n)&&Tt()(o))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.animated,o=t.attached,s=t.basic,u=t.children,c=t.circular,l=t.className,f=t.color,h=t.compact,p=t.content,d=t.disabled,v=t.floated,m=t.fluid,y=t.icon,g=t.inverted,b=t.label,_=t.labelPosition,w=t.loading,E=t.negative,T=t.positive,C=t.primary,x=t.secondary,k=t.role,N=t.size,A=t.toggle,I=Qt()(f,N,ct(n,"active"),ct(s,"basic"),ct(c,"circular"),ct(h,"compact"),ct(m,"fluid"),ct(this.hasIconClass(),"icon"),ct(g,"inverted"),ct(w,"loading"),ct(E,"negative"),ct(T,"positive"),ct(C,"primary"),ct(x,"secondary"),ct(A,"toggle"),ft(i,"animated"),ft(o,"attached")),O=Qt()(ft(_||!!b,"labeled")),P=Qt()(ct(d,"disabled"),lt(v,"floated")),R=re(e,this.props),D=ie(e,this.props,this.computeElementType),M=this.computeTabIndex(D);if(!Tt()(b)){var L=Qt()("ui",I,"button",l),F=Qt()("ui",O,"button",l,P),U=Yn.create(b,{defaultProps:{basic:!0,pointing:"left"===_?"right":"left"},autoGenerateKey:!1});return S.a.createElement(D,a()({},R,{className:F,onClick:this.handleClick}),"left"===_&&U,S.a.createElement("button",{className:L,disabled:d,ref:this.handleRef,tabIndex:M},Nn.create(y,{autoGenerateKey:!1})," ",p),("right"===_||!_)&&U)}var j=Qt()("ui",I,P,O,"button",l),B=!r.isNil(u);return S.a.createElement(D,a()({},R,{className:j,disabled:d&&"button"===D||void 0,onClick:this.handleClick,ref:this.handleRef,role:k,tabIndex:M}),B&&u,!B&&Nn.create(y,{autoGenerateKey:!1}),!B&&p)}}]),e}(x.Component);_()(nr,"defaultProps",{as:"button",role:"button"}),_()(nr,"Content",$n),_()(nr,"Group",Zn),_()(nr,"Or",er),_()(nr,"handledProps",["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle"]),nr.propTypes={},nr.create=Xt(nr,function(t){return{content:t}});var rr=nr,ir=n(97),or=n.n(ir),ar=n(58),sr=n.n(ar),ur=function(t){var e=t.node;if(St())return Tt()(e)?document.body:e},cr=n(282),lr=n.n(cr),fr=n(281),hr=n.n(fr),pr=n(280),dr=n.n(pr),vr=n(279),mr=n.n(vr),yr=n(278),gr=n.n(yr),br=n(277),_r=n.n(br),wr=wt()(_r.a,bt()("props.className"),gr()(mr()(/\s+/)),dr()(hr.a),lr.a),Er=function(t,e){return[I()(e,t),I()(t,e)]},Tr=new Map,Cr=function(t,e){var n=wr(e),r=Er(Tr.get(t),n),i=H()(r,2),o=i[0],a=i[1];K()(o,function(e){return t.classList.add(e)}),K()(a,function(e){return t.classList.remove(e)}),Tr.set(t,n)},xr=new function t(){var e=this;u()(this,t),_()(this,"add",function(t,n){e.nodes.has(t)?e.nodes.get(t).add(n):e.nodes.set(t,new Set([n]))}),_()(this,"del",function(t,n){if(e.nodes.has(t)){var r=e.nodes.get(t);1!==r.size?r.delete(n):e.nodes.delete(t)}}),_()(this,"emit",function(t,n){n(t,e.nodes.get(t))}),this.nodes=new Map},Sr=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return t.className!==this.props.className}},{key:"componentWillMount",value:function(){var t=ur(this.props);t&&(xr.add(t,this),xr.emit(t,Cr))}},{key:"componentDidUpdate",value:function(){var t=ur(this.props);t&&xr.emit(t,Cr)}},{key:"componentWillUnmount",value:function(){var t=ur(this.props);t&&(xr.del(t,this),xr.emit(t,Cr))}},{key:"render",value:function(){return null}}]),e}(x.Component);function kr(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"header"),s=re(kr,t),u=ie(kr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Sr,"handledProps",["className","node"]),Sr.propTypes={},kr.handledProps=["as","children","className","content"],kr.propTypes={},kr.create=Xt(kr,function(t){return{content:t}});var Nr=kr;function Ar(t){var e=t.children,n=t.className,i=t.content,o=t.image,s=t.scrolling,u=Qt()(n,ct(o,"image"),ct(s,"scrolling"),"content"),c=re(Ar,t),l=ie(Ar,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ar.handledProps=["as","children","className","content","image","scrolling"],Ar.propTypes={},Ar.create=Xt(Ar,function(t){return{content:t}});var Ir=Ar,Or=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleButtonOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onActionClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.actions,o=n.children,s=n.className,u=n.content,c=Qt()("actions",s),l=re(e,this.props),f=ie(e,this.props);return r.isNil(o)?r.isNil(u)?S.a.createElement(f,a()({},l,{className:c}),be()(i,function(e){return rr.create(e,{overrideProps:t.handleButtonOverrides})})):S.a.createElement(f,a()({},l,{className:c}),u):S.a.createElement(f,a()({},l,{className:c}),o)}}]),e}(x.Component);function Pr(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pr,t),u=ie(Pr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Or,"handledProps",["actions","as","children","className","content","onActionClick"]),Or.propTypes={},Or.create=Xt(Or,function(t){return{actions:t}}),Pr.handledProps=["as","children","className","content"],Pr.propTypes={};var Rr=Pr,Dr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"getMountNode",function(){return St()?i.props.mountNode||document.body:null}),_()(g()(g()(i)),"handleActionsOverrides",function(t){return{onActionClick:function(e,n){C()(t,"onActionClick",e,n),C()(i.props,"onActionClick",e,i.props),i.handleClose(e)}}}),_()(g()(g()(i)),"handleClose",function(t){C()(i.props,"onClose",t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),i.handleClose(e)}}}),_()(g()(g()(i)),"handleOpen",function(t){C()(i.props,"onOpen",t,i.props),i.trySetState({open:!0})}),_()(g()(g()(i)),"handlePortalMount",function(t){i.setState({scrolling:!1}),i.setPositionAndClassNames(),C()(i.props,"onMount",t,i.props)}),_()(g()(g()(i)),"handlePortalUnmount",function(t){cancelAnimationFrame(i.animationRequestId),C()(i.props,"onUnmount",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"handlePortalRef",function(t){return i.portalRef=t}),_()(g()(g()(i)),"setRootNodeStyle",function(){i.portalRef&&i.portalRef&&i.portalRef.rootNode.style.setProperty("display","flex","important")}),_()(g()(g()(i)),"setPositionAndClassNames",function(){var t,e=i.props.dimmer;e&&(t="dimmable dimmed","blurring"===e&&(t+=" blurring"));var n={};if(i.ref){var r=i.ref.getBoundingClientRect().height>=window.innerHeight;null!==i.state.marginTop&&(n.marginTop=null),i.state.scrolling!==r&&(n.scrolling=r),r&&(t+=" scrolling")}i.state.mountClasses!==t&&(n.mountClasses=t),L()(n)||i.setState(n),i.animationRequestId=requestAnimationFrame(i.setPositionAndClassNames),i.setRootNodeStyle()}),_()(g()(g()(i)),"renderContent",function(t){var n=i.props,o=n.actions,s=n.basic,u=n.children,c=n.className,l=n.closeIcon,f=n.content,h=n.header,p=n.mountNode,d=n.size,v=n.style,m=i.state,y=m.marginTop,g=m.mountClasses,b=m.scrolling,_=Qt()("ui",d,ct(s,"basic"),ct(b,"scrolling"),"modal transition visible active",c),w=ie(e,i.props),E=!0===l?"close":l,T=Nn.create(E,{overrideProps:i.handleIconOverrides});return r.isNil(u)?S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,Nr.create(h,{autoGenerateKey:!1}),Ir.create(f,{autoGenerateKey:!1}),Or.create(o,{overrideProps:i.handleActionsOverrides}))):S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,u))}),n))}return m()(e,t),l()(e,[{key:"componentWillUnmount",value:function(){this.handlePortalUnmount()}},{key:"render",value:function(){var t=this.state.open,n=this.props,r=n.centered,i=n.closeOnDimmerClick,o=n.closeOnDocumentClick,s=n.dimmer,u=n.eventPool,c=n.trigger,l=this.getMountNode();if(!St())return Object(x.isValidElement)(c)?c:null;var f=re(e,this.props),h=Mn.handledProps,p=sr()(f,function(t,e,n){return ae()(h,n)||(t[n]=e),t},{}),d=or()(f,h),v=s?Qt()("ui","inverted"===s&&"inverted",!r&&"top aligned","page modals dimmer transition visible active"):null;return S.a.createElement(Mn,a()({closeOnDocumentClick:o,closeOnRootNodeClick:i},d,{trigger:c,className:v,eventPool:u,mountNode:l,open:t,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,ref:this.handlePortalRef}),this.renderContent(p))}}]),e}(V);_()(Dr,"defaultProps",{centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"}),_()(Dr,"autoControlledProps",["open"]),_()(Dr,"Header",Nr),_()(Dr,"Content",Ir),_()(Dr,"Description",Rr),_()(Dr,"Actions",Or),_()(Dr,"handledProps",["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"]),Dr.propTypes={};var Mr=Dr,Lr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleCancel",function(t){C()(r.props,"onCancel",t,r.props)}),_()(g()(g()(r)),"handleCancelOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),r.handleCancel(e)}}}),_()(g()(g()(r)),"handleConfirmOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onConfirm",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.cancelButton,r=t.confirmButton,i=t.content,o=t.header,s=t.open,u=t.size,c=re(e,this.props),l={};return E()(this.props,"open")&&(l.open=s),S.a.createElement(Mr,a()({},c,l,{size:u,onClose:this.handleCancel}),Mr.Header.create(o,{autoGenerateKey:!1}),Mr.Content.create(i,{autoGenerateKey:!1}),S.a.createElement(Mr.Actions,null,rr.create(n,{autoGenerateKey:!1,overrideProps:this.handleCancelOverrides}),rr.create(r,{autoGenerateKey:!1,defaultProps:{primary:!0},overrideProps:this.handleConfirmOverrides})))}}]),e}(x.Component);_()(Lr,"defaultProps",{cancelButton:"Cancel",confirmButton:"OK",content:"Are you sure?",size:"small"}),_()(Lr,"handledProps",["cancelButton","confirmButton","content","header","onCancel","onConfirm","open","size"]),Lr.propTypes={};var Fr=Lr;function Ur(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ur,t),u=ie(Ur,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ur.handledProps=["as","children","className","content"],Ur.propTypes={};var jr=Ur,Br=n(276),qr=n.n(Br),Vr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.fitted,f=t.header,h=t.icon,p=t.link,d=t.name,v=t.onClick,m=t.position,y=Qt()(s,m,ct(n,"active"),ct(c,"disabled"),ct(!0===h||h&&!(d||u),"icon"),ct(f,"header"),ct(p,"link"),ft(l,"fitted"),"item",o),g=ie(e,this.props,function(){if(v)return"a"}),b=re(e,this.props);return r.isNil(i)?S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),r.isNil(u)?qr()(d):u):S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),i)}}]),e}(x.Component);function Wr(t){var e=t.children,n=t.className,i=t.content,o=t.position,s=Qt()(o,"menu",n),u=re(Wr,t),c=ie(Wr,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(Vr,"handledProps",["active","as","children","className","color","content","disabled","fitted","header","icon","index","link","name","onClick","position"]),Vr.propTypes={},Vr.create=Xt(Vr,function(t){return{content:t,name:t}}),Wr.handledProps=["as","children","className","content","position"],Wr.propTypes={};var Hr=Wr,zr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){var i=n.index;r.trySetState({activeIndex:i}),C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"renderItems",value:function(){var t=this,e=this.props.items,n=this.state.activeIndex;return be()(e,function(e,r){return Vr.create(e,{defaultProps:{active:parseInt(n,10)===r,index:r},overrideProps:t.handleItemOverrides})})}},{key:"render",value:function(){var t=this.props,n=t.attached,i=t.borderless,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.fixed,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.pagination,m=t.pointing,y=t.secondary,g=t.size,b=t.stackable,_=t.tabular,w=t.text,E=t.vertical,T=t.widths,C=Qt()("ui",u,g,ct(i,"borderless"),ct(c,"compact"),ct(h,"fluid"),ct(d,"inverted"),ct(v,"pagination"),ct(m,"pointing"),ct(y,"secondary"),ct(b,"stackable"),ct(w,"text"),ct(E,"vertical"),ft(n,"attached"),ft(f,"floated"),ft(p,"icon"),ft(_,"tabular"),lt(l,"fixed"),vt(T,"item"),s,"menu"),x=re(e,this.props),k=ie(e,this.props);return S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?this.renderItems():o)}}]),e}(V);_()(zr,"autoControlledProps",["activeIndex"]),_()(zr,"Header",jr),_()(zr,"Item",Vr),_()(zr,"Menu",Hr),_()(zr,"handledProps",["activeIndex","as","attached","borderless","children","className","color","compact","defaultActiveIndex","fixed","floated","fluid","icon","inverted","items","onItemClick","pagination","pointing","secondary","size","stackable","tabular","text","vertical","widths"]),zr.propTypes={},zr.create=Xt(zr,function(t){return{items:t}});var Kr=zr,Gr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){"ellipsisItem"!==r.props.type&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleKeyDown",function(t){C()(r.props,"onKeyDown",t,r.props),In.a.getCode(t)===In.a.Enter&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleOverrides",function(){return{onClick:r.handleClick,onKeyDown:r.handleKeyDown}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,e=t.active,n=t.type,r=this.props.disabled||"ellipsisItem"===n;return Vr.create(this.props,{defaultProps:{active:e,disabled:r,"aria-current":e,onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:r?-1:0},overrideProps:this.handleOverrides})}}]),e}(x.Component);_()(Gr,"handledProps",["active","disabled","onClick","onKeyDown","type"]),Gr.propTypes={},Gr.create=Xt(Gr,function(t){return{content:t}});var Qr=Gr,Yr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.value;+r.state.activePage!=+n&&(r.trySetState({activePage:n}),C()(r.props,"onPageChange",t,N()({},r.props,{activePage:n})))}),_()(g()(g()(r)),"handleItemOverrides",function(t,e,n){return function(i){return{active:t,type:e,key:"".concat(e,"-").concat(n),onClick:function(t,e){C()(i,"onClick",t,e),r.handleItemClick(t,e)}}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n["aria-label"],i=n.boundaryRange,o=n.siblingRange,s=n.totalPages,u=this.state.activePage,c=Ee({activePage:u,boundaryRange:i,siblingRange:o,totalPages:s}),l=re(e,this.props);return S.a.createElement(Kr,a()({},l,{"aria-label":r,pagination:!0,role:"navigation"}),be()(c,function(e){var n=e.active,r=e.type,i=e.value;return Qr.create(t.props[r],{defaultProps:{content:i,value:i},overrideProps:t.handleItemOverrides(n,r,i)})}))}}]),e}(V);_()(Yr,"autoControlledProps",["activePage"]),_()(Yr,"defaultProps",{"aria-label":"Pagination Navigation",boundaryRange:1,ellipsisItem:"...",firstItem:{"aria-label":"First item",content:"«"},lastItem:{"aria-label":"Last item",content:"»"},nextItem:{"aria-label":"Next item",content:"⟩"},pageItem:{},prevItem:{"aria-label":"Previous item",content:"⟨"},siblingRange:1}),_()(Yr,"Item",Qr),_()(Yr,"handledProps",["activePage","aria-label","boundaryRange","defaultActivePage","ellipsisItem","firstItem","lastItem","nextItem","onPageChange","pageItem","prevItem","siblingRange","totalPages"]),Yr.propTypes={};var Xr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"canToggle",function(){var t=r.props,e=t.disabled,n=t.radio,i=t.readOnly,o=r.state.checked;return!(e||i||n&&o)}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(r)),"handleContainerClick",function(t){var e=r.props.id;Tt()(e)&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputClick",function(t){r.props.id&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"handleClick",function(t){var e=r.state,n=e.checked,i=e.indeterminate;r.canToggle()&&(C()(r.props,"onClick",t,N()({},r.props,{checked:!n,indeterminate:!!i})),C()(r.props,"onChange",t,N()({},r.props,{checked:!n,indeterminate:!1})),r.trySetState({checked:!n,indeterminate:!1}))}),_()(g()(g()(r)),"handleMouseDown",function(t){var e=r.state,n=e.checked,i=e.indeterminate;C()(r.props,"onMouseDown",t,N()({},r.props,{checked:!!n,indeterminate:!!i})),C()(r.inputRef,"focus"),t.preventDefault()}),_()(g()(g()(r)),"setIndeterminate",function(){var t=r.state.indeterminate;r.inputRef&&(r.inputRef.indeterminate=!!t)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.setIndeterminate()}},{key:"componentDidUpdate",value:function(){this.setIndeterminate()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.disabled,i=t.label,o=t.id,s=t.name,u=t.radio,c=t.readOnly,l=t.slider,f=t.toggle,h=t.type,p=t.value,d=this.state,v=d.checked,m=d.indeterminate,y=Qt()("ui",ct(v,"checked"),ct(r,"disabled"),ct(m,"indeterminate"),ct(Tt()(i),"fitted"),ct(u,"radio"),ct(c,"read-only"),ct(l,"slider"),ct(f,"toggle"),"checkbox",n),g=re(e,this.props),b=ie(e,this.props),_=ce(g,{htmlProps:se}),w=H()(_,2),E=w[0],T=w[1];return S.a.createElement(b,a()({},T,{className:y,onClick:this.handleContainerClick,onChange:this.handleContainerClick,onMouseDown:this.handleMouseDown}),S.a.createElement("input",a()({},E,{checked:v,className:"hidden",disabled:r,id:o,name:s,onClick:this.handleInputClick,readOnly:!0,ref:this.handleInputRef,tabIndex:this.computeTabIndex(),type:h,value:p})),ee(i,{defaultProps:{htmlFor:o},autoGenerateKey:!1})||S.a.createElement("label",{htmlFor:o}))}}]),e}(V);function $r(t){var e=t.slider,n=t.toggle,r=t.type,i=re($r,t),o=!(e||n)||void 0;return S.a.createElement(Xr,a()({},i,{type:r,radio:o,slider:e,toggle:n}))}_()(Xr,"defaultProps",{type:"checkbox"}),_()(Xr,"autoControlledProps",["checked","indeterminate"]),_()(Xr,"handledProps",["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","radio","readOnly","slider","tabIndex","toggle","type","value"]),Xr.propTypes={},$r.handledProps=["slider","toggle","type"],$r.propTypes={},$r.defaultProps={type:"radio"};var Jr=$r,Zr=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"fitsMaxWidth",function(){var t=n.props.maxWidth,e=n.state.width;return!!Tt()(t)||e<=t}),_()(g()(g()(n)),"fitsMinWidth",function(){var t=n.props.minWidth,e=n.state.width;return!!Tt()(t)||e>=t}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)}),_()(g()(g()(n)),"isVisible",function(){return n.fitsMinWidth()&&n.fitsMaxWidth()}),_()(g()(g()(n)),"handleResize",function(t){n.ticking||(n.ticking=!0,requestAnimationFrame(function(){return n.handleUpdate(t)}))}),_()(g()(g()(n)),"handleUpdate",function(t){n.ticking=!1;var e=C()(n.props,"getWidth");n.setSafeState({width:e}),C()(n.props,"onUpdate",t,N()({},n.props,{width:e}))}),n.state={width:C()(n.props,"getWidth")},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.fireOnMount;this.mounted=!0,Dt.sub("resize",this.handleResize,{target:"window"}),t&&this.handleUpdate()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,Dt.unsub("resize",this.handleResize,{target:"window"})}},{key:"shouldComponentUpdate",value:function(t,e){return this.state.width!==e.width||!En(this.props,t)}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return this.isVisible()?S.a.createElement(n,r,t):null}}]),e}(x.Component);_()(Zr,"defaultProps",{getWidth:function(){return St()?window.innerWidth:0}}),_()(Zr,"onlyMobile",{minWidth:320,maxWidth:767}),_()(Zr,"onlyTablet",{minWidth:768,maxWidth:991}),_()(Zr,"onlyComputer",{minWidth:992}),_()(Zr,"onlyLargeScreen",{minWidth:1200,maxWidth:1919}),_()(Zr,"onlyWidescreen",{minWidth:1920}),_()(Zr,"handledProps",["as","children","fireOnMount","getWidth","maxWidth","minWidth","onUpdate"]),Zr.propTypes={};var ti=n(140),ei=n.n(ti),ni=n(188),ri=n.n(ni),ii=n(275),oi=n.n(ii),ai=n(189),si=n.n(ai),ui=n(274),ci=n.n(ui),li=n(141),fi=n.n(li),hi=n(273),pi=n.n(hi),di=n(192),vi=n.n(di),mi=n(191),yi=n.n(mi),gi=n(20),bi=n.n(gi);function _i(t){var e=t.className,n=Qt()("divider",e),r=re(_i,t),i=ie(_i,t);return S.a.createElement(i,a()({},r,{className:n}))}_i.handledProps=["as","className"],_i.propTypes={};var wi=_i,Ei=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.name,i=Qt()(r,"flag",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}))}}]),e}(x.Component);_()(Ei,"defaultProps",{as:"i"}),_()(Ei,"handledProps",["as","className","name"]),Ei.propTypes={},Ei.create=Xt(Ei,function(t){return{name:t}});var Ti=Ei,Ci=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.description,l=t.flag,f=t.icon,h=t.image,p=t.label,d=t.selected,v=t.text,m=Qt()(ct(n,"active"),ct(u,"disabled"),ct(d,"selected"),"item",o),y=Tt()(f)?r.someByType(i,"DropdownMenu")&&"dropdown":f,g=re(e,this.props),b=ie(e,this.props),_={role:"option","aria-disabled":u,"aria-checked":n,"aria-selected":d};if(!r.isNil(i))return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),i);var w=Ti.create(l,{autoGenerateKey:!1}),E=Nn.create(y,{autoGenerateKey:!1}),T=Hn.create(h,{autoGenerateKey:!1}),C=Yn.create(p,{autoGenerateKey:!1}),x=Yt("span",function(t){return{children:t}},c,{defaultProps:{className:"description"},autoGenerateKey:!1}),k=Yt("span",function(t){return{children:t}},r.isNil(s)?v:s,{defaultProps:{className:"text"},autoGenerateKey:!1});return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),T,E,w,C,x,k)}}]),e}(x.Component);_()(Ci,"handledProps",["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"]),Ci.propTypes={},Ci.create=Xt(Ci,function(t){return t});var xi=Ci;function Si(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("header",n),u=re(Si,t),c=ie(Si,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}Si.handledProps=["as","children","className","content","icon"],Si.propTypes={},Si.create=Xt(Si,function(t){return{content:t}});var ki=Si;function Ni(t){var e=t.children,n=t.className,i=t.content,o=t.direction,s=t.open,u=t.scrolling,c=Qt()(o,ct(s,"visible"),ct(u,"scrolling"),"menu transition",n),l=re(Ni,t),f=ie(Ni,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Ni.handledProps=["as","children","className","content","direction","open","scrolling"],Ni.propTypes={};var Ai=Ni,Ii=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleRef",function(t){return C()(r.props,"inputRef",t)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.autoComplete,r=t.className,i=t.tabIndex,o=t.type,s=t.value,u=Qt()("search",r),c=re(e,this.props);return S.a.createElement("input",a()({},c,{"aria-autocomplete":"list",autoComplete:n,className:u,onChange:this.handleChange,ref:this.handleRef,tabIndex:i,type:o,value:s}))}}]),e}(x.Component);_()(Ii,"defaultProps",{autoComplete:"off",type:"text"}),_()(Ii,"handledProps",["as","autoComplete","className","inputRef","tabIndex","type","value"]),Ii.propTypes={},Ii.create=Xt(Ii,function(t){return{type:t}});var Oi=Ii,Pi=function(t,e){return Tt()(t)?e:t},Ri=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"handleChange",function(t,e){C()(i.props,"onChange",t,N()({},i.props,{value:e}))}),_()(g()(g()(i)),"closeOnChange",function(t){var e=i.props,n=e.closeOnChange,r=e.multiple;(P()(n)?!r:n)&&i.close(t)}),_()(g()(g()(i)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),i.close())}),_()(g()(g()(i)),"moveSelectionOnKeyDown",function(t){var e,n=i.props,r=n.multiple,o=n.selectOnNavigation,a=(e={},_()(e,In.a.ArrowDown,1),_()(e,In.a.ArrowUp,-1),e)[In.a.getCode(t)];void 0!==a&&(t.preventDefault(),i.moveSelectionBy(a),!r&&o&&i.makeSelectedItemActive(t))}),_()(g()(g()(i)),"openOnSpace",function(t){In.a.getCode(t)===In.a.Spacebar&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"openOnArrow",function(t){var e=In.a.getCode(t);ae()([In.a.ArrowDown,In.a.ArrowUp],e)&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"makeSelectedItemActive",function(t){var e=i.state.open,n=i.props.multiple,r=i.getSelectedItem(),o=bi()(r,"value");if(!Tt()(o)&&e){var a=n?yi()(i.state.value,[o]):o;i.setValue(a),i.setSelectedIndex(a),i.handleChange(t,a),r["data-additional"]&&C()(i.props,"onAddItem",t,N()({},i.props,{value:o}))}}),_()(g()(g()(i)),"selectItemOnEnter",function(t){var e=i.props.search;if(In.a.getCode(t)===In.a.Enter){t.preventDefault();var n=vi()(i.getMenuOptions());e&&0===n||(i.makeSelectedItemActive(t),i.closeOnChange(t),i.clearSearchQuery(),e&&i.searchRef&&i.searchRef.focus())}}),_()(g()(g()(i)),"removeItemOnBackspace",function(t){var e=i.props,n=e.multiple,r=e.search,o=i.state,a=o.searchQuery,s=o.value;if(In.a.getCode(t)===In.a.Backspace&&!a&&r&&n&&!L()(s)){t.preventDefault();var u=pi()(s);i.setValue(u),i.setSelectedIndex(u),i.handleChange(t,u)}}),_()(g()(g()(i)),"closeOnDocumentClick",function(t){i.props.closeOnBlur&&(i.ref&&de(i.ref,t)||i.close())}),_()(g()(g()(i)),"attachHandlersOnOpen",function(){Dt.sub("keydown",[i.closeOnEscape,i.moveSelectionOnKeyDown,i.selectItemOnEnter,i.removeItemOnBackspace]),Dt.sub("click",i.closeOnDocumentClick),Dt.unsub("keydown",[i.openOnArrow,i.openOnSpace])}),_()(g()(g()(i)),"handleMouseDown",function(t){i.isMouseDown=!0,Dt.sub("mouseup",i.handleDocumentMouseUp),C()(i.props,"onMouseDown",t,i.props)}),_()(g()(g()(i)),"handleDocumentMouseUp",function(){i.isMouseDown=!1,Dt.unsub("mouseup",i.handleDocumentMouseUp)}),_()(g()(g()(i)),"handleClick",function(t){var e=i.props,n=e.minCharacters,r=e.search,o=i.state,a=o.open,s=o.searchQuery;if(C()(i.props,"onClick",t,i.props),t.stopPropagation(),!r)return i.toggle(t);a||(s.length>=n||1===n?i.open(t):i.searchRef&&i.searchRef.focus())}),_()(g()(g()(i)),"handleIconClick",function(t){C()(i.props,"onClick",t,i.props),t.stopPropagation(),i.toggle(t)}),_()(g()(g()(i)),"handleItemClick",function(t,e){var n=i.props,r=n.multiple,o=n.search,a=e.value;if(t.stopPropagation(),(r||e.disabled)&&t.nativeEvent.stopImmediatePropagation(),!e.disabled){var s=e["data-additional"],u=r?yi()(i.state.value,[a]):a;i.setValue(u),i.setSelectedIndex(a);var c=vi()(i.getMenuOptions());r&&!s&&1!==c||i.clearSearchQuery(),i.handleChange(t,u),i.closeOnChange(t),s&&C()(i.props,"onAddItem",t,N()({},i.props,{value:a})),r&&o&&i.searchRef&&i.searchRef.focus()}}),_()(g()(g()(i)),"handleFocus",function(t){i.state.focus||(C()(i.props,"onFocus",t,i.props),i.setState({focus:!0}))}),_()(g()(g()(i)),"handleBlur",function(t){var e=bi()(t,"currentTarget");if(!e||!e.contains(document.activeElement)){var n=i.props,r=n.closeOnBlur,o=n.multiple,a=n.onBlur,s=n.selectOnBlur;i.isMouseDown||(a&&a(t,i.props),s&&!o&&(i.makeSelectedItemActive(t),r&&i.close()),i.setState({focus:!1}),i.clearSearchQuery())}}),_()(g()(g()(i)),"handleSearchChange",function(t,e){var n=e.value;t.stopPropagation();var r=i.props.minCharacters,o=i.state.open,a=n;C()(i.props,"onSearchChange",t,N()({},i.props,{searchQuery:a})),i.trySetState({searchQuery:a},{selectedIndex:0}),!o&&a.length>=r?i.open():o&&1!==r&&a.length<r&&i.close()}),_()(g()(g()(i)),"getMenuOptions",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,n=i.props,r=n.additionLabel,o=n.additionPosition,a=n.allowAdditions,s=n.deburr,u=n.multiple,c=n.search,l=i.state.searchQuery,f=e;if(u&&(f=D()(f,function(e){return!ae()(t,e.value)})),c&&l)if(Bt()(c))f=c(f,l);else{var h=s?fi()(l):l,p=new RegExp(ci()(h),"i");f=D()(f,function(t){return p.test(s?fi()(t.text):t.text)})}if(a&&c&&l&&!et()(f,{text:l})){var d={key:"addition",text:[S.a.isValidElement(r)?S.a.cloneElement(r,{key:"addition-label"}):r||"",S.a.createElement("b",{key:"addition-query"},l)],value:l,className:"addition","data-additional":!0};"top"===o?f.unshift(d):f.push(d)}return f}),_()(g()(g()(i)),"getSelectedItem",function(){var t=i.state.selectedIndex,e=i.getMenuOptions();return bi()(e,"[".concat(t,"]"))}),_()(g()(g()(i)),"getEnabledIndices",function(t){var e=t||i.getMenuOptions();return sr()(e,function(t,e,n){return e.disabled||t.push(n),t},[])}),_()(g()(g()(i)),"getItemByValue",function(t){var e=i.props.options;return Z()(e,{value:t})}),_()(g()(g()(i)),"getMenuItemIndexByValue",function(t,e){var n=e||i.getMenuOptions();return si()(n,["value",t])}),_()(g()(g()(i)),"getDropdownAriaOptions",function(){var t=i.props,e=t.loading,n=t.disabled,r=t.search,o=t.multiple,a=i.state.open,s={role:r?"combobox":"listbox","aria-busy":e,"aria-disabled":n,"aria-expanded":!!a};return"listbox"===s.role&&(s["aria-multiselectable"]=o),s}),_()(g()(g()(i)),"clearSearchQuery",function(){i.trySetState({searchQuery:""})}),_()(g()(g()(i)),"setValue",function(t){i.trySetState({value:t})}),_()(g()(g()(i)),"setSelectedIndex",function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,r=i.props.multiple,o=i.state.selectedIndex,a=i.getMenuOptions(e,n),s=i.getEnabledIndices(a);if(!o||o<0){var u=s[0];t=r?u:i.getMenuItemIndexByValue(e,a)||s[0]}else if(r)o>=a.length-1&&(t=s[s.length-1]);else{var c=i.getMenuItemIndexByValue(e,a);t=ae()(s,c)?c:void 0}(!t||t<0)&&(t=s[0]),i.setState({selectedIndex:t})}),_()(g()(g()(i)),"handleLabelClick",function(t,e){t.stopPropagation(),i.setState({selectedLabel:e.value});var n=i.props.onLabelClick;n&&n(t,e)}),_()(g()(g()(i)),"handleLabelRemove",function(t,e){t.stopPropagation();var n=i.state.value,r=Cn()(n,e.value);i.setValue(r),i.setSelectedIndex(r),i.handleChange(t,r)}),_()(g()(g()(i)),"moveSelectionBy",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.state.selectedIndex,n=i.getMenuOptions();if(void 0!==n&&!oi()(n,"disabled")){var r=n.length-1,o=e+t;!i.props.wrapSelection&&(o>r||o<0)?o=e:o>r?o=0:o<0&&(o=r),n[o].disabled?i.moveSelectionBy(t,o):(i.setState({selectedIndex:o}),i.scrollSelectedItemIntoView())}}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e,t),i.handleIconClick(e)}}}),_()(g()(g()(i)),"handleSearchRef",function(t){return i.searchRef=t}),_()(g()(g()(i)),"handleSizerRef",function(t){return i.sizerRef=t}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"computeSearchInputTabIndex",function(){var t=i.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(i)),"computeSearchInputWidth",function(){var t=i.state.searchQuery;if(i.sizerRef&&t){i.sizerRef.style.display="inline",i.sizerRef.textContent=t;var e=Math.ceil(i.sizerRef.getBoundingClientRect().width);return i.sizerRef.style.removeProperty("display"),e}}),_()(g()(g()(i)),"computeTabIndex",function(){var t=i.props,e=t.disabled,n=t.search,r=t.tabIndex;if(!n)return e?-1:Tt()(r)?0:r}),_()(g()(g()(i)),"scrollSelectedItemIntoView",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=t.querySelector(".item.selected");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}}),_()(g()(g()(i)),"setOpenDirection",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=i.ref.getBoundingClientRect(),n=t.clientHeight,r=document.documentElement.clientHeight-e.y-e.height-n,o=e.y-n,a=r<0&&o>r;!a!=!i.state.upward&&i.trySetState({upward:a})}}}),_()(g()(g()(i)),"open",function(t){var e=i.props,n=e.disabled,r=e.onOpen,o=e.search;n||(o&&i.searchRef&&i.searchRef.focus(),r&&r(t,i.props),i.trySetState({open:!0}),i.scrollSelectedItemIntoView())}),_()(g()(g()(i)),"close",function(t){var e=i.props.onClose;e&&e(t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleClose",function(){var t=document.activeElement===i.searchRef,e=document.activeElement===i.ref,n=t||e;t||i.ref.blur(),i.setState({focus:n})}),_()(g()(g()(i)),"toggle",function(t){return i.state.open?i.close(t):i.open(t)}),_()(g()(g()(i)),"renderText",function(){var t=i.props,e=t.multiple,n=t.placeholder,r=t.search,o=t.text,a=i.state,s=a.searchQuery,u=a.value,c=a.open,l=e?!L()(u):!Tt()(u)&&""!==u,f=Qt()(n&&!l&&"default","text",r&&s&&"filtered"),h=n;return s?h=null:o?h=o:c&&!e?h=bi()(i.getSelectedItem(),"text"):l&&(h=bi()(i.getItemByValue(u),"text")),S.a.createElement("div",{className:f,role:"alert","aria-live":"polite"},h)}),_()(g()(g()(i)),"renderSearchInput",function(){var t=i.props,e=t.search,n=t.searchInput,r=i.state.searchQuery;return e?Oi.create(n,{defaultProps:{inputRef:i.handleSearchRef,onChange:i.handleSearchChange,style:{width:i.computeSearchInputWidth()},tabIndex:i.computeSearchInputTabIndex(),value:r}}):null}),_()(g()(g()(i)),"renderSearchSizer",function(){var t=i.props,e=t.search,n=t.multiple;return e&&n?S.a.createElement("span",{className:"sizer",ref:i.handleSizerRef}):null}),_()(g()(g()(i)),"renderLabels",function(){var t=i.props,e=t.multiple,n=t.renderLabel,r=i.state,o=r.selectedLabel,a=r.value;if(e&&!L()(a)){var s=be()(a,i.getItemByValue);return be()(ri()(s),function(t,e){var r={active:t.value===o,as:"a",key:Pi(t.key,t.value),onClick:i.handleLabelClick,onRemove:i.handleLabelRemove,value:t.value};return Yn.create(n(t,e,r),{defaultProps:r})})}}),_()(g()(g()(i)),"renderOptions",function(){var t=i.props,e=t.multiple,n=t.search,r=t.noResultsMessage,o=i.state,a=o.selectedIndex,s=o.value,u=i.getMenuOptions();if(null!==r&&n&&L()(u))return S.a.createElement("div",{className:"message"},r);var c=e?function(t){return ae()(s,t)}:function(t){return t===s};return be()(u,function(t,e){return xi.create(N()({active:c(t.value),onClick:i.handleItemClick,selected:a===e},t,{key:Pi(t.key,t.value),style:N()({},t.style,{pointerEvents:"all"})}))})}),_()(g()(g()(i)),"renderMenu",function(){var t=i.props,e=t.children,n=t.direction,o=t.header,s=i.state.open,u=i.getDropdownMenuAriaOptions();if(!r.isNil(e)){var c=x.Children.only(e),l=Qt()(n,ct(s,"visible"),c.props.className);return Object(x.cloneElement)(c,N()({className:l},u))}return S.a.createElement(Ai,a()({},u,{direction:n,open:s}),ki.create(o,{autoGenerateKey:!1}),i.renderOptions())}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{searchQuery:""}}},{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),this.setSelectedIndex(n),e&&(this.open(),this.attachHandlersOnOpen())}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||(this.setValue(t.value),this.setSelectedIndex(t.value)),_n()(t.options,this.props.options)||this.setSelectedIndex(void 0,t.options)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){if(!e.focus&&this.state.focus){if(!this.isMouseDown){var n=this.props,r=n.minCharacters,i=n.openOnFocus,o=n.search,a=!o||o&&1===r&&!this.state.open;i&&a&&this.open()}this.state.open?Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter]):Dt.sub("keydown",[this.openOnArrow,this.openOnSpace]),Dt.sub("keydown",this.removeItemOnBackspace)}else if(e.focus&&!this.state.focus){var s=this.props.closeOnBlur;!this.isMouseDown&&s&&this.close(),Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace])}!e.open&&this.state.open?(this.attachHandlersOnOpen(),this.setOpenDirection(),this.scrollSelectedItemIntoView()):e.open&&!this.state.open&&(this.handleClose(),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]),Dt.unsub("click",this.closeOnDocumentClick),this.state.focus||Dt.unsub("keydown",this.removeItemOnBackspace))}},{key:"componentWillUnmount",value:function(){Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace,this.closeOnEscape]),Dt.unsub("click",this.closeOnDocumentClick)}},{key:"getDropdownMenuAriaOptions",value:function(){var t=this.props,e=t.search,n=t.multiple,r={};return e&&(r["aria-multiselectable"]=n,r.role="listbox"),r}},{key:"render",value:function(){var t=this.props,n=t.basic,r=t.button,i=t.className,o=t.compact,s=t.disabled,u=t.error,c=t.fluid,l=t.floating,f=t.icon,h=t.inline,p=t.item,d=t.labeled,v=t.loading,m=t.multiple,y=t.pointing,g=t.search,b=t.selection,_=t.scrolling,w=t.simple,E=t.trigger,T=this.state,C=T.open,x=T.upward,k=Qt()("ui",ct(C,"active visible"),ct(s,"disabled"),ct(u,"error"),ct(v,"loading"),ct(n,"basic"),ct(r,"button"),ct(o,"compact"),ct(c,"fluid"),ct(l,"floating"),ct(h,"inline"),ct(d,"labeled"),ct(p,"item"),ct(m,"multiple"),ct(g,"search"),ct(b,"selection"),ct(w,"simple"),ct(_,"scrolling"),ct(x,"upward"),ft(y,"pointing"),"dropdown",i),N=re(e,this.props),A=ie(e,this.props),I=this.getDropdownAriaOptions(A,this.props);return S.a.createElement(A,a()({},N,I,{className:k,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex(),ref:this.handleRef}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),E||this.renderText(),Nn.create(f,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu())}}]),e}(V);function Di(t){return S.a.createElement(Ri,a()({},t,{selection:!0}))}_()(Ri,"defaultProps",{additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:function(t){return t.text},searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0}),_()(Ri,"autoControlledProps",["open","searchQuery","selectedLabel","value","upward"]),_()(Ri,"Divider",wi),_()(Ri,"Header",ki),_()(Ri,"Item",xi),_()(Ri,"Menu",Ai),_()(Ri,"SearchInput",Oi),_()(Ri,"handledProps",["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","closeOnBlur","closeOnChange","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"]),Ri.propTypes={},Di.handledProps=["options"],Di.propTypes={},Di.Divider=Ri.Divider,Di.Header=Ri.Header,Di.Item=Ri.Item,Di.Menu=Ri.Menu;var Mi=Di,Li=n(187),Fi=n.n(Li),Ui=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"focus",function(){return r.ref.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleInput",function(t){var e=bi()(t,"target.value");C()(r.props,"onInput",t,N()({},r.props,{value:e})),r.updateHeight()}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"removeAutoHeightStyles",function(){r.ref.style.height=null,r.ref.style.resize=null}),_()(g()(g()(r)),"updateHeight",function(){var t=r.props.autoHeight;if(r.ref&&t){var e=window.getComputedStyle(r.ref),n=e.minHeight,i=e.borderBottomWidth,o=e.borderTopWidth,a=Fi()([i,o].map(function(t){return parseFloat(t)}));r.ref.style.height="auto",r.ref.style.overflowY="hidden",r.ref.style.height="".concat(Math.max(parseFloat(n),Math.ceil(r.ref.scrollHeight+a)),"px"),r.ref.style.overflowY=""}}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.updateHeight()}},{key:"componentDidUpdate",value:function(t){!this.props.autoHeight&&t.autoHeight&&this.removeAutoHeightStyles(),(this.props.autoHeight&&!t.autoHeight||t.value!==this.props.value)&&this.updateHeight()}},{key:"render",value:function(){var t=this.props,n=t.autoHeight,r=t.rows,i=t.style,o=t.value,s=re(e,this.props),u=ie(e,this.props),c=n?"none":"";return S.a.createElement(u,a()({},s,{onChange:this.handleChange,onInput:this.handleInput,ref:this.handleRef,rows:r,style:N()({resize:c},i),value:o}))}}]),e}(x.Component);_()(Ui,"defaultProps",{as:"textarea",rows:3}),_()(Ui,"handledProps",["as","autoHeight","onChange","onInput","rows","style","value"]),Ui.propTypes={};var ji=Ui,Bi=n(139),qi=n.n(Bi),Vi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"handleOnHide",function(t,e){var r=e.reactKey;n.setState(function(t){var e=N()({},t.children);return delete e[r],{children:e}})}),_()(g()(g()(n)),"wrapChild",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.props,i=r.animation,o=r.duration,a=t.key,s=e.visible,u=void 0===s||s,c=e.transitionOnMount,l=void 0!==c&&c;return S.a.createElement(Hi,{animation:i,duration:o,key:a,onHide:n.handleOnHide,reactKey:a,transitionOnMount:l,visible:u},t)});var a=n.props.children;return n.state={children:qi()(Y(a),function(t){return n.wrapChild(t)})},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.state.children,r=Y(t.children),i=$(n,r);K()(i,function(t,o){var a=E()(n,o),s=E()(r,o),u=n[o],c=!bi()(u,"props.visible");if(!s||a&&!c)if(s||!a||c){var l=u.props,f=l.visible,h=l.transitionOnMount;i[o]=e.wrapChild(t,{transitionOnMount:h,visible:f})}else i[o]=Object(x.cloneElement)(u,{visible:!1});else i[o]=e.wrapChild(t,{transitionOnMount:!0})}),this.setState({children:i})}},{key:"render",value:function(){var t=this.state.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,r,Ce()(t))}}]),e}(S.a.Component);_()(Vi,"defaultProps",{animation:"fade",duration:500}),_()(Vi,"handledProps",["animation","as","children","duration"]),Vi.propTypes={};var Wi={ENTERING:"show",EXITING:"hide"},Hi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(n)),"handleStart",function(){var t=n.props.duration,e=n.nextStatus;n.nextStatus=null,n.setSafeState({status:e,animating:!0},function(){var r=Wi[e],i=gn(t,r);C()(n.props,"onStart",null,N()({},n.props,{status:e})),setTimeout(n.handleComplete,i)})}),_()(g()(g()(n)),"handleComplete",function(){var t=n.state.status;if(C()(n.props,"onComplete",null,N()({},n.props,{status:t})),n.nextStatus)n.handleStart();else{var r=n.computeCompletedStatus(),i=t===e.ENTERING?"onShow":"onHide";n.setSafeState({status:r,animating:!1},function(){C()(n.props,i,null,N()({},n.props,{status:r}))})}}),_()(g()(g()(n)),"updateStatus",function(){var t=n.state.animating;n.nextStatus&&(n.nextStatus=n.computeNextStatus(),t||n.handleStart())}),_()(g()(g()(n)),"computeClasses",function(){var t=n.props,r=t.animation,o=t.children,a=n.state,s=a.animating,u=a.status,c=bi()(o,"props.className");return ae()(i.DIRECTIONAL_TRANSITIONS,r)?Qt()(r,c,ct(s,"animating"),ct(u===e.ENTERING,"in"),ct(u===e.EXITING,"out"),ct(u===e.EXITED,"hidden"),ct(u!==e.EXITED,"visible"),"transition"):Qt()(r,c,ct(s,"animating transition"))}),_()(g()(g()(n)),"computeCompletedStatus",function(){var t=n.props.unmountOnHide;return n.state.status===e.ENTERING?e.ENTERED:t?e.UNMOUNTED:e.EXITED}),_()(g()(g()(n)),"computeInitialStatuses",function(){var t=n.props,r=t.visible,i=t.mountOnShow,o=t.transitionOnMount,a=t.unmountOnHide;return r?o?{initial:e.EXITED,next:e.ENTERING}:{initial:e.ENTERED}:i||a?{initial:e.UNMOUNTED}:{initial:e.EXITED}}),_()(g()(g()(n)),"computeNextStatus",function(){var t=n.state,r=t.animating,i=t.status;return r?i===e.ENTERING?e.EXITING:e.ENTERING:i===e.ENTERED?e.EXITING:e.ENTERING}),_()(g()(g()(n)),"computeStatuses",function(t){var r=n.state.status;return t.visible?{current:r===e.UNMOUNTED&&e.EXITED,next:r!==e.ENTERING&&r!==e.ENTERED&&e.ENTERING}:{next:(r===e.ENTERING||r===e.ENTERED)&&e.EXITING}}),_()(g()(g()(n)),"computeStyle",function(){var t=n.props,e=t.children,r=t.duration,i=n.state.status,o=bi()(e,"props.style"),a=Wi[i],s=a&&"".concat(gn(r,a),"ms");return N()({},o,{animationDuration:s})}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)});var s=n.computeInitialStatuses(),c=s.initial,l=s.next;return n.nextStatus=l,n.state={status:c},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.updateStatus()}},{key:"componentWillReceiveProps",value:function(t){var e=this.computeStatuses(t),n=e.current,r=e.next;this.nextStatus=r,n&&this.setSafeState({status:n})}},{key:"componentDidUpdate",value:function(){this.updateStatus()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var t=this.props.children;return this.state.status===e.UNMOUNTED?null:Object(x.cloneElement)(t,{className:this.computeClasses(),style:this.computeStyle()})}}]),e}(x.Component);_()(Hi,"defaultProps",{animation:"fade",duration:500,visible:!0,mountOnShow:!0,transitionOnMount:!1,unmountOnHide:!1}),_()(Hi,"ENTERED","ENTERED"),_()(Hi,"ENTERING","ENTERING"),_()(Hi,"EXITED","EXITED"),_()(Hi,"EXITING","EXITING"),_()(Hi,"UNMOUNTED","UNMOUNTED"),_()(Hi,"Group",Vi),_()(Hi,"handledProps",["animation","children","duration","mountOnShow","onComplete","onHide","onShow","onStart","reactKey","transitionOnMount","unmountOnHide","visible"]),Hi.propTypes={};var zi=function(t){function e(t){var n;return u()(this,e),n=h()(this,d()(e).call(this,t)),_()(g()(g()(n)),"handlePortalClose",function(){n.setState({portalOpen:!1})}),_()(g()(g()(n)),"handlePortalOpen",function(){n.setState({portalOpen:!0})}),_()(g()(g()(n)),"handleTransitionHide",function(t,e){var r=n.state.portalOpen;n.setState({transitionVisible:!1}),C()(n.props,"onClose",null,N()({},e,{portalOpen:!1,transitionVisible:!1})),C()(n.props,"onHide",null,N()({},e,{portalOpen:r,transitionVisible:!1}))}),_()(g()(g()(n)),"handleTransitionStart",function(t,e){var r=n.state.portalOpen,i=e.status===Hi.ENTERING;C()(n.props,"onStart",null,N()({},e,{portalOpen:r,transitionVisible:i})),i&&(n.setState({transitionVisible:i}),C()(n.props,"onOpen",null,N()({},e,{transitionVisible:i,portalOpen:!0})))}),n.state={portalOpen:t.open},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.open;this.setState({portalOpen:e})}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.transition,i=this.state,o=i.portalOpen,s=i.transitionVisible,u=o||s,c=re(e,this.props);return S.a.createElement(Mn,a()({},c,{open:u,onOpen:this.handlePortalOpen,onClose:this.handlePortalClose}),S.a.createElement(Hi,a()({},r,{transitionOnMount:!0,onStart:this.handleTransitionStart,onHide:this.handleTransitionHide,visible:o}),n))}}]),e}(x.Component);_()(zi,"defaultProps",{transition:{animation:"scale",duration:400}}),_()(zi,"handledProps",["children","onClose","onHide","onOpen","onStart","open","transition"]),zi.propTypes={};var Ki=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"calculations",{bottomPassed:!1,bottomVisible:!1,fits:!1,passing:!1,offScreen:!1,onScreen:!1,topPassed:!1,topVisible:!1}),_()(g()(g()(r)),"firedCallbacks",[]),_()(g()(g()(r)),"fire",function(t,e){var n=t.callback,i=t.name,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=r.props,s=a.continuous,u=a.once,c=r.calculations[e]!==o,l=s||r.calculations[e]!==r.oldCalculations[e];c&&l&&r.execute(n,i),u||(r.firedCallbacks=Cn()(r.firedCallbacks,i))}),_()(g()(g()(r)),"handleUpdate",function(){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(r.update))}),_()(g()(g()(r)),"update",function(){if(r.mounted){r.ticking=!1,r.oldCalculations=r.calculations,r.calculations=r.computeCalculations(),r.pageYOffset=window.pageYOffset;var t=r.props,e=t.onBottomPassed,n=t.onBottomPassedReverse,i=t.onBottomVisible,o=t.onBottomVisibleReverse,a=t.onPassing,s=t.onPassingReverse,u=t.onTopPassed,c=t.onTopPassedReverse,l=t.onTopVisible,f=t.onTopVisibleReverse,h=t.onOffScreen,p=t.onOnScreen,d=t.updateOn,v={bottomPassed:{callback:e,name:"onBottomPassed"},bottomVisible:{callback:i,name:"onBottomVisible"},passing:{callback:a,name:"onPassing"},offScreen:{callback:h,name:"onOffScreen"},onScreen:{callback:p,name:"onOnScreen"},topPassed:{callback:u,name:"onTopPassed"},topVisible:{callback:l,name:"onTopVisible"}},m={bottomPassed:{callback:n,name:"onBottomPassedReverse"},bottomVisible:{callback:o,name:"onBottomVisibleReverse"},passing:{callback:s,name:"onPassingReverse"},topPassed:{callback:c,name:"onTopPassedReverse"},topVisible:{callback:f,name:"onTopVisibleReverse"}};C()(r.props,"onUpdate",null,N()({},r.props,{calculations:r.calculations})),r.fireOnPassed(),K()(m,function(t,e){return r.fire(t,e,!0)}),K()(v,function(t,e){return r.fire(t,e)}),"repaint"===d&&r.handleUpdate()}}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.continuous,n=t.once,r=t.context,i=t.updateOn;(e!==this.props.continuous||n!==this.props.once||i!==this.props.updateOn)&&(this.firedCallbacks=[]),r===this.props.context&&i===this.props.updateOn||(this.unattachHandlers(this.props.context),this.attachHandlers(r,i))}},{key:"componentDidMount",value:function(){if(this.mounted=!0,St()){var t=this.props,e=t.context,n=t.fireOnMount,r=t.updateOn;this.pageYOffset=window.pageYOffset,this.attachHandlers(e,r),n&&this.update()}}},{key:"componentWillUnmount",value:function(){var t=this.props.context;this.unattachHandlers(t),this.mounted=!1}},{key:"attachHandlers",value:function(t,e){"events"!==e?this.handleUpdate():t&&(Dt.sub("resize",this.handleUpdate,{target:t}),Dt.sub("scroll",this.handleUpdate,{target:t}))}},{key:"unattachHandlers",value:function(t){t&&(Dt.unsub("resize",this.handleUpdate,{target:t}),Dt.unsub("scroll",this.handleUpdate,{target:t})),this.frameId&&cancelAnimationFrame(this.frameId)}},{key:"execute",value:function(t,e){var n=this.props.continuous;t&&(!n&&ae()(this.firedCallbacks,e)||(t(null,N()({},this.props,{calculations:this.calculations})),this.firedCallbacks.push(e)))}},{key:"fireOnPassed",value:function(){var t=this,e=this.calculations,n=e.percentagePassed,r=e.pixelsPassed,i=this.props.onPassed;K()(i,function(e,i){var o=Number(i);if(o&&r>=o)t.execute(e,i);else{var a="".concat(i).match(/^(\d+)%$/);if(a){var s=Number(a[1])/100;n>=s&&t.execute(e,i)}}})}},{key:"computeCalculations",value:function(){var t,e=this.props.offset,n=this.ref.getBoundingClientRect(),r=n.bottom,i=n.height,o=n.top,a=n.width,s="number"==typeof(t=e)||"string"==typeof t?[t,t]:t,u=H()(s,2),c=u[0],l=u[1],f=window.pageYOffset>this.pageYOffset?"down":"up",h=o<c,p=r<l,d=p?0:Math.max(-1*o,0),v=d/i,m=r>=l&&r<=window.innerHeight,y=o>=c&&o<=window.innerHeight,g=(y||h)&&!p;return{bottomPassed:p,bottomVisible:m,direction:f,fits:y&&m,height:i,passing:h&&!p,percentagePassed:v,pixelsPassed:d,offScreen:!g,onScreen:g,topPassed:h,topVisible:y,width:a}}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,a()({},r,{ref:this.handleRef}),t)}}]),e}(x.Component);function Gi(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("divider",n),u=re(Gi,t),c=ie(Gi,t);return Tt()(o)?Tt()(i)?S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?"/":e):S.a.createElement(c,a()({},u,{className:s}),i):Nn.create(o,{defaultProps:N()({},u,{className:s}),autoGenerateKey:!1})}_()(Ki,"defaultProps",{context:St()?window:null,continuous:!1,offset:[0,0],once:!0,updateOn:"events"}),_()(Ki,"handledProps",["as","children","context","continuous","fireOnMount","offset","onBottomPassed","onBottomPassedReverse","onBottomVisible","onBottomVisibleReverse","onOffScreen","onOnScreen","onPassed","onPassing","onPassingReverse","onTopPassed","onTopPassedReverse","onTopVisible","onTopVisibleReverse","onUpdate","once","updateOn"]),Ki.propTypes={},Gi.handledProps=["as","children","className","content","icon"],Gi.propTypes={},Gi.create=Xt(Gi,function(t){return{icon:t}});var Qi=Gi,Yi=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){var t=r.props,e=t.link,n=t.onClick;if(e||n)return"a"}),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.href,c=Qt()(ct(n,"active"),"section",o),l=re(e,this.props),f=ie(e,this.props,this.computeElementType);return S.a.createElement(f,a()({},l,{className:c,href:u,onClick:this.handleClick}),r.isNil(i)?s:i)}}]),e}(x.Component);function Xi(t){var e=t.children,n=t.className,i=t.divider,o=t.icon,s=t.sections,u=t.size,c=Qt()("ui",u,"breadcrumb",n),l=re(Xi,t),f=ie(Xi,t);if(!r.isNil(e))return S.a.createElement(f,a()({},l,{className:c}),e);var h=[];return B()(s,function(t,e){var n=Yi.create(t);if(h.push(n),e!==s.length-1){var r="".concat(n.key,"_divider")||JSON.stringify(t);h.push(Qi.create({content:i,icon:o,key:r}))}}),S.a.createElement(f,a()({},l,{className:c}),h)}_()(Yi,"handledProps",["active","as","children","className","content","href","link","onClick"]),Yi.propTypes={},Yi.create=Xt(Yi,function(t){return{content:t,link:!0}}),Xi.handledProps=["as","children","className","divider","icon","sections","size"],Xi.propTypes={},Xi.Divider=Qi,Xi.Section=Yi;var $i=Xi;function Ji(t){var e=t.children,n=t.className,i=t.content,o=t.control,s=t.disabled,u=t.error,c=t.inline,l=t.label,f=t.required,h=t.type,p=t.width,d=Qt()(ct(s,"disabled"),ct(u,"error"),ct(c,"inline"),ct(f,"required"),vt(p,"wide"),"field",n),v=re(Ji,t),m=ie(Ji,t);if(Tt()(o))return Tt()(l)?S.a.createElement(m,a()({},v,{className:d}),r.isNil(e)?i:e):S.a.createElement(m,a()({},v,{className:d}),ee(l,{autoGenerateKey:!1}));var y=N()({},v,{content:i,children:e,disabled:s,required:f,type:h});return"input"!==o||"checkbox"!==h&&"radio"!==h?o===Xr||o===Jr?S.a.createElement(m,{className:d},Object(x.createElement)(o,N()({},y,{label:l}))):S.a.createElement(m,{className:d},ee(l,{defaultProps:{htmlFor:bi()(y,"id")},autoGenerateKey:!1}),Object(x.createElement)(o,y)):S.a.createElement(m,{className:d},S.a.createElement("label",null,Object(x.createElement)(o,y)," ",l))}Ji.handledProps=["as","children","className","content","control","disabled","error","inline","label","required","type","width"],Ji.propTypes={};var Zi=Ji;function to(t){var e=t.control,n=re(to,t),r=ie(to,t);return S.a.createElement(r,a()({},n,{control:e}))}to.handledProps=["as","control"],to.propTypes={},to.defaultProps={as:Zi,control:rr};var eo=to;function no(t){var e=t.control,n=re(no,t),r=ie(no,t);return S.a.createElement(r,a()({},n,{control:e}))}no.handledProps=["as","control"],no.propTypes={},no.defaultProps={as:Zi,control:Xr};var ro=no;function io(t){var e=t.control,n=re(io,t),r=ie(io,t);return S.a.createElement(r,a()({},n,{control:e}))}io.handledProps=["as","control"],io.propTypes={},io.defaultProps={as:Zi,control:Ri};var oo=io;function ao(t){var e=t.children,n=t.className,r=t.grouped,i=t.inline,o=t.unstackable,s=t.widths,u=Qt()(ct(r,"grouped"),ct(i,"inline"),ct(o,"unstackable"),vt(s,null,!0),"fields",n),c=re(ao,t),l=ie(ao,t);return S.a.createElement(l,a()({},c,{className:u}),e)}ao.handledProps=["as","children","className","grouped","inline","unstackable","widths"],ao.propTypes={};var so=ao,uo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeIcon",function(){var t=r.props,e=t.loading,n=t.icon;return Tt()(n)?e?"spinner":void 0:n}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:void 0:n}),_()(g()(g()(r)),"focus",function(){return r.inputRef.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleChildOverrides",function(t,e){return N()({},e,t.props,{ref:function(e){C()(t,"ref",e),r.handleInputRef(e)}})}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"partitionProps",function(){var t=r.props,n=t.disabled,i=t.type,o=r.computeTabIndex(),a=re(e,r.props),s=ce(a),u=H()(s,2),c=u[0],l=u[1];return[N()({},c,{disabled:n,type:i,tabIndex:o,onChange:r.handleChange,ref:r.handleInputRef}),l]}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.action,o=n.actionPosition,s=n.children,u=n.className,c=n.disabled,l=n.error,f=n.fluid,h=n.focus,p=n.icon,d=n.iconPosition,v=n.input,m=n.inverted,y=n.label,g=n.labelPosition,b=n.loading,_=n.size,w=n.transparent,E=n.type,T=Qt()("ui",_,ct(c,"disabled"),ct(l,"error"),ct(f,"fluid"),ct(h,"focus"),ct(m,"inverted"),ct(b,"loading"),ct(w,"transparent"),lt(o,"action")||ct(i,"action"),lt(d,"icon")||ct(p||b,"icon"),lt(g,"labeled")||ct(y,"labeled"),"input",u),C=ie(e,this.props),k=this.partitionProps(),N=H()(k,2),A=N[0],I=N[1];if(!r.isNil(s)){var O=be()(x.Children.toArray(s),function(e){return"input"!==e.type?e:Object(x.cloneElement)(e,t.handleChildOverrides(e,A))});return S.a.createElement(C,a()({},I,{className:T}),O)}var P=rr.create(i,{autoGenerateKey:!1}),R=Yn.create(y,{defaultProps:{className:Qt()("label",ae()(g,"corner")&&g)},autoGenerateKey:!1});return S.a.createElement(C,a()({},I,{className:T}),"left"===o&&P,"right"!==g&&R,te(v||E,{defaultProps:A,autoGenerateKey:!1}),"left"!==o&&P,Nn.create(this.computeIcon(),{autoGenerateKey:!1}),"right"===g&&R)}}]),e}(x.Component);_()(uo,"defaultProps",{type:"text"}),_()(uo,"handledProps",["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"]),uo.propTypes={},uo.create=Xt(uo,function(t){return{type:t}});var co=uo;function lo(t){var e=t.control,n=re(lo,t),r=ie(lo,t);return S.a.createElement(r,a()({},n,{control:e}))}lo.handledProps=["as","control"],lo.propTypes={},lo.defaultProps={as:Zi,control:co};var fo=lo;function ho(t){var e=t.control,n=re(ho,t),r=ie(ho,t);return S.a.createElement(r,a()({},n,{control:e}))}ho.handledProps=["as","control"],ho.propTypes={},ho.defaultProps={as:Zi,control:Jr};var po=ho;function vo(t){var e=t.control,n=t.options,r=re(vo,t),i=ie(vo,t);return S.a.createElement(i,a()({},r,{control:e,options:n}))}vo.handledProps=["as","control","options"],vo.propTypes={},vo.defaultProps={as:Zi,control:Mi};var mo=vo;function yo(t){var e=t.control,n=re(yo,t),r=ie(yo,t);return S.a.createElement(r,a()({},n,{control:e}))}yo.handledProps=["as","control"],yo.propTypes={},yo.defaultProps={as:Zi,control:ji};var go=yo,bo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleSubmit",function(t){"string"!=typeof r.props.action&&C()(t,"preventDefault");for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];C.a.apply(void 0,[r.props,"onSubmit",t,r.props].concat(n))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.action,r=t.children,i=t.className,o=t.error,s=t.inverted,u=t.loading,c=t.reply,l=t.size,f=t.success,h=t.unstackable,p=t.warning,d=t.widths,v=Qt()("ui",l,ct(o,"error"),ct(s,"inverted"),ct(u,"loading"),ct(c,"reply"),ct(f,"success"),ct(h,"unstackable"),ct(p,"warning"),vt(d,null,!0),"form",i),m=re(e,this.props),y=ie(e,this.props);return S.a.createElement(y,a()({},m,{action:n,className:v,onSubmit:this.handleSubmit}),r)}}]),e}(x.Component);_()(bo,"defaultProps",{as:"form"}),_()(bo,"Field",Zi),_()(bo,"Button",eo),_()(bo,"Checkbox",ro),_()(bo,"Dropdown",oo),_()(bo,"Group",so),_()(bo,"Input",fo),_()(bo,"Radio",po),_()(bo,"Select",mo),_()(bo,"TextArea",go),_()(bo,"handledProps",["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"]),bo.propTypes={};var _o=bo;function wo(t){var e=t.children,n=t.className,r=t.computer,i=t.color,o=t.floated,s=t.largeScreen,u=t.mobile,c=t.only,l=t.stretched,f=t.tablet,h=t.textAlign,p=t.verticalAlign,d=t.widescreen,v=t.width,m=Qt()(i,ct(l,"stretched"),ht(c,"only"),pt(h),lt(o,"floated"),dt(p),vt(r,"wide computer"),vt(s,"wide large screen"),vt(u,"wide mobile"),vt(f,"wide tablet"),vt(d,"wide widescreen"),vt(v,"wide"),"column",n),y=re(wo,t),g=ie(wo,t);return S.a.createElement(g,a()({},y,{className:m}),e)}wo.handledProps=["as","children","className","color","computer","floated","largeScreen","mobile","only","stretched","tablet","textAlign","verticalAlign","widescreen","width"],wo.propTypes={},wo.create=Xt(wo,function(t){return{children:t}});var Eo=wo;function To(t){var e=t.centered,n=t.children,r=t.className,i=t.color,o=t.columns,s=t.divided,u=t.only,c=t.reversed,l=t.stretched,f=t.textAlign,h=t.verticalAlign,p=Qt()(i,ct(e,"centered"),ct(s,"divided"),ct(l,"stretched"),ht(u,"only"),ht(c,"reversed"),pt(f),dt(h),vt(o,"column",!0),"row",r),d=re(To,t),v=ie(To,t);return S.a.createElement(v,a()({},d,{className:p}),n)}To.handledProps=["as","centered","children","className","color","columns","divided","only","reversed","stretched","textAlign","verticalAlign"],To.propTypes={};var Co=To;function xo(t){var e=t.celled,n=t.centered,r=t.children,i=t.className,o=t.columns,s=t.container,u=t.divided,c=t.doubling,l=t.inverted,f=t.padded,h=t.relaxed,p=t.reversed,d=t.stackable,v=t.stretched,m=t.textAlign,y=t.verticalAlign,g=Qt()("ui",ct(n,"centered"),ct(s,"container"),ct(c,"doubling"),ct(l,"inverted"),ct(d,"stackable"),ct(v,"stretched"),ft(e,"celled"),ft(u,"divided"),ft(f,"padded"),ft(h,"relaxed"),ht(p,"reversed"),pt(m),dt(y),vt(o,"column",!0),"grid",i),b=re(xo,t),_=ie(xo,t);return S.a.createElement(_,a()({},b,{className:g}),r)}xo.handledProps=["as","celled","centered","children","className","columns","container","divided","doubling","inverted","padded","relaxed","reversed","stackable","stretched","textAlign","verticalAlign"],xo.Column=Eo,xo.Row=Co,xo.propTypes={};var So=xo;function ko(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(ko,t),u=ie(ko,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ko.handledProps=["as","children","className","content"],ko.propTypes={};var No=ko;function Ao(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ao,t),u=ie(Ao,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ao.handledProps=["as","children","className","content"],Ao.propTypes={},Ao.create=Xt(Ao,function(t){return{content:t}});var Io=Ao;function Oo(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Oo,t),u=ie(Oo,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Oo.handledProps=["as","children","className","content"],Oo.propTypes={},Oo.defaultProps={as:"li"},Oo.create=Xt(Oo,function(t){return{content:t}});var Po=Oo;function Ro(t){var e=t.children,n=t.className,i=t.items,o=Qt()("list",n),s=re(Ro,t),u=ie(Ro,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?be()(i,Po.create):e)}Ro.handledProps=["as","children","className","items"],Ro.propTypes={},Ro.defaultProps={as:"ul"},Ro.create=Xt(Ro,function(t){return{items:t}});var Do=Ro,Mo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDismiss",function(t){var e=r.props.onDismiss;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.attached,i=t.children,o=t.className,s=t.color,u=t.compact,c=t.content,l=t.error,f=t.floating,h=t.header,p=t.hidden,d=t.icon,v=t.info,m=t.list,y=t.negative,g=t.onDismiss,b=t.positive,_=t.size,w=t.success,E=t.visible,T=t.warning,C=Qt()("ui",s,_,ct(u,"compact"),ct(l,"error"),ct(f,"floating"),ct(p,"hidden"),ct(d,"icon"),ct(v,"info"),ct(y,"negative"),ct(b,"positive"),ct(w,"success"),ct(E,"visible"),ct(T,"warning"),ft(n,"attached"),"message",o),x=g&&S.a.createElement(Nn,{name:"close",onClick:this.handleDismiss}),k=re(e,this.props),N=ie(e,this.props);return r.isNil(i)?S.a.createElement(N,a()({},k,{className:C}),x,Nn.create(d,{autoGenerateKey:!1}),(!Tt()(h)||!Tt()(c)||!Tt()(m))&&S.a.createElement(No,null,Io.create(h,{autoGenerateKey:!1}),Do.create(m,{autoGenerateKey:!1}),ne(c,{autoGenerateKey:!1}))):S.a.createElement(N,a()({},k,{className:C}),x,i)}}]),e}(x.Component);function Lo(t){var e=t.children,n=t.className,r=Qt()(n),i=re(Lo,t),o=ie(Lo,t);return S.a.createElement(o,a()({},i,{className:r}),e)}_()(Mo,"Content",No),_()(Mo,"Header",Io),_()(Mo,"List",Do),_()(Mo,"Item",Po),_()(Mo,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),Mo.propTypes={},Lo.handledProps=["as","children","className"],Lo.defaultProps={as:"tbody"},Lo.propTypes={};var Fo=Lo;function Uo(t){var e=t.active,n=t.children,i=t.className,o=t.collapsing,s=t.content,u=t.disabled,c=t.error,l=t.icon,f=t.negative,h=t.positive,p=t.selectable,d=t.singleLine,v=t.textAlign,m=t.verticalAlign,y=t.warning,g=t.width,b=Qt()(ct(e,"active"),ct(o,"collapsing"),ct(u,"disabled"),ct(c,"error"),ct(f,"negative"),ct(h,"positive"),ct(p,"selectable"),ct(d,"single line"),ct(y,"warning"),pt(v),dt(m),vt(g,"wide"),i),_=re(Uo,t),w=ie(Uo,t);return r.isNil(n)?S.a.createElement(w,a()({},_,{className:b}),Nn.create(l),s):S.a.createElement(w,a()({},_,{className:b}),n)}Uo.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],Uo.defaultProps={as:"td"},Uo.propTypes={},Uo.create=Xt(Uo,function(t){return{content:t}});var jo=Uo;function Bo(t){var e=t.children,n=t.className,i=t.content,o=t.fullWidth,s=Qt()(ct(o,"full-width"),n),u=re(Bo,t),c=ie(Bo,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bo.handledProps=["as","children","className","content","fullWidth"],Bo.defaultProps={as:"thead"},Bo.propTypes={};var qo=Bo;function Vo(t){var e=t.as,n=re(Vo,t);return S.a.createElement(qo,a()({},n,{as:e}))}Vo.handledProps=["as"],Vo.propTypes={},Vo.defaultProps={as:"tfoot"};var Wo=Vo;function Ho(t){var e=t.as,n=t.className,r=t.sorted,i=Qt()(lt(r,"sorted"),n),o=re(Ho,t);return S.a.createElement(jo,a()({},o,{as:e,className:i}))}Ho.handledProps=["as","className","sorted"],Ho.propTypes={},Ho.defaultProps={as:"th"};var zo=Ho;function Ko(t){var e=t.active,n=t.cellAs,i=t.cells,o=t.children,s=t.className,u=t.disabled,c=t.error,l=t.negative,f=t.positive,h=t.textAlign,p=t.verticalAlign,d=t.warning,v=Qt()(ct(e,"active"),ct(u,"disabled"),ct(c,"error"),ct(l,"negative"),ct(f,"positive"),ct(d,"warning"),pt(h),dt(p),s),m=re(Ko,t),y=ie(Ko,t);return r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(i,function(t){return jo.create(t,{defaultProps:{as:n}})})):S.a.createElement(y,a()({},m,{className:v}),o)}Ko.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],Ko.defaultProps={as:"tr",cellAs:"td"},Ko.propTypes={},Ko.create=Xt(Ko,function(t){return{cells:t}});var Go=Ko;function Qo(t){var e=t.attached,n=t.basic,i=t.celled,o=t.children,s=t.className,u=t.collapsing,c=t.color,l=t.columns,f=t.compact,h=t.definition,p=t.fixed,d=t.footerRow,v=t.headerRow,m=t.inverted,y=t.padded,g=t.renderBodyRow,b=t.selectable,_=t.singleLine,w=t.size,E=t.sortable,T=t.stackable,C=t.striped,x=t.structured,k=t.tableData,N=t.textAlign,A=t.unstackable,I=t.verticalAlign,O=Qt()("ui",c,w,ct(i,"celled"),ct(u,"collapsing"),ct(h,"definition"),ct(p,"fixed"),ct(m,"inverted"),ct(b,"selectable"),ct(_,"single line"),ct(E,"sortable"),ct(T,"stackable"),ct(C,"striped"),ct(x,"structured"),ct(A,"unstackable"),ft(e,"attached"),ft(n,"basic"),ft(f,"compact"),ft(y,"padded"),pt(N),dt(I),vt(l,"column"),"table",s),P=re(Qo,t),R=ie(Qo,t);return r.isNil(o)?S.a.createElement(R,a()({},P,{className:O}),v&&S.a.createElement(qo,null,Go.create(v,{defaultProps:{cellAs:"th"}})),S.a.createElement(Fo,null,g&&be()(k,function(t,e){return Go.create(g(t,e))})),d&&S.a.createElement(Wo,null,Go.create(d))):S.a.createElement(R,a()({},P,{className:O}),o)}Qo.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],Qo.defaultProps={as:"table"},Qo.propTypes={},Qo.Body=Fo,Qo.Cell=jo,Qo.Footer=Wo,Qo.Header=qo,Qo.HeaderCell=zo,Qo.Row=Go;var Yo=Qo;function Xo(t){var e=t.children,n=t.className,i=t.content,o=t.fluid,s=t.text,u=t.textAlign,c=Qt()("ui",ct(s,"text"),ct(o,"fluid"),pt(u),"container",n),l=re(Xo,t),f=ie(Xo,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Xo.handledProps=["as","children","className","content","fluid","text","textAlign"],Xo.propTypes={};var $o=Xo;function Jo(t){var e=t.children,n=t.className,i=t.clearing,o=t.content,s=t.fitted,u=t.hidden,c=t.horizontal,l=t.inverted,f=t.section,h=t.vertical,p=Qt()("ui",ct(i,"clearing"),ct(s,"fitted"),ct(u,"hidden"),ct(c,"horizontal"),ct(l,"inverted"),ct(f,"section"),ct(h,"vertical"),"divider",n),d=re(Jo,t),v=ie(Jo,t);return S.a.createElement(v,a()({},d,{className:p}),r.isNil(e)?o:e)}Jo.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],Jo.propTypes={};var Zo=Jo;function ta(t){var e=t.children,n=t.className,i=t.content,o=Qt()("sub header",n),s=re(ta,t),u=ie(ta,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ta.handledProps=["as","children","className","content"],ta.propTypes={},ta.create=Xt(ta,function(t){return{content:t}});var ea=ta;function na(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(na,t),u=ie(na,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}na.handledProps=["as","children","className","content"],na.propTypes={};var ra=na;function ia(t){var e=t.attached,n=t.block,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.dividing,f=t.floated,h=t.icon,p=t.image,d=t.inverted,v=t.size,m=t.sub,y=t.subheader,g=t.textAlign,b=Qt()("ui",s,v,ct(n,"block"),ct(c,"disabled"),ct(l,"dividing"),lt(f,"floated"),ct(!0===h,"icon"),ct(!0===p,"image"),ct(d,"inverted"),ct(m,"sub"),ft(e,"attached"),pt(g),"header",o),_=re(ia,t),w=ie(ia,t);if(!r.isNil(i))return S.a.createElement(w,a()({},_,{className:b}),i);var E=Nn.create(h,{autoGenerateKey:!1}),T=Hn.create(p,{autoGenerateKey:!1}),C=ea.create(y,{autoGenerateKey:!1});return E||T?S.a.createElement(w,a()({},_,{className:b}),E||T,(u||C)&&S.a.createElement(ra,null,u,C)):S.a.createElement(w,a()({},_,{className:b}),u,C)}ia.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],ia.propTypes={},ia.Content=ra,ia.Subheader=ea;var oa=ia;function aa(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"description"),s=re(aa,t),u=ie(aa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}aa.handledProps=["as","children","className","content"],aa.propTypes={},aa.create=Xt(aa,function(t){return{content:t}});var sa=aa;function ua(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(ua,t),u=ie(ua,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ua.handledProps=["as","children","className","content"],ua.propTypes={},ua.create=Xt(ua,function(t){return{content:t}});var ca=ua;function la(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.floated,u=t.header,c=t.verticalAlign,l=Qt()(lt(s,"floated"),dt(c),"content",n),f=re(la,t),h=ie(la,t);return r.isNil(e)?S.a.createElement(h,a()({},f,{className:l}),ca.create(u),sa.create(o),i):S.a.createElement(h,a()({},f,{className:l}),e)}la.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],la.propTypes={},la.create=Xt(la,function(t){return{content:t}});var fa=la;function ha(t){var e=t.className,n=t.verticalAlign,r=Qt()(dt(n),e),i=re(ha,t);return S.a.createElement(Nn,a()({},i,{className:r}))}ha.handledProps=["className","verticalAlign"],ha.propTypes={},ha.create=Xt(ha,function(t){return{name:t}});var pa=ha,da=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.description,c=t.disabled,l=t.header,f=t.icon,h=t.image,p=t.value,d=ie(e,this.props),v=Qt()(ct(n,"active"),ct(c,"disabled"),ct("li"!==d,"item"),o),m=re(e,this.props),y="li"===d?{value:p}:{"data-value":p};if(!r.isNil(i))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),i);var g=pa.create(f,{autoGenerateKey:!1}),b=Hn.create(h,{autoGenerateKey:!1});if(!Object(x.isValidElement)(s)&&Ut()(s))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,fa.create(s,{autoGenerateKey:!1,defaultProps:{header:l,description:u}}));var _=ca.create(l,{autoGenerateKey:!1}),w=sa.create(u,{autoGenerateKey:!1});return g||b?S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,(s||_||w)&&S.a.createElement(fa,null,_,w,s)):S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),_,w,s)}}]),e}(x.Component);_()(da,"handledProps",["active","as","children","className","content","description","disabled","header","icon","image","onClick","value"]),da.propTypes={},da.create=Xt(da,function(t){return{content:t}});var va=da;function ma(t){var e=t.children,n=t.className,i=t.content,o=re(ma,t),s=ie(ma,t),u=Qt()(ct("ul"!==s&&"ol"!==s,"list"),n);return S.a.createElement(s,a()({},o,{className:u}),r.isNil(e)?i:e)}ma.handledProps=["as","children","className","content"],ma.propTypes={};var ya=ma,ga=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.animated,o=n.bulleted,s=n.celled,u=n.children,c=n.className,l=n.content,f=n.divided,h=n.floated,p=n.horizontal,d=n.inverted,v=n.items,m=n.link,y=n.ordered,g=n.relaxed,b=n.selection,_=n.size,w=n.verticalAlign,E=Qt()("ui",_,ct(i,"animated"),ct(o,"bulleted"),ct(s,"celled"),ct(f,"divided"),ct(p,"horizontal"),ct(d,"inverted"),ct(m,"link"),ct(y,"ordered"),ct(b,"selection"),ft(g,"relaxed"),lt(h,"floated"),dt(w),"list",c),T=re(e,this.props),C=ie(e,this.props);return r.isNil(u)?r.isNil(l)?S.a.createElement(C,a()({},T,{role:"list",className:E}),be()(v,function(e){return va.create(e,{overrideProps:t.handleItemOverrides})})):S.a.createElement(C,a()({},T,{role:"list",className:E}),l):S.a.createElement(C,a()({},T,{role:"list",className:E}),u)}}]),e}(x.Component);_()(ga,"Content",fa),_()(ga,"Description",sa),_()(ga,"Header",ca),_()(ga,"Icon",pa),_()(ga,"Item",va),_()(ga,"List",ya),_()(ga,"handledProps",["animated","as","bulleted","celled","children","className","content","divided","floated","horizontal","inverted","items","link","onItemClick","ordered","relaxed","selection","size","verticalAlign"]),ga.propTypes={};var ba=ga;function _a(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.disabled,u=t.indeterminate,c=t.inline,l=t.inverted,f=t.size,h=Qt()("ui",f,ct(e,"active"),ct(s,"disabled"),ct(u,"indeterminate"),ct(l,"inverted"),ct(n||o,"text"),ft(c,"inline"),"loader",i),p=re(_a,t),d=ie(_a,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?o:n)}_a.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"],_a.propTypes={};var wa=_a;function Ea(t){var e=t.attached,n=t.children,i=t.className,o=t.close,s=t.content,u=t.dividing,c=t.internal,l=t.position,f=t.size,h=Qt()("ui",l,f,ct(e,"attached"),ct(u,"dividing"),ct(c,"internal"),ft(o,"close"),"rail",i),p=re(Ea,t),d=ie(Ea,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?s:n)}Ea.handledProps=["as","attached","children","className","close","content","dividing","internal","position","size"],Ea.propTypes={};var Ta=Ea;function Ca(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()("ui",ct(o,"hidden"),ct(s,"visible"),"content",n),c=re(Ca,t),l=ie(Ca,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ca.handledProps=["as","children","className","content","hidden","visible"],Ca.propTypes={};var xa=Ca;function Sa(t){var e=t.active,n=t.animated,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.instant,l=Qt()("ui",n,ct(e,"active"),ct(u,"disabled"),ct(c,"instant"),"reveal",o),f=re(Sa,t),h=ie(Sa,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(i)?s:i)}Sa.handledProps=["active","animated","as","children","className","content","disabled","instant"],Sa.propTypes={},Sa.Content=xa;var ka=Sa;function Na(t){var e=t.children,n=t.className,i=t.compact,o=t.content,s=t.horizontal,u=t.piled,c=t.raised,l=t.size,f=t.stacked,h=Qt()("ui",l,ct(i,"compact"),ct(s,"horizontal"),ct(u,"piled"),ct(c,"raised"),ct(f,"stacked"),"segments",n),p=re(Na,t),d=ie(Na,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(e)?o:e)}Na.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],Na.propTypes={};var Aa=Na;function Ia(t){var e=t.attached,n=t.basic,i=t.children,o=t.circular,s=t.className,u=t.clearing,c=t.color,l=t.compact,f=t.content,h=t.disabled,p=t.floated,d=t.inverted,v=t.loading,m=t.padded,y=t.piled,g=t.raised,b=t.secondary,_=t.size,w=t.stacked,E=t.tertiary,T=t.textAlign,C=t.vertical,x=Qt()("ui",c,_,ct(n,"basic"),ct(o,"circular"),ct(u,"clearing"),ct(l,"compact"),ct(h,"disabled"),ct(d,"inverted"),ct(v,"loading"),ct(y,"piled"),ct(g,"raised"),ct(b,"secondary"),ct(w,"stacked"),ct(E,"tertiary"),ct(C,"vertical"),ft(e,"attached"),ft(m,"padded"),pt(T),lt(p,"floated"),"segment",s),k=re(Ia,t),N=ie(Ia,t);return S.a.createElement(N,a()({},k,{className:x}),r.isNil(i)?f:i)}Ia.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","raised","secondary","size","stacked","tertiary","textAlign","vertical"],Ia.Group=Aa,Ia.propTypes={};var Oa=Ia;function Pa(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pa,t),u=ie(Pa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Pa.handledProps=["as","children","className","content"],Pa.propTypes={},Pa.create=Xt(Pa,function(t){return{content:t}});var Ra=Pa;function Da(t){var e=t.children,n=t.className,i=t.content,o=Qt()("title",n),s=re(Da,t),u=ie(Da,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Da.handledProps=["as","children","className","content"],Da.propTypes={},Da.create=Xt(Da,function(t){return{content:t}});var Ma=Da;function La(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.title,u=Qt()("content",n),c=re(La,t),l=ie(La,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(l,a()({},c,{className:u}),Ma.create(s,{autoGenerateKey:!1}),Ra.create(o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),i):S.a.createElement(l,a()({},c,{className:u}),e)}La.handledProps=["as","children","className","content","description","title"],La.propTypes={},La.create=Xt(La,function(t){return{content:t}});var Fa=La,Ua=n(272);n.n(Ua)()(st,function(t,e){return e<=8});function ja(t){var e=t.attached,n=t.children,i=t.className,o=t.content,s=t.fluid,u=t.items,c=t.ordered,l=t.size,f=t.stackable,h=t.unstackable,p=t.vertical,d=t.widths,v=Qt()("ui",l,ct(s,"fluid"),ct(c,"ordered"),ct(h,"unstackable"),ct(p,"vertical"),ft(e,"attached"),lt(f,"stackable"),vt(d),"steps",i),m=re(ja,t),y=ie(ja,t);return r.isNil(n)?r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(u,function(t){return Va.create(t)})):S.a.createElement(y,a()({},m,{className:v}),o):S.a.createElement(y,a()({},m,{className:v}),n)}ja.handledProps=["as","attached","children","className","content","fluid","items","ordered","size","stackable","unstackable","vertical","widths"],ja.propTypes={};var Ba=ja,qa=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){if(r.props.onClick)return"a"}),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.completed,u=t.content,c=t.description,l=t.disabled,f=t.href,h=t.icon,p=t.link,d=t.title,v=Qt()(ct(n,"active"),ct(s,"completed"),ct(l,"disabled"),ct(p,"link"),"step",o),m=re(e,this.props),y=ie(e,this.props,this.computeElementType);return r.isNil(i)?r.isNil(u)?S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),Fa.create({description:c,title:d},{autoGenerateKey:!1})):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),u):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),i)}}]),e}(x.Component);_()(qa,"Content",Fa),_()(qa,"Description",Ra),_()(qa,"Group",Ba),_()(qa,"Title",Ma),_()(qa,"handledProps",["active","as","children","className","completed","content","description","disabled","href","icon","link","onClick","ordered","title"]),qa.propTypes={},qa.create=Xt(qa,function(t){return{content:t}});var Va=qa;function Wa(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=Qt()("content",ct(e,"active"),i),u=re(Wa,t),c=ie(Wa,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}Wa.handledProps=["active","as","children","className","content"],Wa.propTypes={},Wa.create=Xt(Wa,function(t){return{content:t}});var Ha=Wa,za=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.children,i=t.className,o=t.content,s=Qt()(ct(n,"active"),"title",i),u=re(e,this.props),c=ie(e,this.props);return Tt()(o)?S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),r):S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),S.a.createElement(Nn,{name:"dropdown"}),o)}}]),e}(x.Component);_()(za,"handledProps",["active","as","children","className","content","index","onClick"]),za.propTypes={},za.create=Xt(za,function(t){return{content:t}});var Ka=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeNewIndex",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?t===n?-1:t:ae()(n,t)?Cn()(n,t):yt()(n).concat([t])}),_()(g()(g()(r)),"handleTitleOverrides",function(t){return{onClick:function(e,n){var i=n.index,o=r.computeNewIndex(i);r.trySetState({activeIndex:o}),C()(t,"onClick",e,n),C()(r.props,"onTitleClick",e,n)}}}),_()(g()(g()(r)),"isIndexActive",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?n===t:ae()(n,t)}),_()(g()(g()(r)),"renderPanels",function(){var t=[],e=r.props.panels;return B()(e,function(e,n){var i=e.content,o=e.title,a=r.isIndexActive(n);t.push(za.create(o,{defaultProps:{active:a,index:n},overrideProps:r.handleTitleOverrides})),t.push(Ha.create(i,{defaultProps:{active:a}}))}),t}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(t){return{activeIndex:t.exclusive?-1:[-1]}}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children,i=Qt()("accordion",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}),Tt()(r)?this.renderPanels():r)}}]),e}(V);function Ga(t){var e=t.className,n=t.fluid,r=t.inverted,i=t.styled,o=Qt()("ui",ct(n,"fluid"),ct(r,"inverted"),ct(i,"styled"),e),s=re(Ga,t);return S.a.createElement(Ka,a()({},s,{className:o}))}_()(Ka,"defaultProps",{exclusive:!0}),_()(Ka,"autoControlledProps",["activeIndex"]),_()(Ka,"handledProps",["activeIndex","as","children","className","defaultActiveIndex","exclusive","onTitleClick","panels"]),Ka.propTypes={},Ka.create=Xt(Ka,function(t){return{content:t}}),Ga.handledProps=["className","fluid","inverted","styled"],Ga.propTypes={},Ga.Accordion=Ka,Ga.Content=Ha,Ga.Title=za;var Qa=Ga,Ya=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick,n=r.state.active;e&&e(t,N()({},r.props,{active:!0})),n||r.trySetState({active:!0})}),n))}return m()(e,t),l()(e,[{key:"getSrc",value:function(){var t=this.props,e=t.autoplay,n=void 0===e||e,r=t.brandedUI,i=void 0!==r&&r,o=t.color,a=void 0===o?"#444444":o,s=t.hd,u=void 0===s||s,c=t.id,l=t.source,f=t.url;return"youtube"===l?["//www.youtube.com/embed/".concat(c),"?autohide=true","&amp;autoplay=".concat(n),"&amp;color=".concat(encodeURIComponent(a)),"&amp;hq=".concat(u),"&amp;jsapi=false","&amp;modestbranding=".concat(i),"&amp;rel=".concat(i?0:1)].join(""):"vimeo"===l?["//player.vimeo.com/video/".concat(c),"?api=false","&amp;autoplay=".concat(n),"&amp;byline=false","&amp;color=".concat(encodeURIComponent(a)),"&amp;portrait=false","&amp;title=false"].join(""):f}},{key:"render",value:function(){var t=this.props,n=t.aspectRatio,r=t.className,i=t.icon,o=t.placeholder,s=this.state.active,u=Qt()("ui",n,ct(s,"active"),"embed",r),c=re(e,this.props),l=ie(e,this.props),f=void 0!==i?i:"video play";return S.a.createElement(l,a()({},c,{className:u,onClick:this.handleClick}),Nn.create(f,{autoGenerateKey:!1}),o&&S.a.createElement("img",{className:"placeholder",src:o}),this.renderEmbed())}},{key:"renderEmbed",value:function(){var t=this.props,e=t.children,n=t.content,i=t.iframe,o=t.source;return this.state.active?r.isNil(e)?r.isNil(n)?S.a.createElement("div",{className:"embed"},Jt(r.isNil(i)?this.getSrc():i,{defaultProps:{allowFullScreen:!1,frameBorder:0,height:"100%",scrolling:"no",src:this.getSrc(),title:"Embedded content from ".concat(o,"."),width:"100%"},autoGenerateKey:!1})):S.a.createElement("div",{className:"embed"},n):S.a.createElement("div",{className:"embed"},e):null}}]),e}(V);_()(Ya,"autoControlledProps",["active"]),_()(Ya,"handledProps",["active","as","aspectRatio","autoplay","brandedUI","children","className","color","content","defaultActive","hd","icon","id","iframe","onClick","placeholder","source","url"]),Ya.propTypes={};var Xa=n(271),$a=n.n(Xa);function Ja(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Ja,t),u=ie(Ja,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}function Za(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Za,t),u=ie(Za,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ja.handledProps=["as","children","className","content"],Ja.propTypes={},Ja.create=Xt(Ja,function(t){return{children:t}}),Za.handledProps=["as","children","className","content"],Za.propTypes={},Za.create=Xt(Za,function(t){return{children:t}});var ts=["top left","top right","bottom right","bottom left","right center","left center","top center","bottom center"],es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{}),_()(g()(g()(r)),"hideOnScroll",function(t){r.setState({closed:!0}),Dt.unsub("scroll",r.hideOnScroll,{target:window}),setTimeout(function(){r.mounted&&r.setState({closed:!1})},50),r.handleClose(t)}),_()(g()(g()(r)),"handleClose",function(t){C()(r.props,"onClose",t,r.props)}),_()(g()(g()(r)),"handleOpen",function(t){r.coords=t.currentTarget.getBoundingClientRect();var e=r.props.onOpen;e&&e(t,r.props)}),_()(g()(g()(r)),"handlePortalMount",function(t){r.props.hideOnScroll&&Dt.sub("scroll",r.hideOnScroll,{target:window}),r.setPosition(),C()(r.props,"onMount",t,r.props)}),_()(g()(g()(r)),"handlePortalUnmount",function(t){var e=r.props.hideOnScroll;cancelAnimationFrame(r.animationRequestId),e&&Dt.unsub("scroll",r.hideOnScroll,{target:window}),C()(r.props,"onUnmount",t,r.props)}),_()(g()(g()(r)),"handlePopupRef",function(t){r.popupCoords=t?t.getBoundingClientRect():null,r.setPopupStyle()}),_()(g()(g()(r)),"handleTriggerRef",function(t){t&&(r.triggerRef=t)}),_()(g()(g()(r)),"setPosition",function(){r.triggerRef&&r.setPopupStyle(r.props.position),r.animationRequestId=requestAnimationFrame(r.setPosition)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"computePopupStyle",value:function(t){var e={position:"absolute"};if(!St())return e;var n=this.props,r=n.horizontalOffset,i=n.verticalOffset,o=window,a=o.pageYOffset,s=o.pageXOffset,u=document.documentElement,c=u.clientWidth,l=u.clientHeight,f=this.coords||this.triggerRef.getBoundingClientRect();if(ae()(t,"right"))e.right=Math.round(c-(f.right+s)),e.left="auto";else if(ae()(t,"left"))e.left=Math.round(f.left+s),e.right="auto";else{var h=(f.width-this.popupCoords.width)/2;e.left=Math.round(f.left+h+s),e.right="auto"}if(ae()(t,"top"))e.bottom=Math.round(l-(f.top+a)),e.top="auto";else if(ae()(t,"bottom"))e.top=Math.round(f.bottom+a),e.bottom="auto";else{var p=(f.height+this.popupCoords.height)/2;e.top=Math.round(f.bottom+a-p),e.bottom="auto";var d=this.popupCoords.width+8;ae()(t,"right")?e.right-=d:e.left-=d}return r&&(Vt()(e.right)?e.right-=r:e.left-=r),i&&(Vt()(e.top)?e.top+=i:e.bottom+=i),e}},{key:"isStyleInViewport",value:function(t){var e=window,n=e.pageYOffset,r=e.pageXOffset,i=document.documentElement,o=i.clientWidth,a=i.clientHeight,s={top:t.top,left:t.left,width:this.popupCoords.width,height:this.popupCoords.height};return Vt()(t.right)&&(s.left=o-t.right-s.width),Vt()(t.bottom)&&(s.top=a-t.bottom-s.height),!(s.top<n)&&(!(s.top+s.height>n+a)&&(!(s.left<r)&&!(s.left+s.width>r+o)))}},{key:"setPopupStyle",value:function(){if((this.coords||this.triggerRef)&&this.popupCoords){var t=this.props.position,e=this.computePopupStyle(t);if(this.props.keepInViewPort)for(var n=Cn()(ts,t).concat([t]),r=0;!this.isStyleInViewport(e)&&r<n.length;r+=1)e=this.computePopupStyle(n[r]),t=n[r];e=qi()(e,function(t){return Vt()(t)?"".concat(t,"px"):t}),this.setState({style:e,position:t})}}},{key:"getPortalProps",value:function(){var t={},e=this.props,n=e.on,r=e.hoverable,i=Ot()(n)?n:[n];return r&&(t.closeOnPortalMouseLeave=!0,t.mouseLeaveDelay=300),ae()(i,"click")&&(t.openOnTriggerClick=!0,t.closeOnTriggerClick=!0,t.closeOnDocumentClick=!0),ae()(i,"focus")&&(t.openOnTriggerFocus=!0,t.closeOnTriggerBlur=!0),ae()(i,"hover")&&(t.openOnTriggerMouseEnter=!0,t.closeOnTriggerMouseLeave=!0,t.mouseLeaveDelay=70,t.mouseEnterDelay=50),t}},{key:"render",value:function(){var t=this.props,n=t.basic,i=t.children,o=t.className,s=t.content,u=t.flowing,c=t.header,l=t.inverted,f=t.size,h=t.trigger,p=t.wide,d=this.state,v=d.position,m=d.closed,y=$a()({},this.state.style,this.props.style),g=Qt()("ui",v,f,ft(p,"wide"),ct(n,"basic"),ct(u,"flowing"),ct(l,"inverted"),"popup transition visible",o);if(m)return h;var b=re(e,this.props),_=Mn.handledProps,w=sr()(b,function(t,e,n){return ae()(_,n)||(t[n]=e),t},{}),E=or()(b,_),T=ie(e,this.props),C=S.a.createElement(T,a()({},w,{className:g,style:y,ref:this.handlePopupRef}),i,r.isNil(i)&&Za.create(c,{autoGenerateKey:!1}),r.isNil(i)&&Ja.create(s,{autoGenerateKey:!1})),x=N()({},this.getPortalProps(),E);return S.a.createElement(Rn,{innerRef:this.handleTriggerRef},S.a.createElement(Mn,a()({},x,{trigger:h,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),C))}}]),e}(x.Component);_()(es,"defaultProps",{position:"top left",on:"hover",keepInViewPort:!0}),_()(es,"Content",Ja),_()(es,"Header",Za),_()(es,"handledProps",["as","basic","children","className","content","flowing","header","hideOnScroll","horizontalOffset","hoverable","inverted","keepInViewPort","on","onClose","onMount","onOpen","onUnmount","position","size","style","trigger","verticalOffset","wide"]),es.propTypes={};var ns=n(270),rs=n.n(ns),is=n(269),os=n.n(is),as=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"calculatePercent",function(){var t=i.props,e=t.percent,n=t.total,r=t.value;return P()(e)?P()(n)||P()(r)?void 0:r/n*100:e}),_()(g()(g()(i)),"computeValueText",function(t){var e=i.props,n=e.progress,r=e.total,o=e.value;return"value"===n?o:"ratio"===n?"".concat(o,"/").concat(r):"".concat(t,"%")}),_()(g()(g()(i)),"getPercent",function(){var t=i.props,e=t.precision,n=t.progress,r=t.total,o=t.value,a=os()(i.calculatePercent(),0,100);return P()(r)||P()(o)||"value"!==n?"value"===n?o:P()(e)?a:rs()(a,e):o/r*100}),_()(g()(g()(i)),"isAutoSuccess",function(){var t=i.props,e=t.autoSuccess,n=t.percent,r=t.total,o=t.value;return e&&(n>=100||o>=r)}),_()(g()(g()(i)),"renderLabel",function(){var t=i.props,e=t.children,n=t.content,o=t.label;return r.isNil(e)?r.isNil(n)?$t(o,{autoGenerateKey:!1,defaultProps:{className:"label"}}):S.a.createElement("div",{className:"label"},n):S.a.createElement("div",{className:"label"},e)}),_()(g()(g()(i)),"renderProgress",function(t){var e=i.props,n=e.precision;if(e.progress||!P()(n))return S.a.createElement("div",{className:"progress"},i.computeValueText(t))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.attached,i=t.className,o=t.color,s=t.disabled,u=t.error,c=t.indicating,l=t.inverted,f=t.size,h=t.success,p=t.warning,d=Qt()("ui",o,f,ct(n||c,"active"),ct(s,"disabled"),ct(u,"error"),ct(c,"indicating"),ct(l,"inverted"),ct(h||this.isAutoSuccess(),"success"),ct(p,"warning"),lt(r,"attached"),"progress",i),v=re(e,this.props),m=ie(e,this.props),y=this.getPercent()||0;return S.a.createElement(m,a()({},v,{className:d,"data-percent":Math.floor(y)}),S.a.createElement("div",{className:"bar",style:{width:"".concat(y,"%")}},this.renderProgress(y)),this.renderLabel())}}]),e}(x.Component);_()(as,"handledProps",["active","as","attached","autoSuccess","children","className","color","content","disabled","error","indicating","inverted","label","percent","precision","progress","size","success","total","value","warning"]),as.propTypes={};var ss=as,us=n(268),cs=n.n(us),ls=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleKeyUp",function(t){var e=r.props,n=e.onClick,i=e.onKeyUp;if(i&&i(t,r.props),n)switch(In.a.getCode(t)){case In.a.Enter:case In.a.Spacebar:t.preventDefault(),n(t,r.props)}}),_()(g()(g()(r)),"handleMouseEnter",function(t){var e=r.props.onMouseEnter;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.selected,o=Qt()(ct(n,"active"),ct(i,"selected"),"icon",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick,onKeyUp:this.handleKeyUp,onMouseEnter:this.handleMouseEnter,tabIndex:0,role:"radio"}))}}]),e}(x.Component);_()(ls,"defaultProps",{as:"i"}),_()(ls,"handledProps",["active","as","className","index","onClick","onKeyUp","onMouseEnter","selected"]),ls.propTypes={};var fs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleIconClick",function(t,e){var n=e.index,i=r.props,o=i.clearable,a=i.disabled,s=i.maxRating,u=i.onRate,c=r.state.rating;if(!a){var l=n+1;"auto"===o&&1===s?l=+!c:!0===o&&l===c&&(l=0),r.trySetState({rating:l},{isSelecting:!1}),u&&u(t,N()({},r.props,{rating:l}))}}),_()(g()(g()(r)),"handleIconMouseEnter",function(t,e){var n=e.index;r.props.disabled||r.setState({selectedIndex:n,isSelecting:!0})}),_()(g()(g()(r)),"handleMouseLeave",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];C.a.apply(void 0,[r.props,"onMouseLeave"].concat(e)),r.props.disabled||r.setState({selectedIndex:-1,isSelecting:!1})}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n.className,i=n.disabled,o=n.icon,s=n.maxRating,u=n.size,c=this.state,l=c.rating,f=c.selectedIndex,h=c.isSelecting,p=Qt()("ui",o,u,ct(i,"disabled"),ct(h&&!i&&f>=0,"selected"),"rating",r),d=re(e,this.props),v=ie(e,this.props);return S.a.createElement(v,a()({},d,{className:p,role:"radiogroup",onMouseLeave:this.handleMouseLeave}),cs()(s,function(e){return S.a.createElement(ls,{active:l>=e+1,"aria-checked":l===e+1,"aria-posinset":e+1,"aria-setsize":s,index:e,key:e,onClick:t.handleIconClick,onMouseEnter:t.handleIconMouseEnter,selected:f>=e&&h})}))}}]),e}(V);_()(fs,"autoControlledProps",["rating"]),_()(fs,"defaultProps",{clearable:"auto",maxRating:1}),_()(fs,"Icon",ls),_()(fs,"handledProps",["as","className","clearable","defaultRating","disabled","icon","maxRating","onRate","rating","size"]),fs.propTypes={};var hs=n(51),ps=n.n(hs),ds=n(267),vs=n.n(ds);function ms(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.renderer,u=Qt()(ct(e,"active"),"category",i),c=re(ms,t),l=ie(ms,t);return S.a.createElement(l,a()({},c,{className:u}),S.a.createElement("div",{className:"name"},s(t)),r.isNil(n)?o:n)}ms.handledProps=["active","as","children","className","content","name","renderer","results"],ms.defaultProps={renderer:function(t){return t.name}},ms.propTypes={};var ys=ms,gs=function(t){var e=t.image,n=t.price,r=t.title,i=t.description;return[e&&S.a.createElement("div",{key:"image",className:"image"},Zt(e,{autoGenerateKey:!1})),S.a.createElement("div",{key:"content",className:"content"},n&&S.a.createElement("div",{className:"price"},n),r&&S.a.createElement("div",{className:"title"},r),i&&S.a.createElement("div",{className:"description"},i))]};gs.handledProps=[];var bs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.renderer,o=Qt()(ct(n,"active"),"result",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick}),i(this.props))}}]),e}(x.Component);function _s(t){var e=t.children,n=t.className,i=t.content,o=Qt()("results transition",n),s=re(_s,t),u=ie(_s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(bs,"defaultProps",{renderer:gs}),_()(bs,"handledProps",["active","as","className","content","description","id","image","onClick","price","renderer","title"]),bs.propTypes={},_s.handledProps=["as","children","className","content"],_s.propTypes={};var ws=_s,Es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleResultSelect",function(t,e){C()(r.props,"onResultSelect",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"handleSelectionChange",function(t){var e=r.getSelectedResult();C()(r.props,"onSelectionChange",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),r.close())}),_()(g()(g()(r)),"moveSelectionOnKeyDown",function(t){switch(In.a.getCode(t)){case In.a.ArrowDown:t.preventDefault(),r.moveSelectionBy(t,1);break;case In.a.ArrowUp:t.preventDefault(),r.moveSelectionBy(t,-1)}}),_()(g()(g()(r)),"selectItemOnEnter",function(t){if(In.a.getCode(t)===In.a.Enter){var e=r.getSelectedResult();e&&(t.preventDefault(),r.setValue(e.title),r.handleResultSelect(t,e),r.close())}}),_()(g()(g()(r)),"closeOnDocumentClick",function(t){r.close()}),_()(g()(g()(r)),"handleMouseDown",function(t){r.isMouseDown=!0,C()(r.props,"onMouseDown",t,r.props),Dt.sub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleDocumentMouseUp",function(){r.isMouseDown=!1,Dt.unsub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleInputClick",function(t){t.nativeEvent.stopImmediatePropagation(),r.tryOpen()}),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.id,i=r.getSelectedResult(n);t.nativeEvent.stopImmediatePropagation(),r.setValue(i.title),r.handleResultSelect(t,i),r.close()}),_()(g()(g()(r)),"handleFocus",function(t){var e=r.props.onFocus;e&&e(t,r.props),r.setState({focus:!0})}),_()(g()(g()(r)),"handleBlur",function(t){var e=r.props.onBlur;e&&e(t,r.props),r.setState({focus:!1})}),_()(g()(g()(r)),"handleSearchChange",function(t){t.stopPropagation();var e=r.props.minCharacters,n=r.state.open,i=t.target.value;C()(r.props,"onSearchChange",t,N()({},r.props,{value:i})),i.length<e?r.close():n||r.tryOpen(i),r.setValue(i)}),_()(g()(g()(r)),"getFlattenedResults",function(){var t=r.props,e=t.category,n=t.results;return e?sr()(n,function(t,e){return t.concat(e.results)},[]):n}),_()(g()(g()(r)),"getSelectedResult",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.selectedIndex,e=r.getFlattenedResults();return bi()(e,t)}),_()(g()(g()(r)),"setValue",function(t){var e=r.props.selectFirstResult;r.trySetState({value:t},{selectedIndex:e?0:-1})}),_()(g()(g()(r)),"moveSelectionBy",function(t,e){var n=r.state.selectedIndex,i=r.getFlattenedResults().length-1,o=n+e;o>i?o=0:o<0&&(o=i),r.setState({selectedIndex:o}),r.scrollSelectedItemIntoView(),r.handleSelectionChange(t)}),_()(g()(g()(r)),"scrollSelectedItemIntoView",function(){if(St()){var t=document.querySelector(".ui.search.active.visible .results.visible"),e=t.querySelector(".result.active");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}),_()(g()(g()(r)),"tryOpen",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.value,e=r.props.minCharacters;t.length<e||r.open()}),_()(g()(g()(r)),"open",function(){r.trySetState({open:!0})}),_()(g()(g()(r)),"close",function(){r.trySetState({open:!1})}),_()(g()(g()(r)),"renderSearchInput",function(t){var e=r.props,n=e.icon,i=e.input,o=r.state.value;return co.create(i,{autoGenerateKey:!1,defaultProps:N()({},t,{icon:n,input:{className:"prompt",tabIndex:"0",autoComplete:"off"},onChange:r.handleSearchChange,onClick:r.handleInputClick,value:o})})}),_()(g()(g()(r)),"renderNoResults",function(){var t=r.props,e=t.noResultsDescription,n=t.noResultsMessage;return S.a.createElement("div",{className:"message empty"},S.a.createElement("div",{className:"header"},n),e&&S.a.createElement("div",{className:"description"},e))}),_()(g()(g()(r)),"renderResult",function(t,e,n){var i=t.childKey,o=ps()(t,["childKey"]),s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=r.props.resultRenderer,c=r.state.selectedIndex,l=e+s;return S.a.createElement(bs,a()({key:i||o.title,active:c===l,onClick:r.handleItemClick,renderer:u},o,{id:l}))}),_()(g()(g()(r)),"renderResults",function(){var t=r.props.results;return be()(t,r.renderResult)}),_()(g()(g()(r)),"renderCategories",function(){var t=r.props,e=t.categoryRenderer,n=t.results,i=r.state.selectedIndex,o=0;return be()(n,function(t){var n=t.childKey,a=ps()(t,["childKey"]),s=N()({key:n||a.name,active:fe()(i,o,o+a.results.length),renderer:e},a),u=vs()(r.renderResult,o);return o+=a.results.length,S.a.createElement(ys,s,a.results.map(u))})}),_()(g()(g()(r)),"renderMenuContent",function(){var t=r.props,e=t.category,n=t.showNoResults,i=t.results;return L()(i)?n?r.renderNoResults():null:e?r.renderCategories():r.renderResults()}),_()(g()(g()(r)),"renderResultsMenu",function(){var t=r.state.open?"visible":"",e=r.renderMenuContent();if(e)return S.a.createElement(ws,{className:t},e)}),n))}return m()(e,t),l()(e,[{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),e&&this.open()}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||this.setValue(t.value)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){!e.focus&&this.state.focus?(this.isMouseDown||this.tryOpen(),this.state.open&&Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.focus&&!this.state.focus&&(this.isMouseDown||this.close(),Dt.unsub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])),!e.open&&this.state.open?(this.open(),Dt.sub("click",this.closeOnDocumentClick),Dt.sub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.open&&!this.state.open&&(this.close(),Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]))}},{key:"componentWillUnmount",value:function(){Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])}},{key:"render",value:function(){var t=this.state,n=t.searchClasses,r=t.focus,i=t.open,o=this.props,s=o.aligned,u=o.category,c=o.className,l=o.fluid,f=o.loading,h=o.size,p=Qt()("ui",i&&"active visible",h,n,ct(u,"category"),ct(r,"focus"),ct(l,"fluid"),ct(f,"loading"),lt(s,"aligned"),"search",c),d=re(e,this.props),v=ie(e,this.props),m=ce(d,{htmlProps:se}),y=H()(m,2),g=y[0],b=y[1];return S.a.createElement(v,a()({},b,{className:p,onBlur:this.handleBlur,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown}),this.renderSearchInput(g),this.renderResultsMenu())}}]),e}(V);function Ts(t){var e=t.className,n=t.children,i=t.content,o=Qt()("pushable",e),s=re(Ts,t),u=ie(Ts,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}_()(Es,"defaultProps",{icon:"search",input:"text",minCharacters:1,noResultsMessage:"No results found.",showNoResults:!0}),_()(Es,"autoControlledProps",["open","value"]),_()(Es,"Category",ys),_()(Es,"Result",bs),_()(Es,"Results",ws),_()(Es,"handledProps",["aligned","as","category","categoryRenderer","className","defaultOpen","defaultValue","fluid","icon","input","loading","minCharacters","noResultsDescription","noResultsMessage","onBlur","onFocus","onMouseDown","onResultSelect","onSearchChange","onSelectionChange","open","resultRenderer","results","selectFirstResult","showNoResults","size","value"]),Es.propTypes={},Ts.handledProps=["as","children","className","content"],Ts.propTypes={};var Cs=Ts;function xs(t){var e=t.className,n=t.dimmed,i=t.children,o=t.content,s=Qt()("pusher",ct(n,"dimmed"),e),u=re(xs,t),c=ie(xs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}xs.handledProps=["as","children","className","content","dimmed"],xs.propTypes={};var Ss=xs,ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"startAnimating",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;clearTimeout(r.stopAnimatingTimer),r.setState({animating:!0}),r.stopAnimatingTimer=setTimeout(function(){return r.setState({animating:!1})},t)}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){t.visible!==this.props.visible&&this.startAnimating()}},{key:"render",value:function(){var t=this.props,n=t.animation,i=t.className,o=t.children,s=t.content,u=t.direction,c=t.visible,l=t.width,f=this.state.animating,h=Qt()("ui",n,u,l,ct(f,"animating"),ct(c,"visible"),"sidebar",i),p=re(e,this.props),d=ie(e,this.props);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(o)?s:o)}}]),e}(V);_()(ks,"defaultProps",{direction:"left"}),_()(ks,"autoControlledProps",["visible"]),_()(ks,"Pushable",Cs),_()(ks,"Pusher",Ss),_()(ks,"handledProps",["animation","as","children","className","content","defaultVisible","direction","visible","width"]),ks.propTypes={};var Ns=ks,As=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{sticky:!1}),_()(g()(g()(r)),"addListeners",function(t){var e=t.scrollContext;e&&(Dt.sub("resize",r.handleUpdate,{target:e}),Dt.sub("scroll",r.handleUpdate,{target:e}))}),_()(g()(g()(r)),"removeListeners",function(){var t=r.props.scrollContext;t&&(Dt.unsub("resize",r.handleUpdate,{target:t}),Dt.unsub("scroll",r.handleUpdate,{target:t}))}),_()(g()(g()(r)),"update",function(t){var e=r.state.pushing;if(r.ticking=!1,r.assignRects(),e)return r.didReachStartingPoint()?r.stickToContextTop(t):r.didTouchScreenBottom()?r.stickToScreenBottom(t):r.stickToContextBottom(t);if(r.isOversized()){if(r.contextRect.top>0)return r.stickToContextTop(t);if(r.contextRect.bottom<window.innerHeight)return r.stickToContextBottom(t)}return r.didTouchScreenTop()?r.didReachContextBottom()?r.stickToContextBottom(t):r.stickToScreenTop(t):r.stickToContextTop(t)}),_()(g()(g()(r)),"handleUpdate",function(t){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(function(){return r.update(t)}))}),_()(g()(g()(r)),"assignRects",function(){var t=r.props.context;r.triggerRect=r.triggerRef.getBoundingClientRect(),r.contextRect=(t||document.body).getBoundingClientRect(),r.stickyRect=r.stickyRef.getBoundingClientRect()}),_()(g()(g()(r)),"didReachContextBottom",function(){var t=r.props.offset;return r.stickyRect.height+t>=r.contextRect.bottom}),_()(g()(g()(r)),"didReachStartingPoint",function(){return r.stickyRect.top<=r.triggerRect.top}),_()(g()(g()(r)),"didTouchScreenTop",function(){return r.triggerRect.top<r.props.offset}),_()(g()(g()(r)),"didTouchScreenBottom",function(){var t=r.props.bottomOffset;return r.contextRect.bottom+t>window.innerHeight}),_()(g()(g()(r)),"isOversized",function(){return r.stickyRect.height>window.innerHeight}),_()(g()(g()(r)),"pushing",function(t){r.props.pushing&&r.setState({pushing:t})}),_()(g()(g()(r)),"stick",function(t){r.setState({sticky:!0}),C()(r.props,"onStick",t,r.props)}),_()(g()(g()(r)),"unstick",function(t){r.setState({sticky:!1}),C()(r.props,"onUnstick",t,r.props)}),_()(g()(g()(r)),"stickToContextBottom",function(t){var e=r.contextRect.bottom-r.stickyRect.height;C()(r.props,"onBottom",t,r.props),r.stick(t),r.setState({top:e,bottom:null}),r.pushing(!0)}),_()(g()(g()(r)),"stickToContextTop",function(t){C()(r.props,"onTop",t,r.props),r.unstick(t),r.pushing(!1)}),_()(g()(g()(r)),"stickToScreenBottom",function(t){var e=r.props.bottomOffset;r.stick(t),r.setState({bottom:e,top:null})}),_()(g()(g()(r)),"stickToScreenTop",function(t){var e=r.props.offset;r.stick(t),r.setState({top:e,bottom:null})}),_()(g()(g()(r)),"handleStickyRef",function(t){return r.stickyRef=t}),_()(g()(g()(r)),"handleTriggerRef",function(t){return r.triggerRef=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){St()&&(this.props.active&&(this.handleUpdate(),this.addListeners(this.props)))}},{key:"componentWillReceiveProps",value:function(t){var e=this.props,n=e.active,r=e.scrollContext,i=t.active,o=t.scrollContext;if(n!==i){if(i)return this.handleUpdate(),void this.addListeners(t);this.removeListeners(),this.setState({sticky:!1})}else r!==o&&(this.removeListeners(),this.addListeners(t))}},{key:"componentWillUnmount",value:function(){St()&&(this.props.active&&(this.removeListeners(),cancelAnimationFrame(this.frameId)))}},{key:"computeStyle",value:function(){var t=this.state,e=t.bottom,n=t.sticky,r=t.top;return n?{bottom:e,top:r,position:"fixed",width:this.triggerRect.width}:{}}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.className,i=re(e,this.props),o=ie(e,this.props);return S.a.createElement(o,a()({},i,{className:r}),S.a.createElement("div",{ref:this.handleTriggerRef}),S.a.createElement("div",{ref:this.handleStickyRef,style:this.computeStyle()},n))}}]),e}(x.Component);function Is(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.loading,u=Qt()(ct(e,"active"),ct(s,"loading"),"tab",i),c=re(Is,t),l=ie(Is,t),f={};return l===Oa&&(f.attached="bottom"),S.a.createElement(l,a()({},f,c,{className:u}),r.isNil(n)?o:n)}_()(As,"defaultProps",{active:!0,bottomOffset:0,offset:0,scrollContext:St()?window:null}),_()(As,"handledProps",["active","as","bottomOffset","children","className","context","offset","onBottom","onStick","onTop","onUnstick","pushing","scrollContext"]),As.propTypes={},Is.handledProps=["active","as","children","className","content","loading"],Is.defaultProps={as:Oa,active:!0},Is.propTypes={},Is.create=Xt(Is,function(t){return{content:t}});var Os=Is,Ps=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.index;C()(r.props,"onTabChange",t,N()({},r.props,{activeIndex:n})),r.trySetState({activeIndex:n})}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{activeIndex:0}}},{key:"renderItems",value:function(){var t=this.props,e=t.panes,n=t.renderActiveOnly,r=this.state.activeIndex;return n?C()(bi()(e,"[".concat(r,"]")),"render",this.props):be()(e,function(t,e){var n=t.pane;return Os.create(n,{overrideProps:{active:e===r}})})}},{key:"renderMenu",value:function(){var t=this.props,e=t.menu,n=t.panes,r=t.menuPosition,i=this.state.activeIndex;return!0===e.tabular&&"right"===r&&(e.tabular="right"),Kr.create(e,{autoGenerateKey:!1,overrideProps:{items:be()(n,"menuItem"),onItemClick:this.handleItemClick,activeIndex:i}})}},{key:"renderVertical",value:function(t){var e=this.props,n=e.grid,r=e.menuPosition,i=n.paneWidth,o=n.tabWidth,a=ps()(n,["paneWidth","tabWidth"]),s=r||"right"===t.props.tabular&&"right"||"left";return S.a.createElement(So,a,"left"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}),Eo.create({width:i,children:this.renderItems(),stretched:!0},{autoGenerateKey:!1}),"right"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}))}},{key:"render",value:function(){var t=this.renderMenu(),n=re(e,this.props),r=ie(e,this.props);return t.props.vertical?S.a.createElement(r,n,this.renderVertical(t)):S.a.createElement(r,n,"bottom"!==t.props.attached&&t,this.renderItems(),"bottom"===t.props.attached&&t)}}]),e}(V);_()(Ps,"autoControlledProps",["activeIndex"]),_()(Ps,"defaultProps",{grid:{paneWidth:12,tabWidth:4},menu:{attached:!0,tabular:!0},renderActiveOnly:!0}),_()(Ps,"Pane",Os),_()(Ps,"handledProps",["activeIndex","as","defaultActiveIndex","grid","menu","menuPosition","onTabChange","panes","renderActiveOnly"]),Ps.propTypes={};var Rs=Ps;function Ds(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.test,u=t.unit,c=Qt()("ui",u,ct(e,"centered"),ct(s,"test"),"ad",i),l=re(Ds,t),f=ie(Ds,t);return S.a.createElement(f,a()({},l,{className:c,"data-text":s}),r.isNil(n)?o:n)}Ds.handledProps=["as","centered","children","className","content","test","unit"],Ds.propTypes={};var Ms=Ds;function Ls(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"description",n),u=re(Ls,t),c=ie(Ls,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Ls.handledProps=["as","children","className","content","textAlign"],Ls.propTypes={};var Fs=Ls;function Us(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"header",n),u=re(Us,t),c=ie(Us,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Us.handledProps=["as","children","className","content","textAlign"],Us.propTypes={};var js=Us;function Bs(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"meta",n),u=re(Bs,t),c=ie(Bs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bs.handledProps=["as","children","className","content","textAlign"],Bs.propTypes={};var qs=Bs;function Vs(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.textAlign,f=Qt()(ct(s,"extra"),pt(l),"content",n),h=re(Vs,t),p=ie(Vs,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(p,a()({},h,{className:f}),Yt(js,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(qs,function(t){return{content:t}},c,{autoGenerateKey:!1}),Yt(Fs,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),i):S.a.createElement(p,a()({},h,{className:f}),e)}Vs.handledProps=["as","children","className","content","description","extra","header","meta","textAlign"],Vs.propTypes={};var Ws=Vs;function Hs(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.doubling,u=t.items,c=t.itemsPerRow,l=t.stackable,f=t.textAlign,h=Qt()("ui",ct(e,"centered"),ct(s,"doubling"),ct(l,"stackable"),pt(f),vt(c),"cards",i),p=re(Hs,t),d=ie(Hs,t);if(!r.isNil(n))return S.a.createElement(d,a()({},p,{className:h}),n);if(!r.isNil(o))return S.a.createElement(d,a()({},p,{className:h}),o);var v=be()(u,function(t){var e=t.key||[t.header,t.description].join("-");return S.a.createElement(Ks,a()({key:e},t))});return S.a.createElement(d,a()({},p,{className:h}),v)}Hs.handledProps=["as","centered","children","className","content","doubling","items","itemsPerRow","stackable","textAlign"],Hs.propTypes={};var zs=Hs,Ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.centered,i=t.children,o=t.className,s=t.color,u=t.content,c=t.description,l=t.extra,f=t.fluid,h=t.header,p=t.href,d=t.image,v=t.link,m=t.meta,y=t.onClick,g=t.raised,b=Qt()("ui",s,ct(n,"centered"),ct(f,"fluid"),ct(v,"link"),ct(g,"raised"),"card",o),_=re(e,this.props),w=ie(e,this.props,function(){if(y)return"a"});return r.isNil(i)?r.isNil(u)?S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),Hn.create(d,{autoGenerateKey:!1}),(c||h||m)&&S.a.createElement(Ws,{description:c,header:h,meta:m}),l&&S.a.createElement(Ws,{extra:!0},l)):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),u):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),i)}}]),e}(x.Component);function Gs(t){var e=t.active,n=t.className,i=t.children,o=t.content,s=Qt()(ct(e,"active"),n),u=re(Gs,t),c=ie(Gs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}_()(Ks,"Content",Ws),_()(Ks,"Description",Fs),_()(Ks,"Group",zs),_()(Ks,"Header",js),_()(Ks,"Meta",qs),_()(Ks,"handledProps",["as","centered","children","className","color","content","description","extra","fluid","header","href","image","link","meta","onClick","raised"]),Ks.propTypes={},Gs.handledProps=["active","as","children","className","content"],Gs.defaultProps={as:"a"},Gs.propTypes={};var Qs=Gs;function Ys(t){var e=t.className,n=t.children,i=t.content,o=Qt()("actions",e),s=re(Ys,t),u=ie(Ys,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}Ys.handledProps=["as","children","className","content"],Ys.propTypes={};var Xs=Ys;function $s(t){var e=t.className,n=t.children,i=t.content,o=Qt()("author",e),s=re($s,t),u=ie($s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}$s.handledProps=["as","children","className","content"],$s.propTypes={};var Js=$s;function Zs(t){var e=t.className,n=t.src,r=Qt()("avatar",e),i=re(Zs,t),o=ie(Zs,t);return S.a.createElement(o,a()({},i,{className:r}),Zt(n,{autoGenerateKey:!1}))}Zs.handledProps=["as","className","src"],Zs.propTypes={};var tu=Zs;function eu(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"content"),s=re(eu,t),u=ie(eu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}eu.handledProps=["as","children","className","content"],eu.propTypes={};var nu=eu;function ru(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=t.minimal,u=t.size,c=t.threaded,l=Qt()("ui",u,ct(i,"collapsed"),ct(s,"minimal"),ct(c,"threaded"),"comments",e),f=re(ru,t),h=ie(ru,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(n)?o:n)}ru.handledProps=["as","children","className","collapsed","content","minimal","size","threaded"],ru.propTypes={};var iu=ru;function ou(t){var e=t.className,n=t.children,i=t.content,o=Qt()("metadata",e),s=re(ou,t),u=ie(ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}ou.handledProps=["as","children","className","content"],ou.propTypes={};var au=ou;function su(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"text"),s=re(su,t),u=ie(su,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}su.handledProps=["as","children","className","content"],su.propTypes={};var uu=su;function cu(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=Qt()(ct(i,"collapsed"),"comment",e),u=re(cu,t),c=ie(cu,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}cu.handledProps=["as","children","className","collapsed","content"],cu.propTypes={},cu.Author=Js,cu.Action=Qs,cu.Actions=Xs,cu.Avatar=tu,cu.Content=nu,cu.Group=iu,cu.Metadata=au,cu.Text=uu;var lu=cu;function fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("date",n),s=re(fu,t),u=ie(fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}fu.handledProps=["as","children","className","content"],fu.propTypes={};var hu=fu;function pu(t){var e=t.children,n=t.className,i=t.content,o=t.images,s=t.text,u=Qt()(ct(o,"images"),ct(i||s,"text"),"extra",n),c=re(pu,t),l=ie(pu,t);if(!r.isNil(e))return S.a.createElement(l,a()({},c,{className:u}),e);var f=be()(o,function(t,e){var n=[e,t].join("-");return Zt(t,{key:n})});return S.a.createElement(l,a()({},c,{className:u}),i,f)}pu.handledProps=["as","children","className","content","images","text"],pu.propTypes={};var du=pu;function vu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("like",n),u=re(vu,t),c=ie(vu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}vu.handledProps=["as","children","className","content","icon"],vu.defaultProps={as:"a"},vu.propTypes={};var mu=vu;function yu(t){var e=t.children,n=t.className,i=t.content,o=t.like,s=Qt()("meta",n),u=re(yu,t),c=ie(yu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Yt(mu,function(t){return{content:t}},o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}yu.handledProps=["as","children","className","content","like"],yu.propTypes={};var gu=yu;function bu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("user",n),s=re(bu,t),u=ie(bu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}bu.handledProps=["as","children","className","content"],bu.propTypes={},bu.defaultProps={as:"a"};var _u=bu;function wu(t){var e=t.children,n=t.className,i=t.content,o=t.date,s=t.user,u=Qt()("summary",n),c=re(wu,t),l=ie(wu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),Yt(_u,function(t){return{content:t}},s,{autoGenerateKey:!1}),i,Yt(hu,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),e)}wu.handledProps=["as","children","className","content","date","user"],wu.propTypes={};var Eu=wu;function Tu(t){var e=t.children,n=t.className,i=t.content,o=t.extraImages,s=t.extraText,u=t.date,c=t.meta,l=t.summary,f=Qt()("content",n),h=re(Tu,t),p=ie(Tu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Yt(hu,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(Eu,function(t){return{content:t}},l,{autoGenerateKey:!1}),i,Yt(du,function(t){return{text:!0,content:t}},s,{autoGenerateKey:!1}),Yt(du,function(t){return{images:t}},o,{autoGenerateKey:!1}),Yt(gu,function(t){return{content:t}},c,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),e)}Tu.handledProps=["as","children","className","content","date","extraImages","extraText","meta","summary"],Tu.propTypes={};var Cu=Tu;function xu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=t.image,u=Qt()("label",n),c=re(xu,t),l=ie(xu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),i,Nn.create(o,{autoGenerateKey:!1}),Zt(s)):S.a.createElement(l,a()({},c,{className:u}),e)}xu.handledProps=["as","children","className","content","icon","image"],xu.propTypes={};var Su=xu;function ku(t){var e=t.content,n=t.children,r=t.className,i=t.date,o=t.extraImages,s=t.extraText,u=t.image,c=t.icon,l=t.meta,f=t.summary,h=Qt()("event",r),p=re(ku,t),d=ie(ku,t),v=e||i||o||s||l||f,m={content:e,date:i,extraImages:o,extraText:s,meta:l,summary:f};return S.a.createElement(d,a()({},p,{className:h}),Yt(Su,function(t){return{icon:t}},c,{autoGenerateKey:!1}),Yt(Su,function(t){return{image:t}},u,{autoGenerateKey:!1}),v&&S.a.createElement(Cu,m),n)}ku.handledProps=["as","children","className","content","date","extraImages","extraText","icon","image","meta","summary"],ku.propTypes={};var Nu=ku;function Au(t){var e=t.children,n=t.className,i=t.events,o=t.size,s=Qt()("ui",o,"feed",n),u=re(Au,t),c=ie(Au,t);if(!r.isNil(e))return S.a.createElement(c,a()({},u,{className:s}),e);var l=be()(i,function(t){var e=t.childKey,n=t.date,r=t.meta,i=t.summary,o=ps()(t,["childKey","date","meta","summary"]),s=e||[n,r,i].join("-");return S.a.createElement(Nu,a()({date:n,key:s,meta:r,summary:i},o))});return S.a.createElement(c,a()({},u,{className:s}),l)}Au.handledProps=["as","children","className","events","size"],Au.propTypes={},Au.Content=Cu,Au.Date=hu,Au.Event=Nu,Au.Extra=du,Au.Label=Su,Au.Like=mu,Au.Meta=gu,Au.Summary=Eu,Au.User=_u;var Iu=Au;function Ou(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ou,t),u=ie(Ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ou.handledProps=["as","children","className","content"],Ou.propTypes={},Ou.create=Xt(Ou,function(t){return{content:t}});var Pu=Ou;function Ru(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Ru,t),u=ie(Ru,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ru.handledProps=["as","children","className","content"],Ru.propTypes={},Ru.create=Xt(Ru,function(t){return{content:t}});var Du=Ru;function Mu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("extra",n),s=re(Mu,t),u=ie(Mu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Mu.handledProps=["as","children","className","content"],Mu.propTypes={},Mu.create=Xt(Mu,function(t){return{content:t}});var Lu=Mu;function Fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("meta",n),s=re(Fu,t),u=ie(Fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Fu.handledProps=["as","children","className","content"],Fu.propTypes={},Fu.create=Xt(Fu,function(t){return{content:t}});var Uu=Fu;function ju(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.verticalAlign,f=Qt()(dt(l),"content",n),h=re(ju,t),p=ie(ju,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Pu.create(u,{autoGenerateKey:!1}),Uu.create(c,{autoGenerateKey:!1}),Du.create(o,{autoGenerateKey:!1}),Lu.create(s,{autoGenerateKey:!1}),i):S.a.createElement(p,a()({},h,{className:f}),e)}ju.handledProps=["as","children","className","content","description","extra","header","meta","verticalAlign"],ju.propTypes={};var Bu=ju;function qu(t){var e=t.children,n=t.className,i=t.content,o=t.divided,s=t.items,u=t.link,c=t.relaxed,l=t.unstackable,f=Qt()("ui",ct(o,"divided"),ct(u,"link"),ct(l,"unstackable"),ft(c,"relaxed"),"items",n),h=re(qu,t),p=ie(qu,t);if(!r.isNil(e))return S.a.createElement(p,a()({},h,{className:f}),e);if(!r.isNil(i))return S.a.createElement(p,a()({},h,{className:f}),i);var d=be()(s,function(t){var e=t.childKey,n=ps()(t,["childKey"]),r=e||[n.content,n.description,n.header,n.meta].join("-");return S.a.createElement(Ku,a()({},n,{key:r}))});return S.a.createElement(p,a()({},h,{className:f}),d)}qu.handledProps=["as","children","className","content","divided","items","link","relaxed","unstackable"],qu.propTypes={};var Vu=qu;function Wu(t){var e=t.size,n=re(Wu,t);return S.a.createElement(Hn,a()({},n,{size:e,ui:!!e,wrapped:!0}))}Wu.handledProps=["size"],Wu.propTypes={},Wu.create=Xt(Wu,function(t){return{src:t}});var Hu=Wu;function zu(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.image,l=t.meta,f=Qt()("item",n),h=re(zu,t),p=ie(zu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Hu.create(c,{autoGenerateKey:!1}),S.a.createElement(Bu,{content:i,description:o,extra:s,header:u,meta:l})):S.a.createElement(p,a()({},h,{className:f}),e)}zu.handledProps=["as","children","className","content","description","extra","header","image","meta"],zu.Content=Bu,zu.Description=Du,zu.Extra=Lu,zu.Group=Vu,zu.Header=Pu,zu.Image=Hu,zu.Meta=Uu,zu.propTypes={};var Ku=zu;function Gu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.horizontal,u=t.inverted,c=t.items,l=t.size,f=t.widths,h=Qt()("ui",i,l,ct(s,"horizontal"),ct(u,"inverted"),vt(f),"statistics",n),p=re(Gu,t),d=ie(Gu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(d,a()({},p,{className:h}),be()(c,function(t){return tc.create(t)})):S.a.createElement(d,a()({},p,{className:h}),o):S.a.createElement(d,a()({},p,{className:h}),e)}Gu.handledProps=["as","children","className","color","content","horizontal","inverted","items","size","widths"],Gu.propTypes={};var Qu=Gu;function Yu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("label",n),s=re(Yu,t),u=ie(Yu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Yu.handledProps=["as","children","className","content"],Yu.propTypes={},Yu.create=Xt(Yu,function(t){return{content:t}});var Xu=Yu;function $u(t){var e=t.children,n=t.className,i=t.content,o=t.text,s=Qt()(ct(o,"text"),"value",n),u=re($u,t),c=ie($u,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}$u.handledProps=["as","children","className","content","text"],$u.propTypes={},$u.create=Xt($u,function(t){return{content:t}});var Ju=$u;function Zu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.floated,u=t.horizontal,c=t.inverted,l=t.label,f=t.size,h=t.text,p=t.value,d=Qt()("ui",i,f,lt(s,"floated"),ct(u,"horizontal"),ct(c,"inverted"),"statistic",n),v=re(Zu,t),m=ie(Zu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(m,a()({},v,{className:d}),Ju.create(p,{defaultProps:{text:h},autoGenerateKey:!1}),Xu.create(l,{autoGenerateKey:!1})):S.a.createElement(m,a()({},v,{className:d}),o):S.a.createElement(m,a()({},v,{className:d}),e)}Zu.handledProps=["as","children","className","color","content","floated","horizontal","inverted","label","size","text","value"],Zu.propTypes={},Zu.Group=Qu,Zu.Label=Xu,Zu.Value=Ju,Zu.create=Xt(Zu,function(t){return{content:t}});var tc=Zu;n.d(e,"Confirm",function(){return Fr}),n.d(e,"MountNode",function(){return Sr}),n.d(e,"Pagination",function(){return Yr}),n.d(e,"PaginationItem",function(){return Qr}),n.d(e,"Portal",function(){return Mn}),n.d(e,"Radio",function(){return Jr}),n.d(e,"Ref",function(){return Rn}),n.d(e,"Responsive",function(){return Zr}),n.d(e,"Select",function(){return Mi}),n.d(e,"TextArea",function(){return ji}),n.d(e,"TransitionablePortal",function(){return zi}),n.d(e,"Visibility",function(){return Ki}),n.d(e,"Breadcrumb",function(){return $i}),n.d(e,"BreadcrumbDivider",function(){return Qi}),n.d(e,"BreadcrumbSection",function(){return Yi}),n.d(e,"Form",function(){return _o}),n.d(e,"FormButton",function(){return eo}),n.d(e,"FormCheckbox",function(){return ro}),n.d(e,"FormDropdown",function(){return oo}),n.d(e,"FormField",function(){return Zi}),n.d(e,"FormGroup",function(){return so}),n.d(e,"FormInput",function(){return fo}),n.d(e,"FormRadio",function(){return po}),n.d(e,"FormSelect",function(){return mo}),n.d(e,"FormTextArea",function(){return go}),n.d(e,"Grid",function(){return So}),n.d(e,"GridColumn",function(){return Eo}),n.d(e,"GridRow",function(){return Co}),n.d(e,"Menu",function(){return Kr}),n.d(e,"MenuHeader",function(){return jr}),n.d(e,"MenuItem",function(){return Vr}),n.d(e,"MenuMenu",function(){return Hr}),n.d(e,"Message",function(){return Mo}),n.d(e,"MessageContent",function(){return No}),n.d(e,"MessageHeader",function(){return Io}),n.d(e,"MessageItem",function(){return Po}),n.d(e,"MessageList",function(){return Do}),n.d(e,"Table",function(){return Yo}),n.d(e,"TableBody",function(){return Fo}),n.d(e,"TableCell",function(){return jo}),n.d(e,"TableFooter",function(){return Wo}),n.d(e,"TableHeader",function(){return qo}),n.d(e,"TableHeaderCell",function(){return zo}),n.d(e,"TableRow",function(){return Go}),n.d(e,"Button",function(){return rr}),n.d(e,"ButtonContent",function(){return $n}),n.d(e,"ButtonGroup",function(){return Zn}),n.d(e,"ButtonOr",function(){return er}),n.d(e,"Container",function(){return $o}),n.d(e,"Divider",function(){return Zo}),n.d(e,"Flag",function(){return Ti}),n.d(e,"Header",function(){return oa}),n.d(e,"HeaderContent",function(){return ra}),n.d(e,"HeaderSubheader",function(){return ea}),n.d(e,"Icon",function(){return Nn}),n.d(e,"IconGroup",function(){return Sn}),n.d(e,"Image",function(){return Hn}),n.d(e,"ImageGroup",function(){return qn}),n.d(e,"Input",function(){return co}),n.d(e,"Label",function(){return Yn}),n.d(e,"LabelDetail",function(){return Kn}),n.d(e,"LabelGroup",function(){return Qn}),n.d(e,"List",function(){return ba}),n.d(e,"ListContent",function(){return fa}),n.d(e,"ListDescription",function(){return sa}),n.d(e,"ListHeader",function(){return ca}),n.d(e,"ListIcon",function(){return pa}),n.d(e,"ListItem",function(){return va}),n.d(e,"ListList",function(){return ya}),n.d(e,"Loader",function(){return wa}),n.d(e,"Rail",function(){return Ta}),n.d(e,"Reveal",function(){return ka}),n.d(e,"RevealContent",function(){return xa}),n.d(e,"Segment",function(){return Oa}),n.d(e,"SegmentGroup",function(){return Aa}),n.d(e,"Step",function(){return Va}),n.d(e,"StepContent",function(){return Fa}),n.d(e,"StepDescription",function(){return Ra}),n.d(e,"StepGroup",function(){return Ba}),n.d(e,"StepTitle",function(){return Ma}),n.d(e,"Accordion",function(){return Qa}),n.d(e,"AccordionAccordion",function(){return Ka}),n.d(e,"AccordionContent",function(){return Ha}),n.d(e,"AccordionTitle",function(){return za}),n.d(e,"Checkbox",function(){return Xr}),n.d(e,"Dimmer",function(){return jn}),n.d(e,"DimmerDimmable",function(){return Fn}),n.d(e,"DimmerInner",function(){return Un}),n.d(e,"Dropdown",function(){return Ri}),n.d(e,"DropdownDivider",function(){return wi}),n.d(e,"DropdownHeader",function(){return ki}),n.d(e,"DropdownItem",function(){return xi}),n.d(e,"DropdownMenu",function(){return Ai}),n.d(e,"DropdownSearchInput",function(){return Oi}),n.d(e,"Embed",function(){return Ya}),n.d(e,"Modal",function(){return Mr}),n.d(e,"ModalActions",function(){return Or}),n.d(e,"ModalContent",function(){return Ir}),n.d(e,"ModalDescription",function(){return Rr}),n.d(e,"ModalHeader",function(){return Nr}),n.d(e,"Popup",function(){return es}),n.d(e,"PopupContent",function(){return Ja}),n.d(e,"PopupHeader",function(){return Za}),n.d(e,"Progress",function(){return ss}),n.d(e,"Rating",function(){return fs}),n.d(e,"RatingIcon",function(){return ls}),n.d(e,"Search",function(){return Es}),n.d(e,"SearchCategory",function(){return ys}),n.d(e,"SearchResult",function(){return bs}),n.d(e,"SearchResults",function(){return ws}),n.d(e,"Sidebar",function(){return Ns}),n.d(e,"SidebarPushable",function(){return Cs}),n.d(e,"SidebarPusher",function(){return Ss}),n.d(e,"Sticky",function(){return As}),n.d(e,"Tab",function(){return Rs}),n.d(e,"TabPane",function(){return Os}),n.d(e,"Transition",function(){return Hi}),n.d(e,"TransitionGroup",function(){return Vi}),n.d(e,"Advertisement",function(){return Ms}),n.d(e,"Card",function(){return Ks}),n.d(e,"CardContent",function(){return Ws}),n.d(e,"CardDescription",function(){return Fs}),n.d(e,"CardGroup",function(){return zs}),n.d(e,"CardHeader",function(){return js}),n.d(e,"CardMeta",function(){return qs}),n.d(e,"Comment",function(){return lu}),n.d(e,"CommentAction",function(){return Qs}),n.d(e,"CommentActions",function(){return Xs}),n.d(e,"CommentAuthor",function(){return Js}),n.d(e,"CommentAvatar",function(){return tu}),n.d(e,"CommentContent",function(){return nu}),n.d(e,"CommentGroup",function(){return iu}),n.d(e,"CommentMetadata",function(){return au}),n.d(e,"CommentText",function(){return uu}),n.d(e,"Feed",function(){return Iu}),n.d(e,"FeedContent",function(){return Cu}),n.d(e,"FeedDate",function(){return hu}),n.d(e,"FeedEvent",function(){return Nu}),n.d(e,"FeedExtra",function(){return du}),n.d(e,"FeedLabel",function(){return Su}),n.d(e,"FeedLike",function(){return mu}),n.d(e,"FeedMeta",function(){return gu}),n.d(e,"FeedSummary",function(){return Eu}),n.d(e,"FeedUser",function(){return _u}),n.d(e,"Item",function(){return Ku}),n.d(e,"ItemContent",function(){return Bu}),n.d(e,"ItemDescription",function(){return Du}),n.d(e,"ItemExtra",function(){return Lu}),n.d(e,"ItemGroup",function(){return Vu}),n.d(e,"ItemHeader",function(){return Pu}),n.d(e,"ItemImage",function(){return Hu}),n.d(e,"ItemMeta",function(){return Uu}),n.d(e,"Statistic",function(){return tc}),n.d(e,"StatisticGroup",function(){return Qu}),n.d(e,"StatisticLabel",function(){return Xu}),n.d(e,"StatisticValue",function(){return Ju})},function(t,e,n){var r=n(44),i=n(165);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){t.exports={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}},function(t,e,n){var r=n(67),i=n(515),o=n(514),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(178)("wks"),i=n(137),o=n(57).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(128);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(41),i=n(39),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==a||e==s||e==o||e==u}},function(t,e,n){var r=n(114),i=n(52),o=n(127),a=n(18),s=n(38),u=n(89),c=n(88),l=n(116),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||o(t)))return!t.length;var e=i(t);if(e==f||e==h)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},function(t,e,n){var r=n(161);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(57),i=n(26),o=n(184),a=n(80),s=n(54),u=function(t,e,n){var c,l,f,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,m=t&u.B,y=t&u.W,g=p?i:i[e]||(i[e]={}),b=g.prototype,_=p?r:d?r[e]:(r[e]||{}).prototype;for(c in p&&(n=e),n)(l=!h&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:n[c],g[c]=p&&"function"!=typeof _[c]?n[c]:m&&l?o(f,r):y&&_[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((g.virtual||(g.virtual={}))[c]=f,t&u.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(544),i=n(535);function o(t){return(o="function"==typeof i&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t})(t)}function a(e){return"function"==typeof i&&"symbol"===o(r)?t.exports=a=function(t){return o(t)}:t.exports=a=function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":o(t)},a(e)}t.exports=a},function(t,e,n){var r=n(244),i=n(243);t.exports=function(t,e){if(null==t)return{};var n,o,a={},s=i(t);for(o=0;o<s.length;o++)n=s[o],e.indexOf(n)>=0||(a[n]=t[n]);if(r){var u=r(t);for(o=0;o<u.length;o++)n=u[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},function(t,e,n){var r=n(457),i=n(166),o=n(456),a=n(228),s=n(227),u=n(41),c=n(249),l=c(r),f=c(i),h=c(o),p=c(a),d=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,n){var r=n(47),i=n(248),o=n(164);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(71);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(55),i=n(264),o=n(183),a=Object.defineProperty;e.f=n(70)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(200),i=n(62),o=n(34),a=n(357),s=n(18);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e,n){var r=n(234),i=n(34),o=n(437),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&s(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r=n(41),i=n(30),o="[object Number]";t.exports=function(t){return"number"==typeof t||i(t)&&r(t)==o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"PageCard"]},o.default.createElement(s.Container,{style:this.props.containerStyle,className:a.default.container},this.props.children))}}]),e}();e.default=c},function(t,e,n){var r=n(160),i=n(468)(r);t.exports=i},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){var r=n(68),i=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e,n){var r=n(509),i=n(506);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(33).Symbol;t.exports=r},function(t,e,n){var r=n(41),i=n(30),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(261),i=n(181);t.exports=function(t){return r(i(t))}},function(t,e,n){t.exports=!n(79)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(362),i=n(28);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(239),i=n(474),o=n(34),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(201);t.exports=function(t){return t&&t.length?r(t):[]}},function(t,e,n){var r=n(23)("flow",n(365));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(s.Container,{text:!0},o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageHeader},this.props.header),o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageSubHeader},this.props.subheader),o.default.createElement("div",{class:a.default.footer},o.default.createElement(s.Button,{className:a.default.pageDown,circular:!0,onClick:this.props.scrollTarget},"Scroll Down")))}}]),e}();e.default=c},function(t,e,n){var r=n(130),i=n(38),o=n(91),a=n(39);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(56),i=n(95);t.exports=n(70)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(41),i=n(107),o=n(30),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!o(t)||r(t)!=a)return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(325),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!=s){var l=a<<4&240|s>>2;if(r.push(l),64!=u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},c=function(t){try{return u.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function l(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=l(t[n],e[n]));return t}var f=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}(),h=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},p="FirebaseError",d=Error.captureStackTrace;var v=function(){return function(t,e){if(this.code=t,this.message=e,d)d(this,m.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=p,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.name=p;var m=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new v(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}();function y(t){return JSON.parse(t)}var g=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=y(c(o[0])||""),n=y(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}},b=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},_=function(t,e){return b(e,function(e,n){t[e]=n}),t},w=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},E=function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}return r.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},e}(function(){return function(){this.blockSize=-1}}());var T=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=C),void 0===r.error&&(r.error=C),void 0===r.complete&&(r.complete=C);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}}),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}();function C(){}function x(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}e.assert=o,e.assertionError=a,e.base64=u,e.base64Decode=c,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.CONSTANTS=i,e.deepCopy=function(t){return l(void 0,t)},e.deepExtend=l,e.patchProperty=function(t,e,n){t[e]=n},e.Deferred=f,e.getUA=h,e.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},e.ErrorFactory=m,e.FirebaseError=v,e.patchCapture=function(t){var e=d;return d=t,e},e.jsonEval=y,e.stringify=function(t){return JSON.stringify(t)},e.decode=g,e.isAdmin=function(t){var e=g(t).claims;return"object"==typeof e&&!0===e.admin},e.issuedAtTime=function(t){var e=g(t).claims;return"object"==typeof e&&e.hasOwnProperty("iat")?e.iat:null},e.isValidFormat=function(t){var e=g(t),n=e.claims;return!!e.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e,n,r=g(t).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?e=r.nbf:r.hasOwnProperty("iat")&&(e=r.iat),n=r.hasOwnProperty("exp")?r.exp:e+86400),i&&e&&n&&i>=e&&i<=n},e.clone=function(t){return _({},t)},e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.every=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0},e.extend=_,e.findKey=w,e.findValue=function(t,e,n){var r=w(t,e,n);return r&&t[r]},e.forEach=b,e.getAnyKey=function(t){for(var e in t)return e},e.getCount=function(t){var e=0;for(var n in t)e++;return e},e.getValues=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},e.isEmpty=function(t){for(var e in t)return!1;return!0},e.isNonNullObject=function(t){return"object"==typeof t&&null!==t},e.map=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},e.safeGet=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},e.querystring=function(t){var e=[];return b(t,function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e},e.Sha1=E,e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&&e(t)})}},e.createSubscribe=function(t,e){var n=new T(t,e);return n.subscribe.bind(n)},e.errorPrefix=x,e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(x(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(x(t,e,r)+"must be a valid context object.")},e.validateNamespace=function(t,e,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(x(t,e,r)+"must be a valid firebase namespace.")},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;o(++r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e}},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(564)},function(t,e,n){var r=n(108),i=n(112);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(39),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){(function(t){var r=n(33),i=n(471),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(117)(t))},function(t,e,n){var r=n(162),i=n(476);t.exports=function t(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(18),i=n(168),o=n(251),a=n(43);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,n){var r=n(181);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(262),i=n(177);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41),i=n(18),o=n(30),a="[object String]";t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&r(t)==a}},function(t,e,n){var r=n(377),i=n(150)(function(t,e){return null==t?{}:r(t,e)});t.exports=i},function(t,e,n){t.exports=n(29)},function(t,e,n){var r=n(242),i=n(90),o=n(53),a=n(119),s=o(function(t,e){return a(t)?r(t,i(e,1,a,!0)):[]});t.exports=s},function(t,e,n){var r=n(361),i=n(161),o=n(118);t.exports=function(t,e,n){return e=i(e),void 0===n?(n=e,e=0):n=i(n),t=o(t),r(t,e,n)}},function(t,e,n){"use strict";n.r(e);var r=n(24),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),c=n(27),l=n.n(c),f=n(25),h=n.n(f);function p(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],i=t&&p(t),o=e&&p(e),a=i||o;if(t&&p(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var c=0,l=r.length;l>=0;l--){var f=r[l];"."===f?d(r,l):".."===f?(d(r,l),c++):c&&(d(r,l),c--)}if(!a)for(;c--;c)r.unshift("..");!a||""===r[0]||r[0]&&p(r[0])||r.unshift("");var h=r.join("/");return s&&"/"!==h.substr(-1)&&(h+="/"),h},m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var y=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var r=void 0===e?"undefined":m(e);if(r!==(void 0===n?"undefined":m(n)))return!1;if("object"===r){var i=e.valueOf(),o=n.valueOf();if(i!==e||o!==n)return t(i,o);var a=Object.keys(e),s=Object.keys(n);return a.length===s.length&&a.every(function(r){return t(e[r],n[r])})}return!1},g=function(t){return"/"===t.charAt(0)?t:"/"+t},b=function(t){return"/"===t.charAt(0)?t.substr(1):t},_=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},w=function(t,e){return _(t,e)?t.substr(e.length):t},E=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},T=function(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i},C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},x=function(t,e,n,r){var i=void 0;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=C({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=v(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},S=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&y(t.state,e.state)},k=function(){var t=null,e=[];return{setPrompt:function(e){return l()(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):(l()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}},N=!("undefined"==typeof window||!window.document||!window.document.createElement),A=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},I=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},O=function(t,e){return e(window.confirm(t))},P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},D=function(){try{return window.history.state||{}}catch(t){return{}}},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Browser history needs a DOM");var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t.forceRefresh,a=void 0!==o&&o,s=t.getUserConfirmation,u=void 0===s?O:s,c=t.keyLength,f=void 0===c?6:c,p=t.basename?E(g(t.basename)):"",d=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return l()(!p||_(o,p),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+p+'".'),p&&(o=w(o,p)),x(o,r,n)},v=function(){return Math.random().toString(36).substr(2,f)},m=k(),y=function(t){R(H,t),H.length=n.length,m.notifyListeners(H.location,H.action)},b=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||M(d(t.state))},C=function(){M(d(D()))},S=!1,M=function(t){S?(S=!1,y()):m.confirmTransitionTo(t,"POP",u,function(e){e?y({action:"POP",location:t}):L(t)})},L=function(t){var e=H.location,n=U.indexOf(e.key);-1===n&&(n=0);var r=U.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(S=!0,B(i))},F=d(D()),U=[F.key],j=function(t){return p+T(t)},B=function(t){n.go(t)},q=0,V=function(t){1===(q+=t)?(A(window,"popstate",b),i&&A(window,"hashchange",C)):0===q&&(I(window,"popstate",b),i&&I(window,"hashchange",C))},W=!1,H={length:n.length,action:"POP",location:F,createHref:j,push:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"PUSH",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.pushState({key:o,state:s},null,e),a)window.location.href=e;else{var u=U.indexOf(H.location.key),c=U.slice(0,-1===u?0:u+1);c.push(i.key),U=c,y({action:"PUSH",location:i})}else l()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"REPLACE",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.replaceState({key:o,state:s},null,e),a)window.location.replace(e);else{var u=U.indexOf(H.location.key);-1!==u&&(U[u]=i.key),y({action:"REPLACE",location:i})}else l()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:B,goBack:function(){return B(-1)},goForward:function(){return B(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=m.setPrompt(t);return W||(V(1),W=!0),function(){return W&&(W=!1,V(-1)),e()}},listen:function(t){var e=m.appendListener(t);return V(1),function(){V(-1),e()}}};return H},L=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+b(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:b,decodePath:g},slash:{encodePath:g,decodePath:g}},U=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},j=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Hash history needs a DOM");var e=window.history,n=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?O:r,o=t.hashType,a=void 0===o?"slash":o,s=t.basename?E(g(t.basename)):"",u=F[a],c=u.encodePath,f=u.decodePath,p=function(){var t=f(U());return l()(!s||_(t,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+s+'".'),s&&(t=w(t,s)),x(t)},d=k(),v=function(t){L(z,t),z.length=e.length,d.notifyListeners(z.location,z.action)},m=!1,y=null,b=function(){var t=U(),e=c(t);if(t!==e)j(e);else{var n=p(),r=z.location;if(!m&&S(r,n))return;if(y===T(n))return;y=null,C(n)}},C=function(t){m?(m=!1,v()):d.confirmTransitionTo(t,"POP",i,function(e){e?v({action:"POP",location:t}):P(t)})},P=function(t){var e=z.location,n=B.lastIndexOf(T(e));-1===n&&(n=0);var r=B.lastIndexOf(T(t));-1===r&&(r=0);var i=n-r;i&&(m=!0,q(i))},R=U(),D=c(R);R!==D&&j(D);var M=p(),B=[T(M)],q=function(t){l()(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},V=0,W=function(t){1===(V+=t)?A(window,"hashchange",b):0===V&&I(window,"hashchange",b)},H=!1,z={length:e.length,action:"POP",location:M,createHref:function(t){return"#"+c(s+T(t))},push:function(t,e){l()(void 0===e,"Hash history cannot push state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"PUSH",i,function(t){if(t){var e=T(n),r=c(s+e);if(U()!==r){y=e,function(t){window.location.hash=t}(r);var i=B.lastIndexOf(T(z.location)),o=B.slice(0,-1===i?0:i+1);o.push(e),B=o,v({action:"PUSH",location:n})}else l()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),v()}})},replace:function(t,e){l()(void 0===e,"Hash history cannot replace state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"REPLACE",i,function(t){if(t){var e=T(n),r=c(s+e);U()!==r&&(y=e,j(r));var i=B.indexOf(T(z.location));-1!==i&&(B[i]=e),v({action:"REPLACE",location:n})}})},go:q,goBack:function(){return q(-1)},goForward:function(){return q(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=d.setPrompt(t);return H||(W(1),H=!0),function(){return H&&(H=!1,W(-1)),e()}},listen:function(t){var e=d.appendListener(t);return W(1),function(){W(-1),e()}}};return z},q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},W=function(t,e,n){return Math.min(Math.max(t,e),n)},H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,o=void 0===i?0:i,a=t.keyLength,s=void 0===a?6:a,u=k(),c=function(t){V(m,t),m.length=m.entries.length,u.notifyListeners(m.location,m.action)},f=function(){return Math.random().toString(36).substr(2,s)},h=W(o,0,r.length-1),p=r.map(function(t){return x(t,void 0,"string"==typeof t?f():t.key||f())}),d=T,v=function(t){var n=W(m.index+t,0,m.entries.length-1),r=m.entries[n];u.confirmTransitionTo(r,"POP",e,function(t){t?c({action:"POP",location:r,index:n}):c()})},m={length:p.length,action:"POP",location:p[h],index:h,entries:p,createHref:d,push:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),c({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(m.entries[m.index]=r,c({action:"REPLACE",location:r}))})},go:v,goBack:function(){return v(-1)},goForward:function(){return v(1)},canGo:function(t){var e=m.index+t;return e>=0&&e<m.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.setPrompt(t)},listen:function(t){return u.appendListener(t)}};return m},z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function K(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var G=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=K(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props.history.location.pathname)},K(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:z({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,r=e.history;h()(null==n||1===a.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){i()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?a.a.Children.only(t):null},e}(a.a.Component);G.propTypes={history:u.a.object.isRequired,children:u.a.node},G.contextTypes={router:u.a.object},G.childContextTypes={router:u.a.object.isRequired};var Q=G,Y=Q;function X(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var $=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=X(this,t.call.apply(t,[this].concat(o))),r.history=M(r.props),X(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);$.propTypes={basename:u.a.string,forceRefresh:u.a.bool,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var J=$;function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var tt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Z(this,t.call.apply(t,[this].concat(o))),r.history=B(r.props),Z(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);tt.propTypes={basename:u.a.string,getUserConfirmation:u.a.func,hashType:u.a.oneOf(["hashbang","noslash","slash"]),children:u.a.node};var et=tt,nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function rt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var it=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},ot=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=rt(this,t.call.apply(t,[this].concat(o))),r.handleClick=function(t){if(r.props.onClick&&r.props.onClick(t),!t.defaultPrevented&&0===t.button&&!r.props.target&&!it(t)){t.preventDefault();var e=r.context.router.history,n=r.props,i=n.replace,o=n.to;i?e.replace(o):e.push(o)}},rt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=t.innerRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["replace","to","innerRef"]);h()(this.context.router,"You should not use <Link> outside a <Router>"),h()(void 0!==e,'You must specify the "to" property');var i=this.context.router.history,o="string"==typeof e?x(e,null,null,i.location):e,s=i.createHref(o);return a.a.createElement("a",nt({},r,{onClick:this.handleClick,href:s,ref:n}))},e}(a.a.Component);ot.propTypes={onClick:u.a.func,target:u.a.string,replace:u.a.bool,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired,innerRef:u.a.oneOfType([u.a.string,u.a.func])},ot.defaultProps={replace:!1},ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired,createHref:u.a.func.isRequired}).isRequired}).isRequired};var at=ot;function st(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var ut=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=st(this,t.call.apply(t,[this].concat(o))),r.history=H(r.props),st(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Q,{history:this.history,children:this.props.children})},e}(a.a.Component);ut.propTypes={initialEntries:u.a.array,initialIndex:u.a.number,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var ct=ut,lt=n(144),ft=n.n(lt),ht={},pt=0,dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var r=e,i=r.path,o=r.exact,a=void 0!==o&&o,s=r.strict,u=void 0!==s&&s,c=r.sensitive,l=void 0!==c&&c;if(null==i)return n;var f=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=ht[n]||(ht[n]={});if(r[t])return r[t];var i=[],o={re:ft()(t,i,e),keys:i};return pt<1e4&&(r[t]=o,pt++),o}(i,{end:a,strict:u,sensitive:l}),h=f.re,p=f.keys,d=h.exec(t);if(!d)return null;var v=d[0],m=d.slice(1),y=t===v;return a&&!y?null:{path:i,url:"/"===i&&""===v?"/":v,isExact:y,params:p.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var yt=function(t){return 0===a.a.Children.count(t)},gt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=mt(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props,r.context.router)},mt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:vt({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,i=t.path,o=t.strict,a=t.exact,s=t.sensitive;if(n)return n;h()(e,"You should not use <Route> or withRouter() outside a <Router>");var u=e.route,c=(r||u.location).pathname;return dt(c,{path:i,strict:o,exact:a,sensitive:s},u.match)},e.prototype.componentWillMount=function(){i()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),i()(!(this.props.component&&this.props.children&&!yt(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),i()(!(this.props.render&&this.props.children&&!yt(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){i()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,r=e.component,i=e.render,o=this.context.router,s=o.history,u=o.route,c=o.staticContext,l={match:t,location:this.props.location||u.location,history:s,staticContext:c};return r?t?a.a.createElement(r,l):null:i?t?i(l):null:"function"==typeof n?n(l):n&&!yt(n)?a.a.Children.only(n):null},e}(a.a.Component);gt.propTypes={computedMatch:u.a.object,path:u.a.string,exact:u.a.bool,strict:u.a.bool,sensitive:u.a.bool,component:u.a.func,render:u.a.func,children:u.a.oneOfType([u.a.func,u.a.node]),location:u.a.object},gt.contextTypes={router:u.a.shape({history:u.a.object.isRequired,route:u.a.object.isRequired,staticContext:u.a.object})},gt.childContextTypes={router:u.a.object.isRequired};var bt=gt,_t=bt,wt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var Tt=function(t){var e=t.to,n=t.exact,r=t.strict,i=t.location,o=t.activeClassName,s=t.className,u=t.activeStyle,c=t.style,l=t.isActive,f=t["aria-current"],h=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),p="object"===(void 0===e?"undefined":Et(e))?e.pathname:e,d=p&&p.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return a.a.createElement(_t,{path:d,exact:n,strict:r,location:i,children:function(t){var n=t.location,r=t.match,i=!!(l?l(r,n):r);return a.a.createElement(at,wt({to:e,className:i?[s,o].filter(function(t){return t}).join(" "):s,style:i?wt({},c,u):c,"aria-current":i&&f||null},h))}})};Tt.propTypes={to:at.propTypes.to,exact:u.a.bool,strict:u.a.bool,location:u.a.object,activeClassName:u.a.string,className:u.a.string,activeStyle:u.a.object,style:u.a.object,isActive:u.a.func,"aria-current":u.a.oneOf(["page","step","location","date","time","true"])},Tt.defaultProps={activeClassName:"active","aria-current":"page"};var Ct=Tt;var xt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(a.a.Component);xt.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},xt.defaultProps={when:!0},xt.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired};var St=xt,kt={},Nt=0,At=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=kt[e]||(kt[e]={});if(n[t])return n[t];var r=ft.a.compile(t);return Nt<1e4&&(n[t]=r,Nt++),r}(t)(e,{pretty:!0})},It=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Ot=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=x(t.to),n=x(this.props.to);S(e,n)?i()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?At(n,e.params):It({},n,{pathname:At(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(a.a.Component);Ot.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},Ot.defaultProps={push:!1},Ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired};var Pt=Ot,Rt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function Dt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Mt=function(t){return"/"===t.charAt(0)?t:"/"+t},Lt=function(t,e){return t?Rt({},e,{pathname:Mt(t)+e.pathname}):e},Ft=function(t){return"string"==typeof t?t:T(t)},Ut=function(t){return function(){h()(!1,"You cannot %s with <StaticRouter>",t)}},jt=function(){},Bt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Dt(this,t.call.apply(t,[this].concat(o))),r.createHref=function(t){return Mt(r.props.basename+Ft(t))},r.handlePush=function(t){var e=r.props,n=e.basename,i=e.context;i.action="PUSH",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,i=e.context;i.action="REPLACE",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleListen=function(){return jt},r.handleBlock=function(){return jt},Dt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.componentWillMount=function(){i()(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Mt(t);return 0!==e.pathname.indexOf(n)?e:Rt({},e,{pathname:e.pathname.substr(n.length)})}(e,x(n)),push:this.handlePush,replace:this.handleReplace,go:Ut("go"),goBack:Ut("goBack"),goForward:Ut("goForward"),listen:this.handleListen,block:this.handleBlock};return a.a.createElement(Q,Rt({},r,{history:i}))},e}(a.a.Component);Bt.propTypes={basename:u.a.string,context:u.a.object.isRequired,location:u.a.oneOfType([u.a.string,u.a.object])},Bt.defaultProps={basename:"",location:"/"},Bt.childContextTypes={router:u.a.object.isRequired};var qt=Bt;var Vt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Switch> outside a <Router>")},e.prototype.componentWillReceiveProps=function(t){i()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,r=void 0,i=void 0;return a.a.Children.forEach(e,function(e){if(null==r&&a.a.isValidElement(e)){var o=e.props,s=o.path,u=o.exact,c=o.strict,l=o.sensitive,f=o.from,h=s||f;i=e,r=dt(n.pathname,{path:h,exact:u,strict:c,sensitive:l},t.match)}}),r?a.a.cloneElement(i,{location:n,computedMatch:r}):null},e}(a.a.Component);Vt.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},Vt.propTypes={children:u.a.node,location:u.a.object};var Wt=Vt,Ht=At,zt=dt,Kt=n(297),Gt=n.n(Kt),Qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Yt=function(t){var e=function(e){var n=e.wrappedComponentRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["wrappedComponentRef"]);return a.a.createElement(bt,{children:function(e){return a.a.createElement(t,Qt({},r,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:u.a.func},Gt()(e,t)};n.d(e,"BrowserRouter",function(){return J}),n.d(e,"HashRouter",function(){return et}),n.d(e,"Link",function(){return at}),n.d(e,"MemoryRouter",function(){return ct}),n.d(e,"NavLink",function(){return Ct}),n.d(e,"Prompt",function(){return St}),n.d(e,"Redirect",function(){return Pt}),n.d(e,"Route",function(){return _t}),n.d(e,"Router",function(){return Y}),n.d(e,"StaticRouter",function(){return qt}),n.d(e,"Switch",function(){return Wt}),n.d(e,"generatePath",function(){return Ht}),n.d(e,"matchPath",function(){return zt}),n.d(e,"withRouter",function(){return Yt})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=u(n(309)),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"Jumbotron"]},o.default.createElement(s.Container,null,this.props.children))}}]),e}();e.default=c},function(t,e,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),u=null,c=0,l=[],f=n(314);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(g(r.parts[a],e))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(g(r.parts[a],e));o[r.id]={id:r.id,refs:1,parts:s}}}}function p(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),d(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;n=u||(u=m(e)),r=w.bind(null,n,a,!1),i=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),d(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return h(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}t&&h(p(t,e),e);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}};var b,_=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e,n){var r=n(379),i=n(105),o=n(378);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(236)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(112),i=n(130),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e){var n="__lodash_placeholder__";t.exports=function(t,e){for(var r=-1,i=t.length,o=0,a=[];++r<i;){var s=t[r];s!==e&&s!==n||(t[r]=n,a[o++]=r)}return a}},function(t,e,n){var r=n(86),i=n(39);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=r(t.prototype),o=t.apply(n,e);return i(o)?o:n}}},function(t,e,n){var r=n(219),i=n(419),o=n(418),a=n(217),s=n(409),u=n(154),c=n(408),l=n(210),f=n(209),h=n(46),p="Expected a function",d=1,v=2,m=8,y=16,g=32,b=64,_=Math.max;t.exports=function(t,e,n,w,E,T,C,x){var S=e&v;if(!S&&"function"!=typeof t)throw new TypeError(p);var k=w?w.length:0;if(k||(e&=~(g|b),w=E=void 0),C=void 0===C?C:_(h(C),0),x=void 0===x?x:h(x),k-=E?E.length:0,e&b){var N=w,A=E;w=E=void 0}var I=S?void 0:u(t),O=[t,e,n,w,E,N,A,T,C,x];if(I&&c(O,I),t=O[0],e=O[1],n=O[2],w=O[3],E=O[4],!(x=O[9]=void 0===O[9]?S?0:t.length:_(O[9]-k,0))&&e&(m|y)&&(e&=~(m|y)),e&&e!=d)P=e==m||e==y?o(t,e,x):e!=g&&e!=(d|g)||E.length?a.apply(void 0,O):s(t,e,n,w);else var P=i(t,e,n);return f((I?r:l)(P,O),t,e)}},function(t,e,n){var r=n(247);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(88),i=n(469),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){(function(t){var r=n(252),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(117)(t))},function(t,e,n){var r=n(470),i=n(63),o=n(115),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(39),i=n(68),o=NaN,a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=u.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):s.test(t)?o:+t}},function(t,e,n){var r=n(38),i=n(30);t.exports=function(t){return i(t)&&r(t)}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(241),i=n(478),o=n(477);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e,n){var r=n(121);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(167),i=n(480),o=n(479);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}},function(t,e,n){var r=n(92),i=n(64);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(491),i=n(30),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(67),i=n(48),o=n(18),a=n(68),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e,n){var r=n(495);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(130);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(501),i=n(500),o=n(499),a=n(498),s=n(497);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(65)(Object,"create");t.exports=r},function(t,e,n){var r=n(136),i=n(95),o=n(69),a=n(183),s=n(54),u=n(264),c=Object.getOwnPropertyDescriptor;e.f=n(70)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r=n(542)(!0);n(258)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(112),i=n(160),o=n(34);t.exports=function(t,e){var n={};return e=o(e,3),i(t,function(t,i,o){r(n,i,e(t,i,o))}),n}},function(t,e,n){var r=n(245),i=n(341),o=(n(10),n(338));function a(e,n,s){return"undefined"!=typeof Reflect&&i?t.exports=a=i:t.exports=a=function(t,e,n){var i=o(t,e);if(i){var a=r(i,e);return a.get?a.get.call(n):a.value}},a(e,n,s||e)}t.exports=a},function(t,e,n){var r=n(349),i=n(43),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(o,r).replace(a,"")}},function(t,e,n){var r=n(158);t.exports=function(t,e){return r(t,e)}},function(t,e,n){var r=n(438)(n(189));t.exports=r},function(t,e,n){var r=n(554);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e))},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],p=n.index;if(s+=t.slice(a,p),a=p+f.length,h)s+=h[1];else{var d=t[a],v=n[2],m=n[3],y=n[4],g=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,C=n[2]||l,x=y||g;r.push({name:m||o++,prefix:v||"",delimiter:C,optional:T,repeat:E,partial:w,asterisk:!!_,pattern:x?c(x):_?".*":"[^"+u(C)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function s(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,i){for(var o="",s=n||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!=typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=u(h[p]),!e[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):u(h),!e[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"==typeof c)a+=u(c);else{var h=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){var r=n(23)("isNil",n(13),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("keys",n(28),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){(function(t,r){var i;
 
/**
 
/**
 
  * @license
 
  * @license
Line 18: Line 18:
 
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",h=1,p=2,d=4,v=1,m=2,y=1,g=2,b=4,_=8,w=16,E=32,T=64,C=128,x=256,S=512,k=30,N="...",A=800,I=16,O=1,P=2,R=1/0,D=9007199254740991,M=1.7976931348623157e308,L=NaN,F=4294967295,U=F-1,j=F>>>1,B=[["ary",C],["bind",y],["bindKey",g],["curry",_],["curryRight",w],["flip",S],["partial",E],["partialRight",T],["rearg",x]],q="[object Arguments]",V="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",z="[object Date]",K="[object DOMException]",G="[object Error]",Q="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",$="[object Number]",J="[object Null]",Z="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",dt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",yt="[object Uint16Array]",gt="[object Uint32Array]",bt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,Tt=/[&<>"']/g,Ct=RegExp(Et.source),xt=RegExp(Tt.source),St=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(Pt.source),Dt=/^\s+|\s+$/g,Mt=/^\s+/,Lt=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qt=/\\(\\)?/g,Vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Gt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Zt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Zt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",he="(?:"+oe+"|"+ae+")",pe="(?:"+fe+"|"+ae+")",de="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+de+("(?:\\u200d(?:"+[ue,ce,le].join("|")+")[\\ufe0e\\ufe0f]?"+de+")*"),me="(?:"+[ie,ce,le].join("|")+")"+ve,ye="(?:"+[ue+ne+"?",ne,ce,le,te].join("|")+")",ge=RegExp("['’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ye+ve,"g"),we=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+he,"$"].join("|")+")",fe+"?"+he+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),Ee=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),Te=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xe=-1,Se={};Se[lt]=Se[ft]=Se[ht]=Se[pt]=Se[dt]=Se[vt]=Se[mt]=Se[yt]=Se[gt]=!0,Se[q]=Se[V]=Se[ut]=Se[H]=Se[ct]=Se[z]=Se[G]=Se[Q]=Se[X]=Se[$]=Se[Z]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var ke={};ke[q]=ke[V]=ke[ut]=ke[ct]=ke[H]=ke[z]=ke[lt]=ke[ft]=ke[ht]=ke[pt]=ke[dt]=ke[X]=ke[$]=ke[Z]=ke[et]=ke[nt]=ke[rt]=ke[it]=ke[vt]=ke[mt]=ke[yt]=ke[gt]=!0,ke[G]=ke[Q]=ke[at]=!1;var Ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ae=parseFloat,Ie=parseInt,Oe="object"==typeof t&&t&&t.Object===Object&&t,Pe="object"==typeof self&&self&&self.Object===Object&&self,Re=Oe||Pe||Function("return this")(),De="object"==typeof e&&e&&!e.nodeType&&e,Me=De&&"object"==typeof r&&r&&!r.nodeType&&r,Le=Me&&Me.exports===De,Fe=Le&&Oe.process,Ue=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch(t){}}(),je=Ue&&Ue.isArrayBuffer,Be=Ue&&Ue.isDate,qe=Ue&&Ue.isMap,Ve=Ue&&Ue.isRegExp,We=Ue&&Ue.isSet,He=Ue&&Ue.isTypedArray;function ze(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ge(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Qe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Xe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function $e(t,e){return!!(null==t?0:t.length)&&un(t,e,0)>-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ze(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=hn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function un(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function cn(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function fn(t,e){var n=null==t?0:t.length;return n?vn(t,e)/n:L}function hn(t){return function(e){return null==e?o:e[t]}}function pn(t){return function(e){return null==t?o:t[e]}}function dn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function vn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function mn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function yn(t){return function(e){return t(e)}}function gn(t,e){return Ze(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&un(e,t[n],0)>-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var En=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Tn=pn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Cn(t){return"\\"+Ne[t]}function xn(t){return Ee.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function kn(t,e){return function(n){return t(e(n))}}function Nn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==f||(t[n]=f,o[i++]=n)}return o}function An(t,e){return"__proto__"==e?o:t[e]}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function On(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Pn(t){return xn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function Rn(t){return xn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var Dn=pn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Mn=function t(e){var n,r=(e=null==e?Re:Mn.defaults(Re.Object(),e,Mn.pick(Re,Ce))).Array,i=e.Date,Jt=e.Error,Zt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Zt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],ce=ae.toString,le=se.hasOwnProperty,fe=0,he=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,de=ce.call(ee),ve=Re._,me=ne("^"+ce.call(le).replace(Pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=Le?e.Buffer:o,_e=e.Symbol,Ee=e.Uint8Array,Ne=ye?ye.allocUnsafe:o,Oe=kn(ee.getPrototypeOf,ee),Pe=ee.create,De=se.propertyIsEnumerable,Me=oe.splice,Fe=_e?_e.isConcatSpreadable:o,Ue=_e?_e.iterator:o,on=_e?_e.toStringTag:o,pn=function(){try{var t=Bo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ln=e.clearTimeout!==Re.clearTimeout&&e.clearTimeout,Fn=i&&i.now!==Re.Date.now&&i.now,Un=e.setTimeout!==Re.setTimeout&&e.setTimeout,jn=te.ceil,Bn=te.floor,qn=ee.getOwnPropertySymbols,Vn=ye?ye.isBuffer:o,Wn=e.isFinite,Hn=oe.join,zn=kn(ee.keys,ee),Kn=te.max,Gn=te.min,Qn=i.now,Yn=e.parseInt,Xn=te.random,$n=oe.reverse,Jn=Bo(e,"DataView"),Zn=Bo(e,"Map"),tr=Bo(e,"Promise"),er=Bo(e,"Set"),nr=Bo(e,"WeakMap"),rr=Bo(ee,"create"),ir=nr&&new nr,or={},ar=fa(Jn),sr=fa(Zn),ur=fa(tr),cr=fa(er),lr=fa(nr),fr=_e?_e.prototype:o,hr=fr?fr.valueOf:o,pr=fr?fr.toString:o;function dr(t){if(Ns(t)&&!ys(t)&&!(t instanceof gr)){if(t instanceof yr)return t;if(le.call(t,"__wrapped__"))return ha(t)}return new yr(t)}var vr=function(){function t(){}return function(e){if(!ks(e))return{};if(Pe)return Pe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function mr(){}function yr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Er(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new wr;++e<n;)this.add(t[e])}function Tr(t){var e=this.__data__=new _r(t);this.size=e.size}function Cr(t,e){var n=ys(t),r=!n&&ms(t),i=!n&&!r&&ws(t),o=!n&&!r&&!i&&Ls(t),a=n||r||i||o,s=a?mn(t.length,re):[],u=s.length;for(var c in t)!e&&!le.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Go(c,u))||s.push(c);return s}function xr(t){var e=t.length;return e?t[Ei(0,e-1)]:o}function Sr(t,e){return ua(ro(t),Mr(e,0,t.length))}function kr(t){return ua(ro(t))}function Nr(t,e,n){(n===o||ps(t[e],n))&&(n!==o||e in t)||Rr(t,e,n)}function Ar(t,e,n){var r=t[e];le.call(t,e)&&ps(r,n)&&(n!==o||e in t)||Rr(t,e,n)}function Ir(t,e){for(var n=t.length;n--;)if(ps(t[n][0],e))return n;return-1}function Or(t,e,n,r){return Br(t,function(t,i,o){e(r,t,n(t),o)}),r}function Pr(t,e){return t&&io(e,iu(e),t)}function Rr(t,e,n){"__proto__"==e&&pn?pn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Dr(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Zs(t,e[n]);return a}function Mr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Lr(t,e,n,r,i,a){var s,u=e&h,c=e&p,l=e&d;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ks(t))return t;var f=ys(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return ro(t,s)}else{var v=Wo(t),m=v==Q||v==Y;if(ws(t))return $i(t,u);if(v==Z||v==q||m&&!i){if(s=c||m?{}:zo(t),!u)return c?function(t,e){return io(t,Vo(t),e)}(t,function(t,e){return t&&io(e,ou(e),t)}(s,t)):function(t,e){return io(t,qo(t),e)}(t,Pr(s,t))}else{if(!ke[v])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ut:return Ji(t);case H:case z:return new a(+t);case ct:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ft:case ht:case pt:case dt:case vt:case mt:case yt:case gt:return Zi(t,n);case X:return new a;case $:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,Wt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,hr?ee(hr.call(r)):{}}}(t,v,u)}}a||(a=new Tr);var y=a.get(t);if(y)return y;if(a.set(t,s),Rs(t))return t.forEach(function(r){s.add(Lr(r,e,n,r,t,a))}),s;if(As(t))return t.forEach(function(r,i){s.set(i,Lr(r,e,n,i,t,a))}),s;var g=f?o:(l?c?Ro:Po:c?ou:iu)(t);return Ge(g||t,function(r,i){g&&(r=t[i=r]),Ar(s,i,Lr(r,e,n,i,t,a))}),s}function Fr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Ur(t,e,n){if("function"!=typeof t)throw new ie(u);return ia(function(){t.apply(o,n)},e)}function jr(t,e,n,r){var i=-1,o=$e,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;n&&(e=Ze(e,yn(n))),r?(o=Je,s=!1):e.length>=a&&(o=bn,s=!1,e=new Er(e));t:for(;++i<u;){var f=t[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h==h){for(var p=l;p--;)if(e[p]===h)continue t;c.push(f)}else o(e,h,r)||c.push(f)}return c}dr.templateSettings={escape:St,evaluate:kt,interpolate:Nt,variable:"",imports:{_:dr}},dr.prototype=mr.prototype,dr.prototype.constructor=dr,yr.prototype=vr(mr.prototype),yr.prototype.constructor=yr,gr.prototype=vr(mr.prototype),gr.prototype.constructor=gr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===c?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?c:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Ir(e,t);return!(n<0||(n==e.length-1?e.pop():Me.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Ir(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Ir(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new(Zn||_r),string:new br}},wr.prototype.delete=function(t){var e=Uo(this,t).delete(t);return this.size-=e?1:0,e},wr.prototype.get=function(t){return Uo(this,t).get(t)},wr.prototype.has=function(t){return Uo(this,t).has(t)},wr.prototype.set=function(t,e){var n=Uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Er.prototype.add=Er.prototype.push=function(t){return this.__data__.set(t,c),this},Er.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.clear=function(){this.__data__=new _r,this.size=0},Tr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Tr.prototype.get=function(t){return this.__data__.get(t)},Tr.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!Zn||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new wr(r)}return n.set(t,e),this.size=n.size,this};var Br=so(Qr),qr=so(Yr,!0);function Vr(t,e){var n=!0;return Br(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Wr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s==s&&!Ms(s):n(s,u)))var u=s,c=a}return c}function Hr(t,e){var n=[];return Br(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function zr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Ko),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?zr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Kr=uo(),Gr=uo(!0);function Qr(t,e){return t&&Kr(t,e,iu)}function Yr(t,e){return t&&Gr(t,e,iu)}function Xr(t,e){return Xe(e,function(e){return Cs(t[e])})}function $r(t,e){for(var n=0,r=(e=Gi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Jr(t,e,n){var r=e(t);return ys(t)?r:tn(r,n(t))}function Zr(t){return null==t?t===o?ot:J:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=pe.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return pe.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Je:$e,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ze(h,yn(e))),l=Gn(h.length,l),c[u]=!n&&(e||a>=120&&h.length>=120)?new Er(u&&h):o}h=t[0];var p=-1,d=c[0];t:for(;++p<a&&f.length<l;){var v=h[p],m=e?e(v):v;if(v=n||0!==v?v:0,!(d?bn(d,m):i(f,m,n))){for(u=s;--u;){var y=c[u];if(!(y?bn(y,m):i(t[u],m,n)))continue t}d&&d.push(m),f.push(v)}}return f}function ii(t,e,n){var r=null==(t=na(t,e=Gi(e,t)))?t:t[la(Ta(e))];return null==r?o:ze(r,t,n)}function oi(t){return Ns(t)&&Zr(t)==q}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Ns(t)&&!Ns(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=ys(t),u=ys(e),c=s?V:Wo(t),l=u?V:Wo(e),f=(c=c==q?Z:c)==Z,h=(l=l==q?Z:l)==Z,p=c==l;if(p&&ws(t)){if(!ws(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Tr),s||Ls(t)?Io(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ct:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ut:return!(t.byteLength!=e.byteLength||!o(new Ee(t),new Ee(e)));case H:case z:case $:return ps(+t,+e);case G:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case X:var s=Sn;case nt:var u=r&v;if(s||(s=In),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=m,a.set(t,e);var l=Io(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(hr)return hr.call(t)==hr.call(e)}return!1}(t,e,c,n,r,i,a);if(!(n&v)){var d=f&&le.call(t,"__wrapped__"),y=h&&le.call(e,"__wrapped__");if(d||y){var g=d?t.value():t,b=y?e.value():e;return a||(a=new Tr),i(g,b,n,r,a)}}return!!p&&(a||(a=new Tr),function(t,e,n,r,i,a){var s=n&v,u=Po(t),c=u.length,l=Po(e).length;if(c!=l&&!s)return!1;for(var f=c;f--;){var h=u[f];if(!(s?h in e:le.call(e,h)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var d=!0;a.set(t,e),a.set(e,t);for(var m=s;++f<c;){h=u[f];var y=t[h],g=e[h];if(r)var b=s?r(g,y,h,e,t,a):r(y,g,h,t,e,a);if(!(b===o?y===g||i(y,g,n,r,a):b)){d=!1;break}m||(m="constructor"==h)}if(d&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var c=(u=n[i])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in t))return!1}else{var h=new Tr;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?ai(f,l,v|m,r,h):p))return!1}}return!0}function ui(t){return!(!ks(t)||he&&he in t)&&(Cs(t)?me:Kt).test(fa(t))}function ci(t){return"function"==typeof t?t:null==t?Iu:"object"==typeof t?ys(t)?vi(t[0],t[1]):di(t):ju(t)}function li(t){if(!Jo(t))return zn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fi(t){if(!ks(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Jo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function hi(t,e){return t<e}function pi(t,e){var n=-1,i=bs(t)?r(t.length):[];return Br(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function di(t){var e=jo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function vi(t,e){return Yo(t)&&Zo(e)?ta(la(t),e):function(n){var r=Zs(n,t);return r===o&&r===e?tu(n,t):ai(e,r,v|m)}}function mi(t,e,n,r,i){t!==e&&Kr(e,function(a,s){if(ks(a))i||(i=new Tr),function(t,e,n,r,i,a,s){var u=An(t,n),c=An(e,n),l=s.get(c);if(l)Nr(t,n,l);else{var f=a?a(u,c,n+"",t,e,s):o,h=f===o;if(h){var p=ys(c),d=!p&&ws(c),v=!p&&!d&&Ls(c);f=c,p||d||v?ys(u)?f=u:_s(u)?f=ro(u):d?(h=!1,f=$i(c,!0)):v?(h=!1,f=Zi(c,!0)):f=[]:Os(c)||ms(c)?(f=u,ms(u)?f=Hs(u):(!ks(u)||r&&Cs(u))&&(f=zo(c))):h=!1}h&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Nr(t,n,f)}}(t,e,s,n,mi,r,i);else{var u=r?r(An(t,s),a,s+"",t,e,i):o;u===o&&(u=a),Nr(t,s,u)}},ou)}function yi(t,e){var n=t.length;if(n)return Go(e+=e<0?n:0,n)?t[e]:o}function gi(t,e,n){var r=-1;return e=Ze(e.length?e:[Iu],yn(Fo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(pi(t,function(t,n,i){return{criteria:Ze(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=to(i[r],o[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=$r(t,a);n(s,a)&&ki(o,Gi(a,t),s)}return o}function _i(t,e,n,r){var i=r?cn:un,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=Ze(t,yn(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Me.call(s,u,1),Me.call(t,u,1);return t}function wi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Go(i)?Me.call(t,i,1):ji(t,i)}}return t}function Ei(t,e){return t+Bn(Xn()*(e-t+1))}function Ti(t,e){var n="";if(!t||e<1||e>D)return n;do{e%2&&(n+=t),(e=Bn(e/2))&&(t+=t)}while(e);return n}function Ci(t,e){return oa(ea(t,e,Iu),t+"")}function xi(t){return xr(pu(t))}function Si(t,e){var n=pu(t);return ua(n,Mr(e,0,n.length))}function ki(t,e,n,r){if(!ks(t))return t;for(var i=-1,a=(e=Gi(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var c=la(e[i]),l=n;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ks(f)?f:Go(e[i+1])?[]:{})}Ar(u,c,l),u=u[c]}return t}var Ni=ir?function(t,e){return ir.set(t,e),t}:Iu,Ai=pn?function(t,e){return pn(t,"toString",{configurable:!0,enumerable:!1,value:ku(e),writable:!0})}:Iu;function Ii(t){return ua(pu(t))}function Oi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Pi(t,e){var n;return Br(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Ri(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=j){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ms(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Di(t,e,Iu,n)}function Di(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,u=null===e,c=Ms(e),l=e===o;i<a;){var f=Bn((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,v=h==h,m=Ms(h);if(s)var y=r||v;else y=l?v&&(r||p):u?v&&p&&(r||!d):c?v&&p&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);y?i=f+1:a=f}return Gn(a,U)}function Mi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ps(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Li(t){return"number"==typeof t?t:Ms(t)?L:+t}function Fi(t){if("string"==typeof t)return t;if(ys(t))return Ze(t,Fi)+"";if(Ms(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-R?"-0":e}function Ui(t,e,n){var r=-1,i=$e,o=t.length,s=!0,u=[],c=u;if(n)s=!1,i=Je;else if(o>=a){var l=e?null:Co(t);if(l)return In(l);s=!1,i=bn,c=new Er}else c=e?[]:u;t:for(;++r<o;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue t;e&&c.push(h),u.push(f)}else i(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function ji(t,e){return null==(t=na(t,e=Gi(e,t)))||delete t[la(Ta(e))]}function Bi(t,e,n,r){return ki(t,e,n($r(t,e)),r)}function qi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Oi(t,r?0:o,r?o+1:i):Oi(t,r?o+1:0,r?i:o)}function Vi(t,e){var n=t;return n instanceof gr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function Wi(t,e,n){var i=t.length;if(i<2)return i?Ui(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=jr(a[o]||s,t[u],e,n));return Ui(zr(a,1),e,n)}function Hi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function zi(t){return _s(t)?t:[]}function Ki(t){return"function"==typeof t?t:Iu}function Gi(t,e){return ys(t)?t:Yo(t,e)?[t]:ca(zs(t))}var Qi=Ci;function Yi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Oi(t,e,n)}var Xi=Ln||function(t){return Re.clearTimeout(t)};function $i(t,e){if(e)return t.slice();var n=t.length,r=Ne?Ne(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new Ee(e).set(new Ee(t)),e}function Zi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ms(t),s=e!==o,u=null===e,c=e==e,l=Ms(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=Kn(a-s,0),f=r(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=Kn(a-u,0),h=r(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+n[s]]=t[o++]);return h}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):o;c===o&&(c=t[u]),i?Rr(n,u,c):Ar(n,u,c)}return n}function oo(t,e){return function(n,r){var i=ys(n)?Ke:Or,o=e?e():{};return i(n,t,Fo(r,2),o)}}function ao(t){return Ci(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function uo(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function co(t){return function(e){var n=xn(e=zs(e))?Rn(e):o,r=n?n[0]:e.charAt(0),i=n?Yi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Cu(mu(e).replace(ge,"")),t,"")}}function fo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=vr(t.prototype),r=t.apply(n,e);return ks(r)?r:n}}function ho(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Fo(n,3);e=iu(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function po(t){return Oo(function(e){var n=e.length,r=n,i=yr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(u);if(i&&!s&&"wrapper"==Mo(a))var s=new yr([],!0)}for(r=s?r:n;++r<n;){var c=Mo(a=e[r]),l="wrapper"==c?Do(a):o;s=l&&Xo(l[0])&&l[1]==(C|_|E|x)&&!l[4].length&&1==l[9]?s[Mo(l[0])].apply(s,l[3]):1==a.length&&Xo(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&ys(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function vo(t,e,n,i,a,s,u,c,l,f){var h=e&C,p=e&y,d=e&g,v=e&(_|w),m=e&S,b=d?o:fo(t);return function y(){for(var g=arguments.length,_=r(g),w=g;w--;)_[w]=arguments[w];if(v)var E=Lo(y),T=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,E);if(i&&(_=eo(_,i,a,v)),s&&(_=no(_,s,u,v)),g-=T,v&&g<f){var C=Nn(_,E);return Eo(t,e,vo,y.placeholder,n,_,C,c,l,f-g)}var x=p?n:this,S=d?x[t]:t;return g=_.length,c?_=function(t,e){for(var n=t.length,r=Gn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=Go(a,n)?i[a]:o}return t}(_,c):m&&g>1&&_.reverse(),h&&l<g&&(_.length=l),this&&this!==Re&&this instanceof y&&(S=b||fo(S)),S.apply(x,_)}}function mo(t,e){return function(n,r){return function(t,e,n,r){return Qr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function yo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Fi(n),r=Fi(r)):(n=Li(n),r=Li(r)),i=t(n,r)}return i}}function go(t){return Oo(function(e){return e=Ze(e,yn(Fo())),Ci(function(n){var r=this;return t(e,function(t){return ze(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Fi(e)).length;if(n<2)return n?Ti(e,t):e;var r=Ti(e,jn(t/Pn(e)));return xn(e)?Yi(Rn(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Qo(e,n,i)&&(n=i=o),e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n,i){for(var o=-1,a=Kn(jn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:Bs(i),t)}}function wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ws(e),n=Ws(n)),t(e,n)}}function Eo(t,e,n,r,i,a,s,u,c,l){var f=e&_;e|=f?E:T,(e&=~(f?T:E))&b||(e&=~(y|g));var h=[t,e,i,f?a:o,f?s:o,f?o:a,f?o:s,u,c,l],p=n.apply(o,h);return Xo(t)&&ra(p,h),p.placeholder=r,aa(p,t,e)}function To(t){var e=te[t];return function(t,n){if(t=Ws(t),n=null==n?0:Gn(qs(n),292)){var r=(zs(t)+"e").split("e");return+((r=(zs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Co=er&&1/In(new er([,-0]))[1]==R?function(t){return new er(t)}:Mu;function xo(t){return function(e){var n=Wo(e);return n==X?Sn(e):n==nt?On(e):function(t,e){return Ze(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,c,l){var h=e&g;if(!h&&"function"!=typeof t)throw new ie(u);var p=i?i.length:0;if(p||(e&=~(E|T),i=a=o),c=c===o?c:Kn(qs(c),0),l=l===o?l:qs(l),p-=a?a.length:0,e&T){var d=i,v=a;i=a=o}var m=h?o:Do(t),S=[t,e,n,i,a,d,v,s,c,l];if(m&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(y|g|C),a=r==C&&n==_||r==C&&n==x&&t[7].length<=e[8]||r==(C|x)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&y&&(t[2]=e[2],i|=n&y?0:b);var s=e[3];if(s){var u=t[3];t[3]=u?eo(u,s,e[4]):s,t[4]=u?Nn(t[3],f):e[4]}(s=e[5])&&(u=t[5],t[5]=u?no(u,s,e[6]):s,t[6]=u?Nn(t[5],f):e[6]),(s=e[7])&&(t[7]=s),r&C&&(t[8]=null==t[8]?e[8]:Gn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,m),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?h?0:t.length:Kn(S[9]-p,0))&&e&(_|w)&&(e&=~(_|w)),e&&e!=y)k=e==_||e==w?function(t,e,n){var i=fo(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=Lo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:Nn(u,l);return(s-=f.length)<n?Eo(t,e,vo,a.placeholder,o,u,f,o,o,n-s):ze(this&&this!==Re&&this instanceof a?i:t,this,u)}}(t,e,l):e!=E&&e!=(y|E)||a.length?vo.apply(o,S):function(t,e,n,i){var o=e&y,a=fo(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),h=this&&this!==Re&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return ze(h,o?n:this,f)}}(t,e,n,i);else var k=function(t,e,n){var r=e&y,i=fo(t);return function e(){return(this&&this!==Re&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((m?Ni:ra)(k,S),t,e)}function ko(t,e,n,r){return t===o||ps(t,se[n])&&!le.call(r,n)?e:t}function No(t,e,n,r,i,a){return ks(t)&&ks(e)&&(a.set(e,t),mi(t,e,o,No,a),a.delete(e)),t}function Ao(t){return Os(t)?o:t}function Io(t,e,n,r,i,a){var s=n&v,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=n&m?new Er:o;for(a.set(t,e),a.set(e,t);++f<u;){var d=t[f],y=e[f];if(r)var g=s?r(y,d,f,e,t,a):r(d,y,f,t,e,a);if(g!==o){if(g)continue;h=!1;break}if(p){if(!rn(e,function(t,e){if(!bn(p,e)&&(d===t||i(d,t,n,r,a)))return p.push(e)})){h=!1;break}}else if(d!==y&&!i(d,y,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Oo(t){return oa(ea(t,o,ga),t+"")}function Po(t){return Jr(t,iu,qo)}function Ro(t){return Jr(t,ou,Vo)}var Do=ir?function(t){return ir.get(t)}:Mu;function Mo(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Lo(t){return(le.call(dr,"placeholder")?dr:t).placeholder}function Fo(){var t=dr.iteratee||Ou;return t=t===Ou?ci:t,arguments.length?t(arguments[0],arguments[1]):t}function Uo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function jo(t){for(var e=iu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Zo(i)]}return e}function Bo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ui(n)?n:o}var qo=qn?function(t){return null==t?[]:(t=ee(t),Xe(qn(t),function(e){return De.call(t,e)}))}:Vu,Vo=qn?function(t){for(var e=[];t;)tn(e,qo(t)),t=Oe(t);return e}:Vu,Wo=Zr;function Ho(t,e,n){for(var r=-1,i=(e=Gi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&Go(a,i)&&(ys(t)||ms(t))}function zo(t){return"function"!=typeof t.constructor||Jo(t)?{}:vr(Oe(t))}function Ko(t){return ys(t)||ms(t)||!!(Fe&&t&&t[Fe])}function Go(t,e){var n=typeof t;return!!(e=null==e?D:e)&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t<e}function Qo(t,e,n){if(!ks(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&Go(e,n.length):"string"==r&&e in n)&&ps(n[e],t)}function Yo(t,e){if(ys(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ms(t))||It.test(t)||!At.test(t)||null!=e&&t in ee(e)}function Xo(t){var e=Mo(t),n=dr[e];if("function"!=typeof n||!(e in gr.prototype))return!1;if(t===n)return!0;var r=Do(n);return!!r&&t===r[0]}(Jn&&Wo(new Jn(new ArrayBuffer(1)))!=ct||Zn&&Wo(new Zn)!=X||tr&&"[object Promise]"!=Wo(tr.resolve())||er&&Wo(new er)!=nt||nr&&Wo(new nr)!=at)&&(Wo=function(t){var e=Zr(t),n=e==Z?t.constructor:o,r=n?fa(n):"";if(r)switch(r){case ar:return ct;case sr:return X;case ur:return"[object Promise]";case cr:return nt;case lr:return at}return e});var $o=ue?Cs:Wu;function Jo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function Zo(t){return t==t&&!ks(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Kn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Kn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),ze(t,this,u)}}function na(t,e){return e.length<2?t:$r(t,Oi(e,0,-1))}var ra=sa(Ni),ia=Un||function(t,e){return Re.setTimeout(t,e)},oa=sa(Ai);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ft,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ge(B,function(n){var r="_."+n[0];e&n[1]&&!$e(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ut);return e?e[1].split(jt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Qn(),i=I-(r-n);if(n=r,i>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ua(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Ei(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ca=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,function(t,n,r,i){e.push(r?i.replace(qt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ms(t))return t;var e=t+"";return"0"==e&&1/t==-R?"-0":e}function fa(t){if(null!=t){try{return ce.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ha(t){if(t instanceof gr)return t.clone();var e=new yr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var pa=Ci(function(t,e){return _s(t)?jr(t,zr(e,1,_s,!0)):[]}),da=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),Fo(n,2)):[]}),va=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),o,n):[]});function ma(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),sn(t,Fo(e,3),i)}function ya(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=qs(n),i=n<0?Kn(r+i,0):Gn(i,r-1)),sn(t,Fo(e,3),i,!0)}function ga(t){return null!=t&&t.length?zr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ci(function(t){var e=Ze(t,zi);return e.length&&e[0]===t[0]?ri(e):[]}),wa=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return e===Ta(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Fo(e,2)):[]}),Ea=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ta(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ca=Ci(xa);function xa(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Oo(function(t,e){var n=null==t?0:t.length,r=Dr(t,e);return wi(t,Ze(e,function(t){return Go(t,n)?+t:t}).sort(to)),r});function ka(t){return null==t?t:$n.call(t)}var Na=Ci(function(t){return Ui(zr(t,1,_s,!0))}),Aa=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Ui(zr(t,1,_s,!0),Fo(e,2))}),Ia=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Ui(zr(t,1,_s,!0),o,e)});function Oa(t){if(!t||!t.length)return[];var e=0;return t=Xe(t,function(t){if(_s(t))return e=Kn(t.length,e),!0}),mn(e,function(e){return Ze(t,hn(e))})}function Pa(t,e){if(!t||!t.length)return[];var n=Oa(t);return null==e?n:Ze(n,function(t){return ze(e,o,t)})}var Ra=Ci(function(t,e){return _s(t)?jr(t,e):[]}),Da=Ci(function(t){return Wi(Xe(t,_s))}),Ma=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Wi(Xe(t,_s),Fo(e,2))}),La=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Wi(Xe(t,_s),o,e)}),Fa=Ci(Oa);var Ua=Ci(function(t){var e=t.length,n=e>1?t[e-1]:o;return Pa(t,n="function"==typeof n?(t.pop(),n):o)});function ja(t){var e=dr(t);return e.__chain__=!0,e}function Ba(t,e){return e(t)}var qa=Oo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Dr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Ba,args:[i],thisArg:o}),new yr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Va=oo(function(t,e,n){le.call(t,n)?++t[n]:Rr(t,n,1)});var Wa=ho(ma),Ha=ho(ya);function za(t,e){return(ys(t)?Ge:Br)(t,Fo(e,3))}function Ka(t,e){return(ys(t)?Qe:qr)(t,Fo(e,3))}var Ga=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Rr(t,n,[e])});var Qa=Ci(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return Br(t,function(t){a[++i]=o?ze(e,t,n):ii(t,e,n)}),a}),Ya=oo(function(t,e,n){Rr(t,n,e)});function Xa(t,e){return(ys(t)?Ze:pi)(t,Fo(e,3))}var $a=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Ja=Ci(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qo(t,e[0],e[1])?e=[]:n>2&&Qo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,zr(e,1),[])}),Za=Fn||function(){return Re.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,C,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ci(function(t,e,n){var r=y;if(n.length){var i=Nn(n,Lo(ns));r|=E}return So(t,r,e,n,i)}),rs=Ci(function(t,e,n){var r=y|g;if(n.length){var i=Nn(n,Lo(rs));r|=E}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new ie(u);function v(e){var n=r,a=i;return r=i=o,f=e,s=t.apply(a,n)}function m(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=a}function y(){var t=Za();if(m(t))return g(t);c=ia(y,function(t){var n=e-(t-l);return p?Gn(n,a-(t-f)):n}(t))}function g(t){return c=o,d&&r?v(t):(r=i=o,s)}function b(){var t=Za(),n=m(t);if(r=arguments,i=this,l=t,n){if(c===o)return function(t){return f=t,c=ia(y,e),h?v(t):s}(l);if(p)return c=ia(y,e),v(l)}return c===o&&(c=ia(y,e)),s}return e=Ws(e)||0,ks(n)&&(h=!!n.leading,a=(p="maxWait"in n)?Kn(Ws(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==o&&Xi(c),f=0,r=l=i=c=o},b.flush=function(){return c===o?s:g(Za())},b}var os=Ci(function(t,e){return Ur(t,1,e)}),as=Ci(function(t,e,n){return Ur(t,Ws(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function us(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=wr;var cs=Qi(function(t,e){var n=(e=1==e.length&&ys(e[0])?Ze(e[0],yn(Fo())):Ze(zr(e,1),yn(Fo()))).length;return Ci(function(r){for(var i=-1,o=Gn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ze(t,this,r)})}),ls=Ci(function(t,e){var n=Nn(e,Lo(ls));return So(t,E,o,e,n)}),fs=Ci(function(t,e){var n=Nn(e,Lo(fs));return So(t,T,o,e,n)}),hs=Oo(function(t,e){return So(t,x,o,o,o,e)});function ps(t,e){return t===e||t!=t&&e!=e}var ds=wo(ti),vs=wo(function(t,e){return t>=e}),ms=oi(function(){return arguments}())?oi:function(t){return Ns(t)&&le.call(t,"callee")&&!De.call(t,"callee")},ys=r.isArray,gs=je?yn(je):function(t){return Ns(t)&&Zr(t)==ut};function bs(t){return null!=t&&Ss(t.length)&&!Cs(t)}function _s(t){return Ns(t)&&bs(t)}var ws=Vn||Wu,Es=Be?yn(Be):function(t){return Ns(t)&&Zr(t)==z};function Ts(t){if(!Ns(t))return!1;var e=Zr(t);return e==G||e==K||"string"==typeof t.message&&"string"==typeof t.name&&!Os(t)}function Cs(t){if(!ks(t))return!1;var e=Zr(t);return e==Q||e==Y||e==W||e==tt}function xs(t){return"number"==typeof t&&t==qs(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=D}function ks(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ns(t){return null!=t&&"object"==typeof t}var As=qe?yn(qe):function(t){return Ns(t)&&Wo(t)==X};function Is(t){return"number"==typeof t||Ns(t)&&Zr(t)==$}function Os(t){if(!Ns(t)||Zr(t)!=Z)return!1;var e=Oe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ce.call(n)==de}var Ps=Ve?yn(Ve):function(t){return Ns(t)&&Zr(t)==et};var Rs=We?yn(We):function(t){return Ns(t)&&Wo(t)==nt};function Ds(t){return"string"==typeof t||!ys(t)&&Ns(t)&&Zr(t)==rt}function Ms(t){return"symbol"==typeof t||Ns(t)&&Zr(t)==it}var Ls=He?yn(He):function(t){return Ns(t)&&Ss(t.length)&&!!Se[Zr(t)]};var Fs=wo(hi),Us=wo(function(t,e){return t<=e});function js(t){if(!t)return[];if(bs(t))return Ds(t)?Rn(t):ro(t);if(Ue&&t[Ue])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ue]());var e=Wo(t);return(e==X?Sn:e==nt?In:pu)(t)}function Bs(t){return t?(t=Ws(t))===R||t===-R?(t<0?-1:1)*M:t==t?t:0:0===t?t:0}function qs(t){var e=Bs(t),n=e%1;return e==e?n?e-n:e:0}function Vs(t){return t?Mr(qs(t),0,F):0}function Ws(t){if("number"==typeof t)return t;if(Ms(t))return L;if(ks(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ks(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Dt,"");var n=zt.test(t);return n||Gt.test(t)?Ie(t.slice(2),n?2:8):Ht.test(t)?L:+t}function Hs(t){return io(t,ou(t))}function zs(t){return null==t?"":Fi(t)}var Ks=ao(function(t,e){if(Jo(e)||bs(e))io(e,iu(e),t);else for(var n in e)le.call(e,n)&&Ar(t,n,e[n])}),Gs=ao(function(t,e){io(e,ou(e),t)}),Qs=ao(function(t,e,n,r){io(e,ou(e),t,r)}),Ys=ao(function(t,e,n,r){io(e,iu(e),t,r)}),Xs=Oo(Dr);var $s=Ci(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Qo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=ou(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===o||ps(f,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Js=Ci(function(t){return t.push(o,No),ze(su,o,t)});function Zs(t,e,n){var r=null==t?o:$r(t,e);return r===o?n:r}function tu(t,e){return null!=t&&Ho(t,e,ni)}var eu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=n},ku(Iu)),nu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Fo),ru=Ci(ii);function iu(t){return bs(t)?Cr(t):li(t)}function ou(t){return bs(t)?Cr(t,!0):fi(t)}var au=ao(function(t,e,n){mi(t,e,n)}),su=ao(function(t,e,n,r){mi(t,e,n,r)}),uu=Oo(function(t,e){var n={};if(null==t)return n;var r=!1;e=Ze(e,function(e){return e=Gi(e,t),r||(r=e.length>1),e}),io(t,Ro(t),n),r&&(n=Lr(n,h|p|d,Ao));for(var i=e.length;i--;)ji(n,e[i]);return n});var cu=Oo(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tu(t,n)})}(t,e)});function lu(t,e){if(null==t)return{};var n=Ze(Ro(t),function(t){return[t]});return e=Fo(e),bi(t,n,function(t,n){return e(t,n[0])})}var fu=xo(iu),hu=xo(ou);function pu(t){return null==t?[]:gn(t,iu(t))}var du=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?vu(e):e)});function vu(t){return Tu(zs(t).toLowerCase())}function mu(t){return(t=zs(t))&&t.replace(Yt,En).replace(be,"")}var yu=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),gu=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bu=co("toLowerCase");var _u=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var wu=lo(function(t,e,n){return t+(n?" ":"")+Tu(e)});var Eu=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Tu=co("toUpperCase");function Cu(t,e,n){return t=zs(t),(e=n?o:e)===o?function(t){return Te.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Bt)||[]}(t):t.match(e)||[]}var xu=Ci(function(t,e){try{return ze(t,o,e)}catch(t){return Ts(t)?t:new Jt(t)}}),Su=Oo(function(t,e){return Ge(e,function(e){e=la(e),Rr(t,e,ns(t[e],t))}),t});function ku(t){return function(){return t}}var Nu=po(),Au=po(!0);function Iu(t){return t}function Ou(t){return ci("function"==typeof t?t:Lr(t,h))}var Pu=Ci(function(t,e){return function(n){return ii(n,t,e)}}),Ru=Ci(function(t,e){return function(n){return ii(t,n,e)}});function Du(t,e,n){var r=iu(e),i=Xr(e,r);null!=n||ks(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Xr(e,iu(e)));var o=!(ks(n)&&"chain"in n&&!n.chain),a=Cs(t);return Ge(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Mu(){}var Lu=go(Ze),Fu=go(Ye),Uu=go(rn);function ju(t){return Yo(t)?hn(la(t)):function(t){return function(e){return $r(e,t)}}(t)}var Bu=_o(),qu=_o(!0);function Vu(){return[]}function Wu(){return!1}var Hu=yo(function(t,e){return t+e},0),zu=To("ceil"),Ku=yo(function(t,e){return t/e},1),Gu=To("floor");var Qu,Yu=yo(function(t,e){return t*e},1),Xu=To("round"),$u=yo(function(t,e){return t-e},0);return dr.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=ts,dr.assign=Ks,dr.assignIn=Gs,dr.assignInWith=Qs,dr.assignWith=Ys,dr.at=Xs,dr.before=es,dr.bind=ns,dr.bindAll=Su,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ys(t)?t:[t]},dr.chain=ja,dr.chunk=function(t,e,n){e=(n?Qo(t,e,n):e===o)?1:Kn(qs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(jn(i/e));a<i;)u[s++]=Oi(t,a,a+=e);return u},dr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},dr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(ys(n)?ro(n):[n],zr(e,1))},dr.cond=function(t){var e=null==t?0:t.length,n=Fo();return t=e?Ze(t,function(t){if("function"!=typeof t[1])throw new ie(u);return[n(t[0]),t[1]]}):[],Ci(function(n){for(var r=-1;++r<e;){var i=t[r];if(ze(i[0],this,n))return ze(i[1],this,n)}})},dr.conforms=function(t){return function(t){var e=iu(t);return function(n){return Fr(n,t,e)}}(Lr(t,h))},dr.constant=ku,dr.countBy=Va,dr.create=function(t,e){var n=vr(t);return null==e?n:Pr(n,e)},dr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.curryRight=function t(e,n,r){var i=So(e,w,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.debounce=is,dr.defaults=$s,dr.defaultsDeep=Js,dr.defer=os,dr.delay=as,dr.difference=pa,dr.differenceBy=da,dr.differenceWith=va,dr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=n||e===o?1:qs(e))<0?0:e,r):[]},dr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,0,(e=r-(e=n||e===o?1:qs(e)))<0?0:e):[]},dr.dropRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0,!0):[]},dr.dropWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0):[]},dr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Qo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=qs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:qs(r))<0&&(r+=i),r=n>r?0:Vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},dr.filter=function(t,e){return(ys(t)?Xe:Hr)(t,Fo(e,3))},dr.flatMap=function(t,e){return zr(Xa(t,e),1)},dr.flatMapDeep=function(t,e){return zr(Xa(t,e),R)},dr.flatMapDepth=function(t,e,n){return n=n===o?1:qs(n),zr(Xa(t,e),n)},dr.flatten=ga,dr.flattenDeep=function(t){return null!=t&&t.length?zr(t,R):[]},dr.flattenDepth=function(t,e){return null!=t&&t.length?zr(t,e=e===o?1:qs(e)):[]},dr.flip=function(t){return So(t,S)},dr.flow=Nu,dr.flowRight=Au,dr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},dr.functions=function(t){return null==t?[]:Xr(t,iu(t))},dr.functionsIn=function(t){return null==t?[]:Xr(t,ou(t))},dr.groupBy=Ga,dr.initial=function(t){return null!=t&&t.length?Oi(t,0,-1):[]},dr.intersection=_a,dr.intersectionBy=wa,dr.intersectionWith=Ea,dr.invert=eu,dr.invertBy=nu,dr.invokeMap=Qa,dr.iteratee=Ou,dr.keyBy=Ya,dr.keys=iu,dr.keysIn=ou,dr.map=Xa,dr.mapKeys=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,e(t,r,i),t)}),n},dr.mapValues=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,r,e(t,r,i))}),n},dr.matches=function(t){return di(Lr(t,h))},dr.matchesProperty=function(t,e){return vi(t,Lr(e,h))},dr.memoize=ss,dr.merge=au,dr.mergeWith=su,dr.method=Pu,dr.methodOf=Ru,dr.mixin=Du,dr.negate=us,dr.nthArg=function(t){return t=qs(t),Ci(function(e){return yi(e,t)})},dr.omit=uu,dr.omitBy=function(t,e){return lu(t,us(Fo(e)))},dr.once=function(t){return es(2,t)},dr.orderBy=function(t,e,n,r){return null==t?[]:(ys(e)||(e=null==e?[]:[e]),ys(n=r?o:n)||(n=null==n?[]:[n]),gi(t,e,n))},dr.over=Lu,dr.overArgs=cs,dr.overEvery=Fu,dr.overSome=Uu,dr.partial=ls,dr.partialRight=fs,dr.partition=$a,dr.pick=cu,dr.pickBy=lu,dr.property=ju,dr.propertyOf=function(t){return function(e){return null==t?o:$r(t,e)}},dr.pull=Ca,dr.pullAll=xa,dr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Fo(n,2)):t},dr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},dr.pullAt=Sa,dr.range=Bu,dr.rangeRight=qu,dr.rearg=hs,dr.reject=function(t,e){return(ys(t)?Xe:Hr)(t,us(Fo(e,3)))},dr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Fo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return wi(t,i),n},dr.rest=function(t,e){if("function"!=typeof t)throw new ie(u);return Ci(t,e=e===o?e:qs(e))},dr.reverse=ka,dr.sampleSize=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),(ys(t)?Sr:Si)(t,e)},dr.set=function(t,e,n){return null==t?t:ki(t,e,n)},dr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:ki(t,e,n,r)},dr.shuffle=function(t){return(ys(t)?kr:Ii)(t)},dr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Qo(t,e,n)?(e=0,n=r):(e=null==e?0:qs(e),n=n===o?r:qs(n)),Oi(t,e,n)):[]},dr.sortBy=Ja,dr.sortedUniq=function(t){return t&&t.length?Mi(t):[]},dr.sortedUniqBy=function(t,e){return t&&t.length?Mi(t,Fo(e,2)):[]},dr.split=function(t,e,n){return n&&"number"!=typeof n&&Qo(t,e,n)&&(e=n=o),(n=n===o?F:n>>>0)?(t=zs(t))&&("string"==typeof e||null!=e&&!Ps(e))&&!(e=Fi(e))&&xn(t)?Yi(Rn(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:Kn(qs(e),0),Ci(function(n){var r=n[e],i=Yi(n,0,e);return r&&tn(i,r),ze(t,this,i)})},dr.tail=function(t){var e=null==t?0:t.length;return e?Oi(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Oi(t,0,(e=n||e===o?1:qs(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=r-(e=n||e===o?1:qs(e)))<0?0:e,r):[]},dr.takeRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(u);return ks(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Ba,dr.toArray=js,dr.toPairs=fu,dr.toPairsIn=hu,dr.toPath=function(t){return ys(t)?Ze(t,la):Ms(t)?[t]:ro(ca(zs(t)))},dr.toPlainObject=Hs,dr.transform=function(t,e,n){var r=ys(t),i=r||ws(t)||Ls(t);if(e=Fo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ks(t)&&Cs(o)?vr(Oe(t)):{}}return(i?Ge:Qr)(t,function(t,r,i){return e(n,t,r,i)}),n},dr.unary=function(t){return ts(t,1)},dr.union=Na,dr.unionBy=Aa,dr.unionWith=Ia,dr.uniq=function(t){return t&&t.length?Ui(t):[]},dr.uniqBy=function(t,e){return t&&t.length?Ui(t,Fo(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Ui(t,o,e):[]},dr.unset=function(t,e){return null==t||ji(t,e)},dr.unzip=Oa,dr.unzipWith=Pa,dr.update=function(t,e,n){return null==t?t:Bi(t,e,Ki(n))},dr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Bi(t,e,Ki(n),r)},dr.values=pu,dr.valuesIn=function(t){return null==t?[]:gn(t,ou(t))},dr.without=Ra,dr.words=Cu,dr.wrap=function(t,e){return ls(Ki(e),t)},dr.xor=Da,dr.xorBy=Ma,dr.xorWith=La,dr.zip=Fa,dr.zipObject=function(t,e){return Hi(t||[],e||[],Ar)},dr.zipObjectDeep=function(t,e){return Hi(t||[],e||[],ki)},dr.zipWith=Ua,dr.entries=fu,dr.entriesIn=hu,dr.extend=Gs,dr.extendWith=Qs,Du(dr,dr),dr.add=Hu,dr.attempt=xu,dr.camelCase=du,dr.capitalize=vu,dr.ceil=zu,dr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=Ws(n))==n?n:0),e!==o&&(e=(e=Ws(e))==e?e:0),Mr(Ws(t),e,n)},dr.clone=function(t){return Lr(t,d)},dr.cloneDeep=function(t){return Lr(t,h|d)},dr.cloneDeepWith=function(t,e){return Lr(t,h|d,e="function"==typeof e?e:o)},dr.cloneWith=function(t,e){return Lr(t,d,e="function"==typeof e?e:o)},dr.conformsTo=function(t,e){return null==e||Fr(t,e,iu(e))},dr.deburr=mu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Ku,dr.endsWith=function(t,e,n){t=zs(t),e=Fi(e);var r=t.length,i=n=n===o?r:Mr(qs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},dr.eq=ps,dr.escape=function(t){return(t=zs(t))&&xt.test(t)?t.replace(Tt,Tn):t},dr.escapeRegExp=function(t){return(t=zs(t))&&Rt.test(t)?t.replace(Pt,"\\$&"):t},dr.every=function(t,e,n){var r=ys(t)?Ye:Vr;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.find=Wa,dr.findIndex=ma,dr.findKey=function(t,e){return an(t,Fo(e,3),Qr)},dr.findLast=Ha,dr.findLastIndex=ya,dr.findLastKey=function(t,e){return an(t,Fo(e,3),Yr)},dr.floor=Gu,dr.forEach=za,dr.forEachRight=Ka,dr.forIn=function(t,e){return null==t?t:Kr(t,Fo(e,3),ou)},dr.forInRight=function(t,e){return null==t?t:Gr(t,Fo(e,3),ou)},dr.forOwn=function(t,e){return t&&Qr(t,Fo(e,3))},dr.forOwnRight=function(t,e){return t&&Yr(t,Fo(e,3))},dr.get=Zs,dr.gt=ds,dr.gte=vs,dr.has=function(t,e){return null!=t&&Ho(t,e,ei)},dr.hasIn=tu,dr.head=ba,dr.identity=Iu,dr.includes=function(t,e,n,r){t=bs(t)?t:pu(t),n=n&&!r?qs(n):0;var i=t.length;return n<0&&(n=Kn(i+n,0)),Ds(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),un(t,e,i)},dr.inRange=function(t,e,n){return e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n){return t>=Gn(e,n)&&t<Kn(e,n)}(t=Ws(t),e,n)},dr.invoke=ru,dr.isArguments=ms,dr.isArray=ys,dr.isArrayBuffer=gs,dr.isArrayLike=bs,dr.isArrayLikeObject=_s,dr.isBoolean=function(t){return!0===t||!1===t||Ns(t)&&Zr(t)==H},dr.isBuffer=ws,dr.isDate=Es,dr.isElement=function(t){return Ns(t)&&1===t.nodeType&&!Os(t)},dr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(ys(t)||"string"==typeof t||"function"==typeof t.splice||ws(t)||Ls(t)||ms(t)))return!t.length;var e=Wo(t);if(e==X||e==nt)return!t.size;if(Jo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},dr.isEqual=function(t,e){return ai(t,e)},dr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},dr.isError=Ts,dr.isFinite=function(t){return"number"==typeof t&&Wn(t)},dr.isFunction=Cs,dr.isInteger=xs,dr.isLength=Ss,dr.isMap=As,dr.isMatch=function(t,e){return t===e||si(t,e,jo(e))},dr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,jo(e),n)},dr.isNaN=function(t){return Is(t)&&t!=+t},dr.isNative=function(t){if($o(t))throw new Jt(s);return ui(t)},dr.isNil=function(t){return null==t},dr.isNull=function(t){return null===t},dr.isNumber=Is,dr.isObject=ks,dr.isObjectLike=Ns,dr.isPlainObject=Os,dr.isRegExp=Ps,dr.isSafeInteger=function(t){return xs(t)&&t>=-D&&t<=D},dr.isSet=Rs,dr.isString=Ds,dr.isSymbol=Ms,dr.isTypedArray=Ls,dr.isUndefined=function(t){return t===o},dr.isWeakMap=function(t){return Ns(t)&&Wo(t)==at},dr.isWeakSet=function(t){return Ns(t)&&Zr(t)==st},dr.join=function(t,e){return null==t?"":Hn.call(t,e)},dr.kebabCase=yu,dr.last=Ta,dr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=qs(n))<0?Kn(r+i,0):Gn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},dr.lowerCase=gu,dr.lowerFirst=bu,dr.lt=Fs,dr.lte=Us,dr.max=function(t){return t&&t.length?Wr(t,Iu,ti):o},dr.maxBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),ti):o},dr.mean=function(t){return fn(t,Iu)},dr.meanBy=function(t,e){return fn(t,Fo(e,2))},dr.min=function(t){return t&&t.length?Wr(t,Iu,hi):o},dr.minBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),hi):o},dr.stubArray=Vu,dr.stubFalse=Wu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Yu,dr.nth=function(t,e){return t&&t.length?yi(t,qs(e)):o},dr.noConflict=function(){return Re._===this&&(Re._=ve),this},dr.noop=Mu,dr.now=Za,dr.pad=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(Bn(i),n)+t+bo(jn(i),n)},dr.padEnd=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?t+bo(e-r,n):t},dr.padStart=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?bo(e-r,n)+t:t},dr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Yn(zs(t).replace(Mt,""),e||0)},dr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Qo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Bs(t),e===o?(e=t,t=0):e=Bs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Xn();return Gn(t+i*(e-t+Ae("1e-"+((i+"").length-1))),e)}return Ei(t,e)},dr.reduce=function(t,e,n){var r=ys(t)?en:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,Br)},dr.reduceRight=function(t,e,n){var r=ys(t)?nn:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,qr)},dr.repeat=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),Ti(zs(t),e)},dr.replace=function(){var t=arguments,e=zs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var r=-1,i=(e=Gi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Cs(a)?a.call(t):a}return t},dr.round=Xu,dr.runInContext=t,dr.sample=function(t){return(ys(t)?xr:xi)(t)},dr.size=function(t){if(null==t)return 0;if(bs(t))return Ds(t)?Pn(t):t.length;var e=Wo(t);return e==X||e==nt?t.size:li(t).length},dr.snakeCase=_u,dr.some=function(t,e,n){var r=ys(t)?rn:Pi;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.sortedIndex=function(t,e){return Ri(t,e)},dr.sortedIndexBy=function(t,e,n){return Di(t,e,Fo(n,2))},dr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Ri(t,e);if(r<n&&ps(t[r],e))return r}return-1},dr.sortedLastIndex=function(t,e){return Ri(t,e,!0)},dr.sortedLastIndexBy=function(t,e,n){return Di(t,e,Fo(n,2),!0)},dr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Ri(t,e,!0)-1;if(ps(t[n],e))return n}return-1},dr.startCase=wu,dr.startsWith=function(t,e,n){return t=zs(t),n=null==n?0:Mr(qs(n),0,t.length),e=Fi(e),t.slice(n,n+e.length)==e},dr.subtract=$u,dr.sum=function(t){return t&&t.length?vn(t,Iu):0},dr.sumBy=function(t,e){return t&&t.length?vn(t,Fo(e,2)):0},dr.template=function(t,e,n){var r=dr.templateSettings;n&&Qo(t,e,n)&&(e=o),t=zs(t),e=Qs({},e,r,ko);var i,a,s=Qs({},e.imports,r.imports,ko),u=iu(s),c=gn(s,u),l=0,f=e.interpolate||Xt,h="__p += '",p=ne((e.escape||Xt).source+"|"+f.source+"|"+(f===Nt?Vt:Xt).source+"|"+(e.evaluate||Xt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++xe+"]")+"\n";t.replace(p,function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(l,u).replace($t,Cn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),h+="';\n";var v=e.variable;v||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(bt,""):h).replace(_t,"$1").replace(wt,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xu(function(){return Zt(u,d+"return "+h).apply(o,c)});if(m.source=h,Ts(m))throw m;return m},dr.times=function(t,e){if((t=qs(t))<1||t>D)return[];var n=F,r=Gn(t,F);e=Fo(e),t-=F;for(var i=mn(r,e);++n<t;)e(n);return i},dr.toFinite=Bs,dr.toInteger=qs,dr.toLength=Vs,dr.toLower=function(t){return zs(t).toLowerCase()},dr.toNumber=Ws,dr.toSafeInteger=function(t){return t?Mr(qs(t),-D,D):0===t?t:0},dr.toString=zs,dr.toUpper=function(t){return zs(t).toUpperCase()},dr.trim=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t),i=Rn(e);return Yi(r,_n(r,i),wn(r,i)+1).join("")},dr.trimEnd=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Lt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,0,wn(r,Rn(e))+1).join("")},dr.trimStart=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Mt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,_n(r,Rn(e))).join("")},dr.truncate=function(t,e){var n=k,r=N;if(ks(e)){var i="separator"in e?e.separator:i;n="length"in e?qs(e.length):n,r="omission"in e?Fi(e.omission):r}var a=(t=zs(t)).length;if(xn(t)){var s=Rn(t);a=s.length}if(n>=a)return t;var u=n-Pn(r);if(u<1)return r;var c=s?Yi(s,0,u).join(""):t.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),Ps(i)){if(t.slice(u).search(i)){var l,f=c;for(i.global||(i=ne(i.source,zs(Wt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?u:h)}}else if(t.indexOf(Fi(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},dr.unescape=function(t){return(t=zs(t))&&Ct.test(t)?t.replace(Et,Dn):t},dr.uniqueId=function(t){var e=++fe;return zs(t)+e},dr.upperCase=Eu,dr.upperFirst=Tu,dr.each=za,dr.eachRight=Ka,dr.first=ba,Du(dr,(Qu={},Qr(dr,function(t,e){le.call(dr.prototype,e)||(Qu[e]=t)}),Qu),{chain:!1}),dr.VERSION="4.17.10",Ge(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dr[t].placeholder=dr}),Ge(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Kn(qs(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Gn(n,r.__takeCount__):r.__views__.push({size:Gn(n,F),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ge(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==O||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Fo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ge(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Ge(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Iu)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=Ci(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ii(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(us(Fo(t)))},gr.prototype.slice=function(t,e){t=qs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=qs(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(F)},Qr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=dr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof gr,c=s[0],l=u||ys(e),f=function(t){var e=i.apply(dr,tn([t],s));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,v=u&&!p;if(!a&&l){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Ba,args:[f],thisArg:o}),new yr(m,h)}return d&&v?t.apply(this,s):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})}),Ge(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ys(i)?i:[],t)}return this[n](function(n){return e.apply(ys(n)?n:[],t)})}}),Qr(gr.prototype,function(t,e){var n=dr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[vo(o,g).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ys(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Gn(e,t+a);break;case"takeRight":t=Kn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,p=Gn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Vi(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var v=-1,m=t[c+=e];++v<f;){var y=l[v],g=y.iteratee,b=y.type,_=g(m);if(b==P)m=_;else if(!_){if(b==O)continue t;break t}}d[h++]=m}return d},dr.prototype.at=qa,dr.prototype.chain=function(){return ja(this)},dr.prototype.commit=function(){return new yr(this.value(),this.__chain__)},dr.prototype.next=function(){this.__values__===o&&(this.__values__=js(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof mr;){var r=ha(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Ba,args:[ka],thisArg:o}),new yr(e,this.__chain__)}return this.thru(ka)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return Vi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,Ue&&(dr.prototype[Ue]=function(){return this}),dr}();Re._=Mn,(i=function(){return Mn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(66),n(117)(t))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(124);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},function(t,e,n){var r=n(384),i=n(247),o=n(164);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(232);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return t.placeholder}},function(t,e,n){var r=n(86),i=n(155);function o(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,t.exports=o},function(t,e,n){var r=n(217),i=n(211),o=r?function(t){return r.get(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(86),i=n(155),o=4294967295;function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e,n){var r=n(238),i=n(228),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},function(t,e,n){var r=n(460),i=n(30);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},function(t,e,n){var r=n(132),i=n(465),o=n(464),a=n(463),s=n(462),u=n(461);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(473),i=n(28);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(118),i=1/0,o=1.7976931348623157e308;t.exports=function(t){return t?(t=r(t))===i||t===-i?(t<0?-1:1)*o:t==t?t:0:0===t?t:0}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(487),i=n(245)(r);t.exports=i},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(65)(n(33),"Map");t.exports=r},function(t,e,n){var r=n(512),i=n(496),o=n(494),a=n(493),s=n(492);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(18),i=n(68),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(49),i=n(26),o=n(79);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(57),i=n(26),o=n(138),a=n(171),s=n(56).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(42)},function(t,e,n){n(538);for(var r=n(57),i=n(80),o=n(78),a=n(42)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){var r=n(54),i=n(93),o=n(179)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(56).f,i=n(54),o=n(42)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(55),i=n(540),o=n(177),a=n(179)("IE_PROTO"),s=function(){},u=function(){var t,e=n(262)("iframe"),r=o.length;for(e.style.display="none",n(539).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(26),i=n(57),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(138)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(178)("keys"),i=n(137);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(71);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(550);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],f=0;(c=new Error(e.replace(/%s/g,function(){return l[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(369),i=n(47);t.exports=function(t){return t&&t.length?r(t,i):0}},function(t,e){t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}},function(t,e,n){var r=n(240),i=n(34),o=n(46),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}t.exports=function(t,e){if(i(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(e,n[a])||!i(t[n[a]],e[n[a]]))return!1;return!0}},function(t,e,n){var r=n(90),i=n(53),o=n(200),a=n(119),s=i(function(t){return o(r(t,1,a,!0))});t.exports=s},function(t,e,n){var r=n(114),i=n(52),o=n(38),a=n(96),s=n(335),u="[object Map]",c="[object Set]";t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return e==u||e==c?t.size:r(t).length}},function(t,e,n){var r=n(23)("min",n(368),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sum",n(187),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("compact",n(188),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,s=o.left,u=a,c=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o};function l(t,e){return[t,e]}var f=function(t,e,n){var r,i,o,a,s=t.length,u=e.length,c=new Array(s*u);for(null==n&&(n=l),r=o=0;r<s;++r)for(a=t[r],i=0;i<u;++i,++o)c[o]=n(a,e[i]);return c},h=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},p=function(t){return null===t?NaN:+t},d=function(t,e){var n,r,i=t.length,o=0,a=-1,s=0,u=0;if(null==e)for(;++a<i;)isNaN(n=p(t[a]))||(u+=(r=n-s)*(n-(s+=r/++o)));else for(;++a<i;)isNaN(n=p(e(t[a],a,t)))||(u+=(r=n-s)*(n-(s+=r/++o)));if(o>1)return u/(o-1)},v=function(t,e){var n=d(t,e);return n?Math.sqrt(n):n},m=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},y=Array.prototype,g=y.slice,b=y.map,_=function(t){return function(){return t}},w=function(t){return t},E=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o},T=Math.sqrt(50),C=Math.sqrt(10),x=Math.sqrt(2),S=function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=k(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o};function k(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T?10:o>=C?5:o>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T?10:o>=C?5:o>=x?2:1)}function N(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T?i*=10:o>=C?i*=5:o>=x&&(i*=2),e<t?-i:i}var A=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},I=function(){var t=w,e=m,n=A;function r(r){var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],f=c[1],h=n(s,l,f);Array.isArray(h)||(h=N(l,f,h),h=E(Math.ceil(l/h)*h,Math.floor(f/h)*h,h));for(var p=h.length;h[0]<=l;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,v=new Array(p+1);for(i=0;i<=p;++i)(d=v[i]=[]).x0=i>0?h[i-1]:l,d.x1=i<p?h[i]:f;for(i=0;i<a;++i)l<=(o=s[i])&&o<=f&&v[u(h,o,0,p)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?_(g.call(t)):_(t),r):n},r},O=function(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},P=function(t,e,n){return t=b.call(t,p).sort(r),Math.ceil((n-e)/(2*(O(t,.75)-O(t,.25))*Math.pow(t.length,-1/3)))},R=function(t,e,n){return Math.ceil((n-e)/(3.5*v(t)*Math.pow(t.length,-1/3)))},D=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},M=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=p(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=p(e(t[o],o,t)))?--i:a+=n;if(i)return a/i},L=function(t,e){var n,i=t.length,o=-1,a=[];if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||a.push(n);else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||a.push(n);return O(a.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},U=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},B=function(t,e){if(n=t.length){var n,i,o=0,a=0,s=t[a];for(null==e&&(e=r);++o<n;)(e(i=t[o],s)<0||0!==e(s,s))&&(s=i,a=o);return 0===e(s,s)?a:void 0}},q=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},V=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o},W=function(t){if(!(i=t.length))return[];for(var e=-1,n=U(t,H),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r};function H(t){return t.length}var z=function(){return W(arguments)},K=Array.prototype.slice,G=function(t){return t},Q=1,Y=2,X=3,$=4,J=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function tt(t){return"translate(0,"+(t+.5)+")"}function et(){return!this.__axis}function nt(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=t===Q||t===$?-1:1,c=t===$||t===Y?"x":"y",l=t===Q||t===X?Z:tt;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,d=Math.max(o,0)+s,v=e.range(),m=+v[0]+.5,y=+v[v.length-1]+.5,g=(e.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}:function(t){return function(e){return+t(e)}})(e.copy()),b=f.selection?f.selection():f,_=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(h,e).order(),E=w.exit(),T=w.enter().append("g").attr("class","tick"),C=w.select("line"),x=w.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),w=w.merge(T),C=C.merge(T.append("line").attr("stroke","#000").attr(c+"2",u*o)),x=x.merge(T.append("text").attr("fill","#000").attr(c,u*d).attr("dy",t===Q?"0em":t===X?"0.71em":"0.32em")),f!==b&&(_=_.transition(f),w=w.transition(f),C=C.transition(f),x=x.transition(f),E=E.transition(f).attr("opacity",J).attr("transform",function(t){return isFinite(t=g(t))?l(t):this.getAttribute("transform")}),T.attr("opacity",J).attr("transform",function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:g(t))})),E.remove(),_.attr("d",t===$||t==Y?"M"+u*a+","+m+"H0.5V"+y+"H"+u*a:"M"+m+","+u*a+"V0.5H"+y+"V"+u*a),w.attr("opacity",1).attr("transform",function(t){return l(g(t))}),C.attr(c+"2",u*o),x.attr(c,u*d).text(p),b.filter(et).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Y?"start":t===$?"end":"middle"),b.each(function(){this.__axis=g})}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=K.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:K.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:K.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function rt(t){return nt(Q,t)}function it(t){return nt(Y,t)}function ot(t){return nt(X,t)}function at(t){return nt($,t)}var st={value:function(){}};function ut(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ft(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=st,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=ut.prototype={constructor:ct,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=ft(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ft(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=lt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var ht=ut,pt="http://www.w3.org/1999/xhtml",dt={svg:"http://www.w3.org/2000/svg",xhtml:pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},vt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),dt.hasOwnProperty(e)?{space:dt[e],local:t}:t};var mt=function(t){var e=vt(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===pt&&e.documentElement.namespaceURI===pt?e.createElement(t):e.createElementNS(n,t)}})(e)};function yt(){}var gt=function(t){return null==t?yt:function(){return this.querySelector(t)}};function bt(){return[]}var _t=function(t){return null==t?bt:function(){return this.querySelectorAll(t)}},wt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Et=document.documentElement;if(!Et.matches){var Tt=Et.webkitMatchesSelector||Et.msMatchesSelector||Et.mozMatchesSelector||Et.oMatchesSelector;wt=function(t){return function(){return Tt.call(this,t)}}}}var Ct=wt,xt=function(t){return new Array(t.length)};function St(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}St.prototype={constructor:St,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Nt(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new St(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function At(t,e,n,r,i,o,a){var s,u,c,l={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=c=kt+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c=kt+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new St(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l[p[s]]===u&&(i[s]=u)}function It(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function Rt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new Mt(t)}function Mt(t){this._node=t,this._names=Rt(t.getAttribute("class")||"")}function Lt(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ft(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}Mt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ut(){this.textContent=""}function jt(){this.innerHTML=""}function Bt(){this.nextSibling&&this.parentNode.appendChild(this)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vt(){return null}function Wt(){var t=this.parentNode;t&&t.removeChild(this)}function Ht(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function zt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Kt={},Gt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Kt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Qt(t,e,n){return t=Yt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Yt(t,e,n){return function(r){var i=Gt;Gt=r;try{t.call(this,this.__data__,e,n)}finally{Gt=i}}}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function $t(t,e,n){var r=Kt.hasOwnProperty(t.type)?Qt:Yt;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,f=u.length;l<f;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Jt(t,e,n,r){var i=Gt;t.sourceEvent=Gt,Gt=t;try{return e.apply(n,r)}finally{Gt=i}}function Zt(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}function ne(){return new ee([[document.documentElement]],te)}ee.prototype=ne.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new ee(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ee(r,i)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new ee(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each(function(t){d[++l]=t}),d;var n,r=e?At:Nt,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),c=new Array(a),l=0;l<a;++l){var f=i[l],h=o[l],p=h.length,d=t.call(f,f&&f.__data__,l,i),v=d.length,m=u[l]=new Array(v),y=s[l]=new Array(v);r(f,h,m,y,c[l]=new Array(p),d,e);for(var g,b,_=0,w=0;_<v;++_)if(g=m[_]){for(_>=w&&(w=_+1);!(b=y[w])&&++w<v;);g._next=b||null}}return(s=new ee(s,i))._enter=u,s._exit=c,s},enter:function(){return new ee(this._enter||this._groups.map(xt),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(xt),this._parents)},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=It);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new ee(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=vt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):Pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=Rt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Lt:Ft)(this,t)}}:e?function(t){return function(){Lt(this,t)}}:function(t){return function(){Ft(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?Ut:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Bt)},lower:function(){return this.each(qt)},append:function(t){var e="function"==typeof t?t:mt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:mt(t),r=null==e?Vt:"function"==typeof e?e:gt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Wt)},clone:function(t){return this.select(t?zt:Ht)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?$t:Xt,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return Zt(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return Zt(this,t,e)}})(t,e))}};var re=ne,ie=function(t){return"string"==typeof t?new ee([[document.querySelector(t)]],[document.documentElement]):new ee([[t]],te)},oe=function(t){return ie(mt(t).call(document.documentElement))},ae=0;function se(){return new ue}function ue(){this._="@"+(++ae).toString(36)}ue.prototype=se.prototype={constructor:ue,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var ce=function(){for(var t,e=Gt;t=e.sourceEvent;)e=t;return e},le=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},fe=function(t){var e=ce();return e.changedTouches&&(e=e.changedTouches[0]),le(t,e)},he=function(t){return"string"==typeof t?new ee([document.querySelectorAll(t)],[document.documentElement]):new ee([null==t?[]:t],te)},pe=function(t,e,n){arguments.length<3&&(n=e,e=ce().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return le(t,r);return null},de=function(t,e){null==e&&(e=ce().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=le(t,e[n]);return i};function ve(){Gt.stopImmediatePropagation()}var me=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},ye=function(t){var e=t.document.documentElement,n=ie(t).on("dragstart.drag",me,!0);"onselectstart"in e?n.on("selectstart.drag",me,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function ge(t,e){var n=t.document.documentElement,r=ie(t).on("dragstart.drag",null);e&&(r.on("click.drag",me,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var be=function(t){return function(){return t}};function _e(t,e,n,r,i,o,a,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=c}function we(){return!Gt.button}function Ee(){return this.parentNode}function Te(t){return null==t?{x:Gt.x,y:Gt.y}:t}function Ce(){return"ontouchstart"in this}_e.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var xe=function(){var t,e,n,r,i=we,o=Ee,a=Te,s=Ce,u={},c=ht("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",p).filter(s).on("touchstart.drag",m).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=b("mouse",o.apply(this,arguments),fe,this,arguments);a&&(ie(Gt.view).on("mousemove.drag",d,!0).on("mouseup.drag",v,!0),ye(Gt.view),ve(),n=!1,t=Gt.clientX,e=Gt.clientY,a("start"))}}function d(){if(me(),!n){var r=Gt.clientX-t,i=Gt.clientY-e;n=r*r+i*i>f}u.mouse("drag")}function v(){ie(Gt.view).on("mousemove.drag mouseup.drag",null),ge(Gt.view,n),me(),u.mouse("end")}function m(){if(i.apply(this,arguments)){var t,e,n=Gt.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=b(n[t].identifier,r,pe,this,arguments))&&(ve(),e("start"))}}function y(){var t,e,n=Gt.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(me(),e("drag"))}function g(){var t,e,n=Gt.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<i;++t)(e=u[n[t].identifier])&&(ve(),e("end"))}function b(t,e,n,r,i){var o,s,f,p=n(e,t),d=c.copy();if(Jt(new _e(h,"beforestart",o,t,l,p[0],p[1],0,0,d),function(){return null!=(Gt.subject=o=a.apply(r,i))&&(s=o.x-p[0]||0,f=o.y-p[1]||0,!0)}))return function a(c){var v,m=p;switch(c){case"start":u[t]=a,v=l++;break;case"end":delete u[t],--l;case"drag":p=n(e,t),v=l}Jt(new _e(h,c,o,t,v,p[0]+s,p[1]+f,p[0]-m[0],p[1]-m[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:be(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:be(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:be(t),h):a},h.touchable=function(t){return arguments.length?(s="function"==typeof t?t:be(!!t),h):s},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h},Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ne(){}var Ae="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pe=/^#([0-9a-f]{3})$/,Re=/^#([0-9a-f]{6})$/,De=new RegExp("^rgb\\("+[Ae,Ae,Ae]+"\\)$"),Me=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Le=new RegExp("^rgba\\("+[Ae,Ae,Ae,Ie]+"\\)$"),Fe=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^hsl\\("+[Ie,Oe,Oe]+"\\)$"),je=new RegExp("^hsla\\("+[Ie,Oe,Oe,Ie]+"\\)$"),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function qe(t){var e;return t=(t+"").trim().toLowerCase(),(e=Pe.exec(t))?new Ke((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=Re.exec(t))?Ve(parseInt(e[1],16)):(e=De.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Me.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ue.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ve(Be[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ve(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function He(t){return t instanceof Ne||(t=qe(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function ze(t,e,n,r){return 1===arguments.length?He(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xe(t,e,n,r)}function Ye(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);if(t instanceof Ne||(t=qe(t)),!t)return new Xe;if(t instanceof Xe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xe(a,s,u,t.opacity)}(t):new Xe(t,e,n,null==r?1:r)}function Xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Se(Ne,qe,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Se(Ke,ze,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Se(Xe,Ye,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke($e(t>=240?t-240:t+120,i,r),$e(t,i,r),$e(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Je=Math.PI/180,Ze=180/Math.PI,tn=.96422,en=1,nn=.82521,rn=4/29,on=6/29,an=3*on*on,sn=on*on*on;function un(t){if(t instanceof fn)return new fn(t.l,t.a,t.b,t.opacity);if(t instanceof bn){if(isNaN(t.h))return new fn(t.l,0,0,t.opacity);var e=t.h*Je;return new fn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Ke||(t=He(t));var n,r,i=vn(t.r),o=vn(t.g),a=vn(t.b),s=hn((.2225045*i+.7168786*o+.0606169*a)/en);return i===o&&o===a?n=r=s:(n=hn((.4360747*i+.3850649*o+.1430804*a)/tn),r=hn((.0139322*i+.0971045*o+.7141733*a)/nn)),new fn(116*s-16,500*(n-s),200*(s-r),t.opacity)}function cn(t,e){return new fn(t,0,0,null==e?1:e)}function ln(t,e,n,r){return 1===arguments.length?un(t):new fn(t,e,n,null==r?1:r)}function fn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function hn(t){return t>sn?Math.pow(t,1/3):t/an+rn}function pn(t){return t>on?t*t*t:an*(t-rn)}function dn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mn(t){if(t instanceof bn)return new bn(t.h,t.c,t.l,t.opacity);if(t instanceof fn||(t=un(t)),0===t.a&&0===t.b)return new bn(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ze;return new bn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function yn(t,e,n,r){return 1===arguments.length?mn(t):new bn(n,e,t,null==r?1:r)}function gn(t,e,n,r){return 1===arguments.length?mn(t):new bn(t,e,n,null==r?1:r)}function bn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}Se(fn,ln,ke(Ne,{brighter:function(t){return new fn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new fn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(dn(3.1338561*(e=tn*pn(e))-1.6168667*(t=en*pn(t))-.4906146*(n=nn*pn(n))),dn(-.9787684*e+1.9161415*t+.033454*n),dn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(bn,gn,ke(Ne,{brighter:function(t){return new bn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new bn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return un(this).rgb()}}));var _n=-.29227,wn=-.90649,En=1.97294,Tn=En*wn,Cn=1.78277*En,xn=1.78277*_n- -.14861*wn;function Sn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof kn)return new kn(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=He(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(xn*r+Tn*e-Cn*n)/(xn+Tn-Cn),o=r-i,a=(En*(n-i)-_n*o)/wn,s=Math.sqrt(a*a+o*o)/(En*i*(1-i)),u=s?Math.atan2(a,o)*Ze-120:NaN;return new kn(u<0?u+360:u,s,i,t.opacity)}(t):new kn(t,e,n,null==r?1:r)}function kn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Nn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Se(kn,Sn,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Je,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(_n*r+wn*i)),255*(e+n*(En*r)),this.opacity)}}));var An=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Nn((n-r/e)*e,a,i,o,s)}},In=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Nn((n-r/e)*e,i,o,a,s)}},On=function(t){return function(){return t}};function Pn(t,e){return function(n){return t+n*e}}function Rn(t,e){var n=e-t;return n?Pn(t,n>180||n<-180?n-360*Math.round(n/360):n):On(isNaN(t)?e:t)}function Dn(t){return 1==(t=+t)?Mn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):On(isNaN(e)?n:e)}}function Mn(t,e){var n=e-t;return n?Pn(t,n):On(isNaN(t)?e:t)}var Ln=function t(e){var n=Dn(e);function r(t,e){var r=n((t=ze(t)).r,(e=ze(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Mn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Fn(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ze(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}var Un=Fn(An),jn=Fn(In),Bn=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=$n(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}},qn=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Vn=function(t,e){return e-=t=+t,function(n){return t+e*n}},Wn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=$n(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Hn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Hn.source,"g");var Kn,Gn,Qn,Yn,Xn=function(t,e){var n,r,i,o=Hn.lastIndex=zn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Hn.exec(t))&&(r=zn.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Vn(n,r)})),o=zn.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},$n=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?On(e):("number"===r?Vn:"string"===r?(n=qe(e))?(e=n,Ln):Xn:e instanceof qe?Ln:e instanceof Date?qn:Array.isArray(e)?Bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wn:Vn)(t,e)},Jn=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},Zn=180/Math.PI,tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},er=function(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Zn,skewX:Math.atan(u)*Zn,scaleX:a,scaleY:s}};function nr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Vn(t,i)},{i:u-2,x:Vn(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Vn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Vn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Vn(t,n)},{i:s-2,x:Vn(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var rr=nr(function(t){return"none"===t?tr:(Kn||(Kn=document.createElement("DIV"),Gn=document.documentElement,Qn=document.defaultView),Kn.style.transform=t,t=Qn.getComputedStyle(Gn.appendChild(Kn),null).getPropertyValue("transform"),Gn.removeChild(Kn),t=t.slice(7,-1).split(","),er(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),ir=nr(function(t){return null==t?tr:(Yn||(Yn=document.createElementNS("http://www.w3.org/2000/svg","g")),Yn.setAttribute("transform",t),(t=Yn.transform.baseVal.consolidate())?(t=t.matrix,er(t.a,t.b,t.c,t.d,t.e,t.f)):tr)},", ",")",")"),or=Math.SQRT2;function ar(t){return((t=Math.exp(t))+1/t)/2}var sr=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],c=e[2],l=s-i,f=u-o,h=l*l+f*f;if(h<1e-12)r=Math.log(c/a)/or,n=function(t){return[i+t*l,o+t*f,a*Math.exp(or*t*r)]};else{var p=Math.sqrt(h),d=(c*c-a*a+4*h)/(2*a*2*p),v=(c*c-a*a-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-m)/or,n=function(t){var e,n=t*r,s=ar(m),u=a/(2*p)*(s*(e=or*n+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+u*l,o+u*f,a*s/ar(or*n+m)]}}return n.duration=1e3*r,n};function ur(t){return function(e,n){var r=t((e=Ye(e)).h,(n=Ye(n)).h),i=Mn(e.s,n.s),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var cr=ur(Rn),lr=ur(Mn);function fr(t,e){var n=Mn((t=ln(t)).l,(e=ln(e)).l),r=Mn(t.a,e.a),i=Mn(t.b,e.b),o=Mn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function hr(t){return function(e,n){var r=t((e=gn(e)).h,(n=gn(n)).h),i=Mn(e.c,n.c),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var pr=hr(Rn),dr=hr(Mn);function vr(t){return function e(n){function r(e,r){var i=t((e=Sn(e)).h,(r=Sn(r)).h),o=Mn(e.s,r.s),a=Mn(e.l,r.l),s=Mn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var mr=vr(Rn),yr=vr(Mn);function gr(t,e){for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}}var br,_r,wr=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Er=0,Tr=0,Cr=0,xr=1e3,Sr=0,kr=0,Nr=0,Ar="object"==typeof performance&&performance.now?performance:Date,Ir="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Or(){return kr||(Ir(Pr),kr=Ar.now()+Nr)}function Pr(){kr=0}function Rr(){this._call=this._time=this._next=null}function Dr(t,e,n){var r=new Rr;return r.restart(t,e,n),r}function Mr(){Or(),++Er;for(var t,e=br;e;)(t=kr-e._time)>=0&&e._call.call(null,t),e=e._next;--Er}function Lr(){kr=(Sr=Ar.now())+Nr,Er=Tr=0;try{Mr()}finally{Er=0,function(){var t,e,n=br,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:br=e);_r=t,Ur(r)}(),kr=0}}function Fr(){var t=Ar.now(),e=t-Sr;e>xr&&(Nr-=e,Sr=t)}function Ur(t){Er||(Tr&&(Tr=clearTimeout(Tr)),t-kr>24?(t<1/0&&(Tr=setTimeout(Lr,t-Ar.now()-Nr)),Cr&&(Cr=clearInterval(Cr))):(Cr||(Sr=Ar.now(),Cr=setInterval(Fr,xr)),Er=1,Ir(Lr)))}Rr.prototype=Dr.prototype={constructor:Rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Or():+n)+(null==e?0:+e),this._next||_r===this||(_r?_r._next=this:br=this,_r=this),this._call=t,this._time=n,Ur()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ur())}};var jr=function(t,e,n){var r=new Rr;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Br=function(t,e,n){var r=new Rr,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?Or():+n,r.restart(function o(a){a+=i,r.restart(o,i+=e,n),t(a)},e,n),r)},qr=ht("start","end","interrupt"),Vr=[],Wr=0,Hr=1,zr=2,Kr=3,Gr=4,Qr=5,Yr=6,Xr=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,f,h;if(n.state!==Hr)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Kr)return jr(o);h.state===Gr?(h.state=Yr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=Yr,h.timer.stop(),delete i[c])}if(jr(function(){n.state===Kr&&(n.state=Gr,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=zr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===zr){for(n.state=Kr,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=Qr,1),o=-1,a=r.length;++o<a;)r[o].call(null,i);n.state===Qr&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=Yr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Dr(function(t){n.state=Hr,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:qr,tween:Vr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Wr})};function $r(t,e){var n=Zr(t,e);if(n.state>Wr)throw new Error("too late; already scheduled");return n}function Jr(t,e){var n=Zr(t,e);if(n.state>zr)throw new Error("too late; already started");return n}function Zr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var ti=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>zr&&n.state<Qr,n.state=Yr,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}};function ei(t,e,n){var r=t._id;return t.each(function(){var t=Jr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Zr(t,r).value[e]}}var ni=function(t,e){var n;return("number"==typeof e?Vn:e instanceof qe?Ln:(n=qe(e))?(e=n,Ln):Xn)(t,e)};var ri=re.prototype.constructor;var ii=0;function oi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ai(t){return re().transition(t)}function si(){return++ii}var ui=re.prototype;function ci(t){return+t}function li(t){return t*t}function fi(t){return t*(2-t)}function hi(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function pi(t){return t*t*t}function di(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}oi.prototype=ai.prototype={constructor:oi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,f=o[a]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Xr(f[h],e,n,h,f,Zr(s,n)));return new oi(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_t(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,f=0;f<l;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=Zr(u,n),v=0,m=p.length;v<m;++v)(h=p[v])&&Xr(h,e,n,v,p,d);o.push(p),a.push(u)}return new oi(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new oi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new oi(a,this._parents,this._name,this._id)},selection:function(){return new ri(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=si(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=Zr(a,e);Xr(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new oi(r,this._parents,t,n)},call:ui.call,nodes:ui.nodes,node:ui.node,size:ui.size,empty:ui.empty,each:ui.each,on:function(t,e){var n=this._id;return arguments.length<2?Zr(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?$r:Jr;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=vt(t),r="transform"===n?ir:ni;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}})(n,r,ei(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}:function(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}})(n,r,e+""))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=vt(t);return this.tween(n,(r.local?function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}:function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n})(r,e))},style:function(t,e,n){var r="transform"==(t+="")?rr:ni;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Pt(this,t),a=(this.style.removeProperty(t),Pt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof e?function(t,e,n){var r,i,o;return function(){var a=Pt(this,t),s=n(this);return null==s&&(this.style.removeProperty(t),s=Pt(this,t)),a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,r,ei(this,"style."+t,e)):function(t,e,n){var r,i;return function(){var o=Pt(this,t);return o===n?null:o===r?i:i=e(r=o,n)}}(t,r,e+""),n)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Zr(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=Jr(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Jr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){$r(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){$r(this,t).delay=e}})(e,t)):Zr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){Jr(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){Jr(this,t).duration=e}})(e,t)):Zr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Jr(this,t).ease=e}}(e,t)):Zr(this.node(),e).ease}};var mi=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),yi=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),gi=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),bi=Math.PI,_i=bi/2;function wi(t){return 1-Math.cos(t*_i)}function Ei(t){return Math.sin(t*_i)}function Ti(t){return(1-Math.cos(bi*t))/2}function Ci(t){return Math.pow(2,10*t-10)}function xi(t){return 1-Math.pow(2,-10*t)}function Si(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function ki(t){return 1-Math.sqrt(1-t*t)}function Ni(t){return Math.sqrt(1- --t*t)}function Ai(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ii=4/11,Oi=6/11,Pi=8/11,Ri=.75,Di=9/11,Mi=10/11,Li=.9375,Fi=21/22,Ui=63/64,ji=1/Ii/Ii;function Bi(t){return 1-qi(1-t)}function qi(t){return(t=+t)<Ii?ji*t*t:t<Pi?ji*(t-=Oi)*t+Ri:t<Mi?ji*(t-=Di)*t+Li:ji*(t-=Fi)*t+Ui}function Vi(t){return((t*=2)<=1?1-qi(1-t):qi(t-1)+1)/2}var Wi=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Hi=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),zi=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Ki=2*Math.PI,Gi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Qi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Yi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Xi={time:null,delay:0,duration:250,ease:vi};function $i(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Xi.time=Or(),Xi;return n}re.prototype.interrupt=function(t){return this.each(function(){ti(this,t)})},re.prototype.transition=function(t){var e,n;t instanceof oi?(e=t._id,t=t._name):(e=si(),(n=Xi).time=Or(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&Xr(a,t,e,c,s,n||$i(a,e));return new oi(r,this._parents,t,e)};var Ji=[null],Zi=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>Hr&&n.name===e)return new oi([[t]],Ji,e,+r);return null},to=function(t){return function(){return t}},eo=function(t,e,n){this.target=t,this.type=e,this.selection=n};function no(){Gt.stopImmediatePropagation()}var ro=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},io={name:"drag"},oo={name:"space"},ao={name:"handle"},so={name:"center"},uo={name:"x",handles:["e","w"].map(yo),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},co={name:"y",handles:["n","s"].map(yo),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},lo={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(yo),input:function(t){return t},output:function(t){return t}},fo={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ho={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},po={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vo={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},mo={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function yo(t){return{type:t}}function go(){return!Gt.button}function bo(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function _o(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function wo(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Eo(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function To(){return So(uo)}function Co(){return So(co)}var xo=function(){return So(lo)};function So(t){var e,n=bo,r=go,i=ht(a,"start","brush","end"),o=6;function a(e){var n=e.property("__brush",f).selectAll(".overlay").data([yo("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",fo.overlay).merge(n).each(function(){var t=_o(this).extent;ie(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([yo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",fo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return fo[t.type]}),e.each(s).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function s(){var t=ie(this),e=_o(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-o/2:e[0][0]-o/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-o/2:e[0][1]-o/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+o:o}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+o:o})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e){return t.__brush.emitter||new c(t,e)}function c(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function l(){if(Gt.touches){if(Gt.changedTouches.length<Gt.touches.length)return ro()}else if(e)return;if(r.apply(this,arguments)){var n,i,o,a,c,l,f,h,p,d,v,m,y,g=this,b=Gt.target.__data__.type,_="selection"===(Gt.metaKey?b="overlay":b)?io:Gt.altKey?so:ao,w=t===co?null:vo[b],E=t===uo?null:mo[b],T=_o(g),C=T.extent,x=T.selection,S=C[0][0],k=C[0][1],N=C[1][0],A=C[1][1],I=w&&E&&Gt.shiftKey,O=fe(g),P=O,R=u(g,arguments).beforestart();"overlay"===b?T.selection=x=[[n=t===co?S:O[0],o=t===uo?k:O[1]],[c=t===co?N:n,f=t===uo?A:o]]:(n=x[0][0],o=x[0][1],c=x[1][0],f=x[1][1]),i=n,a=o,l=c,h=f;var D=ie(g).attr("pointer-events","none"),M=D.selectAll(".overlay").attr("cursor",fo[b]);if(Gt.touches)D.on("touchmove.brush",F,!0).on("touchend.brush touchcancel.brush",j,!0);else{var L=ie(Gt.view).on("keydown.brush",function(){switch(Gt.keyCode){case 16:I=w&&E;break;case 18:_===ao&&(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so,U());break;case 32:_!==ao&&_!==so||(w<0?c=l-p:w>0&&(n=i-p),E<0?f=h-d:E>0&&(o=a-d),_=oo,M.attr("cursor",fo.selection),U());break;default:return}ro()},!0).on("keyup.brush",function(){switch(Gt.keyCode){case 16:I&&(m=y=I=!1,U());break;case 18:_===so&&(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao,U());break;case 32:_===oo&&(Gt.altKey?(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so):(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao),M.attr("cursor",fo[b]),U());break;default:return}ro()},!0).on("mousemove.brush",F,!0).on("mouseup.brush",j,!0);ye(Gt.view)}no(),ti(g),s.call(g),R.start()}function F(){var t=fe(g);!I||m||y||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?y=!0:m=!0),P=t,v=!0,ro(),U()}function U(){var t;switch(p=P[0]-O[0],d=P[1]-O[1],_){case oo:case io:w&&(p=Math.max(S-n,Math.min(N-c,p)),i=n+p,l=c+p),E&&(d=Math.max(k-o,Math.min(A-f,d)),a=o+d,h=f+d);break;case ao:w<0?(p=Math.max(S-n,Math.min(N-n,p)),i=n+p,l=c):w>0&&(p=Math.max(S-c,Math.min(N-c,p)),i=n,l=c+p),E<0?(d=Math.max(k-o,Math.min(A-o,d)),a=o+d,h=f):E>0&&(d=Math.max(k-f,Math.min(A-f,d)),a=o,h=f+d);break;case so:w&&(i=Math.max(S,Math.min(N,n-p*w)),l=Math.max(S,Math.min(N,c+p*w))),E&&(a=Math.max(k,Math.min(A,o-d*E)),h=Math.max(k,Math.min(A,f+d*E)))}l<i&&(w*=-1,t=n,n=c,c=t,t=i,i=l,l=t,b in ho&&M.attr("cursor",fo[b=ho[b]])),h<a&&(E*=-1,t=o,o=f,f=t,t=a,a=h,h=t,b in po&&M.attr("cursor",fo[b=po[b]])),T.selection&&(x=T.selection),m&&(i=x[0][0],l=x[1][0]),y&&(a=x[0][1],h=x[1][1]),x[0][0]===i&&x[0][1]===a&&x[1][0]===l&&x[1][1]===h||(T.selection=[[i,a],[l,h]],s.call(g),R.brush())}function j(){if(no(),Gt.touches){if(Gt.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500),D.on("touchmove.brush touchend.brush touchcancel.brush",null)}else ge(Gt.view,v),L.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),M.attr("cursor",fo.overlay),T.selection&&(x=T.selection),wo(x)&&(T.selection=null,s.call(g)),R.end()}}function f(){var e=this.__brush||{selection:null};return e.extent=n.apply(this,arguments),e.dim=t,e}return a.move=function(e,n){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var e=this,r=e.__brush,i=u(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),c=$n(o,a);function l(t){r.selection=1===t&&wo(a)?null:c(t),s.call(e),i.brush()}return o&&a?l:l(1)}):e.each(function(){var e=arguments,r=this.__brush,i=t.input("function"==typeof n?n.apply(this,e):n,r.extent),o=u(this,e).beforestart();ti(this),r.selection=null==i||wo(i)?null:i,s.call(this),o.start().brush().end()})},c.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){Jt(new eo(a,e,t.output(this.state.selection)),i.apply,i,[e,this.that,this.args])}},a.extent=function(t){return arguments.length?(n="function"==typeof t?t:to([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),a):n},a.filter=function(t){return arguments.length?(r="function"==typeof t?t:to(!!t),a):r},a.handleSize=function(t){return arguments.length?(o=+t,a):o},a.on=function(){var t=i.on.apply(i,arguments);return t===i?a:t},a}var ko=Math.cos,No=Math.sin,Ao=Math.PI,Io=Ao/2,Oo=2*Ao,Po=Math.max;var Ro=function(){var t=0,e=null,n=null,r=null;function i(i){var o,a,s,u,c,l,f=i.length,h=[],p=E(f),d=[],v=[],m=v.groups=new Array(f),y=new Array(f*f);for(o=0,c=-1;++c<f;){for(a=0,l=-1;++l<f;)a+=i[c][l];h.push(a),d.push(E(f)),o+=a}for(e&&p.sort(function(t,n){return e(h[t],h[n])}),n&&d.forEach(function(t,e){t.sort(function(t,r){return n(i[e][t],i[e][r])})}),u=(o=Po(0,Oo-t*f)/o)?t:Oo/f,a=0,c=-1;++c<f;){for(s=a,l=-1;++l<f;){var g=p[c],b=d[g][l],_=i[g][b],w=a,T=a+=_*o;y[b*f+g]={index:g,subindex:b,startAngle:w,endAngle:T,value:_}}m[g]={index:g,startAngle:s,endAngle:a,value:h[g]},a+=u}for(c=-1;++c<f;)for(l=c-1;++l<f;){var C=y[l*f+c],x=y[c*f+l];(C.value||x.value)&&v.push(C.value<x.value?{source:x,target:C}:{source:C,target:x})}return r?v.sort(r):v}return i.padAngle=function(e){return arguments.length?(t=Po(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(e=t,r=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,i):r&&r._;var e},i},Do=Array.prototype.slice,Mo=function(t){return function(){return t}},Lo=Math.PI,Fo=2*Lo,Uo=Fo-1e-6;function jo(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Bo(){return new jo}jo.prototype=Bo.prototype={constructor:jo,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-o,p=r-a,d=s*s+u*u,v=h*h+p*p,m=Math.sqrt(d),y=Math.sqrt(f),g=i*Math.tan((Lo-Math.acos((d+f-v)/(2*m*y)))/2),b=g/y,_=g/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*p)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Fo+Fo),f>Uo?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Lo)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var qo=Bo;function Vo(t){return t.source}function Wo(t){return t.target}function Ho(t){return t.radius}function zo(t){return t.startAngle}function Ko(t){return t.endAngle}var Go=function(){var t=Vo,e=Wo,n=Ho,r=zo,i=Ko,o=null;function a(){var a,s=Do.call(arguments),u=t.apply(this,s),c=e.apply(this,s),l=+n.apply(this,(s[0]=u,s)),f=r.apply(this,s)-Io,h=i.apply(this,s)-Io,p=l*ko(f),d=l*No(f),v=+n.apply(this,(s[0]=c,s)),m=r.apply(this,s)-Io,y=i.apply(this,s)-Io;if(o||(o=a=qo()),o.moveTo(p,d),o.arc(0,0,l,f,h),f===m&&h===y||(o.quadraticCurveTo(0,0,v*ko(m),v*No(m)),o.arc(0,0,v,m,y)),o.quadraticCurveTo(0,0,p,d),o.closePath(),a)return o=null,a+""||null}return a.radius=function(t){return arguments.length?(n="function"==typeof t?t:Mo(+t),a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Mo(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Mo(+t),a):i},a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(t){return arguments.length?(e=t,a):e},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a};function Qo(){}function Yo(t,e){var n=new Qo;if(t instanceof Qo)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Qo.prototype=Yo.prototype={constructor:Qo,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Xo=Yo,$o=function(){var t,e,n,r=[],i=[];function o(n,i,a,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,c,l,f=-1,h=n.length,p=r[i++],d=Xo(),v=a();++f<h;)(l=d.get(u=p(c=n[f])+""))?l.push(c):d.set(u,[c]);return d.each(function(t,e){s(v,e,o(t,i,a,s))}),v}return n={object:function(t){return o(t,0,Jo,Zo)},map:function(t){return o(t,0,ta,ea)},entries:function(t){return function t(n,o){if(++o>r.length)return n;var a,s=i[o-1];return null!=e&&o>=r.length?a=n.entries():(a=[],n.each(function(e,n){a.push({key:n,values:t(e,o)})})),null!=s?a.sort(function(t,e){return s(t.key,e.key)}):a}(o(t,0,ta,ea),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Jo(){return{}}function Zo(t,e,n){t[e]=n}function ta(){return Xo()}function ea(t,e,n){t.set(e,n)}function na(){}var ra=Xo.prototype;function ia(t,e){var n=new na;if(t instanceof na)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}na.prototype=ia.prototype={constructor:na,has:ra.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ra.remove,clear:ra.clear,values:ra.keys,size:ra.size,empty:ra.empty,each:ra.each};var oa=ia,aa=function(t){var e=[];for(var n in t)e.push(n);return e},sa=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ca=Array.prototype.slice,la=function(t,e){return t-e},fa=function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r},ha=function(t){return function(){return t}},pa=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=da(t,e[r]))return n;return 0};function da(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],f=t[s],h=f[0],p=f[1];if(va(u,f,e))return 0;l>r!=p>r&&n<(h-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function va(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}var ma=function(){},ya=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],ga=function(){var t=1,e=1,n=A,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(la);else{var r=m(t),i=r[0],a=r[1];e=N(i,a,e),e=E(Math.floor(i/e)*e,Math.floor(a/e)*e,e)}return e.map(function(e){return o(t,e)})}function o(n,i){var o=[],s=[];return function(n,r,i){var o,s,u,c,l,f,h=new Array,p=new Array;o=s=-1,c=n[0]>=r,ya[c<<1].forEach(d);for(;++o<t-1;)u=c,c=n[o+1]>=r,ya[u|c<<1].forEach(d);ya[c<<0].forEach(d);for(;++s<e-1;){for(o=-1,c=n[s*t+t]>=r,l=n[s*t]>=r,ya[c<<1|l<<2].forEach(d);++o<t-1;)u=c,c=n[s*t+t+o+1]>=r,f=l,l=n[s*t+o+1]>=r,ya[u|c<<1|l<<2|f<<3].forEach(d);ya[c|l<<3].forEach(d)}o=-1,l=n[s*t]>=r,ya[l<<2].forEach(d);for(;++o<t-1;)f=l,l=n[s*t+o+1]>=r,ya[l<<2|f<<3].forEach(d);function d(t){var e,n,r=[t[0][0]+o,t[0][1]+s],u=[t[1][0]+o,t[1][1]+s],c=a(r),l=a(u);(e=p[c])?(n=h[l])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(u),p[e.end=l]=e):(e=h[l])?(n=p[c])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=c]=e):h[c]=p[l]={start:c,end:l,ring:[r,u]}}ya[l<<3].forEach(d)}(n,i,function(t){r(t,n,i),fa(t)>0?o.push([t]):s.push(t)}),s.forEach(function(t){for(var e,n=0,r=o.length;n<r;++n)if(-1!==pa((e=o[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:i,coordinates:o}}function a(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach(function(n){var o,a=n[0],s=n[1],u=0|a,c=0|s,l=r[c*t+u];a>0&&a<t&&u===a&&(o=r[c*t+u-1],n[0]=a+(i-o)/(l-o)-.5),s>0&&s<e&&c===s&&(o=r[(c-1)*t+u],n[1]=s+(i-o)/(l-o)-.5)})}return i.contour=o,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),o=Math.ceil(n[1]);if(!(r>0&&o>0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:ma,i):r===s},i};function ba(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<i;++a)for(var s=0,u=0;s<r+n;++s)s<r&&(u+=t.data[s+a*r]),s>=n&&(s>=o&&(u-=t.data[s-o+a*r]),e.data[s-n+a*r]=u/Math.min(s+1,r-1+o-s,o))}function _a(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<r;++a)for(var s=0,u=0;s<i+n;++s)s<i&&(u+=t.data[a+s*r]),s>=n&&(s>=o&&(u-=t.data[a+(s-o)*r]),e.data[a+(s-n)*r]=u/Math.min(s+1,i-1+o-s,o))}function wa(t){return t[0]}function Ea(t){return t[1]}var Ta=function(){var t=wa,e=Ea,n=960,r=500,i=20,o=2,a=3*i,s=n+2*a>>o,u=r+2*a>>o,c=ha(20);function l(n){var r=new Float32Array(s*u),l=new Float32Array(s*u);n.forEach(function(n,i,c){var l=t(n,i,c)+a>>o,f=e(n,i,c)+a>>o;l>=0&&l<s&&f>=0&&f<u&&++r[l+f*s]}),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o);var h=c(r);if(!Array.isArray(h)){var p=D(r);h=N(0,p,h),(h=E(0,Math.floor(p/h)*h,h)).shift()}return ga().thresholds(h).size([s,u])(r).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(h),t}function h(t){t.forEach(p)}function p(t){t.forEach(d)}function d(t){t[0]=t[0]*Math.pow(2,o)-a,t[1]=t[1]*Math.pow(2,o)-a}function v(){return s=n+2*(a=3*i)>>o,u=r+2*a>>o,l}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:ha(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:ha(+t),l):e},l.size=function(t){if(!arguments.length)return[n,r];var e=Math.ceil(t[0]),i=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return n=e,r=i,v()},l.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),v()},l.thresholds=function(t){return arguments.length?(c="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),l):c},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(i*(i+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return i=Math.round((Math.sqrt(4*t*t+1)-1)/2),v()},l},Ca={},xa={},Sa=34,ka=10,Na=13;function Aa(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}var Ia=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,c=!1;function l(){if(u)return xa;if(c)return c=!1,Ca;var e,r,i=a;if(t.charCodeAt(i)===Sa){for(;a++<o&&t.charCodeAt(a)!==Sa||t.charCodeAt(++a)===Sa;);return(e=a)>=o?u=!0:(r=t.charCodeAt(a++))===ka?c=!0:r===Na&&(c=!0,t.charCodeAt(a)===ka&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if((r=t.charCodeAt(e=a++))===ka)c=!0;else if(r===Na)c=!0,t.charCodeAt(a)===ka&&++a;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===ka&&--o,t.charCodeAt(o-1)===Na&&--o;(r=l())!==xa;){for(var f=[];r!==Ca&&r!==xa;)f.push(r),r=l();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e){return e.map(o).join(t)}function o(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Aa(t);return function(r,i){return e(n(r),i,t)}}(t,e):Aa(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=function(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}(e)),[n.map(o).join(t)].concat(e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})).join("\n")},formatRows:function(t){return t.map(i).join("\n")}}},Oa=Ia(","),Pa=Oa.parse,Ra=Oa.parseRows,Da=Oa.format,Ma=Oa.formatRows,La=Ia("\t"),Fa=La.parse,Ua=La.parseRows,ja=La.format,Ba=La.formatRows;function qa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var Va=function(t,e){return fetch(t,e).then(qa)};function Wa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var Ha=function(t,e){return fetch(t,e).then(Wa)};function za(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Ka=function(t,e){return fetch(t,e).then(za)};function Ga(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Ka(e,n).then(function(e){return t(e,r)})}}function Qa(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Ia(t);return Ka(e,n).then(function(t){return i.parse(t,r)})}var Ya=Ga(Pa),Xa=Ga(Fa),$a=function(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})};function Ja(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var Za=function(t,e){return fetch(t,e).then(Ja)};function ts(t){return function(e,n){return Ka(e,n).then(function(e){return(new DOMParser).parseFromString(e,t)})}}var es=ts("application/xml"),ns=ts("text/html"),rs=ts("image/svg+xml"),is=function(t,e){var n;function r(){var r,i,o=n.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=n[r]).x,s+=i.y;for(a=a/o-t,s=s/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},os=function(t){return function(){return t}},as=function(){return 1e-6*(Math.random()-.5)};function ss(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,c,l,f,h,p=t._root,d={data:r},v=t._x0,m=t._y0,y=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a,i=p,!(p=p[f=l<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===s&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a}while((f=l<<1|c)==(h=(u>=a)<<1|s>=o));return i[h]=p,i[f]=d,t}var us=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function cs(t){return t[0]}function ls(t){return t[1]}function fs(t,e,n){var r=new hs(null==e?cs:e,null==n?ls:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function hs(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ps(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ds=fs.prototype=hs.prototype;function vs(t){return t.x+t.vx}function ms(t){return t.y+t.vy}ds.copy=function(){var t,e,n=new hs(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ps(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ps(e));return n},ds.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ss(this.cover(e,n),e,n,t)},ds.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<u&&(u=r),r>l&&(l=r),i<c&&(c=i),i>f&&(f=i));for(l<u&&(u=this._x0,l=this._x1),f<c&&(c=this._y0,f=this._y1),this.cover(u,c).cover(l,f),n=0;n<o;++n)ss(this,a[n],s[n],t[n]);return this},ds.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>o))return this;var a,s,u=i-n,c=this._root;switch(s=(e<(r+o)/2)<<1|t<(n+i)/2){case 0:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),t>(i=n+u)||e>o);break;case 1:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),(n=i-u)>t||e>o);break;case 2:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),t>(i=n+u)||r>e);break;case 3:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),(n=i-u)>t||r>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},ds.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},ds.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ds.find=function(t,e,n){var r,i,o,a,s,u,c,l=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new us(v,l,f,h,p)),null==n?n=1/0:(l=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(v=u.node)||(i=u.x0)>h||(o=u.y0)>p||(a=u.x1)<l||(s=u.y1)<f))if(v.length){var m=(i+a)/2,y=(o+s)/2;d.push(new us(v[3],m,y,a,s),new us(v[2],i,y,m,s),new us(v[1],m,o,a,y),new us(v[0],i,o,m,y)),(c=(e>=y)<<1|t>=m)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}else{var g=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=g*g+b*b;if(_<n){var w=Math.sqrt(n=_);l=t-w,f=e-w,h=t+w,p=e+w,r=v.data}}return r},ds.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,c,l,f,h,p=this._root,d=this._x0,v=this._y0,m=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(s=(d+m)/2))?d=s:m=s,(l=a>=(u=(v+y)/2))?v=u:y=u,e=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},ds.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ds.root=function(){return this._root},ds.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},ds.visit=function(t){var e,n,r,i,o,a,s=[],u=this._root;for(u&&s.push(new us(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&u.length){var c=(r+o)/2,l=(i+a)/2;(n=u[3])&&s.push(new us(n,c,l,o,a)),(n=u[2])&&s.push(new us(n,r,l,c,a)),(n=u[1])&&s.push(new us(n,c,i,o,l)),(n=u[0])&&s.push(new us(n,r,i,c,l))}return this},ds.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new us(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,u=e.x1,c=e.y1,l=(a+u)/2,f=(s+c)/2;(o=i[0])&&n.push(new us(o,a,s,l,f)),(o=i[1])&&n.push(new us(o,l,s,u,f)),(o=i[2])&&n.push(new us(o,a,f,l,c)),(o=i[3])&&n.push(new us(o,l,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ds.x=function(t){return arguments.length?(this._x=t,this):this._x},ds.y=function(t){return arguments.length?(this._y=t,this):this._y};var ys=function(t){var e,n,r=1,i=1;function o(){for(var t,o,s,u,c,l,f,h=e.length,p=0;p<i;++p)for(o=fs(e,vs,ms).visitAfter(a),t=0;t<h;++t)s=e[t],l=n[s.index],f=l*l,u=s.x+s.vx,c=s.y+s.vy,o.visit(d);function d(t,e,n,i,o){var a=t.data,h=t.r,p=l+h;if(!a)return e>u+p||i<u-p||n>c+p||o<c-p;if(a.index>s.index){var d=u-a.x-a.vx,v=c-a.y-a.vy,m=d*d+v*v;m<p*p&&(0===d&&(m+=(d=as())*d),0===v&&(m+=(v=as())*v),m=(p-(m=Math.sqrt(m)))/m*r,s.vx+=(d*=m)*(p=(h*=h)/(f+h)),s.vy+=(v*=m)*p,a.vx-=d*(p=1-p),a.vy-=v*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=os(null==t?1:+t)),o.initialize=function(t){e=t,s()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),s(),o):t},o};function gs(t){return t.index}function bs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var _s=function(t){var e,n,r,i,o,a=gs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=os(30),c=1;function l(r){for(var i=0,a=t.length;i<c;++i)for(var s,u,l,f,h,p,d,v=0;v<a;++v)u=(s=t[v]).source,f=(l=s.target).x+l.vx-u.x-u.vx||as(),h=l.y+l.vy-u.y-u.vy||as(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,l.vx-=f*(d=o[v]),l.vy-=h*d,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var s,u,c=r.length,l=t.length,f=Xo(r,a);for(s=0,i=new Array(c);s<l;++s)(u=t[s]).index=s,"object"!=typeof u.source&&(u.source=bs(f,u.source)),"object"!=typeof u.target&&(u.target=bs(f,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(s=0,o=new Array(l);s<l;++s)u=t[s],o[s]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);e=new Array(l),h(),n=new Array(l),p()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,f()},l.links=function(e){return arguments.length?(t=e,f(),l):t},l.id=function(t){return arguments.length?(a=t,l):a},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:os(+t),h(),l):s},l.distance=function(t){return arguments.length?(u="function"==typeof t?t:os(+t),p(),l):u},l};function ws(t){return t.x}function Es(t){return t.y}var Ts=10,Cs=Math.PI*(3-Math.sqrt(5)),xs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=Xo(),u=Dr(l),c=ht("tick","end");function l(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(){var e,r,u=t.length;for(n+=(o-n)*i,s.each(function(t){t(n)}),e=0;e<u;++e)null==(r=t[e]).fx?r.x+=r.vx*=a:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=a:(r.y=r.fy,r.vy=0)}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,isNaN(e.x)||isNaN(e.y)){var i=Ts*Math.sqrt(n),o=n*Cs;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return u.restart(l),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),s.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)(a=(i=e-(s=t[c]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}},Ss=function(){var t,e,n,r,i=os(-30),o=1,a=1/0,s=.81;function u(r){var i,o=t.length,a=fs(t,ws,Es).visitAfter(l);for(n=r,i=0;i<o;++i)e=t[i],a.visit(f)}function c(){if(t){var e,n,o=t.length;for(r=new Array(o),e=0;e<o;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,o,a,s=0,u=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,i+=n*e.x,o+=n*e.y);t.x=i/u,t.y=o/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function f(t,i,u,c){if(!t.value)return!0;var l=t.x-e.x,f=t.y-e.y,h=c-i,p=l*l+f*f;if(h*h/s<p)return p<a&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=l*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=l*h,e.vy+=f*h)}while(t=t.next)}}return u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),c(),u):i},u.distanceMin=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u},ks=function(t,e,n){var r,i,o,a=os(.1);function s(t){for(var a=0,s=r.length;a<s;++a){var u=r[a],c=u.x-e||1e-6,l=u.y-n||1e-6,f=Math.sqrt(c*c+l*l),h=(o[a]-f)*i[a]*t/f;u.vx+=c*h,u.vy+=l*h}}function u(){if(r){var e,n=r.length;for(i=new Array(n),o=new Array(n),e=0;e<n;++e)o[e]=+t(r[e],e,r),i[e]=isNaN(o[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,u()},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:os(+t),u(),s):a},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),u(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ns=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},As=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},Is=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},Os=function(t){return(t=Is(Math.abs(t)))?t[1]:NaN},Ps=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rs(t){return new Ds(t)}function Ds(t){if(!(e=Ps.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}Rs.prototype=Ds.prototype,Ds.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ms,Ls,Fs,Us,js=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Bs=function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},qs={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Bs(100*t,e)},r:Bs,s:function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ms=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Is(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Vs=function(t){return t},Ws=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Hs=function(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}):Vs,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):Vs,s=t.percent||"%";function u(t){var e=(t=Rs(t)).fill,n=t.align,u=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,p=t.precision,d=t.trim,v=t.type;"n"===v?(h=!0,v="g"):qs[v]||(null==p&&(p=12),d=!0,v="g"),(l||"0"===e&&"="===n)&&(l=!0,e="0",n="=");var m="$"===c?i[0]:"#"===c&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===c?i[1]:/[%p]/.test(v)?s:"",g=qs[v],b=/[defgprs%]/.test(v);function _(t){var i,s,c,_=m,w=y;if("c"===v)w=g(t)+w,t="";else{var E=(t=+t)<0;if(t=g(Math.abs(t),p),d&&(t=js(t)),E&&0==+t&&(E=!1),_=(E?"("===u?u:"-":"-"===u||"("===u?"":u)+_,w=("s"===v?Ws[8+Ms/3]:"")+w+(E&&"("===u?")":""),b)for(i=-1,s=t.length;++i<s;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var T=_.length+t.length+w.length,C=T<f?new Array(f-T+1).join(e):"";switch(h&&l&&(t=r(C+t,C.length?f-w.length:1/0),C=""),n){case"<":t=_+t+w+C;break;case"=":t=_+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+_+t+w+C.slice(T);break;default:t=C+_+t+w}return a(t)}return p=null==p?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var n=u(((t=Rs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3))),i=Math.pow(10,-r),o=Ws[8+r/3];return function(t){return n(i*t)+o}}}};function zs(t){return Ls=Hs(t),Fs=Ls.format,Us=Ls.formatPrefix,Ls}zs({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ks=function(t){return Math.max(0,-Os(Math.abs(t)))},Gs=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3)))-Os(Math.abs(t)))},Qs=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Os(e)-Os(t))+1},Ys=function(){return new Xs};function Xs(){this.reset()}Xs.prototype={constructor:Xs,reset:function(){this.s=this.t=0},add:function(t){Js($s,t,this.t),Js(this,$s.s,this.s),this.s?this.t+=$s.t:this.s=$s.t},valueOf:function(){return this.s}};var $s=new Xs;function Js(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var Zs=1e-6,tu=Math.PI,eu=tu/2,nu=tu/4,ru=2*tu,iu=180/tu,ou=tu/180,au=Math.abs,su=Math.atan,uu=Math.atan2,cu=Math.cos,lu=Math.ceil,fu=Math.exp,hu=(Math.floor,Math.log),pu=Math.pow,du=Math.sin,vu=Math.sign||function(t){return t>0?1:t<0?-1:0},mu=Math.sqrt,yu=Math.tan;function gu(t){return t>1?0:t<-1?tu:Math.acos(t)}function bu(t){return t>1?eu:t<-1?-eu:Math.asin(t)}function _u(t){return(t=du(t/2))*t}function wu(){}function Eu(t,e){t&&Cu.hasOwnProperty(t.type)&&Cu[t.type](t,e)}var Tu={Feature:function(t,e){Eu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Eu(n[r].geometry,e)}},Cu={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){xu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xu(n[r],e,0)},Polygon:function(t,e){Su(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Su(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Eu(n[r],e)}};function xu(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Su(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)xu(t[n],e,1);e.polygonEnd()}var ku,Nu,Au,Iu,Ou,Pu=function(t,e){t&&Tu.hasOwnProperty(t.type)?Tu[t.type](t,e):Eu(t,e)},Ru=Ys(),Du=Ys(),Mu={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Ru.reset(),Mu.lineStart=Lu,Mu.lineEnd=Fu},polygonEnd:function(){var t=+Ru;Du.add(t<0?ru+t:t),this.lineStart=this.lineEnd=this.point=wu},sphere:function(){Du.add(ru)}};function Lu(){Mu.point=Uu}function Fu(){ju(ku,Nu)}function Uu(t,e){Mu.point=ju,ku=t,Nu=e,Au=t*=ou,Iu=cu(e=(e*=ou)/2+nu),Ou=du(e)}function ju(t,e){e=(e*=ou)/2+nu;var n=(t*=ou)-Au,r=n>=0?1:-1,i=r*n,o=cu(e),a=du(e),s=Ou*a,u=Iu*o+s*cu(i),c=s*r*du(i);Ru.add(uu(c,u)),Au=t,Iu=o,Ou=a}var Bu=function(t){return Du.reset(),Pu(t,Mu),2*Du};function qu(t){return[uu(t[1],t[0]),bu(t[2])]}function Vu(t){var e=t[0],n=t[1],r=cu(n);return[r*cu(e),r*du(e),du(n)]}function Wu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ku(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Gu(t){var e=mu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Qu,Yu,Xu,$u,Ju,Zu,tc,ec,nc,rc,ic=Ys(),oc={point:ac,lineStart:uc,lineEnd:cc,polygonStart:function(){oc.point=lc,oc.lineStart=fc,oc.lineEnd=hc,ic.reset(),Mu.polygonStart()},polygonEnd:function(){Mu.polygonEnd(),oc.point=ac,oc.lineStart=uc,oc.lineEnd=cc,Ru<0?(Qu=-(Xu=180),Yu=-($u=90)):ic>Zs?$u=90:ic<-Zs&&(Yu=-90),rc[0]=Qu,rc[1]=Xu}};function ac(t,e){nc.push(rc=[Qu=t,Xu=t]),e<Yu&&(Yu=e),e>$u&&($u=e)}function sc(t,e){var n=Vu([t*ou,e*ou]);if(ec){var r=Hu(ec,n),i=Hu([r[1],-r[0],0],r);Gu(i),i=qu(i);var o,a=t-Ju,s=a>0?1:-1,u=i[0]*iu*s,c=au(a)>180;c^(s*Ju<u&&u<s*t)?(o=i[1]*iu)>$u&&($u=o):c^(s*Ju<(u=(u+360)%360-180)&&u<s*t)?(o=-i[1]*iu)<Yu&&(Yu=o):(e<Yu&&(Yu=e),e>$u&&($u=e)),c?t<Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t):Xu>=Qu?(t<Qu&&(Qu=t),t>Xu&&(Xu=t)):t>Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t)}else nc.push(rc=[Qu=t,Xu=t]);e<Yu&&(Yu=e),e>$u&&($u=e),ec=n,Ju=t}function uc(){oc.point=sc}function cc(){rc[0]=Qu,rc[1]=Xu,oc.point=ac,ec=null}function lc(t,e){if(ec){var n=t-Ju;ic.add(au(n)>180?n+(n>0?360:-360):n)}else Zu=t,tc=e;Mu.point(t,e),sc(t,e)}function fc(){Mu.lineStart()}function hc(){lc(Zu,tc),Mu.lineEnd(),au(ic)>Zs&&(Qu=-(Xu=180)),rc[0]=Qu,rc[1]=Xu,ec=null}function pc(t,e){return(e-=t)<0?e+360:e}function dc(t,e){return t[0]-e[0]}function vc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var mc,yc,gc,bc,_c,wc,Ec,Tc,Cc,xc,Sc,kc,Nc,Ac,Ic,Oc,Pc=function(t){var e,n,r,i,o,a,s;if($u=Xu=-(Qu=Yu=1/0),nc=[],Pu(t,oc),n=nc.length){for(nc.sort(dc),e=1,o=[r=nc[0]];e<n;++e)vc(r,(i=nc[e])[0])||vc(r,i[1])?(pc(r[0],i[1])>pc(r[0],r[1])&&(r[1]=i[1]),pc(i[0],r[1])>pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=pc(r[1],i[0]))>a&&(a=s,Qu=i[0],Xu=r[1])}return nc=rc=null,Qu===1/0||Yu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Qu,Yu],[Xu,$u]]},Rc={sphere:wu,point:Dc,lineStart:Lc,lineEnd:jc,polygonStart:function(){Rc.lineStart=Bc,Rc.lineEnd=qc},polygonEnd:function(){Rc.lineStart=Lc,Rc.lineEnd=jc}};function Dc(t,e){t*=ou;var n=cu(e*=ou);Mc(n*cu(t),n*du(t),du(e))}function Mc(t,e,n){gc+=(t-gc)/++mc,bc+=(e-bc)/mc,_c+=(n-_c)/mc}function Lc(){Rc.point=Fc}function Fc(t,e){t*=ou;var n=cu(e*=ou);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Rc.point=Uc,Mc(Ac,Ic,Oc)}function Uc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=uu(mu((a=Ic*o-Oc*i)*a+(a=Oc*r-Ac*o)*a+(a=Ac*i-Ic*r)*a),Ac*r+Ic*i+Oc*o);yc+=a,wc+=a*(Ac+(Ac=r)),Ec+=a*(Ic+(Ic=i)),Tc+=a*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}function jc(){Rc.point=Dc}function Bc(){Rc.point=Vc}function qc(){Wc(kc,Nc),Rc.point=Dc}function Vc(t,e){kc=t,Nc=e,t*=ou,e*=ou,Rc.point=Wc;var n=cu(e);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Mc(Ac,Ic,Oc)}function Wc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=Ic*o-Oc*i,s=Oc*r-Ac*o,u=Ac*i-Ic*r,c=mu(a*a+s*s+u*u),l=bu(c),f=c&&-l/c;Cc+=f*a,xc+=f*s,Sc+=f*u,yc+=l,wc+=l*(Ac+(Ac=r)),Ec+=l*(Ic+(Ic=i)),Tc+=l*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}var Hc=function(t){mc=yc=gc=bc=_c=wc=Ec=Tc=Cc=xc=Sc=0,Pu(t,Rc);var e=Cc,n=xc,r=Sc,i=e*e+n*n+r*r;return i<1e-12&&(e=wc,n=Ec,r=Tc,yc<Zs&&(e=gc,n=bc,r=_c),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[uu(n,e)*iu,bu(r/mu(i))*iu]},zc=function(t){return function(){return t}},Kc=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function Gc(t,e){return[t>tu?t-ru:t<-tu?t+ru:t,e]}function Qc(t,e,n){return(t%=ru)?e||n?Kc(Xc(t),$c(e,n)):Xc(t):e||n?$c(e,n):Gc}function Yc(t){return function(e,n){return[(e+=t)>tu?e-ru:e<-tu?e+ru:e,n]}}function Xc(t){var e=Yc(t);return e.invert=Yc(-t),e}function $c(t,e){var n=cu(t),r=du(t),i=cu(e),o=du(e);function a(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*n+s*r;return[uu(u*i-l*o,s*n-c*r),bu(l*i+u*o)]}return a.invert=function(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*i-u*o;return[uu(u*i+c*o,s*n+l*r),bu(l*n-s*r)]},a}Gc.invert=Gc;var Jc=function(t){function e(e){return(e=t(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e}return t=Qc(t[0]*ou,t[1]*ou,t.length>2?t[2]*ou:0),e.invert=function(e){return(e=t.invert(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e},e};function Zc(t,e,n,r,i,o){if(n){var a=cu(e),s=du(e),u=r*n;null==i?(i=e+r*ru,o=e-u/2):(i=tl(a,i),o=tl(a,o),(r>0?i<o:i>o)&&(i+=r*ru));for(var c,l=i;r>0?l>o:l<o;l-=u)c=qu([a,-s*cu(l),-s*du(l)]),t.point(c[0],c[1])}}function tl(t,e){(e=Vu(e))[0]-=t,Gu(e);var n=gu(-e[1]);return((-e[2]<0?-n:n)+ru-Zs)%ru}var el=function(){var t,e,n=zc([0,0]),r=zc(90),i=zc(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=iu,n[1]*=iu}};function a(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*ou,u=i.apply(this,arguments)*ou;return t=[],e=Qc(-a[0]*ou,-a[1]*ou,0).invert,Zc(o,s,u,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:zc([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:zc(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:zc(+t),a):i},a},nl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:wu,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},rl=function(t,e){return au(t[0]-e[0])<Zs&&au(t[1]-e[1])<Zs};function il(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var ol=function(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rl(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new il(r,t,null,!0)),u.push(n.o=new il(r,null,n,!1)),s.push(n=new il(a,t,null,!1)),u.push(n.o=new il(a,null,n,!0))}}),s.length){for(u.sort(e),al(s),al(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var c,l,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=c.length;o<a;++o)i.point((l=c[o])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((l=c[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function al(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var sl=Ys(),ul=function(t,e){var n=e[0],r=e[1],i=du(r),o=[du(n),-cu(n),0],a=0,s=0;sl.reset(),1===i?r=eu+Zs:-1===i&&(r=-eu-Zs);for(var u=0,c=t.length;u<c;++u)if(f=(l=t[u]).length)for(var l,f,h=l[f-1],p=h[0],d=h[1]/2+nu,v=du(d),m=cu(d),y=0;y<f;++y,p=b,v=w,m=E,h=g){var g=l[y],b=g[0],_=g[1]/2+nu,w=du(_),E=cu(_),T=b-p,C=T>=0?1:-1,x=C*T,S=x>tu,k=v*w;if(sl.add(uu(k*C*du(x),m*E+k*cu(x))),a+=S?T+C*ru:T,S^p>=n^b>=n){var N=Hu(Vu(h),Vu(g));Gu(N);var A=Hu(o,N);Gu(A);var I=(S^T>=0?-1:1)*bu(A[2]);(r>I||r===I&&(N[0]||N[1]))&&(s+=S^T>=0?1:-1)}}return(a<-Zs||a<Zs&&sl<-Zs)^1&s},cl=function(t,e,n,r){return function(i){var o,a,s,u=e(i),c=nl(),l=e(c),f=!1,h={point:p,lineStart:v,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=g,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=v,h.lineEnd=m,a=F(a);var t=ul(o,r);a.length?(f||(i.polygonStart(),f=!0),ol(a,fl,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function v(){h.point=d,u.lineStart()}function m(){h.point=p,u.lineEnd()}function y(t,e){s.push([t,e]),l.point(t,e)}function g(){l.lineStart(),s=[]}function b(){y(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,u=l.clean(),h=c.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ll))}return h}};function ll(t){return t.length>1}function fl(t,e){return((t=t.x)[0]<0?t[1]-eu-Zs:eu-t[1])-((e=e.x)[0]<0?e[1]-eu-Zs:eu-e[1])}var hl=cl(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?tu:-tu,u=au(o-n);au(u-tu)<Zs?(t.point(n,r=(r+a)/2>0?eu:-eu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=tu&&(au(n-i)<Zs&&(n-=i*Zs),au(o-s)<Zs&&(o-=s*Zs),r=function(t,e,n,r){var i,o,a=du(t-n);return au(a)>Zs?su((du(e)*(o=cu(r))*du(n)-du(r)*(i=cu(e))*du(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eu,r.point(-tu,i),r.point(0,i),r.point(tu,i),r.point(tu,0),r.point(tu,-i),r.point(0,-i),r.point(-tu,-i),r.point(-tu,0),r.point(-tu,i);else if(au(t[0]-e[0])>Zs){var o=t[0]<e[0]?tu:-tu;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-tu,-eu]);var pl=function(t){var e=cu(t),n=6*ou,r=e>0,i=au(e)>Zs;function o(t,n){return cu(t)*cu(n)>e}function a(t,n,r){var i=[1,0,0],o=Hu(Vu(t),Vu(n)),a=Wu(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var c=e*a/u,l=-e*s/u,f=Hu(i,o),h=Ku(i,c);zu(h,Ku(o,l));var p=f,d=Wu(h,p),v=Wu(p,p),m=d*d-v*(Wu(h,h)-1);if(!(m<0)){var y=mu(m),g=Ku(p,(-d-y)/v);if(zu(g,h),g=qu(g),!r)return g;var b,_=t[0],w=n[0],E=t[1],T=n[1];w<_&&(b=_,_=w,w=b);var C=w-_,x=au(C-tu)<Zs;if(!x&&T<E&&(b=E,E=T,T=b),x||C<Zs?x?E+T>0^g[1]<(au(g[0]-_)<Zs?E:T):E<=g[1]&&g[1]<=T:C>tu^(_<=g[0]&&g[0]<=w)){var S=Ku(p,(-d+y)/v);return zu(S,h),[g,qu(S)]}}}function s(e,n){var i=r?t:tu-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return cl(o,function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,h){var p,d=[f,h],v=o(f,h),m=r?v?0:s(f,h):v?s(f+(f<0?tu:-tu),h):0;if(!e&&(c=u=v)&&t.lineStart(),v!==u&&(!(p=a(e,d))||rl(e,p)||rl(d,p))&&(d[0]+=Zs,d[1]+=Zs,v=o(d[0],d[1])),v!==u)l=0,v?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^v){var y;m&n||!(y=a(d,e,!0))||(l=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||e&&rl(e,d)||t.point(d[0],d[1]),e=d,u=v,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}},function(e,r,i,o){Zc(o,t,n,i,e,r)},r?[0,-t]:[-tu,t-tu])},dl=function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=0,l=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<c)return;a<l&&(l=a)}else if(f>0){if(a>l)return;a>c&&(c=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>l)return;a>c&&(c=a)}else if(f>0){if(a<c)return;a<l&&(l=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<l&&(l=a)}else if(h>0){if(a>l)return;a>c&&(c=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<l&&(l=a)}return c>0&&(t[0]=s+c*f,t[1]=u+c*h),l<1&&(e[0]=s+l*f,e[1]=u+l*h),!0}}}}},vl=1e9,ml=-vl;function yl(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,c){var l=0,f=0;if(null==i||(l=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else c.point(o[0],o[1])}function a(r,i){return au(r[0]-t)<Zs?i>0?0:3:au(r[0]-n)<Zs?i>0?2:1:au(r[1]-e)<Zs?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,c,l,f,h,p,d,v,m,y,g,b=a,_=nl(),w={point:E,lineStart:function(){w.point=T,c&&c.push(l=[]);y=!0,m=!1,d=v=NaN},lineEnd:function(){u&&(T(f,h),p&&m&&_.rejoin(),u.push(_.result()));w.point=E,m&&b.lineEnd()},polygonStart:function(){b=_,u=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],u=1,l=s.length,f=s[0],h=f[0],p=f[1];u<l;++u)o=h,a=p,f=s[u],h=f[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=g&&e,i=(u=F(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ol(u,s,e,o,a),a.polygonEnd());b=a,u=c=l=null}};function E(t,e){i(t,e)&&b.point(t,e)}function T(o,a){var s=i(o,a);if(c&&l.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&m)b.point(o,a);else{var u=[d=Math.max(ml,Math.min(vl,d)),v=Math.max(ml,Math.min(vl,v))],_=[o=Math.max(ml,Math.min(vl,o)),a=Math.max(ml,Math.min(vl,a))];dl(u,_,t,e,n,r)?(m||(b.lineStart(),b.point(u[0],u[1])),b.point(_[0],_[1]),s||b.lineEnd(),g=!1):s&&(b.lineStart(),b.point(o,a),g=!1)}d=o,v=a,m=s}return w}}var gl,bl,_l,wl=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=yl(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}},El=Ys(),Tl={sphere:wu,point:wu,lineStart:function(){Tl.point=xl,Tl.lineEnd=Cl},lineEnd:wu,polygonStart:wu,polygonEnd:wu};function Cl(){Tl.point=Tl.lineEnd=wu}function xl(t,e){gl=t*=ou,bl=du(e*=ou),_l=cu(e),Tl.point=Sl}function Sl(t,e){t*=ou;var n=du(e*=ou),r=cu(e),i=au(t-gl),o=cu(i),a=r*du(i),s=_l*n-bl*r*o,u=bl*n+_l*r*o;El.add(uu(mu(a*a+s*s),u)),gl=t,bl=n,_l=r}var kl=function(t){return El.reset(),Pu(t,Tl),+El},Nl=[null,null],Al={type:"LineString",coordinates:Nl},Il=function(t,e){return Nl[0]=t,Nl[1]=e,kl(Al)},Ol={Feature:function(t,e){return Rl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rl(n[r].geometry,e))return!0;return!1}},Pl={Sphere:function(){return!0},Point:function(t,e){return Dl(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Dl(n[r],e))return!0;return!1},LineString:function(t,e){return Ml(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ml(n[r],e))return!0;return!1},Polygon:function(t,e){return Ll(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ll(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rl(n[r],e))return!0;return!1}};function Rl(t,e){return!(!t||!Pl.hasOwnProperty(t.type))&&Pl[t.type](t,e)}function Dl(t,e){return 0===Il(t,e)}function Ml(t,e){var n=Il(t[0],t[1]);return Il(t[0],e)+Il(e,t[1])<=n+Zs}function Ll(t,e){return!!ul(t.map(Fl),Ul(e))}function Fl(t){return(t=t.map(Ul)).pop(),t}function Ul(t){return[t[0]*ou,t[1]*ou]}var jl=function(t,e){return(t&&Ol.hasOwnProperty(t.type)?Ol[t.type]:Rl)(t,e)};function Bl(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function ql(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Vl(){var t,e,n,r,i,o,a,s,u,c,l,f,h=10,p=h,d=90,v=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:g()}}function g(){return E(lu(r/d)*d,n,d).map(l).concat(E(lu(s/v)*v,a,v).map(f)).concat(E(lu(e/h)*h,t,h).filter(function(t){return au(t%d)>Zs}).map(u)).concat(E(lu(o/p)*p,i,p).filter(function(t){return au(t%v)>Zs}).map(c))}return y.lines=function(){return g().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(a).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(m)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],y):[d,v]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(m=+h,u=Bl(o,i,90),c=ql(e,t,m),l=Bl(s,a,90),f=ql(r,n,m),y):m},y.extentMajor([[-180,-90+Zs],[180,90-Zs]]).extentMinor([[-180,-80-Zs],[180,80+Zs]])}function Wl(){return Vl()()}var Hl,zl,Kl,Gl,Ql=function(t,e){var n=t[0]*ou,r=t[1]*ou,i=e[0]*ou,o=e[1]*ou,a=cu(r),s=du(r),u=cu(o),c=du(o),l=a*cu(n),f=a*du(n),h=u*cu(i),p=u*du(i),d=2*bu(mu(_u(o-r)+a*u*_u(i-n))),v=du(d),m=d?function(t){var e=du(t*=d)/v,n=du(d-t)/v,r=n*l+e*h,i=n*f+e*p,o=n*s+e*c;return[uu(i,r)*iu,uu(o,mu(r*r+i*i))*iu]}:function(){return[n*iu,r*iu]};return m.distance=d,m},Yl=function(t){return t},Xl=Ys(),$l=Ys(),Jl={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Jl.lineStart=Zl,Jl.lineEnd=nf},polygonEnd:function(){Jl.lineStart=Jl.lineEnd=Jl.point=wu,Xl.add(au($l)),$l.reset()},result:function(){var t=Xl/2;return Xl.reset(),t}};function Zl(){Jl.point=tf}function tf(t,e){Jl.point=ef,Hl=Kl=t,zl=Gl=e}function ef(t,e){$l.add(Gl*t-Kl*e),Kl=t,Gl=e}function nf(){ef(Hl,zl)}var rf=Jl,of=1/0,af=of,sf=-of,uf=sf;var cf,lf,ff,hf,pf={point:function(t,e){t<of&&(of=t);t>sf&&(sf=t);e<af&&(af=e);e>uf&&(uf=e)},lineStart:wu,lineEnd:wu,polygonStart:wu,polygonEnd:wu,result:function(){var t=[[of,af],[sf,uf]];return sf=uf=-(af=of=1/0),t}},df=0,vf=0,mf=0,yf=0,gf=0,bf=0,_f=0,wf=0,Ef=0,Tf={point:Cf,lineStart:xf,lineEnd:Nf,polygonStart:function(){Tf.lineStart=Af,Tf.lineEnd=If},polygonEnd:function(){Tf.point=Cf,Tf.lineStart=xf,Tf.lineEnd=Nf},result:function(){var t=Ef?[_f/Ef,wf/Ef]:bf?[yf/bf,gf/bf]:mf?[df/mf,vf/mf]:[NaN,NaN];return df=vf=mf=yf=gf=bf=_f=wf=Ef=0,t}};function Cf(t,e){df+=t,vf+=e,++mf}function xf(){Tf.point=Sf}function Sf(t,e){Tf.point=kf,Cf(ff=t,hf=e)}function kf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,Cf(ff=t,hf=e)}function Nf(){Tf.point=Cf}function Af(){Tf.point=Of}function If(){Pf(cf,lf)}function Of(t,e){Tf.point=Pf,Cf(cf=ff=t,lf=hf=e)}function Pf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,_f+=(i=hf*t-ff*e)*(ff+t),wf+=i*(hf+e),Ef+=3*i,Cf(ff=t,hf=e)}var Rf=Tf;function Df(t){this._context=t}Df.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ru)}},result:wu};var Mf,Lf,Ff,Uf,jf,Bf=Ys(),qf={point:wu,lineStart:function(){qf.point=Vf},lineEnd:function(){Mf&&Wf(Lf,Ff),qf.point=wu},polygonStart:function(){Mf=!0},polygonEnd:function(){Mf=null},result:function(){var t=+Bf;return Bf.reset(),t}};function Vf(t,e){qf.point=Wf,Lf=Uf=t,Ff=jf=e}function Wf(t,e){Uf-=t,jf-=e,Bf.add(mu(Uf*Uf+jf*jf)),Uf=t,jf=e}var Hf=qf;function zf(){this._string=[]}function Kf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}zf.prototype={_radius:4.5,_circle:Kf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Kf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Gf=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Pu(t,n(r))),r.result()}return o.area=function(t){return Pu(t,n(rf)),rf.result()},o.measure=function(t){return Pu(t,n(Hf)),Hf.result()},o.bounds=function(t){return Pu(t,n(pf)),pf.result()},o.centroid=function(t){return Pu(t,n(Rf)),Rf.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Yl):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new zf):new Df(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},Qf=function(t){return{stream:Yf(t)}};function Yf(t){return function(e){var n=new Xf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Xf(){}function $f(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Pu(n,t.stream(pf)),e(pf.result()),null!=r&&t.clipExtent(r),t}function Jf(t,e,n){return $f(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])},n)}function Zf(t,e,n){return Jf(t,[[0,0],e],n)}function th(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function eh(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}Xf.prototype={constructor:Xf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var nh=16,rh=cu(30*ou),ih=function(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,c,l,f,h,p,d,v,m){var y=c-r,g=l-i,b=y*y+g*g;if(b>4*e&&v--){var _=a+h,w=s+p,E=u+d,T=mu(_*_+w*w+E*E),C=bu(E/=T),x=au(au(E)-1)<Zs||au(o-f)<Zs?(o+f)/2:uu(w,_),S=t(x,C),k=S[0],N=S[1],A=k-r,I=N-i,O=g*A-y*I;(O*O/b>e||au((y*A+g*I)/b-.5)>.3||a*h+s*p+u*d<rh)&&(n(r,i,o,a,s,u,k,N,x,_/=T,w/=T,E,v,m),m.point(k,N),n(k,N,x,_,w,E,c,l,f,h,p,d,v,m))}}return function(e){var r,i,o,a,s,u,c,l,f,h,p,d,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){l=NaN,v.point=g,e.lineStart()}function g(r,i){var o=Vu([r,i]),a=t(r,i);n(l,f,c,h,p,d,l=a[0],f=a[1],c=r,h=o[0],p=o[1],d=o[2],nh,e),e.point(l,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=E}function w(t,e){g(r=t,e),i=l,o=f,a=h,s=p,u=d,v.point=g}function E(){n(l,f,c,h,p,d,i,o,r,a,s,u,nh,e),v.lineEnd=b,b()}return v}}(t,e):function(t){return Yf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var oh=Yf({point:function(t,e){this.stream.point(t*ou,e*ou)}});function ah(t,e,n,r){var i=cu(r),o=du(r),a=i*t,s=o*t,u=i/t,c=o/t,l=(o*n-i*e)/t,f=(o*e+i*n)/t;function h(t,r){return[a*t-s*r+e,n-s*t-a*r]}return h.invert=function(t,e){return[u*t-c*e+l,f-c*t-u*e]},h}function sh(t){return uh(function(){return t})()}function uh(t){var e,n,r,i,o,a,s,u,c,l,f=150,h=480,p=250,d=0,v=0,m=0,y=0,g=0,b=0,_=null,w=hl,E=null,T=Yl,C=.5;function x(t){return u(t[0]*ou,t[1]*ou)}function S(t){return(t=u.invert(t[0],t[1]))&&[t[0]*iu,t[1]*iu]}function k(){var t=ah(f,0,0,b).apply(null,e(d,v)),r=(b?ah:function(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r})(f,h-t[0],p-t[1],b);return n=Qc(m,y,g),s=Kc(e,r),u=Kc(n,s),a=ih(s,C),N()}function N(){return c=l=null,x}return x.stream=function(t){return c&&l===t?c:c=oh(function(t){return Yf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(T(l=t)))))},x.preclip=function(t){return arguments.length?(w=t,_=void 0,N()):w},x.postclip=function(t){return arguments.length?(T=t,E=r=i=o=null,N()):T},x.clipAngle=function(t){return arguments.length?(w=+t?pl(_=t*ou):(_=null,hl),N()):_*iu},x.clipExtent=function(t){return arguments.length?(T=null==t?(E=r=i=o=null,Yl):yl(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),N()):null==E?null:[[E,r],[i,o]]},x.scale=function(t){return arguments.length?(f=+t,k()):f},x.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],k()):[h,p]},x.center=function(t){return arguments.length?(d=t[0]%360*ou,v=t[1]%360*ou,k()):[d*iu,v*iu]},x.rotate=function(t){return arguments.length?(m=t[0]%360*ou,y=t[1]%360*ou,g=t.length>2?t[2]%360*ou:0,k()):[m*iu,y*iu,g*iu]},x.angle=function(t){return arguments.length?(b=t%360*ou,k()):b*iu},x.precision=function(t){return arguments.length?(a=ih(s,C=t*t),N()):mu(C)},x.fitExtent=function(t,e){return Jf(x,t,e)},x.fitSize=function(t,e){return Zf(x,t,e)},x.fitWidth=function(t,e){return th(x,t,e)},x.fitHeight=function(t,e){return eh(x,t,e)},function(){return e=t.apply(this,arguments),x.invert=e.invert&&S,k()}}function ch(t){var e=0,n=tu/3,r=uh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*ou,n=t[1]*ou):[e*iu,n*iu]},i}function lh(t,e){var n=du(t),r=(n+du(e))/2;if(au(r)<Zs)return function(t){var e=cu(t);function n(t,n){return[t*e,du(n)/e]}return n.invert=function(t,n){return[t/e,bu(n*e)]},n}(t);var i=1+n*(2*r-n),o=mu(i)/r;function a(t,e){var n=mu(i-2*r*du(e))/r;return[n*du(t*=r),o-n*cu(t)]}return a.invert=function(t,e){var n=o-e;return[uu(t,au(n))/r*vu(n),bu((i-(t*t+n*n)*r*r)/(2*r))]},a}var fh=function(){return ch(lh).scale(155.424).center([0,33.6442])},hh=function(){return fh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var ph=function(){var t,e,n,r,i,o,a=hh(),s=fh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=fh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,l}return l.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:a).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[a.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),u.precision(t),f()):a.precision()},l.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),u.scale(t),l.translate(a.translate())):a.scale()},l.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],l=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,l-.238*e],[o+.455*e,l+.238*e]]).stream(c),r=s.translate([o-.307*e,l+.201*e]).clipExtent([[o-.425*e+Zs,l+.12*e+Zs],[o-.214*e-Zs,l+.234*e-Zs]]).stream(c),i=u.translate([o-.205*e,l+.212*e]).clipExtent([[o-.214*e+Zs,l+.166*e+Zs],[o-.115*e-Zs,l+.234*e-Zs]]).stream(c),f()},l.fitExtent=function(t,e){return Jf(l,t,e)},l.fitSize=function(t,e){return Zf(l,t,e)},l.fitWidth=function(t,e){return th(l,t,e)},l.fitHeight=function(t,e){return eh(l,t,e)},l.scale(1070)};function dh(t){return function(e,n){var r=cu(e),i=cu(n),o=t(r*i);return[o*i*du(e),o*du(n)]}}function vh(t){return function(e,n){var r=mu(e*e+n*n),i=t(r),o=du(i),a=cu(i);return[uu(e*o,r*a),bu(r&&n*o/r)]}}var mh=dh(function(t){return mu(2/(1+t))});mh.invert=vh(function(t){return 2*bu(t/2)});var yh=function(){return sh(mh).scale(124.75).clipAngle(179.999)},gh=dh(function(t){return(t=gu(t))&&t/du(t)});gh.invert=vh(function(t){return t});var bh=function(){return sh(gh).scale(79.4188).clipAngle(179.999)};function _h(t,e){return[t,hu(yu((eu+e)/2))]}_h.invert=function(t,e){return[t,2*su(fu(e))-eu]};var wh=function(){return Eh(_h).scale(961/ru)};function Eh(t){var e,n,r,i=sh(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,c=null;function l(){var o=tu*a(),s=i(Jc(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===_h?[[Math.max(s[0]-o,c),e],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),l()):a()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(o(t),l()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==c?null:[[c,e],[n,r]]},l()}function Th(t){return yu((eu+t)/2)}function Ch(t,e){var n=cu(t),r=t===e?du(t):hu(n/cu(e))/hu(Th(e)/Th(t)),i=n*pu(Th(t),r)/r;if(!r)return _h;function o(t,e){i>0?e<-eu+Zs&&(e=-eu+Zs):e>eu-Zs&&(e=eu-Zs);var n=i/pu(Th(e),r);return[n*du(r*t),i-n*cu(r*t)]}return o.invert=function(t,e){var n=i-e,o=vu(r)*mu(t*t+n*n);return[uu(t,au(n))/r*vu(n),2*su(pu(i/o,1/r))-eu]},o}var xh=function(){return ch(Ch).scale(109.5).parallels([30,30])};function Sh(t,e){return[t,e]}Sh.invert=Sh;var kh=function(){return sh(Sh).scale(152.63)};function Nh(t,e){var n=cu(t),r=t===e?du(t):(n-cu(e))/(e-t),i=n/r+t;if(au(r)<Zs)return Sh;function o(t,e){var n=i-e,o=r*t;return[n*du(o),i-n*cu(o)]}return o.invert=function(t,e){var n=i-e;return[uu(t,au(n))/r*vu(n),i-vu(r)*mu(t*t+n*n)]},o}var Ah=function(){return ch(Nh).scale(131.154).center([0,13.9389])};function Ih(t,e){var n=cu(e),r=cu(t)*n;return[n*du(t)/r,du(e)/r]}Ih.invert=vh(su);var Oh=function(){return sh(Ih).scale(144.049).clipAngle(60)};function Ph(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?Yl:Yf({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}var Rh=function(){var t,e,n,r,i,o,a=1,s=0,u=0,c=1,l=1,f=Yl,h=null,p=Yl;function d(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=f(p(i=t))},postclip:function(r){return arguments.length?(p=r,h=t=e=n=null,d()):p},clipExtent:function(r){return arguments.length?(p=null==r?(h=t=e=n=null,Yl):yl(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),d()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(f=Ph((a=+t)*c,a*l,s,u),d()):a},translate:function(t){return arguments.length?(f=Ph(a*c,a*l,s=+t[0],u=+t[1]),d()):[s,u]},reflectX:function(t){return arguments.length?(f=Ph(a*(c=t?-1:1),a*l,s,u),d()):c<0},reflectY:function(t){return arguments.length?(f=Ph(a*c,a*(l=t?-1:1),s,u),d()):l<0},fitExtent:function(t,e){return Jf(o,t,e)},fitSize:function(t,e){return Zf(o,t,e)},fitWidth:function(t,e){return th(o,t,e)},fitHeight:function(t,e){return eh(o,t,e)}}};function Dh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Dh.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(au(n)>Zs&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Mh=function(){return sh(Dh).scale(175.295)};function Lh(t,e){return[cu(e)*du(t),du(e)]}Lh.invert=vh(bu);var Fh=function(){return sh(Lh).scale(249.5).clipAngle(90+Zs)};function Uh(t,e){var n=cu(e),r=1+cu(t)*n;return[n*du(t)/r,du(e)/r]}Uh.invert=vh(function(t){return 2*su(t)});var jh=function(){return sh(Uh).scale(250).clipAngle(142)};function Bh(t,e){return[hu(yu((eu+e)/2)),-t]}Bh.invert=function(t,e){return[-e,2*su(fu(t))-eu]};var qh=function(){var t=Eh(Bh),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function Vh(t,e){return t.parent===e.parent?1:2}function Wh(t,e){return t+e.x}function Hh(t,e){return Math.max(t,e.y)}var zh=function(){var t=Vh,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Wh,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Hh,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,l=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(l-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function Kh(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Gh(t,e){var n,r,i,o,a,s=new $h(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Qh);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new $h(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Xh)}function Qh(t){return t.children}function Yh(t){t.data=t.data.data}function Xh(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function $h(t){this.data=t,this.depth=this.height=0,this.parent=null}$h.prototype=Gh.prototype={constructor:$h,count:function(){return this.eachAfter(Kh)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return Gh(this).eachBefore(Yh)}};var Jh=Array.prototype.slice;var Zh=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Jh.call(t))).length,o=[];r<i;)e=t[r],n&&np(n,e)?++r:(n=ip(o=tp(o,e)),r=0);return n};function tp(t,e){var n,r;if(rp(e,t))return[e];for(n=0;n<t.length;++n)if(ep(e,t[n])&&rp(op(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(ep(op(t[n],t[r]),e)&&ep(op(t[n],e),t[r])&&ep(op(t[r],e),t[n])&&rp(ap(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function ep(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function np(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function rp(t,e){for(var n=0;n<e.length;++n)if(!np(t,e[n]))return!1;return!0}function ip(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return op(t[0],t[1]);case 3:return ap(t[0],t[1],t[2])}var e}function op(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,f=Math.sqrt(u*u+c*c);return{x:(n+o+u/f*l)/2,y:(r+a+c/f*l)/2,r:(f+i+s)/2}}function ap(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,f=n.r,h=r-a,p=r-c,d=i-s,v=i-l,m=u-o,y=f-o,g=r*r+i*i-o*o,b=g-a*a-s*s+u*u,_=g-c*c-l*l+f*f,w=p*d-h*v,E=(d*_-v*b)/(2*w)-r,T=(v*m-d*y)/w,C=(p*b-h*_)/(2*w)-i,x=(h*y-p*m)/w,S=T*T+x*x-1,k=2*(o+E*T+C*x),N=E*E+C*C-o*o,A=-(S?(k+Math.sqrt(k*k-4*S*N))/(2*S):N/k);return{x:r+E+T*A,y:i+C+x*A,r:A}}function sp(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,c=s*s+u*u;c?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function up(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function cp(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function lp(t){this._=t,this.next=null,this.previous=null}function fp(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,c,l,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;sp(n,e,r=t[2]),e=new lp(e),n=new lp(n),r=new lp(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){sp(e._,n._,r=t[s]),r=new lp(r),u=n.next,c=e.previous,l=n._.r,f=e._.r;do{if(l<=f){if(up(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}l+=u._.r,u=u.next}else{if(up(c._,r._)){(e=c).next=n,n.previous=e,--s;continue t}f+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=cp(e);(r=r.next)!==n;)(a=cp(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Zh(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var hp=function(t){return fp(t),t};function pp(t){if("function"!=typeof t)throw new Error;return t}function dp(){return 0}var vp=function(t){return function(){return t}};function mp(t){return Math.sqrt(t.value)}var yp=function(){var t=null,e=1,n=1,r=dp;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(gp(t)).eachAfter(bp(r,.5)).eachBefore(_p(1)):i.eachBefore(gp(mp)).eachAfter(bp(dp,1)).eachAfter(bp(r,i.r/Math.min(e,n))).eachBefore(_p(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(n=e)?null:pp(n),i):t;var n},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:vp(+t),i):r},i};function gp(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function bp(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=fp(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function _p(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var wp=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Ep=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c},Tp=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&Ep(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(e,o)),r&&i.eachBefore(wp),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},Cp="$",xp={depth:-1},Sp={};function kp(t){return t.id}function Np(t){return t.parentId}var Ap=function(){var t=kp,e=Np;function n(n){var r,i,o,a,s,u,c,l=n.length,f=new Array(l),h={};for(i=0;i<l;++i)r=n[i],s=f[i]=new $h(r),null!=(u=t(r,i,n))&&(u+="")&&(h[c=Cp+(s.id=u)]=c in h?Sp:s);for(i=0;i<l;++i)if(s=f[i],null!=(u=e(n[i],i,n))&&(u+="")){if(!(a=h[Cp+u]))throw new Error("missing: "+u);if(a===Sp)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=xp,o.eachBefore(function(t){t.depth=t.parent.depth+1,--l}).eachBefore(Xh),o.parent=null,l>0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=pp(e),n):t},n.parentId=function(t){return arguments.length?(e=pp(t),n):e},n};function Ip(t,e){return t.parent===e.parent?1:2}function Op(t){var e=t.children;return e?e[0]:t.t}function Pp(t){var e=t.children;return e?e[e.length-1]:t.t}function Rp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Dp(t,e,n){return t.a.parent===e.parent?t.a:n}function Mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Mp.prototype=Object.create($h.prototype);var Lp=function(){var t=Ip,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Mp(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Mp(r[i],i)),n.parent=e;return(a.parent=new Mp(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var c=i,l=i,f=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>l.x&&(l=t),t.depth>f.depth&&(f=t)});var h=c===l?1:t(c,l)/2,p=h-c.x,d=e/(l.x+h+p),v=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],c=o.m,l=a.m,f=s.m,h=u.m;s=Pp(s),o=Op(o),s&&o;)u=Op(u),(a=Pp(a)).a=e,(i=s.z+f-o.z-c+t(s._,o._))>0&&(Rp(Dp(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=o.m,h+=u.m,l+=a.m;s&&!Pp(a)&&(a.t=s,a.m+=f-l),o&&!Op(u)&&(u.t=o,u.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Fp=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c},Up=(1+Math.sqrt(5))/2;function jp(t,e,n,r,i,o){for(var a,s,u,c,l,f,h,p,d,v,m,y=[],g=e.children,b=0,_=0,w=g.length,E=e.value;b<w;){u=i-n,c=o-r;do{l=g[_++].value}while(!l&&_<w);for(f=h=l,m=l*l*(v=Math.max(c/u,u/c)/(E*t)),d=Math.max(h/m,m/f);_<w;++_){if(l+=s=g[_].value,s<f&&(f=s),s>h&&(h=s),m=l*l*v,(p=Math.max(h/m,m/f))>d){l-=s;break}d=p}y.push(a={value:l,dice:u<c,children:g.slice(b,_)}),a.dice?Ep(a,n,r,i,E?r+=c*l/E:o):Fp(a,n,r,E?n+=u*l/E:i,o),E-=l,b=_}return y}var Bp=function t(e){function n(t,n,r,i,o){jp(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),qp=function(){var t=Bp,e=!1,n=1,r=1,i=[0],o=dp,a=dp,s=dp,u=dp,c=dp;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wp),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,f-=s(e)-n,h-=u(e)-n,f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=pp(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:vp(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:vp(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:vp(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:vp(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:vp(+t),l):c},l},Vp=function(t,e,n,r,i){var o,a,s=t.children,u=s.length,c=new Array(u+1);for(c[0]=a=o=0;o<u;++o)c[o+1]=a+=s[o].value;!function t(e,n,r,i,o,a,u){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=o,l.x1=a,void(l.y1=u)}var f=c[e],h=r/2+f,p=e+1,d=n-1;for(;p<d;){var v=p+d>>>1;c[v]<h?p=v+1:d=v}h-c[p-1]<c[p]-h&&e+1<p&&--p;var m=c[p]-f,y=r-m;if(a-i>u-o){var g=(i*y+a*m)/r;t(e,p,m,i,o,g,u),t(p,n,y,g,o,a,u)}else{var b=(o*y+u*m)/r;t(e,p,m,i,o,a,b),t(p,n,y,i,b,a,u)}}(0,u,t.value,e,n,r,i)},Wp=function(t,e,n,r,i){(1&t.depth?Fp:Ep)(t,e,n,r,i)},Hp=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,u,c,l,f=-1,h=a.length,p=t.value;++f<h;){for(u=(s=a[f]).children,c=s.value=0,l=u.length;c<l;++c)s.value+=u[c].value;s.dice?Ep(s,n,r,i,r+=(o-r)*s.value/p):Fp(s,n,r,n+=(i-n)*s.value/p,o),p-=s.value}else t._squarify=a=jp(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),zp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2},Kp=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o/(u*=3),a/u]},Gp=function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])};function Qp(t,e){return t[0]-e[0]||t[1]-e[1]}function Yp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Gp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var Xp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Qp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Yp(r),a=Yp(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c},$p=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],s=e[1],u=o[0],c=o[1],l=!1,f=0;f<i;++f)n=(o=t[f])[0],(r=o[1])>s!=c>s&&a<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l},Jp=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],s=o[1],u=0;++r<i;)e=a,n=s,e-=a=(o=t[r])[0],n-=s=o[1],u+=Math.sqrt(e*e+n*n);return u},Zp=function(){return Math.random()},td=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Zp),ed=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Zp),nd=function t(e){function n(){var t=ed.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Zp),rd=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Zp),id=function t(e){function n(t){var n=rd.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Zp),od=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Zp),ad=Array.prototype,sd=ad.map,ud=ad.slice,cd={name:"implicit"};function ld(t){var e=Xo(),n=[],r=cd;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==cd)return r;e.set(o,a=n.push(i))}return t[(a-1)%t.length]}return t=null==t?[]:ud.call(t),i.domain=function(t){if(!arguments.length)return n.slice();n=[],e=Xo();for(var r,o,a=-1,s=t.length;++a<s;)e.has(o=(r=t[a])+"")||e.set(o,n.push(r));return i},i.range=function(e){return arguments.length?(t=ud.call(e),i):t.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ld().domain(n).range(t).unknown(r)},i}function fd(){var t,e,n=ld().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],f=o[l-0],h=o[1-l];t=(h-f)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),a&&(f=Math.round(f),e=Math.round(e));var p=E(n).map(function(e){return f+t*e});return i(l?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=u=Math.max(0,Math.min(1,t)),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),l()):s},n.paddingOuter=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return fd().domain(r()).range(o).round(a).paddingInner(s).paddingOuter(u).align(c)},l()}function hd(){return function t(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t(n())},e}(fd().paddingInner(1))}var pd=function(t){return function(){return t}},dd=function(t){return+t},vd=[0,1];function md(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:pd(e)}function yd(t,e,n,r){var i=t[0],o=t[1],a=e[0],s=e[1];return o<i?(i=n(o,i),a=r(s,a)):(i=n(i,o),a=r(a,s)),function(t){return a(i(t))}}function gd(t,e,n,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=n(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var n=u(t,e,1,i)-1;return a[n](o[n](e))}}function bd(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function _d(t,e){var n,r,i,o=vd,a=vd,s=$n,u=!1;function c(){return n=Math.min(o.length,a.length)>2?gd:yd,r=i=null,l}function l(e){return(r||(r=n(o,a,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}(t):t,s)))(+e)}return l.invert=function(t){return(i||(i=n(a,o,md,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}(e):e)))(+t)},l.domain=function(t){return arguments.length?(o=sd.call(t,dd),c()):o.slice()},l.range=function(t){return arguments.length?(a=ud.call(t),c()):a.slice()},l.rangeRound=function(t){return a=ud.call(t),s=Jn,c()},l.clamp=function(t){return arguments.length?(u=!!t,c()):u},l.interpolate=function(t){return arguments.length?(s=t,c()):s},c()}var wd=function(t,e,n){var r,i=t[0],o=t[t.length-1],a=N(i,o,null==e?10:e);switch((n=Rs(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(i),Math.abs(o));return null!=n.precision||isNaN(r=Gs(a,s))||(n.precision=r),Us(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(r=Qs(a,Math.max(Math.abs(i),Math.abs(o))))||(n.precision=r-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(r=Ks(a))||(n.precision=r-2*("%"===n.type))}return Fs(n)};function Ed(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return wd(e(),t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=k(s,u,n))>0?r=k(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=k(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function Td(){var t=_d(md,Vn);return t.copy=function(){return bd(t,Td())},Ed(t)}function Cd(){var t=[0,1];function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=sd.call(n,dd),e):t.slice()},e.copy=function(){return Cd().domain(t)},Ed(e)}var xd=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function Sd(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:pd(e)}function kd(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function Nd(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ad(t){return 10===t?Nd:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function Id(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function Od(t){return function(e){return-t(-e)}}function Pd(){var t=_d(Sd,kd).domain([1,10]),e=t.domain,n=10,r=Id(10),i=Ad(10);function o(){return r=Id(n),i=Ad(n),e()[0]<0&&(r=Od(r),i=Od(i)),t}return t.base=function(t){return arguments.length?(n=+t,o()):n},t.domain=function(t){return arguments.length?(e(t),o()):e()},t.ticks=function(t){var o,a=e(),s=a[0],u=a[a.length-1];(o=u<s)&&(h=s,s=u,u=h);var c,l,f,h=r(s),p=r(u),d=null==t?10:+t,v=[];if(!(n%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,s>0){for(;h<p;++h)for(l=1,c=i(h);l<n;++l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else for(;h<p;++h)for(l=n-1,c=i(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else v=S(h,p,Math.min(p-h,d)).map(i);return o?v.reverse():v},t.tickFormat=function(e,o){if(null==o&&(o=10===n?".0e":","),"function"!=typeof o&&(o=Fs(o)),e===1/0)return o;null==e&&(e=10);var a=Math.max(1,n*e/t.ticks().length);return function(t){var e=t/i(Math.round(r(t)));return e*n<n-.5&&(e*=n),e<=a?o(t):""}},t.nice=function(){return e(xd(e(),{floor:function(t){return i(Math.floor(r(t)))},ceil:function(t){return i(Math.ceil(r(t)))}}))},t.copy=function(){return bd(t,Pd().base(n))},t}function Rd(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function Dd(){var t=1,e=_d(function(e,n){return(n=Rd(n,t)-(e=Rd(e,t)))?function(r){return(Rd(r,t)-e)/n}:pd(n)},function(e,n){return n=Rd(n,t)-(e=Rd(e,t)),function(r){return Rd(e+n*r,1/t)}}),n=e.domain;return e.exponent=function(e){return arguments.length?(t=+e,n(n())):t},e.copy=function(){return bd(e,Dd().exponent(t))},Ed(e)}function Md(){return Dd().exponent(.5)}function Ld(){var t=[],e=[],n=[];function i(){var r=0,i=Math.max(1,e.length);for(n=new Array(i-1);++r<i;)n[r-1]=O(t,r/i);return o}function o(t){if(!isNaN(t=+t))return e[u(n,t)]}return o.invertExtent=function(r){var i=e.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:t[0],i<n.length?n[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var n,o=0,a=e.length;o<a;++o)null==(n=e[o])||isNaN(n=+n)||t.push(n);return t.sort(r),i()},o.range=function(t){return arguments.length?(e=ud.call(t),i()):e.slice()},o.quantiles=function(){return n.slice()},o.copy=function(){return Ld().domain(t).range(e)},o}function Fd(){var t=0,e=1,n=1,r=[.5],i=[0,1];function o(t){if(t<=t)return i[u(r,t,0,n)]}function a(){var i=-1;for(r=new Array(n);++i<n;)r[i]=((i+1)*e-(i-n)*t)/(n+1);return o}return o.domain=function(n){return arguments.length?(t=+n[0],e=+n[1],a()):[t,e]},o.range=function(t){return arguments.length?(n=(i=ud.call(t)).length-1,a()):i.slice()},o.invertExtent=function(o){var a=i.indexOf(o);return a<0?[NaN,NaN]:a<1?[t,r[0]]:a>=n?[r[n-1],e]:[r[a-1],r[a]]},o.copy=function(){return Fd().domain([t,e]).range(i)},Ed(o)}function Ud(){var t=[.5],e=[0,1],n=1;function r(r){if(r<=r)return e[u(t,r,0,n)]}return r.domain=function(i){return arguments.length?(t=ud.call(i),n=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(i){return arguments.length?(e=ud.call(i),n=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(n){var r=e.indexOf(n);return[t[r-1],t[r]]},r.copy=function(){return Ud().domain(t).range(e)},r}var jd=new Date,Bd=new Date;function qd(t,e,n,r){function i(e){return t(e=new Date(+e)),e}return i.floor=i,i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return qd(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return jd.setTime(+e),Bd.setTime(+r),t(jd),t(Bd),Math.floor(n(jd,Bd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Vd=qd(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Vd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qd(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):Vd:null};var Wd=Vd,Hd=Vd.range,zd=6e4,Kd=6048e5,Gd=qd(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),Qd=Gd,Yd=Gd.range,Xd=qd(function(t){t.setTime(Math.floor(t/zd)*zd)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getMinutes()}),$d=Xd,Jd=Xd.range,Zd=qd(function(t){var e=t.getTimezoneOffset()*zd%36e5;e<0&&(e+=36e5),t.setTime(36e5*Math.floor((+t-e)/36e5)+e)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),tv=Zd,ev=Zd.range,nv=qd(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/864e5},function(t){return t.getDate()-1}),rv=nv,iv=nv.range;function ov(t){return qd(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/Kd})}var av=ov(0),sv=ov(1),uv=ov(2),cv=ov(3),lv=ov(4),fv=ov(5),hv=ov(6),pv=av.range,dv=sv.range,vv=uv.range,mv=cv.range,yv=lv.range,gv=fv.range,bv=hv.range,_v=qd(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),wv=_v,Ev=_v.range,Tv=qd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Tv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var Cv=Tv,xv=Tv.range,Sv=qd(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getUTCMinutes()}),kv=Sv,Nv=Sv.range,Av=qd(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()}),Iv=Av,Ov=Av.range,Pv=qd(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),Rv=Pv,Dv=Pv.range;function Mv(t){return qd(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/Kd})}var Lv=Mv(0),Fv=Mv(1),Uv=Mv(2),jv=Mv(3),Bv=Mv(4),qv=Mv(5),Vv=Mv(6),Wv=Lv.range,Hv=Fv.range,zv=Uv.range,Kv=jv.range,Gv=Bv.range,Qv=qv.range,Yv=Vv.range,Xv=qd(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),$v=Xv,Jv=Xv.range,Zv=qd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Zv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var tm=Zv,em=Zv.range;function nm(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function im(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function om(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=ym(i),l=gm(i),f=ym(o),h=gm(o),p=ym(a),d=gm(a),v=ym(s),m=gm(s),y=ym(u),g=gm(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Um,e:Um,f:Wm,H:jm,I:Bm,j:qm,L:Vm,m:Hm,M:zm,p:function(t){return i[+(t.getHours()>=12)]},Q:by,s:_y,S:Km,u:Gm,U:Qm,V:Ym,w:Xm,W:$m,x:null,X:null,y:Jm,Y:Zm,Z:ty,"%":gy},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ey,e:ey,f:ay,H:ny,I:ry,j:iy,L:oy,m:sy,M:uy,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:by,s:_y,S:cy,u:ly,U:fy,V:hy,w:py,W:dy,x:null,X:null,y:vy,Y:my,Z:yy,"%":gy},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Nm,e:Nm,f:Dm,H:Im,I:Im,j:Am,L:Rm,m:km,M:Om,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},Q:Lm,s:Fm,S:Pm,u:_m,U:wm,V:Em,w:bm,W:Tm,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:xm,Y:Cm,Z:Sm,"%":Mm};function E(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=fm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=im(1900);if(C(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=rm(im(o.y))).getUTCDay())>4||0===i?Fv.ceil(r):Fv(r),r=Rv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=e(im(o.y))).getDay())>4||0===i?sv.ceil(r):sv(r),r=rv.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?rm(im(o.y)).getUTCDay():e(im(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,rm(o)):e(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in fm?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),_.x=E(n,_),_.X=E(r,_),_.c=E(e,_),{format:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",nm);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t,rm);return e.toString=function(){return t},e}}}var am,sm,um,cm,lm,fm={"-":"",_:" ",0:"0"},hm=/^\s*\d+/,pm=/^%/,dm=/[\\^$*+?|[\]().{}]/g;function vm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function mm(t){return t.replace(dm,"\\$&")}function ym(t){return new RegExp("^(?:"+t.map(mm).join("|")+")","i")}function gm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function bm(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function _m(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Em(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Tm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Cm(t,e,n){var r=hm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function km(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Nm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Im(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Om(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Rm(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=hm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mm(t,e,n){var r=pm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Um(t,e){return vm(t.getDate(),e,2)}function jm(t,e){return vm(t.getHours(),e,2)}function Bm(t,e){return vm(t.getHours()%12||12,e,2)}function qm(t,e){return vm(1+rv.count(Cv(t),t),e,3)}function Vm(t,e){return vm(t.getMilliseconds(),e,3)}function Wm(t,e){return Vm(t,e)+"000"}function Hm(t,e){return vm(t.getMonth()+1,e,2)}function zm(t,e){return vm(t.getMinutes(),e,2)}function Km(t,e){return vm(t.getSeconds(),e,2)}function Gm(t){var e=t.getDay();return 0===e?7:e}function Qm(t,e){return vm(av.count(Cv(t),t),e,2)}function Ym(t,e){var n=t.getDay();return t=n>=4||0===n?lv(t):lv.ceil(t),vm(lv.count(Cv(t),t)+(4===Cv(t).getDay()),e,2)}function Xm(t){return t.getDay()}function $m(t,e){return vm(sv.count(Cv(t),t),e,2)}function Jm(t,e){return vm(t.getFullYear()%100,e,2)}function Zm(t,e){return vm(t.getFullYear()%1e4,e,4)}function ty(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+vm(e/60|0,"0",2)+vm(e%60,"0",2)}function ey(t,e){return vm(t.getUTCDate(),e,2)}function ny(t,e){return vm(t.getUTCHours(),e,2)}function ry(t,e){return vm(t.getUTCHours()%12||12,e,2)}function iy(t,e){return vm(1+Rv.count(tm(t),t),e,3)}function oy(t,e){return vm(t.getUTCMilliseconds(),e,3)}function ay(t,e){return oy(t,e)+"000"}function sy(t,e){return vm(t.getUTCMonth()+1,e,2)}function uy(t,e){return vm(t.getUTCMinutes(),e,2)}function cy(t,e){return vm(t.getUTCSeconds(),e,2)}function ly(t){var e=t.getUTCDay();return 0===e?7:e}function fy(t,e){return vm(Lv.count(tm(t),t),e,2)}function hy(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Bv(t):Bv.ceil(t),vm(Bv.count(tm(t),t)+(4===tm(t).getUTCDay()),e,2)}function py(t){return t.getUTCDay()}function dy(t,e){return vm(Fv.count(tm(t),t),e,2)}function vy(t,e){return vm(t.getUTCFullYear()%100,e,2)}function my(t,e){return vm(t.getUTCFullYear()%1e4,e,4)}function yy(){return"+0000"}function gy(){return"%"}function by(t){return+t}function _y(t){return Math.floor(+t/1e3)}function wy(t){return am=om(t),sm=am.format,um=am.parse,cm=am.utcFormat,lm=am.utcParse,am}wy({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ey=Date.prototype.toISOString?function(t){return t.toISOString()}:cm("%Y-%m-%dT%H:%M:%S.%LZ");var Ty=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:lm("%Y-%m-%dT%H:%M:%S.%LZ"),Cy=1e3,xy=60*Cy,Sy=60*xy,ky=24*Sy,Ny=7*ky,Ay=30*ky,Iy=365*ky;function Oy(t){return new Date(t)}function Py(t){return t instanceof Date?+t:+new Date(+t)}function Ry(t,e,n,r,o,a,s,u,c){var l=_d(md,Vn),f=l.invert,h=l.domain,p=c(".%L"),d=c(":%S"),v=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),g=c("%b %d"),b=c("%B"),_=c("%Y"),w=[[s,1,Cy],[s,5,5*Cy],[s,15,15*Cy],[s,30,30*Cy],[a,1,xy],[a,5,5*xy],[a,15,15*xy],[a,30,30*xy],[o,1,Sy],[o,3,3*Sy],[o,6,6*Sy],[o,12,12*Sy],[r,1,ky],[r,2,2*ky],[n,1,Ny],[e,1,Ay],[e,3,3*Ay],[t,1,Iy]];function E(i){return(s(i)<i?p:a(i)<i?d:o(i)<i?v:r(i)<i?m:e(i)<i?n(i)<i?y:g:t(i)<i?b:_)(i)}function T(e,n,r,o){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,s=i(function(t){return t[2]}).right(w,a);s===w.length?(o=N(n/Iy,r/Iy,e),e=t):s?(o=(s=w[a/w[s-1][2]<w[s][2]/a?s-1:s])[1],e=s[0]):(o=Math.max(N(n,r,e),1),e=u)}return null==o?e:e.every(o)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(sd.call(t,Py)):h().map(Oy)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=T(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?E:c(e)},l.nice=function(t,e){var n=h();return(t=T(t,n[0],n[n.length-1],e))?h(xd(n,t)):l},l.copy=function(){return bd(l,Ry(t,e,n,r,o,a,s,u,c))},l}var Dy=function(){return Ry(Cv,wv,av,rv,tv,$d,Qd,Wd,sm).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},My=function(){return Ry(tm,$v,Lv,Rv,Iv,kv,Qd,Wd,cm).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])};function Ly(t){var e=0,n=1,r=1,i=!1;function o(n){var o=(n-e)*r;return t(i?Math.max(0,Math.min(1,o)):o)}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=e===n?0:1/(n-e),o):[e,n]},o.clamp=function(t){return arguments.length?(i=!!t,o):i},o.interpolator=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return Ly(t).domain([e,n]).clamp(i)},Ed(o)}function Fy(t){var e=0,n=.5,r=1,i=1,o=1,a=!1;function s(e){var r=.5+((e=+e)-n)*(e<n?i:o);return t(a?Math.max(0,Math.min(1,r)):r)}return s.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=+t[2],i=e===n?0:.5/(n-e),o=n===r?0:.5/(r-n),s):[e,n,r]},s.clamp=function(t){return arguments.length?(a=!!t,s):a},s.interpolator=function(e){return arguments.length?(t=e,s):t},s.copy=function(){return Fy(t).domain([e,n,r]).clamp(a)},Ed(s)}var Uy=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},jy=Uy("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),By=Uy("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),qy=Uy("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Vy=Uy("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Wy=Uy("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Hy=Uy("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),zy=Uy("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ky=Uy("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Gy=Uy("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Qy=function(t){return Un(t[t.length-1])},Yy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Uy),Xy=Qy(Yy),$y=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Uy),Jy=Qy($y),Zy=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Uy),tg=Qy(Zy),eg=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Uy),ng=Qy(eg),rg=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Uy),ig=Qy(rg),og=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Uy),ag=Qy(og),sg=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Uy),ug=Qy(sg),cg=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Uy),lg=Qy(cg),fg=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Uy),hg=Qy(fg),pg=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Uy),dg=Qy(pg),vg=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Uy),mg=Qy(vg),yg=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Uy),gg=Qy(yg),bg=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Uy),_g=Qy(bg),wg=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Uy),Eg=Qy(wg),Tg=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Uy),Cg=Qy(Tg),xg=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Uy),Sg=Qy(xg),kg=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Uy),Ng=Qy(kg),Ag=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Uy),Ig=Qy(Ag),Og=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Uy),Pg=Qy(Og),Rg=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Uy),Dg=Qy(Rg),Mg=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Uy),Lg=Qy(Mg),Fg=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Uy),Ug=Qy(Fg),jg=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Uy),Bg=Qy(jg),qg=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Uy),Vg=Qy(qg),Wg=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Uy),Hg=Qy(Wg),zg=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Uy),Kg=Qy(zg),Gg=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Uy),Qg=Qy(Gg),Yg=yr(Sn(300,.5,0),Sn(-240,.5,1)),Xg=yr(Sn(-100,.75,.35),Sn(80,1.5,.8)),$g=yr(Sn(260,.75,.35),Sn(80,1.5,.8)),Jg=Sn(),Zg=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Jg.h=360*t-100,Jg.s=1.5-1.5*e,Jg.l=.8-.9*e,Jg+""},tb=ze(),eb=Math.PI/3,nb=2*Math.PI/3,rb=function(t){var e;return t=(.5-t)*Math.PI,tb.r=255*(e=Math.sin(t))*e,tb.g=255*(e=Math.sin(t+eb))*e,tb.b=255*(e=Math.sin(t+nb))*e,tb+""};function ib(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var ob=ib(Uy("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ab=ib(Uy("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sb=ib(Uy("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ub=ib(Uy("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),cb=function(t){return function(){return t}},lb=Math.abs,fb=Math.atan2,hb=Math.cos,pb=Math.max,db=Math.min,vb=Math.sin,mb=Math.sqrt,yb=1e-12,gb=Math.PI,bb=gb/2,_b=2*gb;function wb(t){return t>=1?bb:t<=-1?-bb:Math.asin(t)}function Eb(t){return t.innerRadius}function Tb(t){return t.outerRadius}function Cb(t){return t.startAngle}function xb(t){return t.endAngle}function Sb(t){return t&&t.padAngle}function kb(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/mb(s*s+u*u),l=c*u,f=-c*s,h=t+l,p=e+f,d=n+l,v=r+f,m=(h+d)/2,y=(p+v)/2,g=d-h,b=v-p,_=g*g+b*b,w=i-o,E=h*v-d*p,T=(b<0?-1:1)*mb(pb(0,w*w*_-E*E)),C=(E*b-g*T)/_,x=(-E*g-b*T)/_,S=(E*b+g*T)/_,k=(-E*g+b*T)/_,N=C-m,A=x-y,I=S-m,O=k-y;return N*N+A*A>I*I+O*O&&(C=S,x=k),{cx:C,cy:x,x01:-l,y01:-f,x11:C*(i/w-1),y11:x*(i/w-1)}}var Nb=function(){var t=Eb,e=Tb,n=cb(0),r=null,i=Cb,o=xb,a=Sb,s=null;function u(){var u,c,l,f=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-bb,d=o.apply(this,arguments)-bb,v=lb(d-p),m=d>p;if(s||(s=u=qo()),h<f&&(c=h,h=f,f=c),h>yb)if(v>_b-yb)s.moveTo(h*hb(p),h*vb(p)),s.arc(0,0,h,p,d,!m),f>yb&&(s.moveTo(f*hb(d),f*vb(d)),s.arc(0,0,f,d,p,m));else{var y,g,b=p,_=d,w=p,E=d,T=v,C=v,x=a.apply(this,arguments)/2,S=x>yb&&(r?+r.apply(this,arguments):mb(f*f+h*h)),k=db(lb(h-f)/2,+n.apply(this,arguments)),N=k,A=k;if(S>yb){var I=wb(S/f*vb(x)),O=wb(S/h*vb(x));(T-=2*I)>yb?(w+=I*=m?1:-1,E-=I):(T=0,w=E=(p+d)/2),(C-=2*O)>yb?(b+=O*=m?1:-1,_-=O):(C=0,b=_=(p+d)/2)}var P=h*hb(b),R=h*vb(b),D=f*hb(E),M=f*vb(E);if(k>yb){var L=h*hb(_),F=h*vb(_),U=f*hb(w),j=f*vb(w);if(v<gb){var B=T>yb?function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,f=s-o,h=(l*(e-o)-f*(t-i))/(f*u-l*c);return[t+h*u,e+h*c]}(P,R,U,j,L,F,D,M):[D,M],q=P-B[0],V=R-B[1],W=L-B[0],H=F-B[1],z=1/vb(((l=(q*W+V*H)/(mb(q*q+V*V)*mb(W*W+H*H)))>1?0:l<-1?gb:Math.acos(l))/2),K=mb(B[0]*B[0]+B[1]*B[1]);N=db(k,(f-K)/(z-1)),A=db(k,(h-K)/(z+1))}}C>yb?A>yb?(y=kb(U,j,P,R,h,A,m),g=kb(L,F,D,M,h,A,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<k?s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,h,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),!m),s.arc(g.cx,g.cy,A,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):(s.moveTo(P,R),s.arc(0,0,h,b,_,!m)):s.moveTo(P,R),f>yb&&T>yb?N>yb?(y=kb(D,M,L,F,f,-N,m),g=kb(P,R,U,j,f,-N,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),N<k?s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,f,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),m),s.arc(g.cx,g.cy,N,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):s.arc(0,0,f,E,w,m):s.lineTo(D,M)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-gb/2;return[hb(r)*n,vb(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:cb(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u};function Ab(t){this._context=t}Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ib=function(t){return new Ab(t)};function Ob(t){return t[0]}function Pb(t){return t[1]}var Rb=function(){var t=Ob,e=Pb,n=cb(!0),r=null,i=Ib,o=null;function a(a){var s,u,c,l=a.length,f=!1;for(null==r&&(o=i(c=qo())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:cb(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a},Db=function(){var t=Ob,e=null,n=cb(0),r=Pb,i=cb(!0),o=null,a=Ib,s=null;function u(u){var c,l,f,h,p,d=u.length,v=!1,m=new Array(d),y=new Array(d);for(null==o&&(s=a(p=qo())),c=0;c<=d;++c){if(!(c<d&&i(h=u[c],c,u))===v)if(v=!v)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=c-1;f>=l;--f)s.point(m[f],y[f]);s.lineEnd(),s.areaEnd()}v&&(m[c]=+t(h,c,u),y[c]=+n(h,c,u),s.point(e?+e(h,c,u):m[c],r?+r(h,c,u):y[c]))}if(p)return s=null,p+""||null}function c(){return Rb().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:cb(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:cb(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:cb(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u},Mb=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Lb=function(t){return t},Fb=function(){var t=Lb,e=Mb,n=null,r=cb(0),i=cb(_b),o=cb(0);function a(a){var s,u,c,l,f,h=a.length,p=0,d=new Array(h),v=new Array(h),m=+r.apply(this,arguments),y=Math.min(_b,Math.max(-_b,i.apply(this,arguments)-m)),g=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=g*(y<0?-1:1);for(s=0;s<h;++s)(f=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=n&&d.sort(function(t,e){return n(a[t],a[e])}),s=0,c=p?(y-h*b)/p:0;s<h;++s,m=l)u=d[s],l=m+((f=v[u])>0?f*c:0)+b,v[u]={data:a[u],index:s,value:f,startAngle:m,endAngle:l,padAngle:g};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),a):o},a},Ub=Bb(Ib);function jb(t){this._curve=t}function Bb(t){function e(e){return new jb(t(e))}return e._curve=t,e}function qb(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t}jb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vb=function(){return qb(Rb().curve(Ub))},Wb=function(){var t=Db().curve(Ub),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return qb(n())},delete t.lineX0,t.lineEndAngle=function(){return qb(r())},delete t.lineX1,t.lineInnerRadius=function(){return qb(i())},delete t.lineY0,t.lineOuterRadius=function(){return qb(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t},Hb=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},zb=Array.prototype.slice;function Kb(t){return t.source}function Gb(t){return t.target}function Qb(t){var e=Kb,n=Gb,r=Ob,i=Pb,o=null;function a(){var a,s=zb.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(o||(o=a=qo()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function Yb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Xb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function $b(t,e,n,r,i){var o=Hb(e,n),a=Hb(e,n=(n+i)/2),s=Hb(r,n),u=Hb(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],u[0],u[1])}function Jb(){return Qb(Yb)}function Zb(){return Qb(Xb)}function t_(){var t=Qb($b);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var e_={draw:function(t,e){var n=Math.sqrt(e/gb);t.moveTo(n,0),t.arc(0,0,n,0,_b)}},n_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},r_=Math.sqrt(1/3),i_=2*r_,o_={draw:function(t,e){var n=Math.sqrt(e/i_),r=n*r_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},a_=Math.sin(gb/10)/Math.sin(7*gb/10),s_=Math.sin(_b/10)*a_,u_=-Math.cos(_b/10)*a_,c_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=s_*n,i=u_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=_b*o/5,s=Math.cos(a),u=Math.sin(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},l_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},f_=Math.sqrt(3),h_={draw:function(t,e){var n=-Math.sqrt(e/(3*f_));t.moveTo(0,2*n),t.lineTo(-f_*n,-n),t.lineTo(f_*n,-n),t.closePath()}},p_=Math.sqrt(3)/2,d_=1/Math.sqrt(12),v_=3*(d_/2+1),m_={draw:function(t,e){var n=Math.sqrt(e/v_),r=n/2,i=n*d_,o=r,a=n*d_+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(-.5*r-p_*i,p_*r+-.5*i),t.lineTo(-.5*o-p_*a,p_*o+-.5*a),t.lineTo(-.5*s-p_*u,p_*s+-.5*u),t.lineTo(-.5*r+p_*i,-.5*i-p_*r),t.lineTo(-.5*o+p_*a,-.5*a-p_*o),t.lineTo(-.5*s+p_*u,-.5*u-p_*s),t.closePath()}},y_=[e_,n_,o_,l_,c_,h_,m_],g_=function(){var t=cb(e_),e=cb(64),n=null;function r(){var r;if(n||(n=r=qo()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:cb(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},b_=function(){};function __(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function w_(t){this._context=t}w_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:__(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var E_=function(t){return new w_(t)};function T_(t){this._context=t}T_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function x_(t){this._context=t}x_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var S_=function(t){return new x_(t)};function k_(t,e){this._basis=new w_(t),this._beta=e}k_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new w_(t):new k_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function A_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function I_(t,e){this._context=t,this._k=(1-e)/6}I_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var O_=function t(e){function n(t){return new I_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var R_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function D_(t,e){this._context=t,this._k=(1-e)/6}D_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var M_=function t(e){function n(t){return new D_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function L_(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>yb){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>yb){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function F_(t,e){this._context=t,this._alpha=e}F_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new F_(t,e):new I_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function j_(t,e){this._context=t,this._alpha=e}j_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var B_=function t(e){function n(t){return e?new j_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function q_(t,e){this._context=t,this._alpha=e}q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new q_(t,e):new D_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t){this._context=t}W_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var H_=function(t){return new W_(t)};function z_(t){return t<0?-1:1}function K_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z_(o)+z_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function G_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Y_(t){this._context=t}function X_(t){this._context=new $_(t)}function $_(t){this._context=t}function J_(t){return new Y_(t)}function Z_(t){return new X_(t)}function tw(t){this._context=t}function ew(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}Y_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Q_(this,this._t0,G_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Q_(this,G_(this,n=K_(this,t,e)),n);break;default:Q_(this,this._t0,n=K_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(X_.prototype=Object.create(Y_.prototype)).point=function(t,e){Y_.prototype.point.call(this,e,t)},$_.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},tw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ew(t),i=ew(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var nw=function(t){return new tw(t)};function rw(t,e){this._context=t,this._t=e}rw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var iw=function(t){return new rw(t,.5)};function ow(t){return new rw(t,0)}function aw(t){return new rw(t,1)}var sw=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},uw=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function cw(t,e){return t[e]}var lw=function(){var t=cb([]),e=uw,n=sw,r=cw;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var f,h=s[o],p=l[o]=new Array(u),d=0;d<u;++d)p[d]=f=[0,+r(i[d],h,d,i)],f.data=i[d];p.key=h}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:cb(zb.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?uw:"function"==typeof t?t:cb(zb.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?sw:t,i):n},i},fw=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=t[n][o][1]||0;if(i)for(n=0;n<r;++n)t[n][o][1]/=i}sw(t,e)}},hw=function(t,e){if((s=t.length)>1)for(var n,r,i,o,a,s,u=0,c=t[e[0]].length;u<c;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},pw=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=t[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}sw(t,e)}},dw=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,c=0;s<i;++s){for(var l=t[e[s]],f=l[a][1]||0,h=(f-(l[a-1][1]||0))/2,p=0;p<s;++p){var d=t[e[p]];h+=(d[a][1]||0)-(d[a-1][1]||0)}u+=f,c+=h*f}n[a-1][1]+=n[a-1][0]=o,u&&(o-=c/u)}n[a-1][1]+=n[a-1][0]=o,sw(t,e)}},vw=function(t){var e=t.map(mw);return uw(t).sort(function(t,n){return e[t]-e[n]})};function mw(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var yw=function(t){return vw(t).reverse()},gw=function(t){var e,n,r=t.length,i=t.map(mw),o=uw(t).sort(function(t,e){return i[e]-i[t]}),a=0,s=0,u=[],c=[];for(e=0;e<r;++e)n=o[e],a<s?(a+=i[n],u.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(u)},bw=function(t){return uw(t).reverse()},_w=function(t){return function(){return t}};function ww(t){return t[0]}function Ew(t){return t[1]}function Tw(){this._=null}function Cw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function xw(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Sw(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function kw(t){for(;t.L;)t=t.L;return t}Tw.prototype={constructor:Tw,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=kw(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(xw(this,n),n=(t=n).U),n.C=!1,r.C=!0,Sw(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Sw(this,n),n=(t=n).U),n.C=!1,r.C=!0,xw(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?kw(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,xw(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Sw(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,xw(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Sw(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,xw(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Sw(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Nw=Tw;function Aw(t,e,n,r){var i=[null,null],o=$w.push(i)-1;return i.left=t,i.right=e,n&&Ow(i,t,e,n),r&&Ow(i,e,t,r),Yw[t.index].halfedges.push(o),Yw[e.index].halfedges.push(o),i}function Iw(t,e,n){var r=[e,n];return r.left=t,r}function Ow(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Pw(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],l=0,f=1,h=s[0]-u,p=s[1]-c;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>l&&(l=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<f&&(f=o)}if(o=n-c,p||!(o>0)){if(o/=p,p<0){if(o<l)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>l&&(l=o)}if(o=i-c,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>l&&(l=o)}else if(p>0){if(o<l)return;o<f&&(f=o)}return!(l>0||f<1)||(l>0&&(t[0]=[u+l*h,c+l*p]),f<1&&(t[1]=[u+f*h,c+f*p]),!0)}}}}}function Rw(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,l=t.right,f=c[0],h=c[1],p=l[0],d=l[1],v=(f+p)/2,m=(h+d)/2;if(d===h){if(v<e||v>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[v,n];o=[v,i]}else{if(u){if(u[1]<n)return}else u=[v,i];o=[v,n]}}else if(s=m-(a=(f-p)/(d-h))*v,a<-1||a>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function Dw(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Mw(t,e){return e[+(e.left!==t.site)]}function Lw(t,e){return e[+(e.left===t.site)]}var Fw,Uw=[];function jw(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,c=r[1]-s,l=o[0]-a,f=o[1]-s,h=2*(u*f-c*l);if(!(h>=-Zw)){var p=u*u+c*c,d=l*l+f*f,v=(f*p-c*d)/h,m=(u*d-l*p)/h,y=Uw.pop()||new function(){Cw(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=m+s)+Math.sqrt(v*v+m*m),t.circle=y;for(var g=null,b=Xw._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){g=b.P;break}b=b.L}else{if(!b.R){g=b;break}b=b.R}Xw.insert(g,y),g||(Fw=y)}}}}function Bw(t){var e=t.circle;e&&(e.P||(Fw=e.N),Xw.remove(e),Uw.push(e),Cw(e),t.circle=null)}var qw=[];function Vw(t){var e=qw.pop()||new function(){Cw(this),this.edge=this.site=this.circle=null};return e.site=t,e}function Ww(t){Bw(t),Qw.remove(t),qw.push(t),Cw(t)}function Hw(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];Ww(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Jw&&Math.abs(r-u.circle.cy)<Jw;)o=u.P,s.unshift(u),Ww(u),u=o;s.unshift(u),Bw(u);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Jw&&Math.abs(r-c.circle.cy)<Jw;)a=c.N,s.push(c),Ww(c),c=a;s.push(c),Bw(c);var l,f=s.length;for(l=1;l<f;++l)c=s[l],u=s[l-1],Ow(c.edge,u.site,c.site,i);u=s[0],(c=s[f-1]).edge=Aw(u.site,c.site,null,i),jw(u),jw(c)}function zw(t){for(var e,n,r,i,o=t[0],a=t[1],s=Qw._;s;)if((r=Kw(s,a)-o)>Jw)s=s.L;else{if(!((i=o-Gw(s,a))>Jw)){r>-Jw?(e=s.P,n=s):i>-Jw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){Yw[t.index]={site:t,halfedges:[]}}(t);var u=Vw(t);if(Qw.insert(e,u),e||n){if(e===n)return Bw(e),n=Vw(e.site),Qw.insert(u,n),u.edge=n.edge=Aw(e.site,u.site),jw(e),void jw(n);if(n){Bw(e),Bw(n);var c=e.site,l=c[0],f=c[1],h=t[0]-l,p=t[1]-f,d=n.site,v=d[0]-l,m=d[1]-f,y=2*(h*m-p*v),g=h*h+p*p,b=v*v+m*m,_=[(m*g-p*b)/y+l,(h*b-v*g)/y+f];Ow(n.edge,c,d,_),u.edge=Aw(c,t,null,_),n.edge=Aw(t,d,null,_),jw(e),jw(n)}else u.edge=Aw(e.site,u.site)}}function Kw(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,f=1/o-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-o/2)))/f+r:(r+s)/2}function Gw(t,e){var n=t.N;if(n)return Kw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Qw,Yw,Xw,$w,Jw=1e-6,Zw=1e-12;function tE(t,e){return e[1]-t[1]||e[0]-t[0]}function eE(t,e){var n,r,i,o=t.sort(tE).pop();for($w=[],Yw=new Array(t.length),Qw=new Nw,Xw=new Nw;;)if(i=Fw,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(zw(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;Hw(i.arc)}if(function(){for(var t,e,n,r,i=0,o=Yw.length;i<o;++i)if((t=Yw[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=Dw(t,$w[e[n]]);for(a.sort(function(t,e){return s[e]-s[t]}),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var a=+e[0][0],s=+e[0][1],u=+e[1][0],c=+e[1][1];!function(t,e,n,r){for(var i,o=$w.length;o--;)Rw(i=$w[o],t,e,n,r)&&Pw(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Jw||Math.abs(i[0][1]-i[1][1])>Jw)||delete $w[o]}(a,s,u,c),function(t,e,n,r){var i,o,a,s,u,c,l,f,h,p,d,v,m=Yw.length,y=!0;for(i=0;i<m;++i)if(o=Yw[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)$w[u[s]]||u.splice(s,1);for(s=0,c=u.length;s<c;)d=(p=Lw(o,$w[u[s]]))[0],v=p[1],f=(l=Mw(o,$w[u[++s%c]]))[0],h=l[1],(Math.abs(d-f)>Jw||Math.abs(v-h)>Jw)&&(u.splice(s,0,$w.push(Iw(a,p,Math.abs(d-t)<Jw&&r-v>Jw?[t,Math.abs(f-t)<Jw?h:r]:Math.abs(v-r)<Jw&&n-d>Jw?[Math.abs(h-r)<Jw?f:n,r]:Math.abs(d-n)<Jw&&v-e>Jw?[n,Math.abs(f-n)<Jw?h:e]:Math.abs(v-e)<Jw&&d-t>Jw?[Math.abs(h-e)<Jw?f:t,e]:null))-1),++c);c&&(y=!1)}if(y){var g,b,_,w=1/0;for(i=0,y=null;i<m;++i)(o=Yw[i])&&(_=(g=(a=o.site)[0]-t)*g+(b=a[1]-e)*b)<w&&(w=_,y=o);if(y){var E=[t,e],T=[t,r],C=[n,r],x=[n,e];y.halfedges.push($w.push(Iw(a=y.site,E,T))-1,$w.push(Iw(a,T,C))-1,$w.push(Iw(a,C,x))-1,$w.push(Iw(a,x,E))-1)}}for(i=0;i<m;++i)(o=Yw[i])&&(o.halfedges.length||delete Yw[i])}(a,s,u,c)}this.edges=$w,this.cells=Yw,Qw=Xw=$w=Yw=null}eE.prototype={constructor:eE,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return Mw(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,u,c,l=n.site,f=-1,h=e[i[o-1]],p=h.left===l?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===l?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(u=a,c=p,((s=l)[0]-c[0])*(u[1]-s[1])-(s[0]-u[0])*(c[1]-s[1])<0)&&t.push([l.data,a.data,p.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],f=u*u+c*c;f<l&&(l=f,a=s.index)}})}while(null!==a);return o._found=r,null==n||l<=n*n?i.site:null}};var nE=function(){var t=ww,e=Ew,n=null;function r(r){return new eE(r.map(function(n,i){var o=[Math.round(t(n,i,r)/Jw)*Jw,Math.round(e(n,i,r)/Jw)*Jw];return o.index=i,o.data=n,o}),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:_w(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:_w(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},rE=function(t){return function(){return t}};function iE(t,e,n){this.k=t,this.x=e,this.y=n}iE.prototype={constructor:iE,scale:function(t){return 1===t?this:new iE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new iE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var oE=new iE(1,0,0);function aE(t){return t.__zoom||oE}function sE(){Gt.stopImmediatePropagation()}aE.prototype=iE.prototype;var uE=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()};function cE(){return!Gt.button}function lE(){var t,e,n=this;return n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function fE(){return this.__zoom||oE}function hE(){return-Gt.deltaY*(Gt.deltaMode?120:1)/500}function pE(){return"ontouchstart"in this}function dE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var vE=function(){var t,e,n=cE,r=lE,i=dE,o=hE,a=pE,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=sr,f=[],h=ht("start","zoom","end"),p=500,d=150,v=0;function m(t){t.property("__zoom",fE).on("wheel.zoom",T).on("mousedown.zoom",C).on("dblclick.zoom",x).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new iE(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new iE(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n){t.on("start.zoom",function(){w(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).end()}).tween("zoom",function(){var t=arguments,i=w(this,t),o=r.apply(this,t),a=n||b(o),s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=l(u.invert(a).concat(s/u.k),c.invert(a).concat(s/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=s/e[2];t=new iE(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function w(t,e){for(var n,r=0,i=f.length;r<i;++r)if((n=f[r]).that===t)return n;return new E(t,e)}function E(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=r.apply(t,e)}function T(){if(n.apply(this,arguments)){var t=w(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,o.apply(this,arguments)))),a=fe(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],ti(this),t.start()}uE(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},d),t.zoom("mouse",i(g(y(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}}function C(){if(!e&&n.apply(this,arguments)){var t=w(this,arguments),r=ie(Gt.view).on("mousemove.zoom",function(){if(uE(),!t.moved){var e=Gt.clientX-a,n=Gt.clientY-s;t.moved=e*e+n*n>v}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=fe(t.that),t.mouse[1]),t.extent,u))},!0).on("mouseup.zoom",function(){r.on("mousemove.zoom mouseup.zoom",null),ge(Gt.view,t.moved),uE(),t.end()},!0),o=fe(this),a=Gt.clientX,s=Gt.clientY;ye(Gt.view),sE(),t.mouse=[o,this.__zoom.invert(o)],ti(this),t.start()}}function x(){if(n.apply(this,arguments)){var t=this.__zoom,e=fe(this),o=t.invert(e),a=t.k*(Gt.shiftKey?.5:2),s=i(g(y(t,a),e,o),r.apply(this,arguments),u);uE(),c>0?ie(this).transition().duration(c).call(_,s,e):ie(this).call(m.transform,s)}}function S(){if(n.apply(this,arguments)){var e,r,i,o,a=w(this,arguments),s=Gt.changedTouches,u=s.length;for(sE(),r=0;r<u;++r)i=s[r],o=[o=pe(this,s,i.identifier),this.__zoom.invert(o),i.identifier],a.touch0?a.touch1||(a.touch1=o):(a.touch0=o,e=!0);if(t&&(t=clearTimeout(t),!a.touch1))return a.end(),void((o=ie(this).on("dblclick.zoom"))&&o.apply(this,arguments));e&&(t=setTimeout(function(){t=null},p),ti(this),a.start())}}function k(){var e,n,r,o,a=w(this,arguments),s=Gt.changedTouches,c=s.length;for(uE(),t&&(t=clearTimeout(t)),e=0;e<c;++e)n=s[e],r=pe(this,s,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var l=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],d=(d=h[0]-l[0])*d+(d=h[1]-l[1])*d,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;n=y(n,Math.sqrt(d/v)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(g(n,r,o),a.extent,u))}function N(){var t,n,r=w(this,arguments),i=Gt.changedTouches,o=i.length;for(sE(),e&&clearTimeout(e),e=setTimeout(function(){e=null},p),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}return m.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",fE),t!==n?_(t,e):n.interrupt().each(function(){w(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},m.scaleBy=function(t,e){m.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)})},m.scaleTo=function(t,e){m.transform(t,function(){var t=r.apply(this,arguments),n=this.__zoom,o=b(t),a=n.invert(o),s="function"==typeof e?e.apply(this,arguments):e;return i(g(y(n,s),o,a),t,u)})},m.translateBy=function(t,e,n){m.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),u)})},m.translateTo=function(t,e,n){m.transform(t,function(){var t=r.apply(this,arguments),o=this.__zoom,a=b(t);return i(oE.translate(a[0],a[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)})},E.prototype={start:function(){return 1==++this.active&&(this.index=f.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(f.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){Jt(new function(t,e,n){this.target=t,this.type=e,this.transform=n}(m,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},m.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:rE(+t),m):o},m.filter=function(t){return arguments.length?(n="function"==typeof t?t:rE(!!t),m):n},m.touchable=function(t){return arguments.length?(a="function"==typeof t?t:rE(!!t),m):a},m.extent=function(t){return arguments.length?(r="function"==typeof t?t:rE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),m):r},m.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],m):[s[0],s[1]]},m.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],m):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},m.constrain=function(t){return arguments.length?(i=t,m):i},m.duration=function(t){return arguments.length?(c=+t,m):c},m.interpolate=function(t){return arguments.length?(l=t,m):l},m.on=function(){var t=h.on.apply(h,arguments);return t===h?m:t},m.clickDistance=function(t){return arguments.length?(v=(t=+t)*t,m):Math.sqrt(v)},m};n.d(e,"version",function(){return"5.5.0"}),n.d(e,"bisect",function(){return u}),n.d(e,"bisectRight",function(){return a}),n.d(e,"bisectLeft",function(){return s}),n.d(e,"ascending",function(){return r}),n.d(e,"bisector",function(){return i}),n.d(e,"cross",function(){return f}),n.d(e,"descending",function(){return h}),n.d(e,"deviation",function(){return v}),n.d(e,"extent",function(){return m}),n.d(e,"histogram",function(){return I}),n.d(e,"thresholdFreedmanDiaconis",function(){return P}),n.d(e,"thresholdScott",function(){return R}),n.d(e,"thresholdSturges",function(){return A}),n.d(e,"max",function(){return D}),n.d(e,"mean",function(){return M}),n.d(e,"median",function(){return L}),n.d(e,"merge",function(){return F}),n.d(e,"min",function(){return U}),n.d(e,"pairs",function(){return c}),n.d(e,"permute",function(){return j}),n.d(e,"quantile",function(){return O}),n.d(e,"range",function(){return E}),n.d(e,"scan",function(){return B}),n.d(e,"shuffle",function(){return q}),n.d(e,"sum",function(){return V}),n.d(e,"ticks",function(){return S}),n.d(e,"tickIncrement",function(){return k}),n.d(e,"tickStep",function(){return N}),n.d(e,"transpose",function(){return W}),n.d(e,"variance",function(){return d}),n.d(e,"zip",function(){return z}),n.d(e,"axisTop",function(){return rt}),n.d(e,"axisRight",function(){return it}),n.d(e,"axisBottom",function(){return ot}),n.d(e,"axisLeft",function(){return at}),n.d(e,"brush",function(){return xo}),n.d(e,"brushX",function(){return To}),n.d(e,"brushY",function(){return Co}),n.d(e,"brushSelection",function(){return Eo}),n.d(e,"chord",function(){return Ro}),n.d(e,"ribbon",function(){return Go}),n.d(e,"nest",function(){return $o}),n.d(e,"set",function(){return oa}),n.d(e,"map",function(){return Xo}),n.d(e,"keys",function(){return aa}),n.d(e,"values",function(){return sa}),n.d(e,"entries",function(){return ua}),n.d(e,"color",function(){return qe}),n.d(e,"rgb",function(){return ze}),n.d(e,"hsl",function(){return Ye}),n.d(e,"lab",function(){return ln}),n.d(e,"hcl",function(){return gn}),n.d(e,"lch",function(){return yn}),n.d(e,"gray",function(){return cn}),n.d(e,"cubehelix",function(){return Sn}),n.d(e,"contours",function(){return ga}),n.d(e,"contourDensity",function(){return Ta}),n.d(e,"dispatch",function(){return ht}),n.d(e,"drag",function(){return xe}),n.d(e,"dragDisable",function(){return ye}),n.d(e,"dragEnable",function(){return ge}),n.d(e,"dsvFormat",function(){return Ia}),n.d(e,"csvParse",function(){return Pa}),n.d(e,"csvParseRows",function(){return Ra}),n.d(e,"csvFormat",function(){return Da}),n.d(e,"csvFormatRows",function(){return Ma}),n.d(e,"tsvParse",function(){return Fa}),n.d(e,"tsvParseRows",function(){return Ua}),n.d(e,"tsvFormat",function(){return ja}),n.d(e,"tsvFormatRows",function(){return Ba}),n.d(e,"easeLinear",function(){return ci}),n.d(e,"easeQuad",function(){return hi}),n.d(e,"easeQuadIn",function(){return li}),n.d(e,"easeQuadOut",function(){return fi}),n.d(e,"easeQuadInOut",function(){return hi}),n.d(e,"easeCubic",function(){return vi}),n.d(e,"easeCubicIn",function(){return pi}),n.d(e,"easeCubicOut",function(){return di}),n.d(e,"easeCubicInOut",function(){return vi}),n.d(e,"easePoly",function(){return gi}),n.d(e,"easePolyIn",function(){return mi}),n.d(e,"easePolyOut",function(){return yi}),n.d(e,"easePolyInOut",function(){return gi}),n.d(e,"easeSin",function(){return Ti}),n.d(e,"easeSinIn",function(){return wi}),n.d(e,"easeSinOut",function(){return Ei}),n.d(e,"easeSinInOut",function(){return Ti}),n.d(e,"easeExp",function(){return Si}),n.d(e,"easeExpIn",function(){return Ci}),n.d(e,"easeExpOut",function(){return xi}),n.d(e,"easeExpInOut",function(){return Si}),n.d(e,"easeCircle",function(){return Ai}),n.d(e,"easeCircleIn",function(){return ki}),n.d(e,"easeCircleOut",function(){return Ni}),n.d(e,"easeCircleInOut",function(){return Ai}),n.d(e,"easeBounce",function(){return qi}),n.d(e,"easeBounceIn",function(){return Bi}),n.d(e,"easeBounceOut",function(){return qi}),n.d(e,"easeBounceInOut",function(){return Vi}),n.d(e,"easeBack",function(){return zi}),n.d(e,"easeBackIn",function(){return Wi}),n.d(e,"easeBackOut",function(){return Hi}),n.d(e,"easeBackInOut",function(){return zi}),n.d(e,"easeElastic",function(){return Qi}),n.d(e,"easeElasticIn",function(){return Gi}),n.d(e,"easeElasticOut",function(){return Qi}),n.d(e,"easeElasticInOut",function(){return Yi}),n.d(e,"blob",function(){return Va}),n.d(e,"buffer",function(){return Ha}),n.d(e,"dsv",function(){return Qa}),n.d(e,"csv",function(){return Ya}),n.d(e,"tsv",function(){return Xa}),n.d(e,"image",function(){return $a}),n.d(e,"json",function(){return Za}),n.d(e,"text",function(){return Ka}),n.d(e,"xml",function(){return es}),n.d(e,"html",function(){return ns}),n.d(e,"svg",function(){return rs}),n.d(e,"forceCenter",function(){return is}),n.d(e,"forceCollide",function(){return ys}),n.d(e,"forceLink",function(){return _s}),n.d(e,"forceManyBody",function(){return Ss}),n.d(e,"forceRadial",function(){return ks}),n.d(e,"forceSimulation",function(){return xs}),n.d(e,"forceX",function(){return Ns}),n.d(e,"forceY",function(){return As}),n.d(e,"formatDefaultLocale",function(){return zs}),n.d(e,"format",function(){return Fs}),n.d(e,"formatPrefix",function(){return Us}),n.d(e,"formatLocale",function(){return Hs}),n.d(e,"formatSpecifier",function(){return Rs}),n.d(e,"precisionFixed",function(){return Ks}),n.d(e,"precisionPrefix",function(){return Gs}),n.d(e,"precisionRound",function(){return Qs}),n.d(e,"geoArea",function(){return Bu}),n.d(e,"geoBounds",function(){return Pc}),n.d(e,"geoCentroid",function(){return Hc}),n.d(e,"geoCircle",function(){return el}),n.d(e,"geoClipAntimeridian",function(){return hl}),n.d(e,"geoClipCircle",function(){return pl}),n.d(e,"geoClipExtent",function(){return wl}),n.d(e,"geoClipRectangle",function(){return yl}),n.d(e,"geoContains",function(){return jl}),n.d(e,"geoDistance",function(){return Il}),n.d(e,"geoGraticule",function(){return Vl}),n.d(e,"geoGraticule10",function(){return Wl}),n.d(e,"geoInterpolate",function(){return Ql}),n.d(e,"geoLength",function(){return kl}),n.d(e,"geoPath",function(){return Gf}),n.d(e,"geoAlbers",function(){return hh}),n.d(e,"geoAlbersUsa",function(){return ph}),n.d(e,"geoAzimuthalEqualArea",function(){return yh}),n.d(e,"geoAzimuthalEqualAreaRaw",function(){return mh}),n.d(e,"geoAzimuthalEquidistant",function(){return bh}),n.d(e,"geoAzimuthalEquidistantRaw",function(){return gh}),n.d(e,"geoConicConformal",function(){return xh}),n.d(e,"geoConicConformalRaw",function(){return Ch}),n.d(e,"geoConicEqualArea",function(){return fh}),n.d(e,"geoConicEqualAreaRaw",function(){return lh}),n.d(e,"geoConicEquidistant",function(){return Ah}),n.d(e,"geoConicEquidistantRaw",function(){return Nh}),n.d(e,"geoEquirectangular",function(){return kh}),n.d(e,"geoEquirectangularRaw",function(){return Sh}),n.d(e,"geoGnomonic",function(){return Oh}),n.d(e,"geoGnomonicRaw",function(){return Ih}),n.d(e,"geoIdentity",function(){return Rh}),n.d(e,"geoProjection",function(){return sh}),n.d(e,"geoProjectionMutator",function(){return uh}),n.d(e,"geoMercator",function(){return wh}),n.d(e,"geoMercatorRaw",function(){return _h}),n.d(e,"geoNaturalEarth1",function(){return Mh}),n.d(e,"geoNaturalEarth1Raw",function(){return Dh}),n.d(e,"geoOrthographic",function(){return Fh}),n.d(e,"geoOrthographicRaw",function(){return Lh}),n.d(e,"geoStereographic",function(){return jh}),n.d(e,"geoStereographicRaw",function(){return Uh}),n.d(e,"geoTransverseMercator",function(){return qh}),n.d(e,"geoTransverseMercatorRaw",function(){return Bh}),n.d(e,"geoRotation",function(){return Jc}),n.d(e,"geoStream",function(){return Pu}),n.d(e,"geoTransform",function(){return Qf}),n.d(e,"cluster",function(){return zh}),n.d(e,"hierarchy",function(){return Gh}),n.d(e,"pack",function(){return yp}),n.d(e,"packSiblings",function(){return hp}),n.d(e,"packEnclose",function(){return Zh}),n.d(e,"partition",function(){return Tp}),n.d(e,"stratify",function(){return Ap}),n.d(e,"tree",function(){return Lp}),n.d(e,"treemap",function(){return qp}),n.d(e,"treemapBinary",function(){return Vp}),n.d(e,"treemapDice",function(){return Ep}),n.d(e,"treemapSlice",function(){return Fp}),n.d(e,"treemapSliceDice",function(){return Wp}),n.d(e,"treemapSquarify",function(){return Bp}),n.d(e,"treemapResquarify",function(){return Hp}),n.d(e,"interpolate",function(){return $n}),n.d(e,"interpolateArray",function(){return Bn}),n.d(e,"interpolateBasis",function(){return An}),n.d(e,"interpolateBasisClosed",function(){return In}),n.d(e,"interpolateDate",function(){return qn}),n.d(e,"interpolateNumber",function(){return Vn}),n.d(e,"interpolateObject",function(){return Wn}),n.d(e,"interpolateRound",function(){return Jn}),n.d(e,"interpolateString",function(){return Xn}),n.d(e,"interpolateTransformCss",function(){return rr}),n.d(e,"interpolateTransformSvg",function(){return ir}),n.d(e,"interpolateZoom",function(){return sr}),n.d(e,"interpolateRgb",function(){return Ln}),n.d(e,"interpolateRgbBasis",function(){return Un}),n.d(e,"interpolateRgbBasisClosed",function(){return jn}),n.d(e,"interpolateHsl",function(){return cr}),n.d(e,"interpolateHslLong",function(){return lr}),n.d(e,"interpolateLab",function(){return fr}),n.d(e,"interpolateHcl",function(){return pr}),n.d(e,"interpolateHclLong",function(){return dr}),n.d(e,"interpolateCubehelix",function(){return mr}),n.d(e,"interpolateCubehelixLong",function(){return yr}),n.d(e,"piecewise",function(){return gr}),n.d(e,"quantize",function(){return wr}),n.d(e,"path",function(){return qo}),n.d(e,"polygonArea",function(){return zp}),n.d(e,"polygonCentroid",function(){return Kp}),n.d(e,"polygonHull",function(){return Xp}),n.d(e,"polygonContains",function(){return $p}),n.d(e,"polygonLength",function(){return Jp}),n.d(e,"quadtree",function(){return fs}),n.d(e,"randomUniform",function(){return td}),n.d(e,"randomNormal",function(){return ed}),n.d(e,"randomLogNormal",function(){return nd}),n.d(e,"randomBates",function(){return id}),n.d(e,"randomIrwinHall",function(){return rd}),n.d(e,"randomExponential",function(){return od}),n.d(e,"scaleBand",function(){return fd}),n.d(e,"scalePoint",function(){return hd}),n.d(e,"scaleIdentity",function(){return Cd}),n.d(e,"scaleLinear",function(){return Td}),n.d(e,"scaleLog",function(){return Pd}),n.d(e,"scaleOrdinal",function(){return ld}),n.d(e,"scaleImplicit",function(){return cd}),n.d(e,"scalePow",function(){return Dd}),n.d(e,"scaleSqrt",function(){return Md}),n.d(e,"scaleQuantile",function(){return Ld}),n.d(e,"scaleQuantize",function(){return Fd}),n.d(e,"scaleThreshold",function(){return Ud}),n.d(e,"scaleTime",function(){return Dy}),n.d(e,"scaleUtc",function(){return My}),n.d(e,"scaleSequential",function(){return Ly}),n.d(e,"scaleDiverging",function(){return Fy}),n.d(e,"schemeCategory10",function(){return jy}),n.d(e,"schemeAccent",function(){return By}),n.d(e,"schemeDark2",function(){return qy}),n.d(e,"schemePaired",function(){return Vy}),n.d(e,"schemePastel1",function(){return Wy}),n.d(e,"schemePastel2",function(){return Hy}),n.d(e,"schemeSet1",function(){return zy}),n.d(e,"schemeSet2",function(){return Ky}),n.d(e,"schemeSet3",function(){return Gy}),n.d(e,"interpolateBrBG",function(){return Xy}),n.d(e,"schemeBrBG",function(){return Yy}),n.d(e,"interpolatePRGn",function(){return Jy}),n.d(e,"schemePRGn",function(){return $y}),n.d(e,"interpolatePiYG",function(){return tg}),n.d(e,"schemePiYG",function(){return Zy}),n.d(e,"interpolatePuOr",function(){return ng}),n.d(e,"schemePuOr",function(){return eg}),n.d(e,"interpolateRdBu",function(){return ig}),n.d(e,"schemeRdBu",function(){return rg}),n.d(e,"interpolateRdGy",function(){return ag}),n.d(e,"schemeRdGy",function(){return og}),n.d(e,"interpolateRdYlBu",function(){return ug}),n.d(e,"schemeRdYlBu",function(){return sg}),n.d(e,"interpolateRdYlGn",function(){return lg}),n.d(e,"schemeRdYlGn",function(){return cg}),n.d(e,"interpolateSpectral",function(){return hg}),n.d(e,"schemeSpectral",function(){return fg}),n.d(e,"interpolateBuGn",function(){return dg}),n.d(e,"schemeBuGn",function(){return pg}),n.d(e,"interpolateBuPu",function(){return mg}),n.d(e,"schemeBuPu",function(){return vg}),n.d(e,"interpolateGnBu",function(){return gg}),n.d(e,"schemeGnBu",function(){return yg}),n.d(e,"interpolateOrRd",function(){return _g}),n.d(e,"schemeOrRd",function(){return bg}),n.d(e,"interpolatePuBuGn",function(){return Eg}),n.d(e,"schemePuBuGn",function(){return wg}),n.d(e,"interpolatePuBu",function(){return Cg}),n.d(e,"schemePuBu",function(){return Tg}),n.d(e,"interpolatePuRd",function(){return Sg}),n.d(e,"schemePuRd",function(){return xg}),n.d(e,"interpolateRdPu",function(){return Ng}),n.d(e,"schemeRdPu",function(){return kg}),n.d(e,"interpolateYlGnBu",function(){return Ig}),n.d(e,"schemeYlGnBu",function(){return Ag}),n.d(e,"interpolateYlGn",function(){return Pg}),n.d(e,"schemeYlGn",function(){return Og}),n.d(e,"interpolateYlOrBr",function(){return Dg}),n.d(e,"schemeYlOrBr",function(){return Rg}),n.d(e,"interpolateYlOrRd",function(){return Lg}),n.d(e,"schemeYlOrRd",function(){return Mg}),n.d(e,"interpolateBlues",function(){return Ug}),n.d(e,"schemeBlues",function(){return Fg}),n.d(e,"interpolateGreens",function(){return Bg}),n.d(e,"schemeGreens",function(){return jg}),n.d(e,"interpolateGreys",function(){return Vg}),n.d(e,"schemeGreys",function(){return qg}),n.d(e,"interpolatePurples",function(){return Hg}),n.d(e,"schemePurples",function(){return Wg}),n.d(e,"interpolateReds",function(){return Kg}),n.d(e,"schemeReds",function(){return zg}),n.d(e,"interpolateOranges",function(){return Qg}),n.d(e,"schemeOranges",function(){return Gg}),n.d(e,"interpolateCubehelixDefault",function(){return Yg}),n.d(e,"interpolateRainbow",function(){return Zg}),n.d(e,"interpolateWarm",function(){return Xg}),n.d(e,"interpolateCool",function(){return $g}),n.d(e,"interpolateSinebow",function(){return rb}),n.d(e,"interpolateViridis",function(){return ob}),n.d(e,"interpolateMagma",function(){return ab}),n.d(e,"interpolateInferno",function(){return sb}),n.d(e,"interpolatePlasma",function(){return ub}),n.d(e,"create",function(){return oe}),n.d(e,"creator",function(){return mt}),n.d(e,"local",function(){return se}),n.d(e,"matcher",function(){return Ct}),n.d(e,"mouse",function(){return fe}),n.d(e,"namespace",function(){return vt}),n.d(e,"namespaces",function(){return dt}),n.d(e,"clientPoint",function(){return le}),n.d(e,"select",function(){return ie}),n.d(e,"selectAll",function(){return he}),n.d(e,"selection",function(){return re}),n.d(e,"selector",function(){return gt}),n.d(e,"selectorAll",function(){return _t}),n.d(e,"style",function(){return Pt}),n.d(e,"touch",function(){return pe}),n.d(e,"touches",function(){return de}),n.d(e,"window",function(){return Ot}),n.d(e,"event",function(){return Gt}),n.d(e,"customEvent",function(){return Jt}),n.d(e,"arc",function(){return Nb}),n.d(e,"area",function(){return Db}),n.d(e,"line",function(){return Rb}),n.d(e,"pie",function(){return Fb}),n.d(e,"areaRadial",function(){return Wb}),n.d(e,"radialArea",function(){return Wb}),n.d(e,"lineRadial",function(){return Vb}),n.d(e,"radialLine",function(){return Vb}),n.d(e,"pointRadial",function(){return Hb}),n.d(e,"linkHorizontal",function(){return Jb}),n.d(e,"linkVertical",function(){return Zb}),n.d(e,"linkRadial",function(){return t_}),n.d(e,"symbol",function(){return g_}),n.d(e,"symbols",function(){return y_}),n.d(e,"symbolCircle",function(){return e_}),n.d(e,"symbolCross",function(){return n_}),n.d(e,"symbolDiamond",function(){return o_}),n.d(e,"symbolSquare",function(){return l_}),n.d(e,"symbolStar",function(){return c_}),n.d(e,"symbolTriangle",function(){return h_}),n.d(e,"symbolWye",function(){return m_}),n.d(e,"curveBasisClosed",function(){return C_}),n.d(e,"curveBasisOpen",function(){return S_}),n.d(e,"curveBasis",function(){return E_}),n.d(e,"curveBundle",function(){return N_}),n.d(e,"curveCardinalClosed",function(){return R_}),n.d(e,"curveCardinalOpen",function(){return M_}),n.d(e,"curveCardinal",function(){return O_}),n.d(e,"curveCatmullRomClosed",function(){return B_}),n.d(e,"curveCatmullRomOpen",function(){return V_}),n.d(e,"curveCatmullRom",function(){return U_}),n.d(e,"curveLinearClosed",function(){return H_}),n.d(e,"curveLinear",function(){return Ib}),n.d(e,"curveMonotoneX",function(){return J_}),n.d(e,"curveMonotoneY",function(){return Z_}),n.d(e,"curveNatural",function(){return nw}),n.d(e,"curveStep",function(){return iw}),n.d(e,"curveStepAfter",function(){return aw}),n.d(e,"curveStepBefore",function(){return ow}),n.d(e,"stack",function(){return lw}),n.d(e,"stackOffsetExpand",function(){return fw}),n.d(e,"stackOffsetDiverging",function(){return hw}),n.d(e,"stackOffsetNone",function(){return sw}),n.d(e,"stackOffsetSilhouette",function(){return pw}),n.d(e,"stackOffsetWiggle",function(){return dw}),n.d(e,"stackOrderAscending",function(){return vw}),n.d(e,"stackOrderDescending",function(){return yw}),n.d(e,"stackOrderInsideOut",function(){return gw}),n.d(e,"stackOrderNone",function(){return uw}),n.d(e,"stackOrderReverse",function(){return bw}),n.d(e,"timeInterval",function(){return qd}),n.d(e,"timeMillisecond",function(){return Wd}),n.d(e,"timeMilliseconds",function(){return Hd}),n.d(e,"utcMillisecond",function(){return Wd}),n.d(e,"utcMilliseconds",function(){return Hd}),n.d(e,"timeSecond",function(){return Qd}),n.d(e,"timeSeconds",function(){return Yd}),n.d(e,"utcSecond",function(){return Qd}),n.d(e,"utcSeconds",function(){return Yd}),n.d(e,"timeMinute",function(){return $d}),n.d(e,"timeMinutes",function(){return Jd}),n.d(e,"timeHour",function(){return tv}),n.d(e,"timeHours",function(){return ev}),n.d(e,"timeDay",function(){return rv}),n.d(e,"timeDays",function(){return iv}),n.d(e,"timeWeek",function(){return av}),n.d(e,"timeWeeks",function(){return pv}),n.d(e,"timeSunday",function(){return av}),n.d(e,"timeSundays",function(){return pv}),n.d(e,"timeMonday",function(){return sv}),n.d(e,"timeMondays",function(){return dv}),n.d(e,"timeTuesday",function(){return uv}),n.d(e,"timeTuesdays",function(){return vv}),n.d(e,"timeWednesday",function(){return cv}),n.d(e,"timeWednesdays",function(){return mv}),n.d(e,"timeThursday",function(){return lv}),n.d(e,"timeThursdays",function(){return yv}),n.d(e,"timeFriday",function(){return fv}),n.d(e,"timeFridays",function(){return gv}),n.d(e,"timeSaturday",function(){return hv}),n.d(e,"timeSaturdays",function(){return bv}),n.d(e,"timeMonth",function(){return wv}),n.d(e,"timeMonths",function(){return Ev}),n.d(e,"timeYear",function(){return Cv}),n.d(e,"timeYears",function(){return xv}),n.d(e,"utcMinute",function(){return kv}),n.d(e,"utcMinutes",function(){return Nv}),n.d(e,"utcHour",function(){return Iv}),n.d(e,"utcHours",function(){return Ov}),n.d(e,"utcDay",function(){return Rv}),n.d(e,"utcDays",function(){return Dv}),n.d(e,"utcWeek",function(){return Lv}),n.d(e,"utcWeeks",function(){return Wv}),n.d(e,"utcSunday",function(){return Lv}),n.d(e,"utcSundays",function(){return Wv}),n.d(e,"utcMonday",function(){return Fv}),n.d(e,"utcMondays",function(){return Hv}),n.d(e,"utcTuesday",function(){return Uv}),n.d(e,"utcTuesdays",function(){return zv}),n.d(e,"utcWednesday",function(){return jv}),n.d(e,"utcWednesdays",function(){return Kv}),n.d(e,"utcThursday",function(){return Bv}),n.d(e,"utcThursdays",function(){return Gv}),n.d(e,"utcFriday",function(){return qv}),n.d(e,"utcFridays",function(){return Qv}),n.d(e,"utcSaturday",function(){return Vv}),n.d(e,"utcSaturdays",function(){return Yv}),n.d(e,"utcMonth",function(){return $v}),n.d(e,"utcMonths",function(){return Jv}),n.d(e,"utcYear",function(){return tm}),n.d(e,"utcYears",function(){return em}),n.d(e,"timeFormatDefaultLocale",function(){return wy}),n.d(e,"timeFormat",function(){return sm}),n.d(e,"timeParse",function(){return um}),n.d(e,"utcFormat",function(){return cm}),n.d(e,"utcParse",function(){return lm}),n.d(e,"timeFormatLocale",function(){return om}),n.d(e,"isoFormat",function(){return Ey}),n.d(e,"isoParse",function(){return Ty}),n.d(e,"now",function(){return Or}),n.d(e,"timer",function(){return Dr}),n.d(e,"timerFlush",function(){return Mr}),n.d(e,"timeout",function(){return jr}),n.d(e,"interval",function(){return Br}),n.d(e,"transition",function(){return ai}),n.d(e,"active",function(){return Zi}),n.d(e,"interrupt",function(){return ti}),n.d(e,"voronoi",function(){return nE}),n.d(e,"zoom",function(){return vE}),n.d(e,"zoomTransform",function(){return aE}),n.d(e,"zoomIdentity",function(){return oE})},function(t,e,n){var r=n(314);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";n.r(e),n.d(e,"setLogLevel",function(){return u}),n.d(e,"Logger",function(){return s}),n.d(e,"LogLevel",function(){return r});var r,i=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(r||(r={}));var o=r.INFO,a=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString();switch(e){case r.DEBUG:case r.VERBOSE:console.log.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.INFO:console.info.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.WARN:console.warn.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.ERROR:console.error.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}},s=function(){function t(t){this.name=t,this._logLevel=o,this._logHandler=a,i.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in r))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.DEBUG].concat(t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.VERBOSE].concat(t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.INFO].concat(t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.WARN].concat(t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.ERROR].concat(t))},t}();function u(t){i.forEach(function(e){e.logLevel=t})}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(120),s=n(363),u=n(113),c=200;t.exports=function(t,e,n){var l=-1,f=i,h=t.length,p=!0,d=[],v=d;if(n)p=!1,f=o;else if(h>=c){var m=e?null:s(t);if(m)return u(m);p=!1,f=a,v=new r}else v=e?[]:d;t:for(;++l<h;){var y=t[l],g=e?e(y):y;if(y=n||0!==y?y:0,p&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue t;e&&v.push(g),d.push(y)}else f(v,g,n)||(v!==d&&v.push(g),d.push(y))}return d}},function(t,e,n){var r=n(62),i=n(38);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,function(t,r,i){o[++n]=e(t,r,i)}),o}},function(t,e,n){var r=n(125),i=n(376),o=n(92);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var c=e[a],l=r(t,c);n(l,c)&&i(u,o(c,t),l)}return u}},function(t,e,n){var r=n(229),i=n(204),o=n(205);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(162),i=n(107),o=n(157),a=n(228),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e,n){var r=n(237),i=n(405),o=n(38);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(159),i=n(87),o=n(108),a=n(207),s=n(406),u=n(403),c=n(85),l=n(402),f=n(401),h=n(230),p=n(203),d=n(52),v=n(400),m=n(399),y=n(394),g=n(18),b=n(89),_=n(393),w=n(39),E=n(391),T=n(28),C=1,x=2,S=4,k="[object Arguments]",N="[object Function]",A="[object GeneratorFunction]",I="[object Object]",O={};O[k]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[I]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[N]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,P,R,D,M){var L,F=n&C,U=n&x,j=n&S;if(P&&(L=D?P(e,R,D,M):P(e)),void 0!==L)return L;if(!w(e))return e;var B=g(e);if(B){if(L=v(e),!F)return c(e,L)}else{var q=d(e),V=q==N||q==A;if(b(e))return u(e,F);if(q==I||q==k||V&&!D){if(L=U||V?{}:y(e),!F)return U?f(e,s(L,e)):l(e,a(L,e))}else{if(!O[q])return D?e:{};L=m(e,q,F)}}M||(M=new r);var W=M.get(e);if(W)return W;if(M.set(e,L),E(e))return e.forEach(function(r){L.add(t(r,n,P,r,e,M))}),L;if(_(e))return e.forEach(function(r,i){L.set(i,t(r,n,P,i,e,M))}),L;var H=j?U?p:h:U?keysIn:T,z=B?void 0:H(e);return i(z||e,function(r,i){z&&(r=e[i=r]),o(L,i,t(r,n,P,i,e,M))}),L}},function(t,e,n){var r=n(84),i=n(28);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(413),i=n(412),o=n(164),a=n(411);t.exports=function(t,e,n){var s=e+"";return o(t,i(s,a(r(s),n)))}},function(t,e,n){var r=n(218),i=n(245)(r);t.exports=i},function(t,e,n){var r=n(416),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",n=r[e],o=i.call(r,e)?n.length:0;o--;){var a=n[o],s=a.func;if(null==s||s==t)return a.name}return e}},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(156),i=n(154),o=n(210),a=n(415);t.exports=function(t){var e=o(t),n=a[e];if("function"!=typeof n||!(e in r.prototype))return!1;if(t===n)return!0;var s=i(n);return!!s&&t===s[0]}},function(t,e,n){var r=n(212),i=n(209),o=n(208),a=1,s=2,u=4,c=8,l=32,f=64;t.exports=function(t,e,n,h,p,d,v,m,y,g){var b=e&c;e|=b?l:f,(e&=~(b?f:l))&u||(e&=~(a|s));var _=[t,e,p,b?d:void 0,b?v:void 0,b?void 0:d,b?void 0:v,m,y,g],w=n.apply(void 0,_);return r(t)&&i(w,_),w.placeholder=h,o(w,t,e)}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=-1,u=r.length,c=-1,l=e.length,f=n(a-u,0),h=Array(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+r[s]]=t[o++]);return h}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=r.length,u=-1,c=e.length,l=n(a-s,0),f=Array(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[r[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}},function(t,e,n){var r=n(215),i=n(214),o=n(417),a=n(110),s=n(213),u=n(152),c=n(410),l=n(109),f=n(33),h=1,p=2,d=8,v=16,m=128,y=512;t.exports=function t(e,n,g,b,_,w,E,T,C,x){var S=n&m,k=n&h,N=n&p,A=n&(d|v),I=n&y,O=N?void 0:a(e);return function h(){for(var p=arguments.length,d=Array(p),v=p;v--;)d[v]=arguments[v];if(A)var m=u(h),y=o(d,m);if(b&&(d=r(d,b,_,A)),w&&(d=i(d,w,E,A)),p-=y,A&&p<x){var P=l(d,m);return s(e,n,t,h.placeholder,g,d,P,T,C,x-p)}var R=k?g:this,D=N?R[e]:e;return p=d.length,T?d=c(d,T):I&&p>1&&d.reverse(),S&&C<p&&(d.length=C),this&&this!==f&&this instanceof h&&(D=O||a(D)),D.apply(R,d)}}},function(t,e,n){var r=n(226),i=r&&new r;t.exports=i},function(t,e,n){var r=n(47),i=n(217),o=i?function(t,e){return i.set(t,e),t}:r;t.exports=o},function(t,e,n){var r=n(182),i=n(42)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(219),i=n(42)("iterator"),o=n(78);t.exports=n(26).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(47);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(453),i=n(252);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(39);t.exports=function(t){return t==t&&!r(t)}},function(t,e,n){var r=n(65)(n(33),"WeakMap");t.exports=r},function(t,e,n){var r=n(65)(n(33),"Set");t.exports=r},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(162),i=n(18);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(229),i=n(157),o=n(28);t.exports=function(t){return r(t,o,i)}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},function(t,e,n){var r=n(33).Uint8Array;t.exports=r},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(123),i=n(233),o=n(120),a=1,s=2;t.exports=function(t,e,n,u,c,l){var f=n&a,h=t.length,p=e.length;if(h!=p&&!(f&&p>h))return!1;var d=l.get(t);if(d&&l.get(e))return d==e;var v=-1,m=!0,y=n&s?new r:void 0;for(l.set(t,e),l.set(e,t);++v<h;){var g=t[v],b=e[v];if(u)var _=f?u(b,g,v,e,t,l):u(g,b,v,t,e,l);if(void 0!==_){if(_)continue;m=!1;break}if(y){if(!i(e,function(t,e){if(!o(y,e)&&(g===t||c(g,t,n,u,l)))return y.push(e)})){m=!1;break}}else if(g!==b&&!c(g,b,n,u,l)){m=!1;break}}return l.delete(t),l.delete(e),m}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(236),i=n(127),o=n(18),a=n(89),s=n(91),u=n(116),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&a(t),h=!n&&!l&&!f&&u(t),p=n||l||f||h,d=p?r(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||d.push(m);return d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=200;t.exports=function(t,e,n,l){var f=-1,h=i,p=!0,d=t.length,v=[],m=e.length;if(!d)return v;n&&(e=a(e,s(n))),l?(h=o,p=!1):e.length>=c&&(h=u,p=!1,e=new r(e));t:for(;++f<d;){var y=t[f],g=null==n?y:n(y);if(y=l||0!==y?y:0,p&&g==g){for(var b=m;b--;)if(e[b]===g)continue t;v.push(y)}else h(e,g,l)||v.push(y)}return v}},function(t,e,n){t.exports=n(482)},function(t,e,n){t.exports=n(483)},function(t,e,n){t.exports=n(485)},function(t,e){var n=800,r=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var a=i(),s=r-(a-o);if(o=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(65),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(126),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(167),i="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},function(t,e,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=n(513)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)}),e});t.exports=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(66))},function(t,e,n){var r=n(92),i=n(127),o=n(18),a=n(91),s=n(165),u=n(64);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&a(h,l)&&(o(t)||i(t))}},function(t,e,n){t.exports=n(523)},function(t,e,n){var r=n(261),i=n(177).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(57),i=n(54),o=n(70),a=n(49),s=n(256),u=n(533).KEY,c=n(79),l=n(178),f=n(174),h=n(137),p=n(42),d=n(171),v=n(170),m=n(532),y=n(531),g=n(55),b=n(71),_=n(69),w=n(183),E=n(95),T=n(175),C=n(530),x=n(134),S=n(56),k=n(94),N=x.f,A=S.f,I=C.f,O=r.Symbol,P=r.JSON,R=P&&P.stringify,D=p("_hidden"),M=p("toPrimitive"),L={}.propertyIsEnumerable,F=l("symbol-registry"),U=l("symbols"),j=l("op-symbols"),B=Object.prototype,q="function"==typeof O,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,H=o&&c(function(){return 7!=T(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=N(B,e);r&&delete B[e],A(t,e,n),r&&t!==B&&A(B,e,r)}:A,z=function(t){var e=U[t]=T(O.prototype);return e._k=t,e},K=q&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},G=function(t,e,n){return t===B&&G(j,e,n),g(t),e=w(e,!0),g(n),i(U,e)?(n.enumerable?(i(t,D)&&t[D][e]&&(t[D][e]=!1),n=T(n,{enumerable:E(0,!1)})):(i(t,D)||A(t,D,E(1,{})),t[D][e]=!0),H(t,e,n)):A(t,e,n)},Q=function(t,e){g(t);for(var n,r=m(e=_(e)),i=0,o=r.length;o>i;)G(t,n=r[i++],e[n]);return t},Y=function(t){var e=L.call(this,t=w(t,!0));return!(this===B&&i(U,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,D)&&this[D][t])||e)},X=function(t,e){if(t=_(t),e=w(e,!0),t!==B||!i(U,e)||i(j,e)){var n=N(t,e);return!n||!i(U,e)||i(t,D)&&t[D][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(_(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==D||e==u||r.push(e);return r},J=function(t){for(var e,n=t===B,r=I(n?j:_(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(B,e)||o.push(U[e]);return o};q||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(j,n),i(this,D)&&i(this[D],t)&&(this[D][t]=!1),H(this,t,E(1,n))};return o&&W&&H(B,t,{configurable:!0,set:e}),z(t)}).prototype,"toString",function(){return this._k}),x.f=X,S.f=G,n(254).f=C.f=$,n(136).f=Y,n(176).f=J,o&&!n(138)&&s(B,"propertyIsEnumerable",Y,!0),d.f=function(t){return z(p(t))}),a(a.G+a.W+a.F*!q,{Symbol:O});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)p(Z[tt++]);for(var et=k(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!q,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!q,"Object",{create:function(t,e){return void 0===e?T(t):Q(T(t),e)},defineProperty:G,defineProperties:Q,getOwnPropertyDescriptor:X,getOwnPropertyNames:$,getOwnPropertySymbols:J}),P&&a(a.S+a.F*(!q||c(function(){var t=O();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,R.apply(P,r)}}),O.prototype[M]||n(80)(O.prototype,M,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(80)},function(t,e,n){"use strict";var r=n(138),i=n(49),o=n(256),a=n(80),s=n(78),u=n(541),c=n(174),l=n(173),f=n(42)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,m,y){u(n,e,d);var g,b,_,w=function(t){if(!h&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",T="values"==v,C=!1,x=t.prototype,S=x[f]||x["@@iterator"]||v&&x[v],k=S||w(v),N=v?T?w("entries"):k:void 0,A="Array"==e&&x.entries||S;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),r||"function"==typeof _[f]||a(_,f,p)),T&&S&&"values"!==S.name&&(C=!0,k=function(){return S.call(this)}),r&&!y||!h&&!C&&x[f]||a(x,f,k),s[e]=k,s[E]=p,v)if(g={values:T?k:w("values"),keys:m?k:w("keys"),entries:N},y)for(b in g)b in x||o(x,b,g[b]);else i(i.P+i.F*(h||C),e,g);return g}},function(t,e,n){t.exports=n(546)},function(t,e,n){var r=n(180),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(182);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(54),i=n(69),o=n(548)(!1),a=n(179)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(71),i=n(57).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){t.exports=!n(70)&&!n(79)(function(){return 7!=Object.defineProperty(n(262)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";
+
*/(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",h=1,p=2,d=4,v=1,m=2,y=1,g=2,b=4,_=8,w=16,E=32,T=64,C=128,x=256,S=512,k=30,N="...",A=800,I=16,O=1,P=2,R=1/0,D=9007199254740991,M=1.7976931348623157e308,L=NaN,F=4294967295,U=F-1,j=F>>>1,B=[["ary",C],["bind",y],["bindKey",g],["curry",_],["curryRight",w],["flip",S],["partial",E],["partialRight",T],["rearg",x]],q="[object Arguments]",V="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",z="[object Date]",K="[object DOMException]",G="[object Error]",Q="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",$="[object Number]",J="[object Null]",Z="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",dt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",yt="[object Uint16Array]",gt="[object Uint32Array]",bt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,Tt=/[&<>"']/g,Ct=RegExp(Et.source),xt=RegExp(Tt.source),St=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(Pt.source),Dt=/^\s+|\s+$/g,Mt=/^\s+/,Lt=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qt=/\\(\\)?/g,Vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Gt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Zt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Zt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",he="(?:"+oe+"|"+ae+")",pe="(?:"+fe+"|"+ae+")",de="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+de+("(?:\\u200d(?:"+[ue,ce,le].join("|")+")[\\ufe0e\\ufe0f]?"+de+")*"),me="(?:"+[ie,ce,le].join("|")+")"+ve,ye="(?:"+[ue+ne+"?",ne,ce,le,te].join("|")+")",ge=RegExp("['’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ye+ve,"g"),we=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+he,"$"].join("|")+")",fe+"?"+he+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),Ee=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),Te=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xe=-1,Se={};Se[lt]=Se[ft]=Se[ht]=Se[pt]=Se[dt]=Se[vt]=Se[mt]=Se[yt]=Se[gt]=!0,Se[q]=Se[V]=Se[ut]=Se[H]=Se[ct]=Se[z]=Se[G]=Se[Q]=Se[X]=Se[$]=Se[Z]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var ke={};ke[q]=ke[V]=ke[ut]=ke[ct]=ke[H]=ke[z]=ke[lt]=ke[ft]=ke[ht]=ke[pt]=ke[dt]=ke[X]=ke[$]=ke[Z]=ke[et]=ke[nt]=ke[rt]=ke[it]=ke[vt]=ke[mt]=ke[yt]=ke[gt]=!0,ke[G]=ke[Q]=ke[at]=!1;var Ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ae=parseFloat,Ie=parseInt,Oe="object"==typeof t&&t&&t.Object===Object&&t,Pe="object"==typeof self&&self&&self.Object===Object&&self,Re=Oe||Pe||Function("return this")(),De="object"==typeof e&&e&&!e.nodeType&&e,Me=De&&"object"==typeof r&&r&&!r.nodeType&&r,Le=Me&&Me.exports===De,Fe=Le&&Oe.process,Ue=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch(t){}}(),je=Ue&&Ue.isArrayBuffer,Be=Ue&&Ue.isDate,qe=Ue&&Ue.isMap,Ve=Ue&&Ue.isRegExp,We=Ue&&Ue.isSet,He=Ue&&Ue.isTypedArray;function ze(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ge(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Qe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Xe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function $e(t,e){return!!(null==t?0:t.length)&&un(t,e,0)>-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ze(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=hn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function un(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function cn(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function fn(t,e){var n=null==t?0:t.length;return n?vn(t,e)/n:L}function hn(t){return function(e){return null==e?o:e[t]}}function pn(t){return function(e){return null==t?o:t[e]}}function dn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function vn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function mn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function yn(t){return function(e){return t(e)}}function gn(t,e){return Ze(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&un(e,t[n],0)>-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var En=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Tn=pn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Cn(t){return"\\"+Ne[t]}function xn(t){return Ee.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function kn(t,e){return function(n){return t(e(n))}}function Nn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==f||(t[n]=f,o[i++]=n)}return o}function An(t,e){return"__proto__"==e?o:t[e]}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function On(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Pn(t){return xn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function Rn(t){return xn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var Dn=pn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Mn=function t(e){var n,r=(e=null==e?Re:Mn.defaults(Re.Object(),e,Mn.pick(Re,Ce))).Array,i=e.Date,Jt=e.Error,Zt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Zt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],ce=ae.toString,le=se.hasOwnProperty,fe=0,he=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,de=ce.call(ee),ve=Re._,me=ne("^"+ce.call(le).replace(Pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=Le?e.Buffer:o,_e=e.Symbol,Ee=e.Uint8Array,Ne=ye?ye.allocUnsafe:o,Oe=kn(ee.getPrototypeOf,ee),Pe=ee.create,De=se.propertyIsEnumerable,Me=oe.splice,Fe=_e?_e.isConcatSpreadable:o,Ue=_e?_e.iterator:o,on=_e?_e.toStringTag:o,pn=function(){try{var t=Bo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ln=e.clearTimeout!==Re.clearTimeout&&e.clearTimeout,Fn=i&&i.now!==Re.Date.now&&i.now,Un=e.setTimeout!==Re.setTimeout&&e.setTimeout,jn=te.ceil,Bn=te.floor,qn=ee.getOwnPropertySymbols,Vn=ye?ye.isBuffer:o,Wn=e.isFinite,Hn=oe.join,zn=kn(ee.keys,ee),Kn=te.max,Gn=te.min,Qn=i.now,Yn=e.parseInt,Xn=te.random,$n=oe.reverse,Jn=Bo(e,"DataView"),Zn=Bo(e,"Map"),tr=Bo(e,"Promise"),er=Bo(e,"Set"),nr=Bo(e,"WeakMap"),rr=Bo(ee,"create"),ir=nr&&new nr,or={},ar=fa(Jn),sr=fa(Zn),ur=fa(tr),cr=fa(er),lr=fa(nr),fr=_e?_e.prototype:o,hr=fr?fr.valueOf:o,pr=fr?fr.toString:o;function dr(t){if(Ns(t)&&!ys(t)&&!(t instanceof gr)){if(t instanceof yr)return t;if(le.call(t,"__wrapped__"))return ha(t)}return new yr(t)}var vr=function(){function t(){}return function(e){if(!ks(e))return{};if(Pe)return Pe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function mr(){}function yr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Er(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new wr;++e<n;)this.add(t[e])}function Tr(t){var e=this.__data__=new _r(t);this.size=e.size}function Cr(t,e){var n=ys(t),r=!n&&ms(t),i=!n&&!r&&ws(t),o=!n&&!r&&!i&&Ls(t),a=n||r||i||o,s=a?mn(t.length,re):[],u=s.length;for(var c in t)!e&&!le.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Go(c,u))||s.push(c);return s}function xr(t){var e=t.length;return e?t[Ei(0,e-1)]:o}function Sr(t,e){return ua(ro(t),Mr(e,0,t.length))}function kr(t){return ua(ro(t))}function Nr(t,e,n){(n===o||ps(t[e],n))&&(n!==o||e in t)||Rr(t,e,n)}function Ar(t,e,n){var r=t[e];le.call(t,e)&&ps(r,n)&&(n!==o||e in t)||Rr(t,e,n)}function Ir(t,e){for(var n=t.length;n--;)if(ps(t[n][0],e))return n;return-1}function Or(t,e,n,r){return Br(t,function(t,i,o){e(r,t,n(t),o)}),r}function Pr(t,e){return t&&io(e,iu(e),t)}function Rr(t,e,n){"__proto__"==e&&pn?pn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Dr(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Zs(t,e[n]);return a}function Mr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Lr(t,e,n,r,i,a){var s,u=e&h,c=e&p,l=e&d;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ks(t))return t;var f=ys(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return ro(t,s)}else{var v=Wo(t),m=v==Q||v==Y;if(ws(t))return $i(t,u);if(v==Z||v==q||m&&!i){if(s=c||m?{}:zo(t),!u)return c?function(t,e){return io(t,Vo(t),e)}(t,function(t,e){return t&&io(e,ou(e),t)}(s,t)):function(t,e){return io(t,qo(t),e)}(t,Pr(s,t))}else{if(!ke[v])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ut:return Ji(t);case H:case z:return new a(+t);case ct:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ft:case ht:case pt:case dt:case vt:case mt:case yt:case gt:return Zi(t,n);case X:return new a;case $:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,Wt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,hr?ee(hr.call(r)):{}}}(t,v,u)}}a||(a=new Tr);var y=a.get(t);if(y)return y;if(a.set(t,s),Rs(t))return t.forEach(function(r){s.add(Lr(r,e,n,r,t,a))}),s;if(As(t))return t.forEach(function(r,i){s.set(i,Lr(r,e,n,i,t,a))}),s;var g=f?o:(l?c?Ro:Po:c?ou:iu)(t);return Ge(g||t,function(r,i){g&&(r=t[i=r]),Ar(s,i,Lr(r,e,n,i,t,a))}),s}function Fr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Ur(t,e,n){if("function"!=typeof t)throw new ie(u);return ia(function(){t.apply(o,n)},e)}function jr(t,e,n,r){var i=-1,o=$e,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;n&&(e=Ze(e,yn(n))),r?(o=Je,s=!1):e.length>=a&&(o=bn,s=!1,e=new Er(e));t:for(;++i<u;){var f=t[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h==h){for(var p=l;p--;)if(e[p]===h)continue t;c.push(f)}else o(e,h,r)||c.push(f)}return c}dr.templateSettings={escape:St,evaluate:kt,interpolate:Nt,variable:"",imports:{_:dr}},dr.prototype=mr.prototype,dr.prototype.constructor=dr,yr.prototype=vr(mr.prototype),yr.prototype.constructor=yr,gr.prototype=vr(mr.prototype),gr.prototype.constructor=gr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===c?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?c:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Ir(e,t);return!(n<0||(n==e.length-1?e.pop():Me.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Ir(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Ir(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new(Zn||_r),string:new br}},wr.prototype.delete=function(t){var e=Uo(this,t).delete(t);return this.size-=e?1:0,e},wr.prototype.get=function(t){return Uo(this,t).get(t)},wr.prototype.has=function(t){return Uo(this,t).has(t)},wr.prototype.set=function(t,e){var n=Uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Er.prototype.add=Er.prototype.push=function(t){return this.__data__.set(t,c),this},Er.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.clear=function(){this.__data__=new _r,this.size=0},Tr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Tr.prototype.get=function(t){return this.__data__.get(t)},Tr.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!Zn||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new wr(r)}return n.set(t,e),this.size=n.size,this};var Br=so(Qr),qr=so(Yr,!0);function Vr(t,e){var n=!0;return Br(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Wr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s==s&&!Ms(s):n(s,u)))var u=s,c=a}return c}function Hr(t,e){var n=[];return Br(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function zr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Ko),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?zr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Kr=uo(),Gr=uo(!0);function Qr(t,e){return t&&Kr(t,e,iu)}function Yr(t,e){return t&&Gr(t,e,iu)}function Xr(t,e){return Xe(e,function(e){return Cs(t[e])})}function $r(t,e){for(var n=0,r=(e=Gi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Jr(t,e,n){var r=e(t);return ys(t)?r:tn(r,n(t))}function Zr(t){return null==t?t===o?ot:J:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=pe.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return pe.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Je:$e,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ze(h,yn(e))),l=Gn(h.length,l),c[u]=!n&&(e||a>=120&&h.length>=120)?new Er(u&&h):o}h=t[0];var p=-1,d=c[0];t:for(;++p<a&&f.length<l;){var v=h[p],m=e?e(v):v;if(v=n||0!==v?v:0,!(d?bn(d,m):i(f,m,n))){for(u=s;--u;){var y=c[u];if(!(y?bn(y,m):i(t[u],m,n)))continue t}d&&d.push(m),f.push(v)}}return f}function ii(t,e,n){var r=null==(t=na(t,e=Gi(e,t)))?t:t[la(Ta(e))];return null==r?o:ze(r,t,n)}function oi(t){return Ns(t)&&Zr(t)==q}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Ns(t)&&!Ns(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=ys(t),u=ys(e),c=s?V:Wo(t),l=u?V:Wo(e),f=(c=c==q?Z:c)==Z,h=(l=l==q?Z:l)==Z,p=c==l;if(p&&ws(t)){if(!ws(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Tr),s||Ls(t)?Io(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ct:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ut:return!(t.byteLength!=e.byteLength||!o(new Ee(t),new Ee(e)));case H:case z:case $:return ps(+t,+e);case G:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case X:var s=Sn;case nt:var u=r&v;if(s||(s=In),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=m,a.set(t,e);var l=Io(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(hr)return hr.call(t)==hr.call(e)}return!1}(t,e,c,n,r,i,a);if(!(n&v)){var d=f&&le.call(t,"__wrapped__"),y=h&&le.call(e,"__wrapped__");if(d||y){var g=d?t.value():t,b=y?e.value():e;return a||(a=new Tr),i(g,b,n,r,a)}}return!!p&&(a||(a=new Tr),function(t,e,n,r,i,a){var s=n&v,u=Po(t),c=u.length,l=Po(e).length;if(c!=l&&!s)return!1;for(var f=c;f--;){var h=u[f];if(!(s?h in e:le.call(e,h)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var d=!0;a.set(t,e),a.set(e,t);for(var m=s;++f<c;){h=u[f];var y=t[h],g=e[h];if(r)var b=s?r(g,y,h,e,t,a):r(y,g,h,t,e,a);if(!(b===o?y===g||i(y,g,n,r,a):b)){d=!1;break}m||(m="constructor"==h)}if(d&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var c=(u=n[i])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in t))return!1}else{var h=new Tr;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?ai(f,l,v|m,r,h):p))return!1}}return!0}function ui(t){return!(!ks(t)||he&&he in t)&&(Cs(t)?me:Kt).test(fa(t))}function ci(t){return"function"==typeof t?t:null==t?Iu:"object"==typeof t?ys(t)?vi(t[0],t[1]):di(t):ju(t)}function li(t){if(!Jo(t))return zn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fi(t){if(!ks(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Jo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function hi(t,e){return t<e}function pi(t,e){var n=-1,i=bs(t)?r(t.length):[];return Br(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function di(t){var e=jo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function vi(t,e){return Yo(t)&&Zo(e)?ta(la(t),e):function(n){var r=Zs(n,t);return r===o&&r===e?tu(n,t):ai(e,r,v|m)}}function mi(t,e,n,r,i){t!==e&&Kr(e,function(a,s){if(ks(a))i||(i=new Tr),function(t,e,n,r,i,a,s){var u=An(t,n),c=An(e,n),l=s.get(c);if(l)Nr(t,n,l);else{var f=a?a(u,c,n+"",t,e,s):o,h=f===o;if(h){var p=ys(c),d=!p&&ws(c),v=!p&&!d&&Ls(c);f=c,p||d||v?ys(u)?f=u:_s(u)?f=ro(u):d?(h=!1,f=$i(c,!0)):v?(h=!1,f=Zi(c,!0)):f=[]:Os(c)||ms(c)?(f=u,ms(u)?f=Hs(u):(!ks(u)||r&&Cs(u))&&(f=zo(c))):h=!1}h&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Nr(t,n,f)}}(t,e,s,n,mi,r,i);else{var u=r?r(An(t,s),a,s+"",t,e,i):o;u===o&&(u=a),Nr(t,s,u)}},ou)}function yi(t,e){var n=t.length;if(n)return Go(e+=e<0?n:0,n)?t[e]:o}function gi(t,e,n){var r=-1;return e=Ze(e.length?e:[Iu],yn(Fo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(pi(t,function(t,n,i){return{criteria:Ze(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=to(i[r],o[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=$r(t,a);n(s,a)&&ki(o,Gi(a,t),s)}return o}function _i(t,e,n,r){var i=r?cn:un,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=Ze(t,yn(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Me.call(s,u,1),Me.call(t,u,1);return t}function wi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Go(i)?Me.call(t,i,1):ji(t,i)}}return t}function Ei(t,e){return t+Bn(Xn()*(e-t+1))}function Ti(t,e){var n="";if(!t||e<1||e>D)return n;do{e%2&&(n+=t),(e=Bn(e/2))&&(t+=t)}while(e);return n}function Ci(t,e){return oa(ea(t,e,Iu),t+"")}function xi(t){return xr(pu(t))}function Si(t,e){var n=pu(t);return ua(n,Mr(e,0,n.length))}function ki(t,e,n,r){if(!ks(t))return t;for(var i=-1,a=(e=Gi(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var c=la(e[i]),l=n;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ks(f)?f:Go(e[i+1])?[]:{})}Ar(u,c,l),u=u[c]}return t}var Ni=ir?function(t,e){return ir.set(t,e),t}:Iu,Ai=pn?function(t,e){return pn(t,"toString",{configurable:!0,enumerable:!1,value:ku(e),writable:!0})}:Iu;function Ii(t){return ua(pu(t))}function Oi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Pi(t,e){var n;return Br(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Ri(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=j){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ms(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Di(t,e,Iu,n)}function Di(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,u=null===e,c=Ms(e),l=e===o;i<a;){var f=Bn((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,v=h==h,m=Ms(h);if(s)var y=r||v;else y=l?v&&(r||p):u?v&&p&&(r||!d):c?v&&p&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);y?i=f+1:a=f}return Gn(a,U)}function Mi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ps(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Li(t){return"number"==typeof t?t:Ms(t)?L:+t}function Fi(t){if("string"==typeof t)return t;if(ys(t))return Ze(t,Fi)+"";if(Ms(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-R?"-0":e}function Ui(t,e,n){var r=-1,i=$e,o=t.length,s=!0,u=[],c=u;if(n)s=!1,i=Je;else if(o>=a){var l=e?null:Co(t);if(l)return In(l);s=!1,i=bn,c=new Er}else c=e?[]:u;t:for(;++r<o;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue t;e&&c.push(h),u.push(f)}else i(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function ji(t,e){return null==(t=na(t,e=Gi(e,t)))||delete t[la(Ta(e))]}function Bi(t,e,n,r){return ki(t,e,n($r(t,e)),r)}function qi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Oi(t,r?0:o,r?o+1:i):Oi(t,r?o+1:0,r?i:o)}function Vi(t,e){var n=t;return n instanceof gr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function Wi(t,e,n){var i=t.length;if(i<2)return i?Ui(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=jr(a[o]||s,t[u],e,n));return Ui(zr(a,1),e,n)}function Hi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function zi(t){return _s(t)?t:[]}function Ki(t){return"function"==typeof t?t:Iu}function Gi(t,e){return ys(t)?t:Yo(t,e)?[t]:ca(zs(t))}var Qi=Ci;function Yi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Oi(t,e,n)}var Xi=Ln||function(t){return Re.clearTimeout(t)};function $i(t,e){if(e)return t.slice();var n=t.length,r=Ne?Ne(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new Ee(e).set(new Ee(t)),e}function Zi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ms(t),s=e!==o,u=null===e,c=e==e,l=Ms(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=Kn(a-s,0),f=r(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=Kn(a-u,0),h=r(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+n[s]]=t[o++]);return h}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):o;c===o&&(c=t[u]),i?Rr(n,u,c):Ar(n,u,c)}return n}function oo(t,e){return function(n,r){var i=ys(n)?Ke:Or,o=e?e():{};return i(n,t,Fo(r,2),o)}}function ao(t){return Ci(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function uo(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function co(t){return function(e){var n=xn(e=zs(e))?Rn(e):o,r=n?n[0]:e.charAt(0),i=n?Yi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Cu(mu(e).replace(ge,"")),t,"")}}function fo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=vr(t.prototype),r=t.apply(n,e);return ks(r)?r:n}}function ho(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Fo(n,3);e=iu(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function po(t){return Oo(function(e){var n=e.length,r=n,i=yr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(u);if(i&&!s&&"wrapper"==Mo(a))var s=new yr([],!0)}for(r=s?r:n;++r<n;){var c=Mo(a=e[r]),l="wrapper"==c?Do(a):o;s=l&&Xo(l[0])&&l[1]==(C|_|E|x)&&!l[4].length&&1==l[9]?s[Mo(l[0])].apply(s,l[3]):1==a.length&&Xo(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&ys(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function vo(t,e,n,i,a,s,u,c,l,f){var h=e&C,p=e&y,d=e&g,v=e&(_|w),m=e&S,b=d?o:fo(t);return function y(){for(var g=arguments.length,_=r(g),w=g;w--;)_[w]=arguments[w];if(v)var E=Lo(y),T=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,E);if(i&&(_=eo(_,i,a,v)),s&&(_=no(_,s,u,v)),g-=T,v&&g<f){var C=Nn(_,E);return Eo(t,e,vo,y.placeholder,n,_,C,c,l,f-g)}var x=p?n:this,S=d?x[t]:t;return g=_.length,c?_=function(t,e){for(var n=t.length,r=Gn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=Go(a,n)?i[a]:o}return t}(_,c):m&&g>1&&_.reverse(),h&&l<g&&(_.length=l),this&&this!==Re&&this instanceof y&&(S=b||fo(S)),S.apply(x,_)}}function mo(t,e){return function(n,r){return function(t,e,n,r){return Qr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function yo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Fi(n),r=Fi(r)):(n=Li(n),r=Li(r)),i=t(n,r)}return i}}function go(t){return Oo(function(e){return e=Ze(e,yn(Fo())),Ci(function(n){var r=this;return t(e,function(t){return ze(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Fi(e)).length;if(n<2)return n?Ti(e,t):e;var r=Ti(e,jn(t/Pn(e)));return xn(e)?Yi(Rn(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Qo(e,n,i)&&(n=i=o),e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n,i){for(var o=-1,a=Kn(jn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:Bs(i),t)}}function wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ws(e),n=Ws(n)),t(e,n)}}function Eo(t,e,n,r,i,a,s,u,c,l){var f=e&_;e|=f?E:T,(e&=~(f?T:E))&b||(e&=~(y|g));var h=[t,e,i,f?a:o,f?s:o,f?o:a,f?o:s,u,c,l],p=n.apply(o,h);return Xo(t)&&ra(p,h),p.placeholder=r,aa(p,t,e)}function To(t){var e=te[t];return function(t,n){if(t=Ws(t),n=null==n?0:Gn(qs(n),292)){var r=(zs(t)+"e").split("e");return+((r=(zs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Co=er&&1/In(new er([,-0]))[1]==R?function(t){return new er(t)}:Mu;function xo(t){return function(e){var n=Wo(e);return n==X?Sn(e):n==nt?On(e):function(t,e){return Ze(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,c,l){var h=e&g;if(!h&&"function"!=typeof t)throw new ie(u);var p=i?i.length:0;if(p||(e&=~(E|T),i=a=o),c=c===o?c:Kn(qs(c),0),l=l===o?l:qs(l),p-=a?a.length:0,e&T){var d=i,v=a;i=a=o}var m=h?o:Do(t),S=[t,e,n,i,a,d,v,s,c,l];if(m&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(y|g|C),a=r==C&&n==_||r==C&&n==x&&t[7].length<=e[8]||r==(C|x)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&y&&(t[2]=e[2],i|=n&y?0:b);var s=e[3];if(s){var u=t[3];t[3]=u?eo(u,s,e[4]):s,t[4]=u?Nn(t[3],f):e[4]}(s=e[5])&&(u=t[5],t[5]=u?no(u,s,e[6]):s,t[6]=u?Nn(t[5],f):e[6]),(s=e[7])&&(t[7]=s),r&C&&(t[8]=null==t[8]?e[8]:Gn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,m),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?h?0:t.length:Kn(S[9]-p,0))&&e&(_|w)&&(e&=~(_|w)),e&&e!=y)k=e==_||e==w?function(t,e,n){var i=fo(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=Lo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:Nn(u,l);return(s-=f.length)<n?Eo(t,e,vo,a.placeholder,o,u,f,o,o,n-s):ze(this&&this!==Re&&this instanceof a?i:t,this,u)}}(t,e,l):e!=E&&e!=(y|E)||a.length?vo.apply(o,S):function(t,e,n,i){var o=e&y,a=fo(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),h=this&&this!==Re&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return ze(h,o?n:this,f)}}(t,e,n,i);else var k=function(t,e,n){var r=e&y,i=fo(t);return function e(){return(this&&this!==Re&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((m?Ni:ra)(k,S),t,e)}function ko(t,e,n,r){return t===o||ps(t,se[n])&&!le.call(r,n)?e:t}function No(t,e,n,r,i,a){return ks(t)&&ks(e)&&(a.set(e,t),mi(t,e,o,No,a),a.delete(e)),t}function Ao(t){return Os(t)?o:t}function Io(t,e,n,r,i,a){var s=n&v,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=n&m?new Er:o;for(a.set(t,e),a.set(e,t);++f<u;){var d=t[f],y=e[f];if(r)var g=s?r(y,d,f,e,t,a):r(d,y,f,t,e,a);if(g!==o){if(g)continue;h=!1;break}if(p){if(!rn(e,function(t,e){if(!bn(p,e)&&(d===t||i(d,t,n,r,a)))return p.push(e)})){h=!1;break}}else if(d!==y&&!i(d,y,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Oo(t){return oa(ea(t,o,ga),t+"")}function Po(t){return Jr(t,iu,qo)}function Ro(t){return Jr(t,ou,Vo)}var Do=ir?function(t){return ir.get(t)}:Mu;function Mo(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Lo(t){return(le.call(dr,"placeholder")?dr:t).placeholder}function Fo(){var t=dr.iteratee||Ou;return t=t===Ou?ci:t,arguments.length?t(arguments[0],arguments[1]):t}function Uo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function jo(t){for(var e=iu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Zo(i)]}return e}function Bo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ui(n)?n:o}var qo=qn?function(t){return null==t?[]:(t=ee(t),Xe(qn(t),function(e){return De.call(t,e)}))}:Vu,Vo=qn?function(t){for(var e=[];t;)tn(e,qo(t)),t=Oe(t);return e}:Vu,Wo=Zr;function Ho(t,e,n){for(var r=-1,i=(e=Gi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&Go(a,i)&&(ys(t)||ms(t))}function zo(t){return"function"!=typeof t.constructor||Jo(t)?{}:vr(Oe(t))}function Ko(t){return ys(t)||ms(t)||!!(Fe&&t&&t[Fe])}function Go(t,e){var n=typeof t;return!!(e=null==e?D:e)&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t<e}function Qo(t,e,n){if(!ks(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&Go(e,n.length):"string"==r&&e in n)&&ps(n[e],t)}function Yo(t,e){if(ys(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ms(t))||It.test(t)||!At.test(t)||null!=e&&t in ee(e)}function Xo(t){var e=Mo(t),n=dr[e];if("function"!=typeof n||!(e in gr.prototype))return!1;if(t===n)return!0;var r=Do(n);return!!r&&t===r[0]}(Jn&&Wo(new Jn(new ArrayBuffer(1)))!=ct||Zn&&Wo(new Zn)!=X||tr&&"[object Promise]"!=Wo(tr.resolve())||er&&Wo(new er)!=nt||nr&&Wo(new nr)!=at)&&(Wo=function(t){var e=Zr(t),n=e==Z?t.constructor:o,r=n?fa(n):"";if(r)switch(r){case ar:return ct;case sr:return X;case ur:return"[object Promise]";case cr:return nt;case lr:return at}return e});var $o=ue?Cs:Wu;function Jo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function Zo(t){return t==t&&!ks(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Kn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Kn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),ze(t,this,u)}}function na(t,e){return e.length<2?t:$r(t,Oi(e,0,-1))}var ra=sa(Ni),ia=Un||function(t,e){return Re.setTimeout(t,e)},oa=sa(Ai);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ft,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ge(B,function(n){var r="_."+n[0];e&n[1]&&!$e(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ut);return e?e[1].split(jt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Qn(),i=I-(r-n);if(n=r,i>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ua(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Ei(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ca=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,function(t,n,r,i){e.push(r?i.replace(qt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ms(t))return t;var e=t+"";return"0"==e&&1/t==-R?"-0":e}function fa(t){if(null!=t){try{return ce.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ha(t){if(t instanceof gr)return t.clone();var e=new yr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var pa=Ci(function(t,e){return _s(t)?jr(t,zr(e,1,_s,!0)):[]}),da=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),Fo(n,2)):[]}),va=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),o,n):[]});function ma(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),sn(t,Fo(e,3),i)}function ya(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=qs(n),i=n<0?Kn(r+i,0):Gn(i,r-1)),sn(t,Fo(e,3),i,!0)}function ga(t){return null!=t&&t.length?zr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ci(function(t){var e=Ze(t,zi);return e.length&&e[0]===t[0]?ri(e):[]}),wa=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return e===Ta(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Fo(e,2)):[]}),Ea=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ta(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ca=Ci(xa);function xa(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Oo(function(t,e){var n=null==t?0:t.length,r=Dr(t,e);return wi(t,Ze(e,function(t){return Go(t,n)?+t:t}).sort(to)),r});function ka(t){return null==t?t:$n.call(t)}var Na=Ci(function(t){return Ui(zr(t,1,_s,!0))}),Aa=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Ui(zr(t,1,_s,!0),Fo(e,2))}),Ia=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Ui(zr(t,1,_s,!0),o,e)});function Oa(t){if(!t||!t.length)return[];var e=0;return t=Xe(t,function(t){if(_s(t))return e=Kn(t.length,e),!0}),mn(e,function(e){return Ze(t,hn(e))})}function Pa(t,e){if(!t||!t.length)return[];var n=Oa(t);return null==e?n:Ze(n,function(t){return ze(e,o,t)})}var Ra=Ci(function(t,e){return _s(t)?jr(t,e):[]}),Da=Ci(function(t){return Wi(Xe(t,_s))}),Ma=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Wi(Xe(t,_s),Fo(e,2))}),La=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Wi(Xe(t,_s),o,e)}),Fa=Ci(Oa);var Ua=Ci(function(t){var e=t.length,n=e>1?t[e-1]:o;return Pa(t,n="function"==typeof n?(t.pop(),n):o)});function ja(t){var e=dr(t);return e.__chain__=!0,e}function Ba(t,e){return e(t)}var qa=Oo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Dr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Ba,args:[i],thisArg:o}),new yr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Va=oo(function(t,e,n){le.call(t,n)?++t[n]:Rr(t,n,1)});var Wa=ho(ma),Ha=ho(ya);function za(t,e){return(ys(t)?Ge:Br)(t,Fo(e,3))}function Ka(t,e){return(ys(t)?Qe:qr)(t,Fo(e,3))}var Ga=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Rr(t,n,[e])});var Qa=Ci(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return Br(t,function(t){a[++i]=o?ze(e,t,n):ii(t,e,n)}),a}),Ya=oo(function(t,e,n){Rr(t,n,e)});function Xa(t,e){return(ys(t)?Ze:pi)(t,Fo(e,3))}var $a=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Ja=Ci(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qo(t,e[0],e[1])?e=[]:n>2&&Qo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,zr(e,1),[])}),Za=Fn||function(){return Re.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,C,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ci(function(t,e,n){var r=y;if(n.length){var i=Nn(n,Lo(ns));r|=E}return So(t,r,e,n,i)}),rs=Ci(function(t,e,n){var r=y|g;if(n.length){var i=Nn(n,Lo(rs));r|=E}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new ie(u);function v(e){var n=r,a=i;return r=i=o,f=e,s=t.apply(a,n)}function m(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=a}function y(){var t=Za();if(m(t))return g(t);c=ia(y,function(t){var n=e-(t-l);return p?Gn(n,a-(t-f)):n}(t))}function g(t){return c=o,d&&r?v(t):(r=i=o,s)}function b(){var t=Za(),n=m(t);if(r=arguments,i=this,l=t,n){if(c===o)return function(t){return f=t,c=ia(y,e),h?v(t):s}(l);if(p)return c=ia(y,e),v(l)}return c===o&&(c=ia(y,e)),s}return e=Ws(e)||0,ks(n)&&(h=!!n.leading,a=(p="maxWait"in n)?Kn(Ws(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==o&&Xi(c),f=0,r=l=i=c=o},b.flush=function(){return c===o?s:g(Za())},b}var os=Ci(function(t,e){return Ur(t,1,e)}),as=Ci(function(t,e,n){return Ur(t,Ws(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function us(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=wr;var cs=Qi(function(t,e){var n=(e=1==e.length&&ys(e[0])?Ze(e[0],yn(Fo())):Ze(zr(e,1),yn(Fo()))).length;return Ci(function(r){for(var i=-1,o=Gn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ze(t,this,r)})}),ls=Ci(function(t,e){var n=Nn(e,Lo(ls));return So(t,E,o,e,n)}),fs=Ci(function(t,e){var n=Nn(e,Lo(fs));return So(t,T,o,e,n)}),hs=Oo(function(t,e){return So(t,x,o,o,o,e)});function ps(t,e){return t===e||t!=t&&e!=e}var ds=wo(ti),vs=wo(function(t,e){return t>=e}),ms=oi(function(){return arguments}())?oi:function(t){return Ns(t)&&le.call(t,"callee")&&!De.call(t,"callee")},ys=r.isArray,gs=je?yn(je):function(t){return Ns(t)&&Zr(t)==ut};function bs(t){return null!=t&&Ss(t.length)&&!Cs(t)}function _s(t){return Ns(t)&&bs(t)}var ws=Vn||Wu,Es=Be?yn(Be):function(t){return Ns(t)&&Zr(t)==z};function Ts(t){if(!Ns(t))return!1;var e=Zr(t);return e==G||e==K||"string"==typeof t.message&&"string"==typeof t.name&&!Os(t)}function Cs(t){if(!ks(t))return!1;var e=Zr(t);return e==Q||e==Y||e==W||e==tt}function xs(t){return"number"==typeof t&&t==qs(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=D}function ks(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ns(t){return null!=t&&"object"==typeof t}var As=qe?yn(qe):function(t){return Ns(t)&&Wo(t)==X};function Is(t){return"number"==typeof t||Ns(t)&&Zr(t)==$}function Os(t){if(!Ns(t)||Zr(t)!=Z)return!1;var e=Oe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ce.call(n)==de}var Ps=Ve?yn(Ve):function(t){return Ns(t)&&Zr(t)==et};var Rs=We?yn(We):function(t){return Ns(t)&&Wo(t)==nt};function Ds(t){return"string"==typeof t||!ys(t)&&Ns(t)&&Zr(t)==rt}function Ms(t){return"symbol"==typeof t||Ns(t)&&Zr(t)==it}var Ls=He?yn(He):function(t){return Ns(t)&&Ss(t.length)&&!!Se[Zr(t)]};var Fs=wo(hi),Us=wo(function(t,e){return t<=e});function js(t){if(!t)return[];if(bs(t))return Ds(t)?Rn(t):ro(t);if(Ue&&t[Ue])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ue]());var e=Wo(t);return(e==X?Sn:e==nt?In:pu)(t)}function Bs(t){return t?(t=Ws(t))===R||t===-R?(t<0?-1:1)*M:t==t?t:0:0===t?t:0}function qs(t){var e=Bs(t),n=e%1;return e==e?n?e-n:e:0}function Vs(t){return t?Mr(qs(t),0,F):0}function Ws(t){if("number"==typeof t)return t;if(Ms(t))return L;if(ks(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ks(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Dt,"");var n=zt.test(t);return n||Gt.test(t)?Ie(t.slice(2),n?2:8):Ht.test(t)?L:+t}function Hs(t){return io(t,ou(t))}function zs(t){return null==t?"":Fi(t)}var Ks=ao(function(t,e){if(Jo(e)||bs(e))io(e,iu(e),t);else for(var n in e)le.call(e,n)&&Ar(t,n,e[n])}),Gs=ao(function(t,e){io(e,ou(e),t)}),Qs=ao(function(t,e,n,r){io(e,ou(e),t,r)}),Ys=ao(function(t,e,n,r){io(e,iu(e),t,r)}),Xs=Oo(Dr);var $s=Ci(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Qo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=ou(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===o||ps(f,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Js=Ci(function(t){return t.push(o,No),ze(su,o,t)});function Zs(t,e,n){var r=null==t?o:$r(t,e);return r===o?n:r}function tu(t,e){return null!=t&&Ho(t,e,ni)}var eu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=n},ku(Iu)),nu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Fo),ru=Ci(ii);function iu(t){return bs(t)?Cr(t):li(t)}function ou(t){return bs(t)?Cr(t,!0):fi(t)}var au=ao(function(t,e,n){mi(t,e,n)}),su=ao(function(t,e,n,r){mi(t,e,n,r)}),uu=Oo(function(t,e){var n={};if(null==t)return n;var r=!1;e=Ze(e,function(e){return e=Gi(e,t),r||(r=e.length>1),e}),io(t,Ro(t),n),r&&(n=Lr(n,h|p|d,Ao));for(var i=e.length;i--;)ji(n,e[i]);return n});var cu=Oo(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tu(t,n)})}(t,e)});function lu(t,e){if(null==t)return{};var n=Ze(Ro(t),function(t){return[t]});return e=Fo(e),bi(t,n,function(t,n){return e(t,n[0])})}var fu=xo(iu),hu=xo(ou);function pu(t){return null==t?[]:gn(t,iu(t))}var du=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?vu(e):e)});function vu(t){return Tu(zs(t).toLowerCase())}function mu(t){return(t=zs(t))&&t.replace(Yt,En).replace(be,"")}var yu=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),gu=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bu=co("toLowerCase");var _u=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var wu=lo(function(t,e,n){return t+(n?" ":"")+Tu(e)});var Eu=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Tu=co("toUpperCase");function Cu(t,e,n){return t=zs(t),(e=n?o:e)===o?function(t){return Te.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Bt)||[]}(t):t.match(e)||[]}var xu=Ci(function(t,e){try{return ze(t,o,e)}catch(t){return Ts(t)?t:new Jt(t)}}),Su=Oo(function(t,e){return Ge(e,function(e){e=la(e),Rr(t,e,ns(t[e],t))}),t});function ku(t){return function(){return t}}var Nu=po(),Au=po(!0);function Iu(t){return t}function Ou(t){return ci("function"==typeof t?t:Lr(t,h))}var Pu=Ci(function(t,e){return function(n){return ii(n,t,e)}}),Ru=Ci(function(t,e){return function(n){return ii(t,n,e)}});function Du(t,e,n){var r=iu(e),i=Xr(e,r);null!=n||ks(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Xr(e,iu(e)));var o=!(ks(n)&&"chain"in n&&!n.chain),a=Cs(t);return Ge(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Mu(){}var Lu=go(Ze),Fu=go(Ye),Uu=go(rn);function ju(t){return Yo(t)?hn(la(t)):function(t){return function(e){return $r(e,t)}}(t)}var Bu=_o(),qu=_o(!0);function Vu(){return[]}function Wu(){return!1}var Hu=yo(function(t,e){return t+e},0),zu=To("ceil"),Ku=yo(function(t,e){return t/e},1),Gu=To("floor");var Qu,Yu=yo(function(t,e){return t*e},1),Xu=To("round"),$u=yo(function(t,e){return t-e},0);return dr.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=ts,dr.assign=Ks,dr.assignIn=Gs,dr.assignInWith=Qs,dr.assignWith=Ys,dr.at=Xs,dr.before=es,dr.bind=ns,dr.bindAll=Su,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ys(t)?t:[t]},dr.chain=ja,dr.chunk=function(t,e,n){e=(n?Qo(t,e,n):e===o)?1:Kn(qs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(jn(i/e));a<i;)u[s++]=Oi(t,a,a+=e);return u},dr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},dr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(ys(n)?ro(n):[n],zr(e,1))},dr.cond=function(t){var e=null==t?0:t.length,n=Fo();return t=e?Ze(t,function(t){if("function"!=typeof t[1])throw new ie(u);return[n(t[0]),t[1]]}):[],Ci(function(n){for(var r=-1;++r<e;){var i=t[r];if(ze(i[0],this,n))return ze(i[1],this,n)}})},dr.conforms=function(t){return function(t){var e=iu(t);return function(n){return Fr(n,t,e)}}(Lr(t,h))},dr.constant=ku,dr.countBy=Va,dr.create=function(t,e){var n=vr(t);return null==e?n:Pr(n,e)},dr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.curryRight=function t(e,n,r){var i=So(e,w,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.debounce=is,dr.defaults=$s,dr.defaultsDeep=Js,dr.defer=os,dr.delay=as,dr.difference=pa,dr.differenceBy=da,dr.differenceWith=va,dr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=n||e===o?1:qs(e))<0?0:e,r):[]},dr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,0,(e=r-(e=n||e===o?1:qs(e)))<0?0:e):[]},dr.dropRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0,!0):[]},dr.dropWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0):[]},dr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Qo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=qs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:qs(r))<0&&(r+=i),r=n>r?0:Vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},dr.filter=function(t,e){return(ys(t)?Xe:Hr)(t,Fo(e,3))},dr.flatMap=function(t,e){return zr(Xa(t,e),1)},dr.flatMapDeep=function(t,e){return zr(Xa(t,e),R)},dr.flatMapDepth=function(t,e,n){return n=n===o?1:qs(n),zr(Xa(t,e),n)},dr.flatten=ga,dr.flattenDeep=function(t){return null!=t&&t.length?zr(t,R):[]},dr.flattenDepth=function(t,e){return null!=t&&t.length?zr(t,e=e===o?1:qs(e)):[]},dr.flip=function(t){return So(t,S)},dr.flow=Nu,dr.flowRight=Au,dr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},dr.functions=function(t){return null==t?[]:Xr(t,iu(t))},dr.functionsIn=function(t){return null==t?[]:Xr(t,ou(t))},dr.groupBy=Ga,dr.initial=function(t){return null!=t&&t.length?Oi(t,0,-1):[]},dr.intersection=_a,dr.intersectionBy=wa,dr.intersectionWith=Ea,dr.invert=eu,dr.invertBy=nu,dr.invokeMap=Qa,dr.iteratee=Ou,dr.keyBy=Ya,dr.keys=iu,dr.keysIn=ou,dr.map=Xa,dr.mapKeys=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,e(t,r,i),t)}),n},dr.mapValues=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,r,e(t,r,i))}),n},dr.matches=function(t){return di(Lr(t,h))},dr.matchesProperty=function(t,e){return vi(t,Lr(e,h))},dr.memoize=ss,dr.merge=au,dr.mergeWith=su,dr.method=Pu,dr.methodOf=Ru,dr.mixin=Du,dr.negate=us,dr.nthArg=function(t){return t=qs(t),Ci(function(e){return yi(e,t)})},dr.omit=uu,dr.omitBy=function(t,e){return lu(t,us(Fo(e)))},dr.once=function(t){return es(2,t)},dr.orderBy=function(t,e,n,r){return null==t?[]:(ys(e)||(e=null==e?[]:[e]),ys(n=r?o:n)||(n=null==n?[]:[n]),gi(t,e,n))},dr.over=Lu,dr.overArgs=cs,dr.overEvery=Fu,dr.overSome=Uu,dr.partial=ls,dr.partialRight=fs,dr.partition=$a,dr.pick=cu,dr.pickBy=lu,dr.property=ju,dr.propertyOf=function(t){return function(e){return null==t?o:$r(t,e)}},dr.pull=Ca,dr.pullAll=xa,dr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Fo(n,2)):t},dr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},dr.pullAt=Sa,dr.range=Bu,dr.rangeRight=qu,dr.rearg=hs,dr.reject=function(t,e){return(ys(t)?Xe:Hr)(t,us(Fo(e,3)))},dr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Fo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return wi(t,i),n},dr.rest=function(t,e){if("function"!=typeof t)throw new ie(u);return Ci(t,e=e===o?e:qs(e))},dr.reverse=ka,dr.sampleSize=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),(ys(t)?Sr:Si)(t,e)},dr.set=function(t,e,n){return null==t?t:ki(t,e,n)},dr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:ki(t,e,n,r)},dr.shuffle=function(t){return(ys(t)?kr:Ii)(t)},dr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Qo(t,e,n)?(e=0,n=r):(e=null==e?0:qs(e),n=n===o?r:qs(n)),Oi(t,e,n)):[]},dr.sortBy=Ja,dr.sortedUniq=function(t){return t&&t.length?Mi(t):[]},dr.sortedUniqBy=function(t,e){return t&&t.length?Mi(t,Fo(e,2)):[]},dr.split=function(t,e,n){return n&&"number"!=typeof n&&Qo(t,e,n)&&(e=n=o),(n=n===o?F:n>>>0)?(t=zs(t))&&("string"==typeof e||null!=e&&!Ps(e))&&!(e=Fi(e))&&xn(t)?Yi(Rn(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:Kn(qs(e),0),Ci(function(n){var r=n[e],i=Yi(n,0,e);return r&&tn(i,r),ze(t,this,i)})},dr.tail=function(t){var e=null==t?0:t.length;return e?Oi(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Oi(t,0,(e=n||e===o?1:qs(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=r-(e=n||e===o?1:qs(e)))<0?0:e,r):[]},dr.takeRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(u);return ks(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Ba,dr.toArray=js,dr.toPairs=fu,dr.toPairsIn=hu,dr.toPath=function(t){return ys(t)?Ze(t,la):Ms(t)?[t]:ro(ca(zs(t)))},dr.toPlainObject=Hs,dr.transform=function(t,e,n){var r=ys(t),i=r||ws(t)||Ls(t);if(e=Fo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ks(t)&&Cs(o)?vr(Oe(t)):{}}return(i?Ge:Qr)(t,function(t,r,i){return e(n,t,r,i)}),n},dr.unary=function(t){return ts(t,1)},dr.union=Na,dr.unionBy=Aa,dr.unionWith=Ia,dr.uniq=function(t){return t&&t.length?Ui(t):[]},dr.uniqBy=function(t,e){return t&&t.length?Ui(t,Fo(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Ui(t,o,e):[]},dr.unset=function(t,e){return null==t||ji(t,e)},dr.unzip=Oa,dr.unzipWith=Pa,dr.update=function(t,e,n){return null==t?t:Bi(t,e,Ki(n))},dr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Bi(t,e,Ki(n),r)},dr.values=pu,dr.valuesIn=function(t){return null==t?[]:gn(t,ou(t))},dr.without=Ra,dr.words=Cu,dr.wrap=function(t,e){return ls(Ki(e),t)},dr.xor=Da,dr.xorBy=Ma,dr.xorWith=La,dr.zip=Fa,dr.zipObject=function(t,e){return Hi(t||[],e||[],Ar)},dr.zipObjectDeep=function(t,e){return Hi(t||[],e||[],ki)},dr.zipWith=Ua,dr.entries=fu,dr.entriesIn=hu,dr.extend=Gs,dr.extendWith=Qs,Du(dr,dr),dr.add=Hu,dr.attempt=xu,dr.camelCase=du,dr.capitalize=vu,dr.ceil=zu,dr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=Ws(n))==n?n:0),e!==o&&(e=(e=Ws(e))==e?e:0),Mr(Ws(t),e,n)},dr.clone=function(t){return Lr(t,d)},dr.cloneDeep=function(t){return Lr(t,h|d)},dr.cloneDeepWith=function(t,e){return Lr(t,h|d,e="function"==typeof e?e:o)},dr.cloneWith=function(t,e){return Lr(t,d,e="function"==typeof e?e:o)},dr.conformsTo=function(t,e){return null==e||Fr(t,e,iu(e))},dr.deburr=mu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Ku,dr.endsWith=function(t,e,n){t=zs(t),e=Fi(e);var r=t.length,i=n=n===o?r:Mr(qs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},dr.eq=ps,dr.escape=function(t){return(t=zs(t))&&xt.test(t)?t.replace(Tt,Tn):t},dr.escapeRegExp=function(t){return(t=zs(t))&&Rt.test(t)?t.replace(Pt,"\\$&"):t},dr.every=function(t,e,n){var r=ys(t)?Ye:Vr;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.find=Wa,dr.findIndex=ma,dr.findKey=function(t,e){return an(t,Fo(e,3),Qr)},dr.findLast=Ha,dr.findLastIndex=ya,dr.findLastKey=function(t,e){return an(t,Fo(e,3),Yr)},dr.floor=Gu,dr.forEach=za,dr.forEachRight=Ka,dr.forIn=function(t,e){return null==t?t:Kr(t,Fo(e,3),ou)},dr.forInRight=function(t,e){return null==t?t:Gr(t,Fo(e,3),ou)},dr.forOwn=function(t,e){return t&&Qr(t,Fo(e,3))},dr.forOwnRight=function(t,e){return t&&Yr(t,Fo(e,3))},dr.get=Zs,dr.gt=ds,dr.gte=vs,dr.has=function(t,e){return null!=t&&Ho(t,e,ei)},dr.hasIn=tu,dr.head=ba,dr.identity=Iu,dr.includes=function(t,e,n,r){t=bs(t)?t:pu(t),n=n&&!r?qs(n):0;var i=t.length;return n<0&&(n=Kn(i+n,0)),Ds(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),un(t,e,i)},dr.inRange=function(t,e,n){return e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n){return t>=Gn(e,n)&&t<Kn(e,n)}(t=Ws(t),e,n)},dr.invoke=ru,dr.isArguments=ms,dr.isArray=ys,dr.isArrayBuffer=gs,dr.isArrayLike=bs,dr.isArrayLikeObject=_s,dr.isBoolean=function(t){return!0===t||!1===t||Ns(t)&&Zr(t)==H},dr.isBuffer=ws,dr.isDate=Es,dr.isElement=function(t){return Ns(t)&&1===t.nodeType&&!Os(t)},dr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(ys(t)||"string"==typeof t||"function"==typeof t.splice||ws(t)||Ls(t)||ms(t)))return!t.length;var e=Wo(t);if(e==X||e==nt)return!t.size;if(Jo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},dr.isEqual=function(t,e){return ai(t,e)},dr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},dr.isError=Ts,dr.isFinite=function(t){return"number"==typeof t&&Wn(t)},dr.isFunction=Cs,dr.isInteger=xs,dr.isLength=Ss,dr.isMap=As,dr.isMatch=function(t,e){return t===e||si(t,e,jo(e))},dr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,jo(e),n)},dr.isNaN=function(t){return Is(t)&&t!=+t},dr.isNative=function(t){if($o(t))throw new Jt(s);return ui(t)},dr.isNil=function(t){return null==t},dr.isNull=function(t){return null===t},dr.isNumber=Is,dr.isObject=ks,dr.isObjectLike=Ns,dr.isPlainObject=Os,dr.isRegExp=Ps,dr.isSafeInteger=function(t){return xs(t)&&t>=-D&&t<=D},dr.isSet=Rs,dr.isString=Ds,dr.isSymbol=Ms,dr.isTypedArray=Ls,dr.isUndefined=function(t){return t===o},dr.isWeakMap=function(t){return Ns(t)&&Wo(t)==at},dr.isWeakSet=function(t){return Ns(t)&&Zr(t)==st},dr.join=function(t,e){return null==t?"":Hn.call(t,e)},dr.kebabCase=yu,dr.last=Ta,dr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=qs(n))<0?Kn(r+i,0):Gn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},dr.lowerCase=gu,dr.lowerFirst=bu,dr.lt=Fs,dr.lte=Us,dr.max=function(t){return t&&t.length?Wr(t,Iu,ti):o},dr.maxBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),ti):o},dr.mean=function(t){return fn(t,Iu)},dr.meanBy=function(t,e){return fn(t,Fo(e,2))},dr.min=function(t){return t&&t.length?Wr(t,Iu,hi):o},dr.minBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),hi):o},dr.stubArray=Vu,dr.stubFalse=Wu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Yu,dr.nth=function(t,e){return t&&t.length?yi(t,qs(e)):o},dr.noConflict=function(){return Re._===this&&(Re._=ve),this},dr.noop=Mu,dr.now=Za,dr.pad=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(Bn(i),n)+t+bo(jn(i),n)},dr.padEnd=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?t+bo(e-r,n):t},dr.padStart=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?bo(e-r,n)+t:t},dr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Yn(zs(t).replace(Mt,""),e||0)},dr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Qo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Bs(t),e===o?(e=t,t=0):e=Bs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Xn();return Gn(t+i*(e-t+Ae("1e-"+((i+"").length-1))),e)}return Ei(t,e)},dr.reduce=function(t,e,n){var r=ys(t)?en:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,Br)},dr.reduceRight=function(t,e,n){var r=ys(t)?nn:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,qr)},dr.repeat=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),Ti(zs(t),e)},dr.replace=function(){var t=arguments,e=zs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var r=-1,i=(e=Gi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Cs(a)?a.call(t):a}return t},dr.round=Xu,dr.runInContext=t,dr.sample=function(t){return(ys(t)?xr:xi)(t)},dr.size=function(t){if(null==t)return 0;if(bs(t))return Ds(t)?Pn(t):t.length;var e=Wo(t);return e==X||e==nt?t.size:li(t).length},dr.snakeCase=_u,dr.some=function(t,e,n){var r=ys(t)?rn:Pi;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.sortedIndex=function(t,e){return Ri(t,e)},dr.sortedIndexBy=function(t,e,n){return Di(t,e,Fo(n,2))},dr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Ri(t,e);if(r<n&&ps(t[r],e))return r}return-1},dr.sortedLastIndex=function(t,e){return Ri(t,e,!0)},dr.sortedLastIndexBy=function(t,e,n){return Di(t,e,Fo(n,2),!0)},dr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Ri(t,e,!0)-1;if(ps(t[n],e))return n}return-1},dr.startCase=wu,dr.startsWith=function(t,e,n){return t=zs(t),n=null==n?0:Mr(qs(n),0,t.length),e=Fi(e),t.slice(n,n+e.length)==e},dr.subtract=$u,dr.sum=function(t){return t&&t.length?vn(t,Iu):0},dr.sumBy=function(t,e){return t&&t.length?vn(t,Fo(e,2)):0},dr.template=function(t,e,n){var r=dr.templateSettings;n&&Qo(t,e,n)&&(e=o),t=zs(t),e=Qs({},e,r,ko);var i,a,s=Qs({},e.imports,r.imports,ko),u=iu(s),c=gn(s,u),l=0,f=e.interpolate||Xt,h="__p += '",p=ne((e.escape||Xt).source+"|"+f.source+"|"+(f===Nt?Vt:Xt).source+"|"+(e.evaluate||Xt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++xe+"]")+"\n";t.replace(p,function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(l,u).replace($t,Cn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),h+="';\n";var v=e.variable;v||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(bt,""):h).replace(_t,"$1").replace(wt,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xu(function(){return Zt(u,d+"return "+h).apply(o,c)});if(m.source=h,Ts(m))throw m;return m},dr.times=function(t,e){if((t=qs(t))<1||t>D)return[];var n=F,r=Gn(t,F);e=Fo(e),t-=F;for(var i=mn(r,e);++n<t;)e(n);return i},dr.toFinite=Bs,dr.toInteger=qs,dr.toLength=Vs,dr.toLower=function(t){return zs(t).toLowerCase()},dr.toNumber=Ws,dr.toSafeInteger=function(t){return t?Mr(qs(t),-D,D):0===t?t:0},dr.toString=zs,dr.toUpper=function(t){return zs(t).toUpperCase()},dr.trim=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t),i=Rn(e);return Yi(r,_n(r,i),wn(r,i)+1).join("")},dr.trimEnd=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Lt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,0,wn(r,Rn(e))+1).join("")},dr.trimStart=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Mt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,_n(r,Rn(e))).join("")},dr.truncate=function(t,e){var n=k,r=N;if(ks(e)){var i="separator"in e?e.separator:i;n="length"in e?qs(e.length):n,r="omission"in e?Fi(e.omission):r}var a=(t=zs(t)).length;if(xn(t)){var s=Rn(t);a=s.length}if(n>=a)return t;var u=n-Pn(r);if(u<1)return r;var c=s?Yi(s,0,u).join(""):t.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),Ps(i)){if(t.slice(u).search(i)){var l,f=c;for(i.global||(i=ne(i.source,zs(Wt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?u:h)}}else if(t.indexOf(Fi(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},dr.unescape=function(t){return(t=zs(t))&&Ct.test(t)?t.replace(Et,Dn):t},dr.uniqueId=function(t){var e=++fe;return zs(t)+e},dr.upperCase=Eu,dr.upperFirst=Tu,dr.each=za,dr.eachRight=Ka,dr.first=ba,Du(dr,(Qu={},Qr(dr,function(t,e){le.call(dr.prototype,e)||(Qu[e]=t)}),Qu),{chain:!1}),dr.VERSION="4.17.10",Ge(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dr[t].placeholder=dr}),Ge(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Kn(qs(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Gn(n,r.__takeCount__):r.__views__.push({size:Gn(n,F),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ge(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==O||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Fo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ge(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Ge(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Iu)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=Ci(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ii(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(us(Fo(t)))},gr.prototype.slice=function(t,e){t=qs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=qs(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(F)},Qr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=dr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof gr,c=s[0],l=u||ys(e),f=function(t){var e=i.apply(dr,tn([t],s));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,v=u&&!p;if(!a&&l){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Ba,args:[f],thisArg:o}),new yr(m,h)}return d&&v?t.apply(this,s):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})}),Ge(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ys(i)?i:[],t)}return this[n](function(n){return e.apply(ys(n)?n:[],t)})}}),Qr(gr.prototype,function(t,e){var n=dr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[vo(o,g).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ys(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Gn(e,t+a);break;case"takeRight":t=Kn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,p=Gn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Vi(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var v=-1,m=t[c+=e];++v<f;){var y=l[v],g=y.iteratee,b=y.type,_=g(m);if(b==P)m=_;else if(!_){if(b==O)continue t;break t}}d[h++]=m}return d},dr.prototype.at=qa,dr.prototype.chain=function(){return ja(this)},dr.prototype.commit=function(){return new yr(this.value(),this.__chain__)},dr.prototype.next=function(){this.__values__===o&&(this.__values__=js(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof mr;){var r=ha(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Ba,args:[ka],thisArg:o}),new yr(e,this.__chain__)}return this.thru(ka)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return Vi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,Ue&&(dr.prototype[Ue]=function(){return this}),dr}();Re._=Mn,(i=function(){return Mn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(66),n(117)(t))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(124);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},function(t,e,n){var r=n(384),i=n(248),o=n(164);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(233);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return t.placeholder}},function(t,e,n){var r=n(86),i=n(155);function o(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,t.exports=o},function(t,e,n){var r=n(218),i=n(212),o=r?function(t){return r.get(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(86),i=n(155),o=4294967295;function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e,n){var r=n(239),i=n(229),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},function(t,e,n){var r=n(460),i=n(30);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},function(t,e,n){var r=n(132),i=n(465),o=n(464),a=n(463),s=n(462),u=n(461);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(473),i=n(28);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(118),i=1/0,o=1.7976931348623157e308;t.exports=function(t){return t?(t=r(t))===i||t===-i?(t<0?-1:1)*o:t==t?t:0:0===t?t:0}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(487),i=n(246)(r);t.exports=i},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(65)(n(33),"Map");t.exports=r},function(t,e,n){var r=n(512),i=n(496),o=n(494),a=n(493),s=n(492);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(18),i=n(68),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(49),i=n(26),o=n(79);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(57),i=n(26),o=n(138),a=n(171),s=n(56).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(42)},function(t,e,n){n(538);for(var r=n(57),i=n(80),o=n(78),a=n(42)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){var r=n(54),i=n(93),o=n(179)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(56).f,i=n(54),o=n(42)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(55),i=n(540),o=n(177),a=n(179)("IE_PROTO"),s=function(){},u=function(){var t,e=n(263)("iframe"),r=o.length;for(e.style.display="none",n(539).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(26),i=n(57),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(138)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(178)("keys"),i=n(137);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(71);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(550);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],f=0;(c=new Error(e.replace(/%s/g,function(){return l[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(369),i=n(47);t.exports=function(t){return t&&t.length?r(t,i):0}},function(t,e){t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}},function(t,e,n){var r=n(241),i=n(34),o=n(46),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}t.exports=function(t,e){if(i(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(e,n[a])||!i(t[n[a]],e[n[a]]))return!1;return!0}},function(t,e,n){var r=n(90),i=n(53),o=n(201),a=n(119),s=i(function(t){return o(r(t,1,a,!0))});t.exports=s},function(t,e,n){var r=n(114),i=n(52),o=n(38),a=n(96),s=n(335),u="[object Map]",c="[object Set]";t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return e==u||e==c?t.size:r(t).length}},function(t,e,n){var r=n(23)("min",n(368),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sum",n(187),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("compact",n(188),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,s=o.left,u=a,c=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o};function l(t,e){return[t,e]}var f=function(t,e,n){var r,i,o,a,s=t.length,u=e.length,c=new Array(s*u);for(null==n&&(n=l),r=o=0;r<s;++r)for(a=t[r],i=0;i<u;++i,++o)c[o]=n(a,e[i]);return c},h=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},p=function(t){return null===t?NaN:+t},d=function(t,e){var n,r,i=t.length,o=0,a=-1,s=0,u=0;if(null==e)for(;++a<i;)isNaN(n=p(t[a]))||(u+=(r=n-s)*(n-(s+=r/++o)));else for(;++a<i;)isNaN(n=p(e(t[a],a,t)))||(u+=(r=n-s)*(n-(s+=r/++o)));if(o>1)return u/(o-1)},v=function(t,e){var n=d(t,e);return n?Math.sqrt(n):n},m=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},y=Array.prototype,g=y.slice,b=y.map,_=function(t){return function(){return t}},w=function(t){return t},E=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o},T=Math.sqrt(50),C=Math.sqrt(10),x=Math.sqrt(2),S=function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=k(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o};function k(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T?10:o>=C?5:o>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T?10:o>=C?5:o>=x?2:1)}function N(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T?i*=10:o>=C?i*=5:o>=x&&(i*=2),e<t?-i:i}var A=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},I=function(){var t=w,e=m,n=A;function r(r){var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],f=c[1],h=n(s,l,f);Array.isArray(h)||(h=N(l,f,h),h=E(Math.ceil(l/h)*h,Math.floor(f/h)*h,h));for(var p=h.length;h[0]<=l;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,v=new Array(p+1);for(i=0;i<=p;++i)(d=v[i]=[]).x0=i>0?h[i-1]:l,d.x1=i<p?h[i]:f;for(i=0;i<a;++i)l<=(o=s[i])&&o<=f&&v[u(h,o,0,p)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?_(g.call(t)):_(t),r):n},r},O=function(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},P=function(t,e,n){return t=b.call(t,p).sort(r),Math.ceil((n-e)/(2*(O(t,.75)-O(t,.25))*Math.pow(t.length,-1/3)))},R=function(t,e,n){return Math.ceil((n-e)/(3.5*v(t)*Math.pow(t.length,-1/3)))},D=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},M=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=p(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=p(e(t[o],o,t)))?--i:a+=n;if(i)return a/i},L=function(t,e){var n,i=t.length,o=-1,a=[];if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||a.push(n);else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||a.push(n);return O(a.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},U=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},B=function(t,e){if(n=t.length){var n,i,o=0,a=0,s=t[a];for(null==e&&(e=r);++o<n;)(e(i=t[o],s)<0||0!==e(s,s))&&(s=i,a=o);return 0===e(s,s)?a:void 0}},q=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},V=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o},W=function(t){if(!(i=t.length))return[];for(var e=-1,n=U(t,H),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r};function H(t){return t.length}var z=function(){return W(arguments)},K=Array.prototype.slice,G=function(t){return t},Q=1,Y=2,X=3,$=4,J=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function tt(t){return"translate(0,"+(t+.5)+")"}function et(){return!this.__axis}function nt(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=t===Q||t===$?-1:1,c=t===$||t===Y?"x":"y",l=t===Q||t===X?Z:tt;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,d=Math.max(o,0)+s,v=e.range(),m=+v[0]+.5,y=+v[v.length-1]+.5,g=(e.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}:function(t){return function(e){return+t(e)}})(e.copy()),b=f.selection?f.selection():f,_=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(h,e).order(),E=w.exit(),T=w.enter().append("g").attr("class","tick"),C=w.select("line"),x=w.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),w=w.merge(T),C=C.merge(T.append("line").attr("stroke","#000").attr(c+"2",u*o)),x=x.merge(T.append("text").attr("fill","#000").attr(c,u*d).attr("dy",t===Q?"0em":t===X?"0.71em":"0.32em")),f!==b&&(_=_.transition(f),w=w.transition(f),C=C.transition(f),x=x.transition(f),E=E.transition(f).attr("opacity",J).attr("transform",function(t){return isFinite(t=g(t))?l(t):this.getAttribute("transform")}),T.attr("opacity",J).attr("transform",function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:g(t))})),E.remove(),_.attr("d",t===$||t==Y?"M"+u*a+","+m+"H0.5V"+y+"H"+u*a:"M"+m+","+u*a+"V0.5H"+y+"V"+u*a),w.attr("opacity",1).attr("transform",function(t){return l(g(t))}),C.attr(c+"2",u*o),x.attr(c,u*d).text(p),b.filter(et).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Y?"start":t===$?"end":"middle"),b.each(function(){this.__axis=g})}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=K.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:K.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:K.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function rt(t){return nt(Q,t)}function it(t){return nt(Y,t)}function ot(t){return nt(X,t)}function at(t){return nt($,t)}var st={value:function(){}};function ut(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ft(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=st,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=ut.prototype={constructor:ct,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=ft(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ft(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=lt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var ht=ut,pt="http://www.w3.org/1999/xhtml",dt={svg:"http://www.w3.org/2000/svg",xhtml:pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},vt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),dt.hasOwnProperty(e)?{space:dt[e],local:t}:t};var mt=function(t){var e=vt(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===pt&&e.documentElement.namespaceURI===pt?e.createElement(t):e.createElementNS(n,t)}})(e)};function yt(){}var gt=function(t){return null==t?yt:function(){return this.querySelector(t)}};function bt(){return[]}var _t=function(t){return null==t?bt:function(){return this.querySelectorAll(t)}},wt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Et=document.documentElement;if(!Et.matches){var Tt=Et.webkitMatchesSelector||Et.msMatchesSelector||Et.mozMatchesSelector||Et.oMatchesSelector;wt=function(t){return function(){return Tt.call(this,t)}}}}var Ct=wt,xt=function(t){return new Array(t.length)};function St(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}St.prototype={constructor:St,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Nt(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new St(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function At(t,e,n,r,i,o,a){var s,u,c,l={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=c=kt+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c=kt+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new St(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l[p[s]]===u&&(i[s]=u)}function It(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function Rt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new Mt(t)}function Mt(t){this._node=t,this._names=Rt(t.getAttribute("class")||"")}function Lt(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ft(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}Mt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ut(){this.textContent=""}function jt(){this.innerHTML=""}function Bt(){this.nextSibling&&this.parentNode.appendChild(this)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vt(){return null}function Wt(){var t=this.parentNode;t&&t.removeChild(this)}function Ht(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function zt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Kt={},Gt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Kt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Qt(t,e,n){return t=Yt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Yt(t,e,n){return function(r){var i=Gt;Gt=r;try{t.call(this,this.__data__,e,n)}finally{Gt=i}}}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function $t(t,e,n){var r=Kt.hasOwnProperty(t.type)?Qt:Yt;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,f=u.length;l<f;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Jt(t,e,n,r){var i=Gt;t.sourceEvent=Gt,Gt=t;try{return e.apply(n,r)}finally{Gt=i}}function Zt(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}function ne(){return new ee([[document.documentElement]],te)}ee.prototype=ne.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new ee(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ee(r,i)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new ee(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each(function(t){d[++l]=t}),d;var n,r=e?At:Nt,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),c=new Array(a),l=0;l<a;++l){var f=i[l],h=o[l],p=h.length,d=t.call(f,f&&f.__data__,l,i),v=d.length,m=u[l]=new Array(v),y=s[l]=new Array(v);r(f,h,m,y,c[l]=new Array(p),d,e);for(var g,b,_=0,w=0;_<v;++_)if(g=m[_]){for(_>=w&&(w=_+1);!(b=y[w])&&++w<v;);g._next=b||null}}return(s=new ee(s,i))._enter=u,s._exit=c,s},enter:function(){return new ee(this._enter||this._groups.map(xt),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(xt),this._parents)},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=It);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new ee(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=vt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):Pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=Rt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Lt:Ft)(this,t)}}:e?function(t){return function(){Lt(this,t)}}:function(t){return function(){Ft(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?Ut:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Bt)},lower:function(){return this.each(qt)},append:function(t){var e="function"==typeof t?t:mt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:mt(t),r=null==e?Vt:"function"==typeof e?e:gt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Wt)},clone:function(t){return this.select(t?zt:Ht)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?$t:Xt,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return Zt(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return Zt(this,t,e)}})(t,e))}};var re=ne,ie=function(t){return"string"==typeof t?new ee([[document.querySelector(t)]],[document.documentElement]):new ee([[t]],te)},oe=function(t){return ie(mt(t).call(document.documentElement))},ae=0;function se(){return new ue}function ue(){this._="@"+(++ae).toString(36)}ue.prototype=se.prototype={constructor:ue,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var ce=function(){for(var t,e=Gt;t=e.sourceEvent;)e=t;return e},le=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},fe=function(t){var e=ce();return e.changedTouches&&(e=e.changedTouches[0]),le(t,e)},he=function(t){return"string"==typeof t?new ee([document.querySelectorAll(t)],[document.documentElement]):new ee([null==t?[]:t],te)},pe=function(t,e,n){arguments.length<3&&(n=e,e=ce().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return le(t,r);return null},de=function(t,e){null==e&&(e=ce().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=le(t,e[n]);return i};function ve(){Gt.stopImmediatePropagation()}var me=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},ye=function(t){var e=t.document.documentElement,n=ie(t).on("dragstart.drag",me,!0);"onselectstart"in e?n.on("selectstart.drag",me,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function ge(t,e){var n=t.document.documentElement,r=ie(t).on("dragstart.drag",null);e&&(r.on("click.drag",me,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var be=function(t){return function(){return t}};function _e(t,e,n,r,i,o,a,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=c}function we(){return!Gt.button}function Ee(){return this.parentNode}function Te(t){return null==t?{x:Gt.x,y:Gt.y}:t}function Ce(){return"ontouchstart"in this}_e.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var xe=function(){var t,e,n,r,i=we,o=Ee,a=Te,s=Ce,u={},c=ht("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",p).filter(s).on("touchstart.drag",m).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=b("mouse",o.apply(this,arguments),fe,this,arguments);a&&(ie(Gt.view).on("mousemove.drag",d,!0).on("mouseup.drag",v,!0),ye(Gt.view),ve(),n=!1,t=Gt.clientX,e=Gt.clientY,a("start"))}}function d(){if(me(),!n){var r=Gt.clientX-t,i=Gt.clientY-e;n=r*r+i*i>f}u.mouse("drag")}function v(){ie(Gt.view).on("mousemove.drag mouseup.drag",null),ge(Gt.view,n),me(),u.mouse("end")}function m(){if(i.apply(this,arguments)){var t,e,n=Gt.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=b(n[t].identifier,r,pe,this,arguments))&&(ve(),e("start"))}}function y(){var t,e,n=Gt.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(me(),e("drag"))}function g(){var t,e,n=Gt.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<i;++t)(e=u[n[t].identifier])&&(ve(),e("end"))}function b(t,e,n,r,i){var o,s,f,p=n(e,t),d=c.copy();if(Jt(new _e(h,"beforestart",o,t,l,p[0],p[1],0,0,d),function(){return null!=(Gt.subject=o=a.apply(r,i))&&(s=o.x-p[0]||0,f=o.y-p[1]||0,!0)}))return function a(c){var v,m=p;switch(c){case"start":u[t]=a,v=l++;break;case"end":delete u[t],--l;case"drag":p=n(e,t),v=l}Jt(new _e(h,c,o,t,v,p[0]+s,p[1]+f,p[0]-m[0],p[1]-m[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:be(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:be(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:be(t),h):a},h.touchable=function(t){return arguments.length?(s="function"==typeof t?t:be(!!t),h):s},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h},Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ne(){}var Ae="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pe=/^#([0-9a-f]{3})$/,Re=/^#([0-9a-f]{6})$/,De=new RegExp("^rgb\\("+[Ae,Ae,Ae]+"\\)$"),Me=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Le=new RegExp("^rgba\\("+[Ae,Ae,Ae,Ie]+"\\)$"),Fe=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^hsl\\("+[Ie,Oe,Oe]+"\\)$"),je=new RegExp("^hsla\\("+[Ie,Oe,Oe,Ie]+"\\)$"),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function qe(t){var e;return t=(t+"").trim().toLowerCase(),(e=Pe.exec(t))?new Ke((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=Re.exec(t))?Ve(parseInt(e[1],16)):(e=De.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Me.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ue.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ve(Be[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ve(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function He(t){return t instanceof Ne||(t=qe(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function ze(t,e,n,r){return 1===arguments.length?He(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xe(t,e,n,r)}function Ye(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);if(t instanceof Ne||(t=qe(t)),!t)return new Xe;if(t instanceof Xe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xe(a,s,u,t.opacity)}(t):new Xe(t,e,n,null==r?1:r)}function Xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Se(Ne,qe,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Se(Ke,ze,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Se(Xe,Ye,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke($e(t>=240?t-240:t+120,i,r),$e(t,i,r),$e(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Je=Math.PI/180,Ze=180/Math.PI,tn=.96422,en=1,nn=.82521,rn=4/29,on=6/29,an=3*on*on,sn=on*on*on;function un(t){if(t instanceof fn)return new fn(t.l,t.a,t.b,t.opacity);if(t instanceof bn){if(isNaN(t.h))return new fn(t.l,0,0,t.opacity);var e=t.h*Je;return new fn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Ke||(t=He(t));var n,r,i=vn(t.r),o=vn(t.g),a=vn(t.b),s=hn((.2225045*i+.7168786*o+.0606169*a)/en);return i===o&&o===a?n=r=s:(n=hn((.4360747*i+.3850649*o+.1430804*a)/tn),r=hn((.0139322*i+.0971045*o+.7141733*a)/nn)),new fn(116*s-16,500*(n-s),200*(s-r),t.opacity)}function cn(t,e){return new fn(t,0,0,null==e?1:e)}function ln(t,e,n,r){return 1===arguments.length?un(t):new fn(t,e,n,null==r?1:r)}function fn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function hn(t){return t>sn?Math.pow(t,1/3):t/an+rn}function pn(t){return t>on?t*t*t:an*(t-rn)}function dn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mn(t){if(t instanceof bn)return new bn(t.h,t.c,t.l,t.opacity);if(t instanceof fn||(t=un(t)),0===t.a&&0===t.b)return new bn(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ze;return new bn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function yn(t,e,n,r){return 1===arguments.length?mn(t):new bn(n,e,t,null==r?1:r)}function gn(t,e,n,r){return 1===arguments.length?mn(t):new bn(t,e,n,null==r?1:r)}function bn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}Se(fn,ln,ke(Ne,{brighter:function(t){return new fn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new fn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(dn(3.1338561*(e=tn*pn(e))-1.6168667*(t=en*pn(t))-.4906146*(n=nn*pn(n))),dn(-.9787684*e+1.9161415*t+.033454*n),dn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(bn,gn,ke(Ne,{brighter:function(t){return new bn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new bn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return un(this).rgb()}}));var _n=-.29227,wn=-.90649,En=1.97294,Tn=En*wn,Cn=1.78277*En,xn=1.78277*_n- -.14861*wn;function Sn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof kn)return new kn(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=He(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(xn*r+Tn*e-Cn*n)/(xn+Tn-Cn),o=r-i,a=(En*(n-i)-_n*o)/wn,s=Math.sqrt(a*a+o*o)/(En*i*(1-i)),u=s?Math.atan2(a,o)*Ze-120:NaN;return new kn(u<0?u+360:u,s,i,t.opacity)}(t):new kn(t,e,n,null==r?1:r)}function kn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Nn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Se(kn,Sn,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Je,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(_n*r+wn*i)),255*(e+n*(En*r)),this.opacity)}}));var An=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Nn((n-r/e)*e,a,i,o,s)}},In=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Nn((n-r/e)*e,i,o,a,s)}},On=function(t){return function(){return t}};function Pn(t,e){return function(n){return t+n*e}}function Rn(t,e){var n=e-t;return n?Pn(t,n>180||n<-180?n-360*Math.round(n/360):n):On(isNaN(t)?e:t)}function Dn(t){return 1==(t=+t)?Mn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):On(isNaN(e)?n:e)}}function Mn(t,e){var n=e-t;return n?Pn(t,n):On(isNaN(t)?e:t)}var Ln=function t(e){var n=Dn(e);function r(t,e){var r=n((t=ze(t)).r,(e=ze(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Mn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Fn(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ze(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}var Un=Fn(An),jn=Fn(In),Bn=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=$n(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}},qn=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Vn=function(t,e){return e-=t=+t,function(n){return t+e*n}},Wn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=$n(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Hn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Hn.source,"g");var Kn,Gn,Qn,Yn,Xn=function(t,e){var n,r,i,o=Hn.lastIndex=zn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Hn.exec(t))&&(r=zn.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Vn(n,r)})),o=zn.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},$n=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?On(e):("number"===r?Vn:"string"===r?(n=qe(e))?(e=n,Ln):Xn:e instanceof qe?Ln:e instanceof Date?qn:Array.isArray(e)?Bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wn:Vn)(t,e)},Jn=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},Zn=180/Math.PI,tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},er=function(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Zn,skewX:Math.atan(u)*Zn,scaleX:a,scaleY:s}};function nr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Vn(t,i)},{i:u-2,x:Vn(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Vn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Vn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Vn(t,n)},{i:s-2,x:Vn(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var rr=nr(function(t){return"none"===t?tr:(Kn||(Kn=document.createElement("DIV"),Gn=document.documentElement,Qn=document.defaultView),Kn.style.transform=t,t=Qn.getComputedStyle(Gn.appendChild(Kn),null).getPropertyValue("transform"),Gn.removeChild(Kn),t=t.slice(7,-1).split(","),er(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),ir=nr(function(t){return null==t?tr:(Yn||(Yn=document.createElementNS("http://www.w3.org/2000/svg","g")),Yn.setAttribute("transform",t),(t=Yn.transform.baseVal.consolidate())?(t=t.matrix,er(t.a,t.b,t.c,t.d,t.e,t.f)):tr)},", ",")",")"),or=Math.SQRT2;function ar(t){return((t=Math.exp(t))+1/t)/2}var sr=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],c=e[2],l=s-i,f=u-o,h=l*l+f*f;if(h<1e-12)r=Math.log(c/a)/or,n=function(t){return[i+t*l,o+t*f,a*Math.exp(or*t*r)]};else{var p=Math.sqrt(h),d=(c*c-a*a+4*h)/(2*a*2*p),v=(c*c-a*a-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-m)/or,n=function(t){var e,n=t*r,s=ar(m),u=a/(2*p)*(s*(e=or*n+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+u*l,o+u*f,a*s/ar(or*n+m)]}}return n.duration=1e3*r,n};function ur(t){return function(e,n){var r=t((e=Ye(e)).h,(n=Ye(n)).h),i=Mn(e.s,n.s),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var cr=ur(Rn),lr=ur(Mn);function fr(t,e){var n=Mn((t=ln(t)).l,(e=ln(e)).l),r=Mn(t.a,e.a),i=Mn(t.b,e.b),o=Mn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function hr(t){return function(e,n){var r=t((e=gn(e)).h,(n=gn(n)).h),i=Mn(e.c,n.c),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var pr=hr(Rn),dr=hr(Mn);function vr(t){return function e(n){function r(e,r){var i=t((e=Sn(e)).h,(r=Sn(r)).h),o=Mn(e.s,r.s),a=Mn(e.l,r.l),s=Mn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var mr=vr(Rn),yr=vr(Mn);function gr(t,e){for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}}var br,_r,wr=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Er=0,Tr=0,Cr=0,xr=1e3,Sr=0,kr=0,Nr=0,Ar="object"==typeof performance&&performance.now?performance:Date,Ir="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Or(){return kr||(Ir(Pr),kr=Ar.now()+Nr)}function Pr(){kr=0}function Rr(){this._call=this._time=this._next=null}function Dr(t,e,n){var r=new Rr;return r.restart(t,e,n),r}function Mr(){Or(),++Er;for(var t,e=br;e;)(t=kr-e._time)>=0&&e._call.call(null,t),e=e._next;--Er}function Lr(){kr=(Sr=Ar.now())+Nr,Er=Tr=0;try{Mr()}finally{Er=0,function(){var t,e,n=br,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:br=e);_r=t,Ur(r)}(),kr=0}}function Fr(){var t=Ar.now(),e=t-Sr;e>xr&&(Nr-=e,Sr=t)}function Ur(t){Er||(Tr&&(Tr=clearTimeout(Tr)),t-kr>24?(t<1/0&&(Tr=setTimeout(Lr,t-Ar.now()-Nr)),Cr&&(Cr=clearInterval(Cr))):(Cr||(Sr=Ar.now(),Cr=setInterval(Fr,xr)),Er=1,Ir(Lr)))}Rr.prototype=Dr.prototype={constructor:Rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Or():+n)+(null==e?0:+e),this._next||_r===this||(_r?_r._next=this:br=this,_r=this),this._call=t,this._time=n,Ur()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ur())}};var jr=function(t,e,n){var r=new Rr;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Br=function(t,e,n){var r=new Rr,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?Or():+n,r.restart(function o(a){a+=i,r.restart(o,i+=e,n),t(a)},e,n),r)},qr=ht("start","end","interrupt"),Vr=[],Wr=0,Hr=1,zr=2,Kr=3,Gr=4,Qr=5,Yr=6,Xr=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,f,h;if(n.state!==Hr)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Kr)return jr(o);h.state===Gr?(h.state=Yr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=Yr,h.timer.stop(),delete i[c])}if(jr(function(){n.state===Kr&&(n.state=Gr,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=zr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===zr){for(n.state=Kr,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=Qr,1),o=-1,a=r.length;++o<a;)r[o].call(null,i);n.state===Qr&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=Yr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Dr(function(t){n.state=Hr,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:qr,tween:Vr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Wr})};function $r(t,e){var n=Zr(t,e);if(n.state>Wr)throw new Error("too late; already scheduled");return n}function Jr(t,e){var n=Zr(t,e);if(n.state>zr)throw new Error("too late; already started");return n}function Zr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var ti=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>zr&&n.state<Qr,n.state=Yr,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}};function ei(t,e,n){var r=t._id;return t.each(function(){var t=Jr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Zr(t,r).value[e]}}var ni=function(t,e){var n;return("number"==typeof e?Vn:e instanceof qe?Ln:(n=qe(e))?(e=n,Ln):Xn)(t,e)};var ri=re.prototype.constructor;var ii=0;function oi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ai(t){return re().transition(t)}function si(){return++ii}var ui=re.prototype;function ci(t){return+t}function li(t){return t*t}function fi(t){return t*(2-t)}function hi(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function pi(t){return t*t*t}function di(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}oi.prototype=ai.prototype={constructor:oi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,f=o[a]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Xr(f[h],e,n,h,f,Zr(s,n)));return new oi(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_t(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,f=0;f<l;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=Zr(u,n),v=0,m=p.length;v<m;++v)(h=p[v])&&Xr(h,e,n,v,p,d);o.push(p),a.push(u)}return new oi(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new oi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new oi(a,this._parents,this._name,this._id)},selection:function(){return new ri(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=si(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=Zr(a,e);Xr(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new oi(r,this._parents,t,n)},call:ui.call,nodes:ui.nodes,node:ui.node,size:ui.size,empty:ui.empty,each:ui.each,on:function(t,e){var n=this._id;return arguments.length<2?Zr(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?$r:Jr;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=vt(t),r="transform"===n?ir:ni;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}})(n,r,ei(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}:function(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}})(n,r,e+""))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=vt(t);return this.tween(n,(r.local?function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}:function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n})(r,e))},style:function(t,e,n){var r="transform"==(t+="")?rr:ni;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Pt(this,t),a=(this.style.removeProperty(t),Pt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof e?function(t,e,n){var r,i,o;return function(){var a=Pt(this,t),s=n(this);return null==s&&(this.style.removeProperty(t),s=Pt(this,t)),a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,r,ei(this,"style."+t,e)):function(t,e,n){var r,i;return function(){var o=Pt(this,t);return o===n?null:o===r?i:i=e(r=o,n)}}(t,r,e+""),n)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Zr(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=Jr(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Jr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){$r(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){$r(this,t).delay=e}})(e,t)):Zr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){Jr(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){Jr(this,t).duration=e}})(e,t)):Zr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Jr(this,t).ease=e}}(e,t)):Zr(this.node(),e).ease}};var mi=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),yi=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),gi=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),bi=Math.PI,_i=bi/2;function wi(t){return 1-Math.cos(t*_i)}function Ei(t){return Math.sin(t*_i)}function Ti(t){return(1-Math.cos(bi*t))/2}function Ci(t){return Math.pow(2,10*t-10)}function xi(t){return 1-Math.pow(2,-10*t)}function Si(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function ki(t){return 1-Math.sqrt(1-t*t)}function Ni(t){return Math.sqrt(1- --t*t)}function Ai(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ii=4/11,Oi=6/11,Pi=8/11,Ri=.75,Di=9/11,Mi=10/11,Li=.9375,Fi=21/22,Ui=63/64,ji=1/Ii/Ii;function Bi(t){return 1-qi(1-t)}function qi(t){return(t=+t)<Ii?ji*t*t:t<Pi?ji*(t-=Oi)*t+Ri:t<Mi?ji*(t-=Di)*t+Li:ji*(t-=Fi)*t+Ui}function Vi(t){return((t*=2)<=1?1-qi(1-t):qi(t-1)+1)/2}var Wi=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Hi=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),zi=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Ki=2*Math.PI,Gi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Qi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Yi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Xi={time:null,delay:0,duration:250,ease:vi};function $i(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Xi.time=Or(),Xi;return n}re.prototype.interrupt=function(t){return this.each(function(){ti(this,t)})},re.prototype.transition=function(t){var e,n;t instanceof oi?(e=t._id,t=t._name):(e=si(),(n=Xi).time=Or(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&Xr(a,t,e,c,s,n||$i(a,e));return new oi(r,this._parents,t,e)};var Ji=[null],Zi=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>Hr&&n.name===e)return new oi([[t]],Ji,e,+r);return null},to=function(t){return function(){return t}},eo=function(t,e,n){this.target=t,this.type=e,this.selection=n};function no(){Gt.stopImmediatePropagation()}var ro=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},io={name:"drag"},oo={name:"space"},ao={name:"handle"},so={name:"center"},uo={name:"x",handles:["e","w"].map(yo),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},co={name:"y",handles:["n","s"].map(yo),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},lo={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(yo),input:function(t){return t},output:function(t){return t}},fo={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ho={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},po={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vo={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},mo={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function yo(t){return{type:t}}function go(){return!Gt.button}function bo(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function _o(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function wo(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Eo(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function To(){return So(uo)}function Co(){return So(co)}var xo=function(){return So(lo)};function So(t){var e,n=bo,r=go,i=ht(a,"start","brush","end"),o=6;function a(e){var n=e.property("__brush",f).selectAll(".overlay").data([yo("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",fo.overlay).merge(n).each(function(){var t=_o(this).extent;ie(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([yo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",fo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return fo[t.type]}),e.each(s).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function s(){var t=ie(this),e=_o(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-o/2:e[0][0]-o/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-o/2:e[0][1]-o/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+o:o}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+o:o})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e){return t.__brush.emitter||new c(t,e)}function c(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function l(){if(Gt.touches){if(Gt.changedTouches.length<Gt.touches.length)return ro()}else if(e)return;if(r.apply(this,arguments)){var n,i,o,a,c,l,f,h,p,d,v,m,y,g=this,b=Gt.target.__data__.type,_="selection"===(Gt.metaKey?b="overlay":b)?io:Gt.altKey?so:ao,w=t===co?null:vo[b],E=t===uo?null:mo[b],T=_o(g),C=T.extent,x=T.selection,S=C[0][0],k=C[0][1],N=C[1][0],A=C[1][1],I=w&&E&&Gt.shiftKey,O=fe(g),P=O,R=u(g,arguments).beforestart();"overlay"===b?T.selection=x=[[n=t===co?S:O[0],o=t===uo?k:O[1]],[c=t===co?N:n,f=t===uo?A:o]]:(n=x[0][0],o=x[0][1],c=x[1][0],f=x[1][1]),i=n,a=o,l=c,h=f;var D=ie(g).attr("pointer-events","none"),M=D.selectAll(".overlay").attr("cursor",fo[b]);if(Gt.touches)D.on("touchmove.brush",F,!0).on("touchend.brush touchcancel.brush",j,!0);else{var L=ie(Gt.view).on("keydown.brush",function(){switch(Gt.keyCode){case 16:I=w&&E;break;case 18:_===ao&&(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so,U());break;case 32:_!==ao&&_!==so||(w<0?c=l-p:w>0&&(n=i-p),E<0?f=h-d:E>0&&(o=a-d),_=oo,M.attr("cursor",fo.selection),U());break;default:return}ro()},!0).on("keyup.brush",function(){switch(Gt.keyCode){case 16:I&&(m=y=I=!1,U());break;case 18:_===so&&(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao,U());break;case 32:_===oo&&(Gt.altKey?(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so):(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao),M.attr("cursor",fo[b]),U());break;default:return}ro()},!0).on("mousemove.brush",F,!0).on("mouseup.brush",j,!0);ye(Gt.view)}no(),ti(g),s.call(g),R.start()}function F(){var t=fe(g);!I||m||y||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?y=!0:m=!0),P=t,v=!0,ro(),U()}function U(){var t;switch(p=P[0]-O[0],d=P[1]-O[1],_){case oo:case io:w&&(p=Math.max(S-n,Math.min(N-c,p)),i=n+p,l=c+p),E&&(d=Math.max(k-o,Math.min(A-f,d)),a=o+d,h=f+d);break;case ao:w<0?(p=Math.max(S-n,Math.min(N-n,p)),i=n+p,l=c):w>0&&(p=Math.max(S-c,Math.min(N-c,p)),i=n,l=c+p),E<0?(d=Math.max(k-o,Math.min(A-o,d)),a=o+d,h=f):E>0&&(d=Math.max(k-f,Math.min(A-f,d)),a=o,h=f+d);break;case so:w&&(i=Math.max(S,Math.min(N,n-p*w)),l=Math.max(S,Math.min(N,c+p*w))),E&&(a=Math.max(k,Math.min(A,o-d*E)),h=Math.max(k,Math.min(A,f+d*E)))}l<i&&(w*=-1,t=n,n=c,c=t,t=i,i=l,l=t,b in ho&&M.attr("cursor",fo[b=ho[b]])),h<a&&(E*=-1,t=o,o=f,f=t,t=a,a=h,h=t,b in po&&M.attr("cursor",fo[b=po[b]])),T.selection&&(x=T.selection),m&&(i=x[0][0],l=x[1][0]),y&&(a=x[0][1],h=x[1][1]),x[0][0]===i&&x[0][1]===a&&x[1][0]===l&&x[1][1]===h||(T.selection=[[i,a],[l,h]],s.call(g),R.brush())}function j(){if(no(),Gt.touches){if(Gt.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500),D.on("touchmove.brush touchend.brush touchcancel.brush",null)}else ge(Gt.view,v),L.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),M.attr("cursor",fo.overlay),T.selection&&(x=T.selection),wo(x)&&(T.selection=null,s.call(g)),R.end()}}function f(){var e=this.__brush||{selection:null};return e.extent=n.apply(this,arguments),e.dim=t,e}return a.move=function(e,n){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var e=this,r=e.__brush,i=u(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),c=$n(o,a);function l(t){r.selection=1===t&&wo(a)?null:c(t),s.call(e),i.brush()}return o&&a?l:l(1)}):e.each(function(){var e=arguments,r=this.__brush,i=t.input("function"==typeof n?n.apply(this,e):n,r.extent),o=u(this,e).beforestart();ti(this),r.selection=null==i||wo(i)?null:i,s.call(this),o.start().brush().end()})},c.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){Jt(new eo(a,e,t.output(this.state.selection)),i.apply,i,[e,this.that,this.args])}},a.extent=function(t){return arguments.length?(n="function"==typeof t?t:to([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),a):n},a.filter=function(t){return arguments.length?(r="function"==typeof t?t:to(!!t),a):r},a.handleSize=function(t){return arguments.length?(o=+t,a):o},a.on=function(){var t=i.on.apply(i,arguments);return t===i?a:t},a}var ko=Math.cos,No=Math.sin,Ao=Math.PI,Io=Ao/2,Oo=2*Ao,Po=Math.max;var Ro=function(){var t=0,e=null,n=null,r=null;function i(i){var o,a,s,u,c,l,f=i.length,h=[],p=E(f),d=[],v=[],m=v.groups=new Array(f),y=new Array(f*f);for(o=0,c=-1;++c<f;){for(a=0,l=-1;++l<f;)a+=i[c][l];h.push(a),d.push(E(f)),o+=a}for(e&&p.sort(function(t,n){return e(h[t],h[n])}),n&&d.forEach(function(t,e){t.sort(function(t,r){return n(i[e][t],i[e][r])})}),u=(o=Po(0,Oo-t*f)/o)?t:Oo/f,a=0,c=-1;++c<f;){for(s=a,l=-1;++l<f;){var g=p[c],b=d[g][l],_=i[g][b],w=a,T=a+=_*o;y[b*f+g]={index:g,subindex:b,startAngle:w,endAngle:T,value:_}}m[g]={index:g,startAngle:s,endAngle:a,value:h[g]},a+=u}for(c=-1;++c<f;)for(l=c-1;++l<f;){var C=y[l*f+c],x=y[c*f+l];(C.value||x.value)&&v.push(C.value<x.value?{source:x,target:C}:{source:C,target:x})}return r?v.sort(r):v}return i.padAngle=function(e){return arguments.length?(t=Po(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(e=t,r=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,i):r&&r._;var e},i},Do=Array.prototype.slice,Mo=function(t){return function(){return t}},Lo=Math.PI,Fo=2*Lo,Uo=Fo-1e-6;function jo(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Bo(){return new jo}jo.prototype=Bo.prototype={constructor:jo,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-o,p=r-a,d=s*s+u*u,v=h*h+p*p,m=Math.sqrt(d),y=Math.sqrt(f),g=i*Math.tan((Lo-Math.acos((d+f-v)/(2*m*y)))/2),b=g/y,_=g/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*p)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Fo+Fo),f>Uo?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Lo)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var qo=Bo;function Vo(t){return t.source}function Wo(t){return t.target}function Ho(t){return t.radius}function zo(t){return t.startAngle}function Ko(t){return t.endAngle}var Go=function(){var t=Vo,e=Wo,n=Ho,r=zo,i=Ko,o=null;function a(){var a,s=Do.call(arguments),u=t.apply(this,s),c=e.apply(this,s),l=+n.apply(this,(s[0]=u,s)),f=r.apply(this,s)-Io,h=i.apply(this,s)-Io,p=l*ko(f),d=l*No(f),v=+n.apply(this,(s[0]=c,s)),m=r.apply(this,s)-Io,y=i.apply(this,s)-Io;if(o||(o=a=qo()),o.moveTo(p,d),o.arc(0,0,l,f,h),f===m&&h===y||(o.quadraticCurveTo(0,0,v*ko(m),v*No(m)),o.arc(0,0,v,m,y)),o.quadraticCurveTo(0,0,p,d),o.closePath(),a)return o=null,a+""||null}return a.radius=function(t){return arguments.length?(n="function"==typeof t?t:Mo(+t),a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Mo(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Mo(+t),a):i},a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(t){return arguments.length?(e=t,a):e},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a};function Qo(){}function Yo(t,e){var n=new Qo;if(t instanceof Qo)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Qo.prototype=Yo.prototype={constructor:Qo,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Xo=Yo,$o=function(){var t,e,n,r=[],i=[];function o(n,i,a,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,c,l,f=-1,h=n.length,p=r[i++],d=Xo(),v=a();++f<h;)(l=d.get(u=p(c=n[f])+""))?l.push(c):d.set(u,[c]);return d.each(function(t,e){s(v,e,o(t,i,a,s))}),v}return n={object:function(t){return o(t,0,Jo,Zo)},map:function(t){return o(t,0,ta,ea)},entries:function(t){return function t(n,o){if(++o>r.length)return n;var a,s=i[o-1];return null!=e&&o>=r.length?a=n.entries():(a=[],n.each(function(e,n){a.push({key:n,values:t(e,o)})})),null!=s?a.sort(function(t,e){return s(t.key,e.key)}):a}(o(t,0,ta,ea),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Jo(){return{}}function Zo(t,e,n){t[e]=n}function ta(){return Xo()}function ea(t,e,n){t.set(e,n)}function na(){}var ra=Xo.prototype;function ia(t,e){var n=new na;if(t instanceof na)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}na.prototype=ia.prototype={constructor:na,has:ra.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ra.remove,clear:ra.clear,values:ra.keys,size:ra.size,empty:ra.empty,each:ra.each};var oa=ia,aa=function(t){var e=[];for(var n in t)e.push(n);return e},sa=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ca=Array.prototype.slice,la=function(t,e){return t-e},fa=function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r},ha=function(t){return function(){return t}},pa=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=da(t,e[r]))return n;return 0};function da(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],f=t[s],h=f[0],p=f[1];if(va(u,f,e))return 0;l>r!=p>r&&n<(h-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function va(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}var ma=function(){},ya=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],ga=function(){var t=1,e=1,n=A,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(la);else{var r=m(t),i=r[0],a=r[1];e=N(i,a,e),e=E(Math.floor(i/e)*e,Math.floor(a/e)*e,e)}return e.map(function(e){return o(t,e)})}function o(n,i){var o=[],s=[];return function(n,r,i){var o,s,u,c,l,f,h=new Array,p=new Array;o=s=-1,c=n[0]>=r,ya[c<<1].forEach(d);for(;++o<t-1;)u=c,c=n[o+1]>=r,ya[u|c<<1].forEach(d);ya[c<<0].forEach(d);for(;++s<e-1;){for(o=-1,c=n[s*t+t]>=r,l=n[s*t]>=r,ya[c<<1|l<<2].forEach(d);++o<t-1;)u=c,c=n[s*t+t+o+1]>=r,f=l,l=n[s*t+o+1]>=r,ya[u|c<<1|l<<2|f<<3].forEach(d);ya[c|l<<3].forEach(d)}o=-1,l=n[s*t]>=r,ya[l<<2].forEach(d);for(;++o<t-1;)f=l,l=n[s*t+o+1]>=r,ya[l<<2|f<<3].forEach(d);function d(t){var e,n,r=[t[0][0]+o,t[0][1]+s],u=[t[1][0]+o,t[1][1]+s],c=a(r),l=a(u);(e=p[c])?(n=h[l])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(u),p[e.end=l]=e):(e=h[l])?(n=p[c])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=c]=e):h[c]=p[l]={start:c,end:l,ring:[r,u]}}ya[l<<3].forEach(d)}(n,i,function(t){r(t,n,i),fa(t)>0?o.push([t]):s.push(t)}),s.forEach(function(t){for(var e,n=0,r=o.length;n<r;++n)if(-1!==pa((e=o[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:i,coordinates:o}}function a(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach(function(n){var o,a=n[0],s=n[1],u=0|a,c=0|s,l=r[c*t+u];a>0&&a<t&&u===a&&(o=r[c*t+u-1],n[0]=a+(i-o)/(l-o)-.5),s>0&&s<e&&c===s&&(o=r[(c-1)*t+u],n[1]=s+(i-o)/(l-o)-.5)})}return i.contour=o,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),o=Math.ceil(n[1]);if(!(r>0&&o>0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:ma,i):r===s},i};function ba(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<i;++a)for(var s=0,u=0;s<r+n;++s)s<r&&(u+=t.data[s+a*r]),s>=n&&(s>=o&&(u-=t.data[s-o+a*r]),e.data[s-n+a*r]=u/Math.min(s+1,r-1+o-s,o))}function _a(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<r;++a)for(var s=0,u=0;s<i+n;++s)s<i&&(u+=t.data[a+s*r]),s>=n&&(s>=o&&(u-=t.data[a+(s-o)*r]),e.data[a+(s-n)*r]=u/Math.min(s+1,i-1+o-s,o))}function wa(t){return t[0]}function Ea(t){return t[1]}var Ta=function(){var t=wa,e=Ea,n=960,r=500,i=20,o=2,a=3*i,s=n+2*a>>o,u=r+2*a>>o,c=ha(20);function l(n){var r=new Float32Array(s*u),l=new Float32Array(s*u);n.forEach(function(n,i,c){var l=t(n,i,c)+a>>o,f=e(n,i,c)+a>>o;l>=0&&l<s&&f>=0&&f<u&&++r[l+f*s]}),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o);var h=c(r);if(!Array.isArray(h)){var p=D(r);h=N(0,p,h),(h=E(0,Math.floor(p/h)*h,h)).shift()}return ga().thresholds(h).size([s,u])(r).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(h),t}function h(t){t.forEach(p)}function p(t){t.forEach(d)}function d(t){t[0]=t[0]*Math.pow(2,o)-a,t[1]=t[1]*Math.pow(2,o)-a}function v(){return s=n+2*(a=3*i)>>o,u=r+2*a>>o,l}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:ha(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:ha(+t),l):e},l.size=function(t){if(!arguments.length)return[n,r];var e=Math.ceil(t[0]),i=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return n=e,r=i,v()},l.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),v()},l.thresholds=function(t){return arguments.length?(c="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),l):c},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(i*(i+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return i=Math.round((Math.sqrt(4*t*t+1)-1)/2),v()},l},Ca={},xa={},Sa=34,ka=10,Na=13;function Aa(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}var Ia=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,c=!1;function l(){if(u)return xa;if(c)return c=!1,Ca;var e,r,i=a;if(t.charCodeAt(i)===Sa){for(;a++<o&&t.charCodeAt(a)!==Sa||t.charCodeAt(++a)===Sa;);return(e=a)>=o?u=!0:(r=t.charCodeAt(a++))===ka?c=!0:r===Na&&(c=!0,t.charCodeAt(a)===ka&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if((r=t.charCodeAt(e=a++))===ka)c=!0;else if(r===Na)c=!0,t.charCodeAt(a)===ka&&++a;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===ka&&--o,t.charCodeAt(o-1)===Na&&--o;(r=l())!==xa;){for(var f=[];r!==Ca&&r!==xa;)f.push(r),r=l();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e){return e.map(o).join(t)}function o(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Aa(t);return function(r,i){return e(n(r),i,t)}}(t,e):Aa(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=function(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}(e)),[n.map(o).join(t)].concat(e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})).join("\n")},formatRows:function(t){return t.map(i).join("\n")}}},Oa=Ia(","),Pa=Oa.parse,Ra=Oa.parseRows,Da=Oa.format,Ma=Oa.formatRows,La=Ia("\t"),Fa=La.parse,Ua=La.parseRows,ja=La.format,Ba=La.formatRows;function qa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var Va=function(t,e){return fetch(t,e).then(qa)};function Wa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var Ha=function(t,e){return fetch(t,e).then(Wa)};function za(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Ka=function(t,e){return fetch(t,e).then(za)};function Ga(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Ka(e,n).then(function(e){return t(e,r)})}}function Qa(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Ia(t);return Ka(e,n).then(function(t){return i.parse(t,r)})}var Ya=Ga(Pa),Xa=Ga(Fa),$a=function(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})};function Ja(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var Za=function(t,e){return fetch(t,e).then(Ja)};function ts(t){return function(e,n){return Ka(e,n).then(function(e){return(new DOMParser).parseFromString(e,t)})}}var es=ts("application/xml"),ns=ts("text/html"),rs=ts("image/svg+xml"),is=function(t,e){var n;function r(){var r,i,o=n.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=n[r]).x,s+=i.y;for(a=a/o-t,s=s/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},os=function(t){return function(){return t}},as=function(){return 1e-6*(Math.random()-.5)};function ss(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,c,l,f,h,p=t._root,d={data:r},v=t._x0,m=t._y0,y=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a,i=p,!(p=p[f=l<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===s&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a}while((f=l<<1|c)==(h=(u>=a)<<1|s>=o));return i[h]=p,i[f]=d,t}var us=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function cs(t){return t[0]}function ls(t){return t[1]}function fs(t,e,n){var r=new hs(null==e?cs:e,null==n?ls:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function hs(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ps(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ds=fs.prototype=hs.prototype;function vs(t){return t.x+t.vx}function ms(t){return t.y+t.vy}ds.copy=function(){var t,e,n=new hs(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ps(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ps(e));return n},ds.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ss(this.cover(e,n),e,n,t)},ds.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<u&&(u=r),r>l&&(l=r),i<c&&(c=i),i>f&&(f=i));for(l<u&&(u=this._x0,l=this._x1),f<c&&(c=this._y0,f=this._y1),this.cover(u,c).cover(l,f),n=0;n<o;++n)ss(this,a[n],s[n],t[n]);return this},ds.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>o))return this;var a,s,u=i-n,c=this._root;switch(s=(e<(r+o)/2)<<1|t<(n+i)/2){case 0:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),t>(i=n+u)||e>o);break;case 1:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),(n=i-u)>t||e>o);break;case 2:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),t>(i=n+u)||r>e);break;case 3:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),(n=i-u)>t||r>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},ds.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},ds.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ds.find=function(t,e,n){var r,i,o,a,s,u,c,l=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new us(v,l,f,h,p)),null==n?n=1/0:(l=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(v=u.node)||(i=u.x0)>h||(o=u.y0)>p||(a=u.x1)<l||(s=u.y1)<f))if(v.length){var m=(i+a)/2,y=(o+s)/2;d.push(new us(v[3],m,y,a,s),new us(v[2],i,y,m,s),new us(v[1],m,o,a,y),new us(v[0],i,o,m,y)),(c=(e>=y)<<1|t>=m)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}else{var g=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=g*g+b*b;if(_<n){var w=Math.sqrt(n=_);l=t-w,f=e-w,h=t+w,p=e+w,r=v.data}}return r},ds.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,c,l,f,h,p=this._root,d=this._x0,v=this._y0,m=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(s=(d+m)/2))?d=s:m=s,(l=a>=(u=(v+y)/2))?v=u:y=u,e=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},ds.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ds.root=function(){return this._root},ds.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},ds.visit=function(t){var e,n,r,i,o,a,s=[],u=this._root;for(u&&s.push(new us(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&u.length){var c=(r+o)/2,l=(i+a)/2;(n=u[3])&&s.push(new us(n,c,l,o,a)),(n=u[2])&&s.push(new us(n,r,l,c,a)),(n=u[1])&&s.push(new us(n,c,i,o,l)),(n=u[0])&&s.push(new us(n,r,i,c,l))}return this},ds.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new us(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,u=e.x1,c=e.y1,l=(a+u)/2,f=(s+c)/2;(o=i[0])&&n.push(new us(o,a,s,l,f)),(o=i[1])&&n.push(new us(o,l,s,u,f)),(o=i[2])&&n.push(new us(o,a,f,l,c)),(o=i[3])&&n.push(new us(o,l,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ds.x=function(t){return arguments.length?(this._x=t,this):this._x},ds.y=function(t){return arguments.length?(this._y=t,this):this._y};var ys=function(t){var e,n,r=1,i=1;function o(){for(var t,o,s,u,c,l,f,h=e.length,p=0;p<i;++p)for(o=fs(e,vs,ms).visitAfter(a),t=0;t<h;++t)s=e[t],l=n[s.index],f=l*l,u=s.x+s.vx,c=s.y+s.vy,o.visit(d);function d(t,e,n,i,o){var a=t.data,h=t.r,p=l+h;if(!a)return e>u+p||i<u-p||n>c+p||o<c-p;if(a.index>s.index){var d=u-a.x-a.vx,v=c-a.y-a.vy,m=d*d+v*v;m<p*p&&(0===d&&(m+=(d=as())*d),0===v&&(m+=(v=as())*v),m=(p-(m=Math.sqrt(m)))/m*r,s.vx+=(d*=m)*(p=(h*=h)/(f+h)),s.vy+=(v*=m)*p,a.vx-=d*(p=1-p),a.vy-=v*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=os(null==t?1:+t)),o.initialize=function(t){e=t,s()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),s(),o):t},o};function gs(t){return t.index}function bs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var _s=function(t){var e,n,r,i,o,a=gs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=os(30),c=1;function l(r){for(var i=0,a=t.length;i<c;++i)for(var s,u,l,f,h,p,d,v=0;v<a;++v)u=(s=t[v]).source,f=(l=s.target).x+l.vx-u.x-u.vx||as(),h=l.y+l.vy-u.y-u.vy||as(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,l.vx-=f*(d=o[v]),l.vy-=h*d,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var s,u,c=r.length,l=t.length,f=Xo(r,a);for(s=0,i=new Array(c);s<l;++s)(u=t[s]).index=s,"object"!=typeof u.source&&(u.source=bs(f,u.source)),"object"!=typeof u.target&&(u.target=bs(f,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(s=0,o=new Array(l);s<l;++s)u=t[s],o[s]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);e=new Array(l),h(),n=new Array(l),p()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,f()},l.links=function(e){return arguments.length?(t=e,f(),l):t},l.id=function(t){return arguments.length?(a=t,l):a},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:os(+t),h(),l):s},l.distance=function(t){return arguments.length?(u="function"==typeof t?t:os(+t),p(),l):u},l};function ws(t){return t.x}function Es(t){return t.y}var Ts=10,Cs=Math.PI*(3-Math.sqrt(5)),xs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=Xo(),u=Dr(l),c=ht("tick","end");function l(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(){var e,r,u=t.length;for(n+=(o-n)*i,s.each(function(t){t(n)}),e=0;e<u;++e)null==(r=t[e]).fx?r.x+=r.vx*=a:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=a:(r.y=r.fy,r.vy=0)}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,isNaN(e.x)||isNaN(e.y)){var i=Ts*Math.sqrt(n),o=n*Cs;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return u.restart(l),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),s.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)(a=(i=e-(s=t[c]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}},Ss=function(){var t,e,n,r,i=os(-30),o=1,a=1/0,s=.81;function u(r){var i,o=t.length,a=fs(t,ws,Es).visitAfter(l);for(n=r,i=0;i<o;++i)e=t[i],a.visit(f)}function c(){if(t){var e,n,o=t.length;for(r=new Array(o),e=0;e<o;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,o,a,s=0,u=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,i+=n*e.x,o+=n*e.y);t.x=i/u,t.y=o/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function f(t,i,u,c){if(!t.value)return!0;var l=t.x-e.x,f=t.y-e.y,h=c-i,p=l*l+f*f;if(h*h/s<p)return p<a&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=l*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=l*h,e.vy+=f*h)}while(t=t.next)}}return u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),c(),u):i},u.distanceMin=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u},ks=function(t,e,n){var r,i,o,a=os(.1);function s(t){for(var a=0,s=r.length;a<s;++a){var u=r[a],c=u.x-e||1e-6,l=u.y-n||1e-6,f=Math.sqrt(c*c+l*l),h=(o[a]-f)*i[a]*t/f;u.vx+=c*h,u.vy+=l*h}}function u(){if(r){var e,n=r.length;for(i=new Array(n),o=new Array(n),e=0;e<n;++e)o[e]=+t(r[e],e,r),i[e]=isNaN(o[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,u()},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:os(+t),u(),s):a},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),u(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ns=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},As=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},Is=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},Os=function(t){return(t=Is(Math.abs(t)))?t[1]:NaN},Ps=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rs(t){return new Ds(t)}function Ds(t){if(!(e=Ps.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}Rs.prototype=Ds.prototype,Ds.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ms,Ls,Fs,Us,js=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Bs=function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},qs={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Bs(100*t,e)},r:Bs,s:function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ms=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Is(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Vs=function(t){return t},Ws=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Hs=function(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}):Vs,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):Vs,s=t.percent||"%";function u(t){var e=(t=Rs(t)).fill,n=t.align,u=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,p=t.precision,d=t.trim,v=t.type;"n"===v?(h=!0,v="g"):qs[v]||(null==p&&(p=12),d=!0,v="g"),(l||"0"===e&&"="===n)&&(l=!0,e="0",n="=");var m="$"===c?i[0]:"#"===c&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===c?i[1]:/[%p]/.test(v)?s:"",g=qs[v],b=/[defgprs%]/.test(v);function _(t){var i,s,c,_=m,w=y;if("c"===v)w=g(t)+w,t="";else{var E=(t=+t)<0;if(t=g(Math.abs(t),p),d&&(t=js(t)),E&&0==+t&&(E=!1),_=(E?"("===u?u:"-":"-"===u||"("===u?"":u)+_,w=("s"===v?Ws[8+Ms/3]:"")+w+(E&&"("===u?")":""),b)for(i=-1,s=t.length;++i<s;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var T=_.length+t.length+w.length,C=T<f?new Array(f-T+1).join(e):"";switch(h&&l&&(t=r(C+t,C.length?f-w.length:1/0),C=""),n){case"<":t=_+t+w+C;break;case"=":t=_+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+_+t+w+C.slice(T);break;default:t=C+_+t+w}return a(t)}return p=null==p?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var n=u(((t=Rs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3))),i=Math.pow(10,-r),o=Ws[8+r/3];return function(t){return n(i*t)+o}}}};function zs(t){return Ls=Hs(t),Fs=Ls.format,Us=Ls.formatPrefix,Ls}zs({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ks=function(t){return Math.max(0,-Os(Math.abs(t)))},Gs=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3)))-Os(Math.abs(t)))},Qs=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Os(e)-Os(t))+1},Ys=function(){return new Xs};function Xs(){this.reset()}Xs.prototype={constructor:Xs,reset:function(){this.s=this.t=0},add:function(t){Js($s,t,this.t),Js(this,$s.s,this.s),this.s?this.t+=$s.t:this.s=$s.t},valueOf:function(){return this.s}};var $s=new Xs;function Js(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var Zs=1e-6,tu=Math.PI,eu=tu/2,nu=tu/4,ru=2*tu,iu=180/tu,ou=tu/180,au=Math.abs,su=Math.atan,uu=Math.atan2,cu=Math.cos,lu=Math.ceil,fu=Math.exp,hu=(Math.floor,Math.log),pu=Math.pow,du=Math.sin,vu=Math.sign||function(t){return t>0?1:t<0?-1:0},mu=Math.sqrt,yu=Math.tan;function gu(t){return t>1?0:t<-1?tu:Math.acos(t)}function bu(t){return t>1?eu:t<-1?-eu:Math.asin(t)}function _u(t){return(t=du(t/2))*t}function wu(){}function Eu(t,e){t&&Cu.hasOwnProperty(t.type)&&Cu[t.type](t,e)}var Tu={Feature:function(t,e){Eu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Eu(n[r].geometry,e)}},Cu={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){xu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xu(n[r],e,0)},Polygon:function(t,e){Su(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Su(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Eu(n[r],e)}};function xu(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Su(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)xu(t[n],e,1);e.polygonEnd()}var ku,Nu,Au,Iu,Ou,Pu=function(t,e){t&&Tu.hasOwnProperty(t.type)?Tu[t.type](t,e):Eu(t,e)},Ru=Ys(),Du=Ys(),Mu={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Ru.reset(),Mu.lineStart=Lu,Mu.lineEnd=Fu},polygonEnd:function(){var t=+Ru;Du.add(t<0?ru+t:t),this.lineStart=this.lineEnd=this.point=wu},sphere:function(){Du.add(ru)}};function Lu(){Mu.point=Uu}function Fu(){ju(ku,Nu)}function Uu(t,e){Mu.point=ju,ku=t,Nu=e,Au=t*=ou,Iu=cu(e=(e*=ou)/2+nu),Ou=du(e)}function ju(t,e){e=(e*=ou)/2+nu;var n=(t*=ou)-Au,r=n>=0?1:-1,i=r*n,o=cu(e),a=du(e),s=Ou*a,u=Iu*o+s*cu(i),c=s*r*du(i);Ru.add(uu(c,u)),Au=t,Iu=o,Ou=a}var Bu=function(t){return Du.reset(),Pu(t,Mu),2*Du};function qu(t){return[uu(t[1],t[0]),bu(t[2])]}function Vu(t){var e=t[0],n=t[1],r=cu(n);return[r*cu(e),r*du(e),du(n)]}function Wu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ku(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Gu(t){var e=mu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Qu,Yu,Xu,$u,Ju,Zu,tc,ec,nc,rc,ic=Ys(),oc={point:ac,lineStart:uc,lineEnd:cc,polygonStart:function(){oc.point=lc,oc.lineStart=fc,oc.lineEnd=hc,ic.reset(),Mu.polygonStart()},polygonEnd:function(){Mu.polygonEnd(),oc.point=ac,oc.lineStart=uc,oc.lineEnd=cc,Ru<0?(Qu=-(Xu=180),Yu=-($u=90)):ic>Zs?$u=90:ic<-Zs&&(Yu=-90),rc[0]=Qu,rc[1]=Xu}};function ac(t,e){nc.push(rc=[Qu=t,Xu=t]),e<Yu&&(Yu=e),e>$u&&($u=e)}function sc(t,e){var n=Vu([t*ou,e*ou]);if(ec){var r=Hu(ec,n),i=Hu([r[1],-r[0],0],r);Gu(i),i=qu(i);var o,a=t-Ju,s=a>0?1:-1,u=i[0]*iu*s,c=au(a)>180;c^(s*Ju<u&&u<s*t)?(o=i[1]*iu)>$u&&($u=o):c^(s*Ju<(u=(u+360)%360-180)&&u<s*t)?(o=-i[1]*iu)<Yu&&(Yu=o):(e<Yu&&(Yu=e),e>$u&&($u=e)),c?t<Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t):Xu>=Qu?(t<Qu&&(Qu=t),t>Xu&&(Xu=t)):t>Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t)}else nc.push(rc=[Qu=t,Xu=t]);e<Yu&&(Yu=e),e>$u&&($u=e),ec=n,Ju=t}function uc(){oc.point=sc}function cc(){rc[0]=Qu,rc[1]=Xu,oc.point=ac,ec=null}function lc(t,e){if(ec){var n=t-Ju;ic.add(au(n)>180?n+(n>0?360:-360):n)}else Zu=t,tc=e;Mu.point(t,e),sc(t,e)}function fc(){Mu.lineStart()}function hc(){lc(Zu,tc),Mu.lineEnd(),au(ic)>Zs&&(Qu=-(Xu=180)),rc[0]=Qu,rc[1]=Xu,ec=null}function pc(t,e){return(e-=t)<0?e+360:e}function dc(t,e){return t[0]-e[0]}function vc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var mc,yc,gc,bc,_c,wc,Ec,Tc,Cc,xc,Sc,kc,Nc,Ac,Ic,Oc,Pc=function(t){var e,n,r,i,o,a,s;if($u=Xu=-(Qu=Yu=1/0),nc=[],Pu(t,oc),n=nc.length){for(nc.sort(dc),e=1,o=[r=nc[0]];e<n;++e)vc(r,(i=nc[e])[0])||vc(r,i[1])?(pc(r[0],i[1])>pc(r[0],r[1])&&(r[1]=i[1]),pc(i[0],r[1])>pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=pc(r[1],i[0]))>a&&(a=s,Qu=i[0],Xu=r[1])}return nc=rc=null,Qu===1/0||Yu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Qu,Yu],[Xu,$u]]},Rc={sphere:wu,point:Dc,lineStart:Lc,lineEnd:jc,polygonStart:function(){Rc.lineStart=Bc,Rc.lineEnd=qc},polygonEnd:function(){Rc.lineStart=Lc,Rc.lineEnd=jc}};function Dc(t,e){t*=ou;var n=cu(e*=ou);Mc(n*cu(t),n*du(t),du(e))}function Mc(t,e,n){gc+=(t-gc)/++mc,bc+=(e-bc)/mc,_c+=(n-_c)/mc}function Lc(){Rc.point=Fc}function Fc(t,e){t*=ou;var n=cu(e*=ou);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Rc.point=Uc,Mc(Ac,Ic,Oc)}function Uc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=uu(mu((a=Ic*o-Oc*i)*a+(a=Oc*r-Ac*o)*a+(a=Ac*i-Ic*r)*a),Ac*r+Ic*i+Oc*o);yc+=a,wc+=a*(Ac+(Ac=r)),Ec+=a*(Ic+(Ic=i)),Tc+=a*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}function jc(){Rc.point=Dc}function Bc(){Rc.point=Vc}function qc(){Wc(kc,Nc),Rc.point=Dc}function Vc(t,e){kc=t,Nc=e,t*=ou,e*=ou,Rc.point=Wc;var n=cu(e);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Mc(Ac,Ic,Oc)}function Wc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=Ic*o-Oc*i,s=Oc*r-Ac*o,u=Ac*i-Ic*r,c=mu(a*a+s*s+u*u),l=bu(c),f=c&&-l/c;Cc+=f*a,xc+=f*s,Sc+=f*u,yc+=l,wc+=l*(Ac+(Ac=r)),Ec+=l*(Ic+(Ic=i)),Tc+=l*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}var Hc=function(t){mc=yc=gc=bc=_c=wc=Ec=Tc=Cc=xc=Sc=0,Pu(t,Rc);var e=Cc,n=xc,r=Sc,i=e*e+n*n+r*r;return i<1e-12&&(e=wc,n=Ec,r=Tc,yc<Zs&&(e=gc,n=bc,r=_c),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[uu(n,e)*iu,bu(r/mu(i))*iu]},zc=function(t){return function(){return t}},Kc=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function Gc(t,e){return[t>tu?t-ru:t<-tu?t+ru:t,e]}function Qc(t,e,n){return(t%=ru)?e||n?Kc(Xc(t),$c(e,n)):Xc(t):e||n?$c(e,n):Gc}function Yc(t){return function(e,n){return[(e+=t)>tu?e-ru:e<-tu?e+ru:e,n]}}function Xc(t){var e=Yc(t);return e.invert=Yc(-t),e}function $c(t,e){var n=cu(t),r=du(t),i=cu(e),o=du(e);function a(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*n+s*r;return[uu(u*i-l*o,s*n-c*r),bu(l*i+u*o)]}return a.invert=function(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*i-u*o;return[uu(u*i+c*o,s*n+l*r),bu(l*n-s*r)]},a}Gc.invert=Gc;var Jc=function(t){function e(e){return(e=t(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e}return t=Qc(t[0]*ou,t[1]*ou,t.length>2?t[2]*ou:0),e.invert=function(e){return(e=t.invert(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e},e};function Zc(t,e,n,r,i,o){if(n){var a=cu(e),s=du(e),u=r*n;null==i?(i=e+r*ru,o=e-u/2):(i=tl(a,i),o=tl(a,o),(r>0?i<o:i>o)&&(i+=r*ru));for(var c,l=i;r>0?l>o:l<o;l-=u)c=qu([a,-s*cu(l),-s*du(l)]),t.point(c[0],c[1])}}function tl(t,e){(e=Vu(e))[0]-=t,Gu(e);var n=gu(-e[1]);return((-e[2]<0?-n:n)+ru-Zs)%ru}var el=function(){var t,e,n=zc([0,0]),r=zc(90),i=zc(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=iu,n[1]*=iu}};function a(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*ou,u=i.apply(this,arguments)*ou;return t=[],e=Qc(-a[0]*ou,-a[1]*ou,0).invert,Zc(o,s,u,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:zc([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:zc(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:zc(+t),a):i},a},nl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:wu,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},rl=function(t,e){return au(t[0]-e[0])<Zs&&au(t[1]-e[1])<Zs};function il(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var ol=function(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rl(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new il(r,t,null,!0)),u.push(n.o=new il(r,null,n,!1)),s.push(n=new il(a,t,null,!1)),u.push(n.o=new il(a,null,n,!0))}}),s.length){for(u.sort(e),al(s),al(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var c,l,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=c.length;o<a;++o)i.point((l=c[o])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((l=c[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function al(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var sl=Ys(),ul=function(t,e){var n=e[0],r=e[1],i=du(r),o=[du(n),-cu(n),0],a=0,s=0;sl.reset(),1===i?r=eu+Zs:-1===i&&(r=-eu-Zs);for(var u=0,c=t.length;u<c;++u)if(f=(l=t[u]).length)for(var l,f,h=l[f-1],p=h[0],d=h[1]/2+nu,v=du(d),m=cu(d),y=0;y<f;++y,p=b,v=w,m=E,h=g){var g=l[y],b=g[0],_=g[1]/2+nu,w=du(_),E=cu(_),T=b-p,C=T>=0?1:-1,x=C*T,S=x>tu,k=v*w;if(sl.add(uu(k*C*du(x),m*E+k*cu(x))),a+=S?T+C*ru:T,S^p>=n^b>=n){var N=Hu(Vu(h),Vu(g));Gu(N);var A=Hu(o,N);Gu(A);var I=(S^T>=0?-1:1)*bu(A[2]);(r>I||r===I&&(N[0]||N[1]))&&(s+=S^T>=0?1:-1)}}return(a<-Zs||a<Zs&&sl<-Zs)^1&s},cl=function(t,e,n,r){return function(i){var o,a,s,u=e(i),c=nl(),l=e(c),f=!1,h={point:p,lineStart:v,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=g,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=v,h.lineEnd=m,a=F(a);var t=ul(o,r);a.length?(f||(i.polygonStart(),f=!0),ol(a,fl,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function v(){h.point=d,u.lineStart()}function m(){h.point=p,u.lineEnd()}function y(t,e){s.push([t,e]),l.point(t,e)}function g(){l.lineStart(),s=[]}function b(){y(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,u=l.clean(),h=c.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ll))}return h}};function ll(t){return t.length>1}function fl(t,e){return((t=t.x)[0]<0?t[1]-eu-Zs:eu-t[1])-((e=e.x)[0]<0?e[1]-eu-Zs:eu-e[1])}var hl=cl(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?tu:-tu,u=au(o-n);au(u-tu)<Zs?(t.point(n,r=(r+a)/2>0?eu:-eu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=tu&&(au(n-i)<Zs&&(n-=i*Zs),au(o-s)<Zs&&(o-=s*Zs),r=function(t,e,n,r){var i,o,a=du(t-n);return au(a)>Zs?su((du(e)*(o=cu(r))*du(n)-du(r)*(i=cu(e))*du(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eu,r.point(-tu,i),r.point(0,i),r.point(tu,i),r.point(tu,0),r.point(tu,-i),r.point(0,-i),r.point(-tu,-i),r.point(-tu,0),r.point(-tu,i);else if(au(t[0]-e[0])>Zs){var o=t[0]<e[0]?tu:-tu;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-tu,-eu]);var pl=function(t){var e=cu(t),n=6*ou,r=e>0,i=au(e)>Zs;function o(t,n){return cu(t)*cu(n)>e}function a(t,n,r){var i=[1,0,0],o=Hu(Vu(t),Vu(n)),a=Wu(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var c=e*a/u,l=-e*s/u,f=Hu(i,o),h=Ku(i,c);zu(h,Ku(o,l));var p=f,d=Wu(h,p),v=Wu(p,p),m=d*d-v*(Wu(h,h)-1);if(!(m<0)){var y=mu(m),g=Ku(p,(-d-y)/v);if(zu(g,h),g=qu(g),!r)return g;var b,_=t[0],w=n[0],E=t[1],T=n[1];w<_&&(b=_,_=w,w=b);var C=w-_,x=au(C-tu)<Zs;if(!x&&T<E&&(b=E,E=T,T=b),x||C<Zs?x?E+T>0^g[1]<(au(g[0]-_)<Zs?E:T):E<=g[1]&&g[1]<=T:C>tu^(_<=g[0]&&g[0]<=w)){var S=Ku(p,(-d+y)/v);return zu(S,h),[g,qu(S)]}}}function s(e,n){var i=r?t:tu-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return cl(o,function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,h){var p,d=[f,h],v=o(f,h),m=r?v?0:s(f,h):v?s(f+(f<0?tu:-tu),h):0;if(!e&&(c=u=v)&&t.lineStart(),v!==u&&(!(p=a(e,d))||rl(e,p)||rl(d,p))&&(d[0]+=Zs,d[1]+=Zs,v=o(d[0],d[1])),v!==u)l=0,v?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^v){var y;m&n||!(y=a(d,e,!0))||(l=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||e&&rl(e,d)||t.point(d[0],d[1]),e=d,u=v,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}},function(e,r,i,o){Zc(o,t,n,i,e,r)},r?[0,-t]:[-tu,t-tu])},dl=function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=0,l=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<c)return;a<l&&(l=a)}else if(f>0){if(a>l)return;a>c&&(c=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>l)return;a>c&&(c=a)}else if(f>0){if(a<c)return;a<l&&(l=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<l&&(l=a)}else if(h>0){if(a>l)return;a>c&&(c=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<l&&(l=a)}return c>0&&(t[0]=s+c*f,t[1]=u+c*h),l<1&&(e[0]=s+l*f,e[1]=u+l*h),!0}}}}},vl=1e9,ml=-vl;function yl(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,c){var l=0,f=0;if(null==i||(l=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else c.point(o[0],o[1])}function a(r,i){return au(r[0]-t)<Zs?i>0?0:3:au(r[0]-n)<Zs?i>0?2:1:au(r[1]-e)<Zs?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,c,l,f,h,p,d,v,m,y,g,b=a,_=nl(),w={point:E,lineStart:function(){w.point=T,c&&c.push(l=[]);y=!0,m=!1,d=v=NaN},lineEnd:function(){u&&(T(f,h),p&&m&&_.rejoin(),u.push(_.result()));w.point=E,m&&b.lineEnd()},polygonStart:function(){b=_,u=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],u=1,l=s.length,f=s[0],h=f[0],p=f[1];u<l;++u)o=h,a=p,f=s[u],h=f[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=g&&e,i=(u=F(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ol(u,s,e,o,a),a.polygonEnd());b=a,u=c=l=null}};function E(t,e){i(t,e)&&b.point(t,e)}function T(o,a){var s=i(o,a);if(c&&l.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&m)b.point(o,a);else{var u=[d=Math.max(ml,Math.min(vl,d)),v=Math.max(ml,Math.min(vl,v))],_=[o=Math.max(ml,Math.min(vl,o)),a=Math.max(ml,Math.min(vl,a))];dl(u,_,t,e,n,r)?(m||(b.lineStart(),b.point(u[0],u[1])),b.point(_[0],_[1]),s||b.lineEnd(),g=!1):s&&(b.lineStart(),b.point(o,a),g=!1)}d=o,v=a,m=s}return w}}var gl,bl,_l,wl=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=yl(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}},El=Ys(),Tl={sphere:wu,point:wu,lineStart:function(){Tl.point=xl,Tl.lineEnd=Cl},lineEnd:wu,polygonStart:wu,polygonEnd:wu};function Cl(){Tl.point=Tl.lineEnd=wu}function xl(t,e){gl=t*=ou,bl=du(e*=ou),_l=cu(e),Tl.point=Sl}function Sl(t,e){t*=ou;var n=du(e*=ou),r=cu(e),i=au(t-gl),o=cu(i),a=r*du(i),s=_l*n-bl*r*o,u=bl*n+_l*r*o;El.add(uu(mu(a*a+s*s),u)),gl=t,bl=n,_l=r}var kl=function(t){return El.reset(),Pu(t,Tl),+El},Nl=[null,null],Al={type:"LineString",coordinates:Nl},Il=function(t,e){return Nl[0]=t,Nl[1]=e,kl(Al)},Ol={Feature:function(t,e){return Rl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rl(n[r].geometry,e))return!0;return!1}},Pl={Sphere:function(){return!0},Point:function(t,e){return Dl(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Dl(n[r],e))return!0;return!1},LineString:function(t,e){return Ml(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ml(n[r],e))return!0;return!1},Polygon:function(t,e){return Ll(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ll(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rl(n[r],e))return!0;return!1}};function Rl(t,e){return!(!t||!Pl.hasOwnProperty(t.type))&&Pl[t.type](t,e)}function Dl(t,e){return 0===Il(t,e)}function Ml(t,e){var n=Il(t[0],t[1]);return Il(t[0],e)+Il(e,t[1])<=n+Zs}function Ll(t,e){return!!ul(t.map(Fl),Ul(e))}function Fl(t){return(t=t.map(Ul)).pop(),t}function Ul(t){return[t[0]*ou,t[1]*ou]}var jl=function(t,e){return(t&&Ol.hasOwnProperty(t.type)?Ol[t.type]:Rl)(t,e)};function Bl(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function ql(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Vl(){var t,e,n,r,i,o,a,s,u,c,l,f,h=10,p=h,d=90,v=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:g()}}function g(){return E(lu(r/d)*d,n,d).map(l).concat(E(lu(s/v)*v,a,v).map(f)).concat(E(lu(e/h)*h,t,h).filter(function(t){return au(t%d)>Zs}).map(u)).concat(E(lu(o/p)*p,i,p).filter(function(t){return au(t%v)>Zs}).map(c))}return y.lines=function(){return g().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(a).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(m)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],y):[d,v]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(m=+h,u=Bl(o,i,90),c=ql(e,t,m),l=Bl(s,a,90),f=ql(r,n,m),y):m},y.extentMajor([[-180,-90+Zs],[180,90-Zs]]).extentMinor([[-180,-80-Zs],[180,80+Zs]])}function Wl(){return Vl()()}var Hl,zl,Kl,Gl,Ql=function(t,e){var n=t[0]*ou,r=t[1]*ou,i=e[0]*ou,o=e[1]*ou,a=cu(r),s=du(r),u=cu(o),c=du(o),l=a*cu(n),f=a*du(n),h=u*cu(i),p=u*du(i),d=2*bu(mu(_u(o-r)+a*u*_u(i-n))),v=du(d),m=d?function(t){var e=du(t*=d)/v,n=du(d-t)/v,r=n*l+e*h,i=n*f+e*p,o=n*s+e*c;return[uu(i,r)*iu,uu(o,mu(r*r+i*i))*iu]}:function(){return[n*iu,r*iu]};return m.distance=d,m},Yl=function(t){return t},Xl=Ys(),$l=Ys(),Jl={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Jl.lineStart=Zl,Jl.lineEnd=nf},polygonEnd:function(){Jl.lineStart=Jl.lineEnd=Jl.point=wu,Xl.add(au($l)),$l.reset()},result:function(){var t=Xl/2;return Xl.reset(),t}};function Zl(){Jl.point=tf}function tf(t,e){Jl.point=ef,Hl=Kl=t,zl=Gl=e}function ef(t,e){$l.add(Gl*t-Kl*e),Kl=t,Gl=e}function nf(){ef(Hl,zl)}var rf=Jl,of=1/0,af=of,sf=-of,uf=sf;var cf,lf,ff,hf,pf={point:function(t,e){t<of&&(of=t);t>sf&&(sf=t);e<af&&(af=e);e>uf&&(uf=e)},lineStart:wu,lineEnd:wu,polygonStart:wu,polygonEnd:wu,result:function(){var t=[[of,af],[sf,uf]];return sf=uf=-(af=of=1/0),t}},df=0,vf=0,mf=0,yf=0,gf=0,bf=0,_f=0,wf=0,Ef=0,Tf={point:Cf,lineStart:xf,lineEnd:Nf,polygonStart:function(){Tf.lineStart=Af,Tf.lineEnd=If},polygonEnd:function(){Tf.point=Cf,Tf.lineStart=xf,Tf.lineEnd=Nf},result:function(){var t=Ef?[_f/Ef,wf/Ef]:bf?[yf/bf,gf/bf]:mf?[df/mf,vf/mf]:[NaN,NaN];return df=vf=mf=yf=gf=bf=_f=wf=Ef=0,t}};function Cf(t,e){df+=t,vf+=e,++mf}function xf(){Tf.point=Sf}function Sf(t,e){Tf.point=kf,Cf(ff=t,hf=e)}function kf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,Cf(ff=t,hf=e)}function Nf(){Tf.point=Cf}function Af(){Tf.point=Of}function If(){Pf(cf,lf)}function Of(t,e){Tf.point=Pf,Cf(cf=ff=t,lf=hf=e)}function Pf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,_f+=(i=hf*t-ff*e)*(ff+t),wf+=i*(hf+e),Ef+=3*i,Cf(ff=t,hf=e)}var Rf=Tf;function Df(t){this._context=t}Df.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ru)}},result:wu};var Mf,Lf,Ff,Uf,jf,Bf=Ys(),qf={point:wu,lineStart:function(){qf.point=Vf},lineEnd:function(){Mf&&Wf(Lf,Ff),qf.point=wu},polygonStart:function(){Mf=!0},polygonEnd:function(){Mf=null},result:function(){var t=+Bf;return Bf.reset(),t}};function Vf(t,e){qf.point=Wf,Lf=Uf=t,Ff=jf=e}function Wf(t,e){Uf-=t,jf-=e,Bf.add(mu(Uf*Uf+jf*jf)),Uf=t,jf=e}var Hf=qf;function zf(){this._string=[]}function Kf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}zf.prototype={_radius:4.5,_circle:Kf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Kf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Gf=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Pu(t,n(r))),r.result()}return o.area=function(t){return Pu(t,n(rf)),rf.result()},o.measure=function(t){return Pu(t,n(Hf)),Hf.result()},o.bounds=function(t){return Pu(t,n(pf)),pf.result()},o.centroid=function(t){return Pu(t,n(Rf)),Rf.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Yl):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new zf):new Df(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},Qf=function(t){return{stream:Yf(t)}};function Yf(t){return function(e){var n=new Xf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Xf(){}function $f(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Pu(n,t.stream(pf)),e(pf.result()),null!=r&&t.clipExtent(r),t}function Jf(t,e,n){return $f(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])},n)}function Zf(t,e,n){return Jf(t,[[0,0],e],n)}function th(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function eh(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}Xf.prototype={constructor:Xf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var nh=16,rh=cu(30*ou),ih=function(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,c,l,f,h,p,d,v,m){var y=c-r,g=l-i,b=y*y+g*g;if(b>4*e&&v--){var _=a+h,w=s+p,E=u+d,T=mu(_*_+w*w+E*E),C=bu(E/=T),x=au(au(E)-1)<Zs||au(o-f)<Zs?(o+f)/2:uu(w,_),S=t(x,C),k=S[0],N=S[1],A=k-r,I=N-i,O=g*A-y*I;(O*O/b>e||au((y*A+g*I)/b-.5)>.3||a*h+s*p+u*d<rh)&&(n(r,i,o,a,s,u,k,N,x,_/=T,w/=T,E,v,m),m.point(k,N),n(k,N,x,_,w,E,c,l,f,h,p,d,v,m))}}return function(e){var r,i,o,a,s,u,c,l,f,h,p,d,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){l=NaN,v.point=g,e.lineStart()}function g(r,i){var o=Vu([r,i]),a=t(r,i);n(l,f,c,h,p,d,l=a[0],f=a[1],c=r,h=o[0],p=o[1],d=o[2],nh,e),e.point(l,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=E}function w(t,e){g(r=t,e),i=l,o=f,a=h,s=p,u=d,v.point=g}function E(){n(l,f,c,h,p,d,i,o,r,a,s,u,nh,e),v.lineEnd=b,b()}return v}}(t,e):function(t){return Yf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var oh=Yf({point:function(t,e){this.stream.point(t*ou,e*ou)}});function ah(t,e,n,r){var i=cu(r),o=du(r),a=i*t,s=o*t,u=i/t,c=o/t,l=(o*n-i*e)/t,f=(o*e+i*n)/t;function h(t,r){return[a*t-s*r+e,n-s*t-a*r]}return h.invert=function(t,e){return[u*t-c*e+l,f-c*t-u*e]},h}function sh(t){return uh(function(){return t})()}function uh(t){var e,n,r,i,o,a,s,u,c,l,f=150,h=480,p=250,d=0,v=0,m=0,y=0,g=0,b=0,_=null,w=hl,E=null,T=Yl,C=.5;function x(t){return u(t[0]*ou,t[1]*ou)}function S(t){return(t=u.invert(t[0],t[1]))&&[t[0]*iu,t[1]*iu]}function k(){var t=ah(f,0,0,b).apply(null,e(d,v)),r=(b?ah:function(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r})(f,h-t[0],p-t[1],b);return n=Qc(m,y,g),s=Kc(e,r),u=Kc(n,s),a=ih(s,C),N()}function N(){return c=l=null,x}return x.stream=function(t){return c&&l===t?c:c=oh(function(t){return Yf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(T(l=t)))))},x.preclip=function(t){return arguments.length?(w=t,_=void 0,N()):w},x.postclip=function(t){return arguments.length?(T=t,E=r=i=o=null,N()):T},x.clipAngle=function(t){return arguments.length?(w=+t?pl(_=t*ou):(_=null,hl),N()):_*iu},x.clipExtent=function(t){return arguments.length?(T=null==t?(E=r=i=o=null,Yl):yl(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),N()):null==E?null:[[E,r],[i,o]]},x.scale=function(t){return arguments.length?(f=+t,k()):f},x.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],k()):[h,p]},x.center=function(t){return arguments.length?(d=t[0]%360*ou,v=t[1]%360*ou,k()):[d*iu,v*iu]},x.rotate=function(t){return arguments.length?(m=t[0]%360*ou,y=t[1]%360*ou,g=t.length>2?t[2]%360*ou:0,k()):[m*iu,y*iu,g*iu]},x.angle=function(t){return arguments.length?(b=t%360*ou,k()):b*iu},x.precision=function(t){return arguments.length?(a=ih(s,C=t*t),N()):mu(C)},x.fitExtent=function(t,e){return Jf(x,t,e)},x.fitSize=function(t,e){return Zf(x,t,e)},x.fitWidth=function(t,e){return th(x,t,e)},x.fitHeight=function(t,e){return eh(x,t,e)},function(){return e=t.apply(this,arguments),x.invert=e.invert&&S,k()}}function ch(t){var e=0,n=tu/3,r=uh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*ou,n=t[1]*ou):[e*iu,n*iu]},i}function lh(t,e){var n=du(t),r=(n+du(e))/2;if(au(r)<Zs)return function(t){var e=cu(t);function n(t,n){return[t*e,du(n)/e]}return n.invert=function(t,n){return[t/e,bu(n*e)]},n}(t);var i=1+n*(2*r-n),o=mu(i)/r;function a(t,e){var n=mu(i-2*r*du(e))/r;return[n*du(t*=r),o-n*cu(t)]}return a.invert=function(t,e){var n=o-e;return[uu(t,au(n))/r*vu(n),bu((i-(t*t+n*n)*r*r)/(2*r))]},a}var fh=function(){return ch(lh).scale(155.424).center([0,33.6442])},hh=function(){return fh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var ph=function(){var t,e,n,r,i,o,a=hh(),s=fh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=fh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,l}return l.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:a).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[a.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),u.precision(t),f()):a.precision()},l.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),u.scale(t),l.translate(a.translate())):a.scale()},l.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],l=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,l-.238*e],[o+.455*e,l+.238*e]]).stream(c),r=s.translate([o-.307*e,l+.201*e]).clipExtent([[o-.425*e+Zs,l+.12*e+Zs],[o-.214*e-Zs,l+.234*e-Zs]]).stream(c),i=u.translate([o-.205*e,l+.212*e]).clipExtent([[o-.214*e+Zs,l+.166*e+Zs],[o-.115*e-Zs,l+.234*e-Zs]]).stream(c),f()},l.fitExtent=function(t,e){return Jf(l,t,e)},l.fitSize=function(t,e){return Zf(l,t,e)},l.fitWidth=function(t,e){return th(l,t,e)},l.fitHeight=function(t,e){return eh(l,t,e)},l.scale(1070)};function dh(t){return function(e,n){var r=cu(e),i=cu(n),o=t(r*i);return[o*i*du(e),o*du(n)]}}function vh(t){return function(e,n){var r=mu(e*e+n*n),i=t(r),o=du(i),a=cu(i);return[uu(e*o,r*a),bu(r&&n*o/r)]}}var mh=dh(function(t){return mu(2/(1+t))});mh.invert=vh(function(t){return 2*bu(t/2)});var yh=function(){return sh(mh).scale(124.75).clipAngle(179.999)},gh=dh(function(t){return(t=gu(t))&&t/du(t)});gh.invert=vh(function(t){return t});var bh=function(){return sh(gh).scale(79.4188).clipAngle(179.999)};function _h(t,e){return[t,hu(yu((eu+e)/2))]}_h.invert=function(t,e){return[t,2*su(fu(e))-eu]};var wh=function(){return Eh(_h).scale(961/ru)};function Eh(t){var e,n,r,i=sh(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,c=null;function l(){var o=tu*a(),s=i(Jc(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===_h?[[Math.max(s[0]-o,c),e],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),l()):a()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(o(t),l()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==c?null:[[c,e],[n,r]]},l()}function Th(t){return yu((eu+t)/2)}function Ch(t,e){var n=cu(t),r=t===e?du(t):hu(n/cu(e))/hu(Th(e)/Th(t)),i=n*pu(Th(t),r)/r;if(!r)return _h;function o(t,e){i>0?e<-eu+Zs&&(e=-eu+Zs):e>eu-Zs&&(e=eu-Zs);var n=i/pu(Th(e),r);return[n*du(r*t),i-n*cu(r*t)]}return o.invert=function(t,e){var n=i-e,o=vu(r)*mu(t*t+n*n);return[uu(t,au(n))/r*vu(n),2*su(pu(i/o,1/r))-eu]},o}var xh=function(){return ch(Ch).scale(109.5).parallels([30,30])};function Sh(t,e){return[t,e]}Sh.invert=Sh;var kh=function(){return sh(Sh).scale(152.63)};function Nh(t,e){var n=cu(t),r=t===e?du(t):(n-cu(e))/(e-t),i=n/r+t;if(au(r)<Zs)return Sh;function o(t,e){var n=i-e,o=r*t;return[n*du(o),i-n*cu(o)]}return o.invert=function(t,e){var n=i-e;return[uu(t,au(n))/r*vu(n),i-vu(r)*mu(t*t+n*n)]},o}var Ah=function(){return ch(Nh).scale(131.154).center([0,13.9389])};function Ih(t,e){var n=cu(e),r=cu(t)*n;return[n*du(t)/r,du(e)/r]}Ih.invert=vh(su);var Oh=function(){return sh(Ih).scale(144.049).clipAngle(60)};function Ph(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?Yl:Yf({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}var Rh=function(){var t,e,n,r,i,o,a=1,s=0,u=0,c=1,l=1,f=Yl,h=null,p=Yl;function d(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=f(p(i=t))},postclip:function(r){return arguments.length?(p=r,h=t=e=n=null,d()):p},clipExtent:function(r){return arguments.length?(p=null==r?(h=t=e=n=null,Yl):yl(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),d()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(f=Ph((a=+t)*c,a*l,s,u),d()):a},translate:function(t){return arguments.length?(f=Ph(a*c,a*l,s=+t[0],u=+t[1]),d()):[s,u]},reflectX:function(t){return arguments.length?(f=Ph(a*(c=t?-1:1),a*l,s,u),d()):c<0},reflectY:function(t){return arguments.length?(f=Ph(a*c,a*(l=t?-1:1),s,u),d()):l<0},fitExtent:function(t,e){return Jf(o,t,e)},fitSize:function(t,e){return Zf(o,t,e)},fitWidth:function(t,e){return th(o,t,e)},fitHeight:function(t,e){return eh(o,t,e)}}};function Dh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Dh.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(au(n)>Zs&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Mh=function(){return sh(Dh).scale(175.295)};function Lh(t,e){return[cu(e)*du(t),du(e)]}Lh.invert=vh(bu);var Fh=function(){return sh(Lh).scale(249.5).clipAngle(90+Zs)};function Uh(t,e){var n=cu(e),r=1+cu(t)*n;return[n*du(t)/r,du(e)/r]}Uh.invert=vh(function(t){return 2*su(t)});var jh=function(){return sh(Uh).scale(250).clipAngle(142)};function Bh(t,e){return[hu(yu((eu+e)/2)),-t]}Bh.invert=function(t,e){return[-e,2*su(fu(t))-eu]};var qh=function(){var t=Eh(Bh),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function Vh(t,e){return t.parent===e.parent?1:2}function Wh(t,e){return t+e.x}function Hh(t,e){return Math.max(t,e.y)}var zh=function(){var t=Vh,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Wh,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Hh,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,l=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(l-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function Kh(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Gh(t,e){var n,r,i,o,a,s=new $h(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Qh);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new $h(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Xh)}function Qh(t){return t.children}function Yh(t){t.data=t.data.data}function Xh(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function $h(t){this.data=t,this.depth=this.height=0,this.parent=null}$h.prototype=Gh.prototype={constructor:$h,count:function(){return this.eachAfter(Kh)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return Gh(this).eachBefore(Yh)}};var Jh=Array.prototype.slice;var Zh=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Jh.call(t))).length,o=[];r<i;)e=t[r],n&&np(n,e)?++r:(n=ip(o=tp(o,e)),r=0);return n};function tp(t,e){var n,r;if(rp(e,t))return[e];for(n=0;n<t.length;++n)if(ep(e,t[n])&&rp(op(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(ep(op(t[n],t[r]),e)&&ep(op(t[n],e),t[r])&&ep(op(t[r],e),t[n])&&rp(ap(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function ep(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function np(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function rp(t,e){for(var n=0;n<e.length;++n)if(!np(t,e[n]))return!1;return!0}function ip(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return op(t[0],t[1]);case 3:return ap(t[0],t[1],t[2])}var e}function op(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,f=Math.sqrt(u*u+c*c);return{x:(n+o+u/f*l)/2,y:(r+a+c/f*l)/2,r:(f+i+s)/2}}function ap(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,f=n.r,h=r-a,p=r-c,d=i-s,v=i-l,m=u-o,y=f-o,g=r*r+i*i-o*o,b=g-a*a-s*s+u*u,_=g-c*c-l*l+f*f,w=p*d-h*v,E=(d*_-v*b)/(2*w)-r,T=(v*m-d*y)/w,C=(p*b-h*_)/(2*w)-i,x=(h*y-p*m)/w,S=T*T+x*x-1,k=2*(o+E*T+C*x),N=E*E+C*C-o*o,A=-(S?(k+Math.sqrt(k*k-4*S*N))/(2*S):N/k);return{x:r+E+T*A,y:i+C+x*A,r:A}}function sp(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,c=s*s+u*u;c?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function up(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function cp(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function lp(t){this._=t,this.next=null,this.previous=null}function fp(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,c,l,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;sp(n,e,r=t[2]),e=new lp(e),n=new lp(n),r=new lp(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){sp(e._,n._,r=t[s]),r=new lp(r),u=n.next,c=e.previous,l=n._.r,f=e._.r;do{if(l<=f){if(up(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}l+=u._.r,u=u.next}else{if(up(c._,r._)){(e=c).next=n,n.previous=e,--s;continue t}f+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=cp(e);(r=r.next)!==n;)(a=cp(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Zh(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var hp=function(t){return fp(t),t};function pp(t){if("function"!=typeof t)throw new Error;return t}function dp(){return 0}var vp=function(t){return function(){return t}};function mp(t){return Math.sqrt(t.value)}var yp=function(){var t=null,e=1,n=1,r=dp;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(gp(t)).eachAfter(bp(r,.5)).eachBefore(_p(1)):i.eachBefore(gp(mp)).eachAfter(bp(dp,1)).eachAfter(bp(r,i.r/Math.min(e,n))).eachBefore(_p(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(n=e)?null:pp(n),i):t;var n},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:vp(+t),i):r},i};function gp(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function bp(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=fp(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function _p(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var wp=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Ep=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c},Tp=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&Ep(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(e,o)),r&&i.eachBefore(wp),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},Cp="$",xp={depth:-1},Sp={};function kp(t){return t.id}function Np(t){return t.parentId}var Ap=function(){var t=kp,e=Np;function n(n){var r,i,o,a,s,u,c,l=n.length,f=new Array(l),h={};for(i=0;i<l;++i)r=n[i],s=f[i]=new $h(r),null!=(u=t(r,i,n))&&(u+="")&&(h[c=Cp+(s.id=u)]=c in h?Sp:s);for(i=0;i<l;++i)if(s=f[i],null!=(u=e(n[i],i,n))&&(u+="")){if(!(a=h[Cp+u]))throw new Error("missing: "+u);if(a===Sp)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=xp,o.eachBefore(function(t){t.depth=t.parent.depth+1,--l}).eachBefore(Xh),o.parent=null,l>0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=pp(e),n):t},n.parentId=function(t){return arguments.length?(e=pp(t),n):e},n};function Ip(t,e){return t.parent===e.parent?1:2}function Op(t){var e=t.children;return e?e[0]:t.t}function Pp(t){var e=t.children;return e?e[e.length-1]:t.t}function Rp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Dp(t,e,n){return t.a.parent===e.parent?t.a:n}function Mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Mp.prototype=Object.create($h.prototype);var Lp=function(){var t=Ip,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Mp(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Mp(r[i],i)),n.parent=e;return(a.parent=new Mp(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var c=i,l=i,f=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>l.x&&(l=t),t.depth>f.depth&&(f=t)});var h=c===l?1:t(c,l)/2,p=h-c.x,d=e/(l.x+h+p),v=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],c=o.m,l=a.m,f=s.m,h=u.m;s=Pp(s),o=Op(o),s&&o;)u=Op(u),(a=Pp(a)).a=e,(i=s.z+f-o.z-c+t(s._,o._))>0&&(Rp(Dp(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=o.m,h+=u.m,l+=a.m;s&&!Pp(a)&&(a.t=s,a.m+=f-l),o&&!Op(u)&&(u.t=o,u.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Fp=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c},Up=(1+Math.sqrt(5))/2;function jp(t,e,n,r,i,o){for(var a,s,u,c,l,f,h,p,d,v,m,y=[],g=e.children,b=0,_=0,w=g.length,E=e.value;b<w;){u=i-n,c=o-r;do{l=g[_++].value}while(!l&&_<w);for(f=h=l,m=l*l*(v=Math.max(c/u,u/c)/(E*t)),d=Math.max(h/m,m/f);_<w;++_){if(l+=s=g[_].value,s<f&&(f=s),s>h&&(h=s),m=l*l*v,(p=Math.max(h/m,m/f))>d){l-=s;break}d=p}y.push(a={value:l,dice:u<c,children:g.slice(b,_)}),a.dice?Ep(a,n,r,i,E?r+=c*l/E:o):Fp(a,n,r,E?n+=u*l/E:i,o),E-=l,b=_}return y}var Bp=function t(e){function n(t,n,r,i,o){jp(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),qp=function(){var t=Bp,e=!1,n=1,r=1,i=[0],o=dp,a=dp,s=dp,u=dp,c=dp;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wp),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,f-=s(e)-n,h-=u(e)-n,f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=pp(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:vp(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:vp(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:vp(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:vp(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:vp(+t),l):c},l},Vp=function(t,e,n,r,i){var o,a,s=t.children,u=s.length,c=new Array(u+1);for(c[0]=a=o=0;o<u;++o)c[o+1]=a+=s[o].value;!function t(e,n,r,i,o,a,u){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=o,l.x1=a,void(l.y1=u)}var f=c[e],h=r/2+f,p=e+1,d=n-1;for(;p<d;){var v=p+d>>>1;c[v]<h?p=v+1:d=v}h-c[p-1]<c[p]-h&&e+1<p&&--p;var m=c[p]-f,y=r-m;if(a-i>u-o){var g=(i*y+a*m)/r;t(e,p,m,i,o,g,u),t(p,n,y,g,o,a,u)}else{var b=(o*y+u*m)/r;t(e,p,m,i,o,a,b),t(p,n,y,i,b,a,u)}}(0,u,t.value,e,n,r,i)},Wp=function(t,e,n,r,i){(1&t.depth?Fp:Ep)(t,e,n,r,i)},Hp=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,u,c,l,f=-1,h=a.length,p=t.value;++f<h;){for(u=(s=a[f]).children,c=s.value=0,l=u.length;c<l;++c)s.value+=u[c].value;s.dice?Ep(s,n,r,i,r+=(o-r)*s.value/p):Fp(s,n,r,n+=(i-n)*s.value/p,o),p-=s.value}else t._squarify=a=jp(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),zp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2},Kp=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o/(u*=3),a/u]},Gp=function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])};function Qp(t,e){return t[0]-e[0]||t[1]-e[1]}function Yp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Gp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var Xp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Qp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Yp(r),a=Yp(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c},$p=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],s=e[1],u=o[0],c=o[1],l=!1,f=0;f<i;++f)n=(o=t[f])[0],(r=o[1])>s!=c>s&&a<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l},Jp=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],s=o[1],u=0;++r<i;)e=a,n=s,e-=a=(o=t[r])[0],n-=s=o[1],u+=Math.sqrt(e*e+n*n);return u},Zp=function(){return Math.random()},td=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Zp),ed=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Zp),nd=function t(e){function n(){var t=ed.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Zp),rd=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Zp),id=function t(e){function n(t){var n=rd.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Zp),od=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Zp),ad=Array.prototype,sd=ad.map,ud=ad.slice,cd={name:"implicit"};function ld(t){var e=Xo(),n=[],r=cd;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==cd)return r;e.set(o,a=n.push(i))}return t[(a-1)%t.length]}return t=null==t?[]:ud.call(t),i.domain=function(t){if(!arguments.length)return n.slice();n=[],e=Xo();for(var r,o,a=-1,s=t.length;++a<s;)e.has(o=(r=t[a])+"")||e.set(o,n.push(r));return i},i.range=function(e){return arguments.length?(t=ud.call(e),i):t.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ld().domain(n).range(t).unknown(r)},i}function fd(){var t,e,n=ld().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],f=o[l-0],h=o[1-l];t=(h-f)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),a&&(f=Math.round(f),e=Math.round(e));var p=E(n).map(function(e){return f+t*e});return i(l?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=u=Math.max(0,Math.min(1,t)),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),l()):s},n.paddingOuter=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return fd().domain(r()).range(o).round(a).paddingInner(s).paddingOuter(u).align(c)},l()}function hd(){return function t(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t(n())},e}(fd().paddingInner(1))}var pd=function(t){return function(){return t}},dd=function(t){return+t},vd=[0,1];function md(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:pd(e)}function yd(t,e,n,r){var i=t[0],o=t[1],a=e[0],s=e[1];return o<i?(i=n(o,i),a=r(s,a)):(i=n(i,o),a=r(a,s)),function(t){return a(i(t))}}function gd(t,e,n,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=n(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var n=u(t,e,1,i)-1;return a[n](o[n](e))}}function bd(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function _d(t,e){var n,r,i,o=vd,a=vd,s=$n,u=!1;function c(){return n=Math.min(o.length,a.length)>2?gd:yd,r=i=null,l}function l(e){return(r||(r=n(o,a,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}(t):t,s)))(+e)}return l.invert=function(t){return(i||(i=n(a,o,md,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}(e):e)))(+t)},l.domain=function(t){return arguments.length?(o=sd.call(t,dd),c()):o.slice()},l.range=function(t){return arguments.length?(a=ud.call(t),c()):a.slice()},l.rangeRound=function(t){return a=ud.call(t),s=Jn,c()},l.clamp=function(t){return arguments.length?(u=!!t,c()):u},l.interpolate=function(t){return arguments.length?(s=t,c()):s},c()}var wd=function(t,e,n){var r,i=t[0],o=t[t.length-1],a=N(i,o,null==e?10:e);switch((n=Rs(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(i),Math.abs(o));return null!=n.precision||isNaN(r=Gs(a,s))||(n.precision=r),Us(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(r=Qs(a,Math.max(Math.abs(i),Math.abs(o))))||(n.precision=r-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(r=Ks(a))||(n.precision=r-2*("%"===n.type))}return Fs(n)};function Ed(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return wd(e(),t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=k(s,u,n))>0?r=k(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=k(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function Td(){var t=_d(md,Vn);return t.copy=function(){return bd(t,Td())},Ed(t)}function Cd(){var t=[0,1];function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=sd.call(n,dd),e):t.slice()},e.copy=function(){return Cd().domain(t)},Ed(e)}var xd=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function Sd(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:pd(e)}function kd(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function Nd(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ad(t){return 10===t?Nd:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function Id(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function Od(t){return function(e){return-t(-e)}}function Pd(){var t=_d(Sd,kd).domain([1,10]),e=t.domain,n=10,r=Id(10),i=Ad(10);function o(){return r=Id(n),i=Ad(n),e()[0]<0&&(r=Od(r),i=Od(i)),t}return t.base=function(t){return arguments.length?(n=+t,o()):n},t.domain=function(t){return arguments.length?(e(t),o()):e()},t.ticks=function(t){var o,a=e(),s=a[0],u=a[a.length-1];(o=u<s)&&(h=s,s=u,u=h);var c,l,f,h=r(s),p=r(u),d=null==t?10:+t,v=[];if(!(n%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,s>0){for(;h<p;++h)for(l=1,c=i(h);l<n;++l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else for(;h<p;++h)for(l=n-1,c=i(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else v=S(h,p,Math.min(p-h,d)).map(i);return o?v.reverse():v},t.tickFormat=function(e,o){if(null==o&&(o=10===n?".0e":","),"function"!=typeof o&&(o=Fs(o)),e===1/0)return o;null==e&&(e=10);var a=Math.max(1,n*e/t.ticks().length);return function(t){var e=t/i(Math.round(r(t)));return e*n<n-.5&&(e*=n),e<=a?o(t):""}},t.nice=function(){return e(xd(e(),{floor:function(t){return i(Math.floor(r(t)))},ceil:function(t){return i(Math.ceil(r(t)))}}))},t.copy=function(){return bd(t,Pd().base(n))},t}function Rd(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function Dd(){var t=1,e=_d(function(e,n){return(n=Rd(n,t)-(e=Rd(e,t)))?function(r){return(Rd(r,t)-e)/n}:pd(n)},function(e,n){return n=Rd(n,t)-(e=Rd(e,t)),function(r){return Rd(e+n*r,1/t)}}),n=e.domain;return e.exponent=function(e){return arguments.length?(t=+e,n(n())):t},e.copy=function(){return bd(e,Dd().exponent(t))},Ed(e)}function Md(){return Dd().exponent(.5)}function Ld(){var t=[],e=[],n=[];function i(){var r=0,i=Math.max(1,e.length);for(n=new Array(i-1);++r<i;)n[r-1]=O(t,r/i);return o}function o(t){if(!isNaN(t=+t))return e[u(n,t)]}return o.invertExtent=function(r){var i=e.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:t[0],i<n.length?n[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var n,o=0,a=e.length;o<a;++o)null==(n=e[o])||isNaN(n=+n)||t.push(n);return t.sort(r),i()},o.range=function(t){return arguments.length?(e=ud.call(t),i()):e.slice()},o.quantiles=function(){return n.slice()},o.copy=function(){return Ld().domain(t).range(e)},o}function Fd(){var t=0,e=1,n=1,r=[.5],i=[0,1];function o(t){if(t<=t)return i[u(r,t,0,n)]}function a(){var i=-1;for(r=new Array(n);++i<n;)r[i]=((i+1)*e-(i-n)*t)/(n+1);return o}return o.domain=function(n){return arguments.length?(t=+n[0],e=+n[1],a()):[t,e]},o.range=function(t){return arguments.length?(n=(i=ud.call(t)).length-1,a()):i.slice()},o.invertExtent=function(o){var a=i.indexOf(o);return a<0?[NaN,NaN]:a<1?[t,r[0]]:a>=n?[r[n-1],e]:[r[a-1],r[a]]},o.copy=function(){return Fd().domain([t,e]).range(i)},Ed(o)}function Ud(){var t=[.5],e=[0,1],n=1;function r(r){if(r<=r)return e[u(t,r,0,n)]}return r.domain=function(i){return arguments.length?(t=ud.call(i),n=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(i){return arguments.length?(e=ud.call(i),n=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(n){var r=e.indexOf(n);return[t[r-1],t[r]]},r.copy=function(){return Ud().domain(t).range(e)},r}var jd=new Date,Bd=new Date;function qd(t,e,n,r){function i(e){return t(e=new Date(+e)),e}return i.floor=i,i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return qd(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return jd.setTime(+e),Bd.setTime(+r),t(jd),t(Bd),Math.floor(n(jd,Bd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Vd=qd(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Vd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qd(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):Vd:null};var Wd=Vd,Hd=Vd.range,zd=6e4,Kd=6048e5,Gd=qd(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),Qd=Gd,Yd=Gd.range,Xd=qd(function(t){t.setTime(Math.floor(t/zd)*zd)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getMinutes()}),$d=Xd,Jd=Xd.range,Zd=qd(function(t){var e=t.getTimezoneOffset()*zd%36e5;e<0&&(e+=36e5),t.setTime(36e5*Math.floor((+t-e)/36e5)+e)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),tv=Zd,ev=Zd.range,nv=qd(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/864e5},function(t){return t.getDate()-1}),rv=nv,iv=nv.range;function ov(t){return qd(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/Kd})}var av=ov(0),sv=ov(1),uv=ov(2),cv=ov(3),lv=ov(4),fv=ov(5),hv=ov(6),pv=av.range,dv=sv.range,vv=uv.range,mv=cv.range,yv=lv.range,gv=fv.range,bv=hv.range,_v=qd(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),wv=_v,Ev=_v.range,Tv=qd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Tv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var Cv=Tv,xv=Tv.range,Sv=qd(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getUTCMinutes()}),kv=Sv,Nv=Sv.range,Av=qd(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()}),Iv=Av,Ov=Av.range,Pv=qd(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),Rv=Pv,Dv=Pv.range;function Mv(t){return qd(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/Kd})}var Lv=Mv(0),Fv=Mv(1),Uv=Mv(2),jv=Mv(3),Bv=Mv(4),qv=Mv(5),Vv=Mv(6),Wv=Lv.range,Hv=Fv.range,zv=Uv.range,Kv=jv.range,Gv=Bv.range,Qv=qv.range,Yv=Vv.range,Xv=qd(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),$v=Xv,Jv=Xv.range,Zv=qd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Zv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var tm=Zv,em=Zv.range;function nm(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function im(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function om(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=ym(i),l=gm(i),f=ym(o),h=gm(o),p=ym(a),d=gm(a),v=ym(s),m=gm(s),y=ym(u),g=gm(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Um,e:Um,f:Wm,H:jm,I:Bm,j:qm,L:Vm,m:Hm,M:zm,p:function(t){return i[+(t.getHours()>=12)]},Q:by,s:_y,S:Km,u:Gm,U:Qm,V:Ym,w:Xm,W:$m,x:null,X:null,y:Jm,Y:Zm,Z:ty,"%":gy},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ey,e:ey,f:ay,H:ny,I:ry,j:iy,L:oy,m:sy,M:uy,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:by,s:_y,S:cy,u:ly,U:fy,V:hy,w:py,W:dy,x:null,X:null,y:vy,Y:my,Z:yy,"%":gy},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Nm,e:Nm,f:Dm,H:Im,I:Im,j:Am,L:Rm,m:km,M:Om,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},Q:Lm,s:Fm,S:Pm,u:_m,U:wm,V:Em,w:bm,W:Tm,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:xm,Y:Cm,Z:Sm,"%":Mm};function E(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=fm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=im(1900);if(C(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=rm(im(o.y))).getUTCDay())>4||0===i?Fv.ceil(r):Fv(r),r=Rv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=e(im(o.y))).getDay())>4||0===i?sv.ceil(r):sv(r),r=rv.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?rm(im(o.y)).getUTCDay():e(im(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,rm(o)):e(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in fm?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),_.x=E(n,_),_.X=E(r,_),_.c=E(e,_),{format:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",nm);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t,rm);return e.toString=function(){return t},e}}}var am,sm,um,cm,lm,fm={"-":"",_:" ",0:"0"},hm=/^\s*\d+/,pm=/^%/,dm=/[\\^$*+?|[\]().{}]/g;function vm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function mm(t){return t.replace(dm,"\\$&")}function ym(t){return new RegExp("^(?:"+t.map(mm).join("|")+")","i")}function gm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function bm(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function _m(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Em(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Tm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Cm(t,e,n){var r=hm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function km(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Nm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Im(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Om(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Rm(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=hm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mm(t,e,n){var r=pm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Um(t,e){return vm(t.getDate(),e,2)}function jm(t,e){return vm(t.getHours(),e,2)}function Bm(t,e){return vm(t.getHours()%12||12,e,2)}function qm(t,e){return vm(1+rv.count(Cv(t),t),e,3)}function Vm(t,e){return vm(t.getMilliseconds(),e,3)}function Wm(t,e){return Vm(t,e)+"000"}function Hm(t,e){return vm(t.getMonth()+1,e,2)}function zm(t,e){return vm(t.getMinutes(),e,2)}function Km(t,e){return vm(t.getSeconds(),e,2)}function Gm(t){var e=t.getDay();return 0===e?7:e}function Qm(t,e){return vm(av.count(Cv(t),t),e,2)}function Ym(t,e){var n=t.getDay();return t=n>=4||0===n?lv(t):lv.ceil(t),vm(lv.count(Cv(t),t)+(4===Cv(t).getDay()),e,2)}function Xm(t){return t.getDay()}function $m(t,e){return vm(sv.count(Cv(t),t),e,2)}function Jm(t,e){return vm(t.getFullYear()%100,e,2)}function Zm(t,e){return vm(t.getFullYear()%1e4,e,4)}function ty(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+vm(e/60|0,"0",2)+vm(e%60,"0",2)}function ey(t,e){return vm(t.getUTCDate(),e,2)}function ny(t,e){return vm(t.getUTCHours(),e,2)}function ry(t,e){return vm(t.getUTCHours()%12||12,e,2)}function iy(t,e){return vm(1+Rv.count(tm(t),t),e,3)}function oy(t,e){return vm(t.getUTCMilliseconds(),e,3)}function ay(t,e){return oy(t,e)+"000"}function sy(t,e){return vm(t.getUTCMonth()+1,e,2)}function uy(t,e){return vm(t.getUTCMinutes(),e,2)}function cy(t,e){return vm(t.getUTCSeconds(),e,2)}function ly(t){var e=t.getUTCDay();return 0===e?7:e}function fy(t,e){return vm(Lv.count(tm(t),t),e,2)}function hy(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Bv(t):Bv.ceil(t),vm(Bv.count(tm(t),t)+(4===tm(t).getUTCDay()),e,2)}function py(t){return t.getUTCDay()}function dy(t,e){return vm(Fv.count(tm(t),t),e,2)}function vy(t,e){return vm(t.getUTCFullYear()%100,e,2)}function my(t,e){return vm(t.getUTCFullYear()%1e4,e,4)}function yy(){return"+0000"}function gy(){return"%"}function by(t){return+t}function _y(t){return Math.floor(+t/1e3)}function wy(t){return am=om(t),sm=am.format,um=am.parse,cm=am.utcFormat,lm=am.utcParse,am}wy({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ey=Date.prototype.toISOString?function(t){return t.toISOString()}:cm("%Y-%m-%dT%H:%M:%S.%LZ");var Ty=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:lm("%Y-%m-%dT%H:%M:%S.%LZ"),Cy=1e3,xy=60*Cy,Sy=60*xy,ky=24*Sy,Ny=7*ky,Ay=30*ky,Iy=365*ky;function Oy(t){return new Date(t)}function Py(t){return t instanceof Date?+t:+new Date(+t)}function Ry(t,e,n,r,o,a,s,u,c){var l=_d(md,Vn),f=l.invert,h=l.domain,p=c(".%L"),d=c(":%S"),v=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),g=c("%b %d"),b=c("%B"),_=c("%Y"),w=[[s,1,Cy],[s,5,5*Cy],[s,15,15*Cy],[s,30,30*Cy],[a,1,xy],[a,5,5*xy],[a,15,15*xy],[a,30,30*xy],[o,1,Sy],[o,3,3*Sy],[o,6,6*Sy],[o,12,12*Sy],[r,1,ky],[r,2,2*ky],[n,1,Ny],[e,1,Ay],[e,3,3*Ay],[t,1,Iy]];function E(i){return(s(i)<i?p:a(i)<i?d:o(i)<i?v:r(i)<i?m:e(i)<i?n(i)<i?y:g:t(i)<i?b:_)(i)}function T(e,n,r,o){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,s=i(function(t){return t[2]}).right(w,a);s===w.length?(o=N(n/Iy,r/Iy,e),e=t):s?(o=(s=w[a/w[s-1][2]<w[s][2]/a?s-1:s])[1],e=s[0]):(o=Math.max(N(n,r,e),1),e=u)}return null==o?e:e.every(o)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(sd.call(t,Py)):h().map(Oy)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=T(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?E:c(e)},l.nice=function(t,e){var n=h();return(t=T(t,n[0],n[n.length-1],e))?h(xd(n,t)):l},l.copy=function(){return bd(l,Ry(t,e,n,r,o,a,s,u,c))},l}var Dy=function(){return Ry(Cv,wv,av,rv,tv,$d,Qd,Wd,sm).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},My=function(){return Ry(tm,$v,Lv,Rv,Iv,kv,Qd,Wd,cm).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])};function Ly(t){var e=0,n=1,r=1,i=!1;function o(n){var o=(n-e)*r;return t(i?Math.max(0,Math.min(1,o)):o)}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=e===n?0:1/(n-e),o):[e,n]},o.clamp=function(t){return arguments.length?(i=!!t,o):i},o.interpolator=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return Ly(t).domain([e,n]).clamp(i)},Ed(o)}function Fy(t){var e=0,n=.5,r=1,i=1,o=1,a=!1;function s(e){var r=.5+((e=+e)-n)*(e<n?i:o);return t(a?Math.max(0,Math.min(1,r)):r)}return s.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=+t[2],i=e===n?0:.5/(n-e),o=n===r?0:.5/(r-n),s):[e,n,r]},s.clamp=function(t){return arguments.length?(a=!!t,s):a},s.interpolator=function(e){return arguments.length?(t=e,s):t},s.copy=function(){return Fy(t).domain([e,n,r]).clamp(a)},Ed(s)}var Uy=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},jy=Uy("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),By=Uy("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),qy=Uy("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Vy=Uy("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Wy=Uy("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Hy=Uy("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),zy=Uy("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ky=Uy("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Gy=Uy("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Qy=function(t){return Un(t[t.length-1])},Yy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Uy),Xy=Qy(Yy),$y=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Uy),Jy=Qy($y),Zy=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Uy),tg=Qy(Zy),eg=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Uy),ng=Qy(eg),rg=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Uy),ig=Qy(rg),og=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Uy),ag=Qy(og),sg=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Uy),ug=Qy(sg),cg=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Uy),lg=Qy(cg),fg=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Uy),hg=Qy(fg),pg=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Uy),dg=Qy(pg),vg=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Uy),mg=Qy(vg),yg=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Uy),gg=Qy(yg),bg=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Uy),_g=Qy(bg),wg=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Uy),Eg=Qy(wg),Tg=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Uy),Cg=Qy(Tg),xg=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Uy),Sg=Qy(xg),kg=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Uy),Ng=Qy(kg),Ag=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Uy),Ig=Qy(Ag),Og=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Uy),Pg=Qy(Og),Rg=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Uy),Dg=Qy(Rg),Mg=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Uy),Lg=Qy(Mg),Fg=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Uy),Ug=Qy(Fg),jg=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Uy),Bg=Qy(jg),qg=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Uy),Vg=Qy(qg),Wg=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Uy),Hg=Qy(Wg),zg=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Uy),Kg=Qy(zg),Gg=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Uy),Qg=Qy(Gg),Yg=yr(Sn(300,.5,0),Sn(-240,.5,1)),Xg=yr(Sn(-100,.75,.35),Sn(80,1.5,.8)),$g=yr(Sn(260,.75,.35),Sn(80,1.5,.8)),Jg=Sn(),Zg=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Jg.h=360*t-100,Jg.s=1.5-1.5*e,Jg.l=.8-.9*e,Jg+""},tb=ze(),eb=Math.PI/3,nb=2*Math.PI/3,rb=function(t){var e;return t=(.5-t)*Math.PI,tb.r=255*(e=Math.sin(t))*e,tb.g=255*(e=Math.sin(t+eb))*e,tb.b=255*(e=Math.sin(t+nb))*e,tb+""};function ib(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var ob=ib(Uy("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ab=ib(Uy("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sb=ib(Uy("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ub=ib(Uy("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),cb=function(t){return function(){return t}},lb=Math.abs,fb=Math.atan2,hb=Math.cos,pb=Math.max,db=Math.min,vb=Math.sin,mb=Math.sqrt,yb=1e-12,gb=Math.PI,bb=gb/2,_b=2*gb;function wb(t){return t>=1?bb:t<=-1?-bb:Math.asin(t)}function Eb(t){return t.innerRadius}function Tb(t){return t.outerRadius}function Cb(t){return t.startAngle}function xb(t){return t.endAngle}function Sb(t){return t&&t.padAngle}function kb(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/mb(s*s+u*u),l=c*u,f=-c*s,h=t+l,p=e+f,d=n+l,v=r+f,m=(h+d)/2,y=(p+v)/2,g=d-h,b=v-p,_=g*g+b*b,w=i-o,E=h*v-d*p,T=(b<0?-1:1)*mb(pb(0,w*w*_-E*E)),C=(E*b-g*T)/_,x=(-E*g-b*T)/_,S=(E*b+g*T)/_,k=(-E*g+b*T)/_,N=C-m,A=x-y,I=S-m,O=k-y;return N*N+A*A>I*I+O*O&&(C=S,x=k),{cx:C,cy:x,x01:-l,y01:-f,x11:C*(i/w-1),y11:x*(i/w-1)}}var Nb=function(){var t=Eb,e=Tb,n=cb(0),r=null,i=Cb,o=xb,a=Sb,s=null;function u(){var u,c,l,f=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-bb,d=o.apply(this,arguments)-bb,v=lb(d-p),m=d>p;if(s||(s=u=qo()),h<f&&(c=h,h=f,f=c),h>yb)if(v>_b-yb)s.moveTo(h*hb(p),h*vb(p)),s.arc(0,0,h,p,d,!m),f>yb&&(s.moveTo(f*hb(d),f*vb(d)),s.arc(0,0,f,d,p,m));else{var y,g,b=p,_=d,w=p,E=d,T=v,C=v,x=a.apply(this,arguments)/2,S=x>yb&&(r?+r.apply(this,arguments):mb(f*f+h*h)),k=db(lb(h-f)/2,+n.apply(this,arguments)),N=k,A=k;if(S>yb){var I=wb(S/f*vb(x)),O=wb(S/h*vb(x));(T-=2*I)>yb?(w+=I*=m?1:-1,E-=I):(T=0,w=E=(p+d)/2),(C-=2*O)>yb?(b+=O*=m?1:-1,_-=O):(C=0,b=_=(p+d)/2)}var P=h*hb(b),R=h*vb(b),D=f*hb(E),M=f*vb(E);if(k>yb){var L=h*hb(_),F=h*vb(_),U=f*hb(w),j=f*vb(w);if(v<gb){var B=T>yb?function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,f=s-o,h=(l*(e-o)-f*(t-i))/(f*u-l*c);return[t+h*u,e+h*c]}(P,R,U,j,L,F,D,M):[D,M],q=P-B[0],V=R-B[1],W=L-B[0],H=F-B[1],z=1/vb(((l=(q*W+V*H)/(mb(q*q+V*V)*mb(W*W+H*H)))>1?0:l<-1?gb:Math.acos(l))/2),K=mb(B[0]*B[0]+B[1]*B[1]);N=db(k,(f-K)/(z-1)),A=db(k,(h-K)/(z+1))}}C>yb?A>yb?(y=kb(U,j,P,R,h,A,m),g=kb(L,F,D,M,h,A,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<k?s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,h,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),!m),s.arc(g.cx,g.cy,A,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):(s.moveTo(P,R),s.arc(0,0,h,b,_,!m)):s.moveTo(P,R),f>yb&&T>yb?N>yb?(y=kb(D,M,L,F,f,-N,m),g=kb(P,R,U,j,f,-N,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),N<k?s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,f,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),m),s.arc(g.cx,g.cy,N,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):s.arc(0,0,f,E,w,m):s.lineTo(D,M)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-gb/2;return[hb(r)*n,vb(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:cb(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u};function Ab(t){this._context=t}Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ib=function(t){return new Ab(t)};function Ob(t){return t[0]}function Pb(t){return t[1]}var Rb=function(){var t=Ob,e=Pb,n=cb(!0),r=null,i=Ib,o=null;function a(a){var s,u,c,l=a.length,f=!1;for(null==r&&(o=i(c=qo())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:cb(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a},Db=function(){var t=Ob,e=null,n=cb(0),r=Pb,i=cb(!0),o=null,a=Ib,s=null;function u(u){var c,l,f,h,p,d=u.length,v=!1,m=new Array(d),y=new Array(d);for(null==o&&(s=a(p=qo())),c=0;c<=d;++c){if(!(c<d&&i(h=u[c],c,u))===v)if(v=!v)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=c-1;f>=l;--f)s.point(m[f],y[f]);s.lineEnd(),s.areaEnd()}v&&(m[c]=+t(h,c,u),y[c]=+n(h,c,u),s.point(e?+e(h,c,u):m[c],r?+r(h,c,u):y[c]))}if(p)return s=null,p+""||null}function c(){return Rb().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:cb(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:cb(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:cb(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u},Mb=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Lb=function(t){return t},Fb=function(){var t=Lb,e=Mb,n=null,r=cb(0),i=cb(_b),o=cb(0);function a(a){var s,u,c,l,f,h=a.length,p=0,d=new Array(h),v=new Array(h),m=+r.apply(this,arguments),y=Math.min(_b,Math.max(-_b,i.apply(this,arguments)-m)),g=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=g*(y<0?-1:1);for(s=0;s<h;++s)(f=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=n&&d.sort(function(t,e){return n(a[t],a[e])}),s=0,c=p?(y-h*b)/p:0;s<h;++s,m=l)u=d[s],l=m+((f=v[u])>0?f*c:0)+b,v[u]={data:a[u],index:s,value:f,startAngle:m,endAngle:l,padAngle:g};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),a):o},a},Ub=Bb(Ib);function jb(t){this._curve=t}function Bb(t){function e(e){return new jb(t(e))}return e._curve=t,e}function qb(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t}jb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vb=function(){return qb(Rb().curve(Ub))},Wb=function(){var t=Db().curve(Ub),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return qb(n())},delete t.lineX0,t.lineEndAngle=function(){return qb(r())},delete t.lineX1,t.lineInnerRadius=function(){return qb(i())},delete t.lineY0,t.lineOuterRadius=function(){return qb(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t},Hb=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},zb=Array.prototype.slice;function Kb(t){return t.source}function Gb(t){return t.target}function Qb(t){var e=Kb,n=Gb,r=Ob,i=Pb,o=null;function a(){var a,s=zb.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(o||(o=a=qo()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function Yb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Xb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function $b(t,e,n,r,i){var o=Hb(e,n),a=Hb(e,n=(n+i)/2),s=Hb(r,n),u=Hb(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],u[0],u[1])}function Jb(){return Qb(Yb)}function Zb(){return Qb(Xb)}function t_(){var t=Qb($b);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var e_={draw:function(t,e){var n=Math.sqrt(e/gb);t.moveTo(n,0),t.arc(0,0,n,0,_b)}},n_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},r_=Math.sqrt(1/3),i_=2*r_,o_={draw:function(t,e){var n=Math.sqrt(e/i_),r=n*r_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},a_=Math.sin(gb/10)/Math.sin(7*gb/10),s_=Math.sin(_b/10)*a_,u_=-Math.cos(_b/10)*a_,c_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=s_*n,i=u_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=_b*o/5,s=Math.cos(a),u=Math.sin(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},l_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},f_=Math.sqrt(3),h_={draw:function(t,e){var n=-Math.sqrt(e/(3*f_));t.moveTo(0,2*n),t.lineTo(-f_*n,-n),t.lineTo(f_*n,-n),t.closePath()}},p_=Math.sqrt(3)/2,d_=1/Math.sqrt(12),v_=3*(d_/2+1),m_={draw:function(t,e){var n=Math.sqrt(e/v_),r=n/2,i=n*d_,o=r,a=n*d_+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(-.5*r-p_*i,p_*r+-.5*i),t.lineTo(-.5*o-p_*a,p_*o+-.5*a),t.lineTo(-.5*s-p_*u,p_*s+-.5*u),t.lineTo(-.5*r+p_*i,-.5*i-p_*r),t.lineTo(-.5*o+p_*a,-.5*a-p_*o),t.lineTo(-.5*s+p_*u,-.5*u-p_*s),t.closePath()}},y_=[e_,n_,o_,l_,c_,h_,m_],g_=function(){var t=cb(e_),e=cb(64),n=null;function r(){var r;if(n||(n=r=qo()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:cb(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},b_=function(){};function __(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function w_(t){this._context=t}w_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:__(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var E_=function(t){return new w_(t)};function T_(t){this._context=t}T_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function x_(t){this._context=t}x_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var S_=function(t){return new x_(t)};function k_(t,e){this._basis=new w_(t),this._beta=e}k_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new w_(t):new k_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function A_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function I_(t,e){this._context=t,this._k=(1-e)/6}I_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var O_=function t(e){function n(t){return new I_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var R_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function D_(t,e){this._context=t,this._k=(1-e)/6}D_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var M_=function t(e){function n(t){return new D_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function L_(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>yb){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>yb){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function F_(t,e){this._context=t,this._alpha=e}F_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new F_(t,e):new I_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function j_(t,e){this._context=t,this._alpha=e}j_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var B_=function t(e){function n(t){return e?new j_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function q_(t,e){this._context=t,this._alpha=e}q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new q_(t,e):new D_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t){this._context=t}W_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var H_=function(t){return new W_(t)};function z_(t){return t<0?-1:1}function K_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z_(o)+z_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function G_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Y_(t){this._context=t}function X_(t){this._context=new $_(t)}function $_(t){this._context=t}function J_(t){return new Y_(t)}function Z_(t){return new X_(t)}function tw(t){this._context=t}function ew(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}Y_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Q_(this,this._t0,G_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Q_(this,G_(this,n=K_(this,t,e)),n);break;default:Q_(this,this._t0,n=K_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(X_.prototype=Object.create(Y_.prototype)).point=function(t,e){Y_.prototype.point.call(this,e,t)},$_.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},tw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ew(t),i=ew(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var nw=function(t){return new tw(t)};function rw(t,e){this._context=t,this._t=e}rw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var iw=function(t){return new rw(t,.5)};function ow(t){return new rw(t,0)}function aw(t){return new rw(t,1)}var sw=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},uw=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function cw(t,e){return t[e]}var lw=function(){var t=cb([]),e=uw,n=sw,r=cw;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var f,h=s[o],p=l[o]=new Array(u),d=0;d<u;++d)p[d]=f=[0,+r(i[d],h,d,i)],f.data=i[d];p.key=h}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:cb(zb.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?uw:"function"==typeof t?t:cb(zb.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?sw:t,i):n},i},fw=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=t[n][o][1]||0;if(i)for(n=0;n<r;++n)t[n][o][1]/=i}sw(t,e)}},hw=function(t,e){if((s=t.length)>1)for(var n,r,i,o,a,s,u=0,c=t[e[0]].length;u<c;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},pw=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=t[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}sw(t,e)}},dw=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,c=0;s<i;++s){for(var l=t[e[s]],f=l[a][1]||0,h=(f-(l[a-1][1]||0))/2,p=0;p<s;++p){var d=t[e[p]];h+=(d[a][1]||0)-(d[a-1][1]||0)}u+=f,c+=h*f}n[a-1][1]+=n[a-1][0]=o,u&&(o-=c/u)}n[a-1][1]+=n[a-1][0]=o,sw(t,e)}},vw=function(t){var e=t.map(mw);return uw(t).sort(function(t,n){return e[t]-e[n]})};function mw(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var yw=function(t){return vw(t).reverse()},gw=function(t){var e,n,r=t.length,i=t.map(mw),o=uw(t).sort(function(t,e){return i[e]-i[t]}),a=0,s=0,u=[],c=[];for(e=0;e<r;++e)n=o[e],a<s?(a+=i[n],u.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(u)},bw=function(t){return uw(t).reverse()},_w=function(t){return function(){return t}};function ww(t){return t[0]}function Ew(t){return t[1]}function Tw(){this._=null}function Cw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function xw(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Sw(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function kw(t){for(;t.L;)t=t.L;return t}Tw.prototype={constructor:Tw,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=kw(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(xw(this,n),n=(t=n).U),n.C=!1,r.C=!0,Sw(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Sw(this,n),n=(t=n).U),n.C=!1,r.C=!0,xw(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?kw(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,xw(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Sw(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,xw(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Sw(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,xw(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Sw(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Nw=Tw;function Aw(t,e,n,r){var i=[null,null],o=$w.push(i)-1;return i.left=t,i.right=e,n&&Ow(i,t,e,n),r&&Ow(i,e,t,r),Yw[t.index].halfedges.push(o),Yw[e.index].halfedges.push(o),i}function Iw(t,e,n){var r=[e,n];return r.left=t,r}function Ow(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Pw(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],l=0,f=1,h=s[0]-u,p=s[1]-c;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>l&&(l=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<f&&(f=o)}if(o=n-c,p||!(o>0)){if(o/=p,p<0){if(o<l)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>l&&(l=o)}if(o=i-c,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>l&&(l=o)}else if(p>0){if(o<l)return;o<f&&(f=o)}return!(l>0||f<1)||(l>0&&(t[0]=[u+l*h,c+l*p]),f<1&&(t[1]=[u+f*h,c+f*p]),!0)}}}}}function Rw(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,l=t.right,f=c[0],h=c[1],p=l[0],d=l[1],v=(f+p)/2,m=(h+d)/2;if(d===h){if(v<e||v>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[v,n];o=[v,i]}else{if(u){if(u[1]<n)return}else u=[v,i];o=[v,n]}}else if(s=m-(a=(f-p)/(d-h))*v,a<-1||a>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function Dw(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Mw(t,e){return e[+(e.left!==t.site)]}function Lw(t,e){return e[+(e.left===t.site)]}var Fw,Uw=[];function jw(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,c=r[1]-s,l=o[0]-a,f=o[1]-s,h=2*(u*f-c*l);if(!(h>=-Zw)){var p=u*u+c*c,d=l*l+f*f,v=(f*p-c*d)/h,m=(u*d-l*p)/h,y=Uw.pop()||new function(){Cw(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=m+s)+Math.sqrt(v*v+m*m),t.circle=y;for(var g=null,b=Xw._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){g=b.P;break}b=b.L}else{if(!b.R){g=b;break}b=b.R}Xw.insert(g,y),g||(Fw=y)}}}}function Bw(t){var e=t.circle;e&&(e.P||(Fw=e.N),Xw.remove(e),Uw.push(e),Cw(e),t.circle=null)}var qw=[];function Vw(t){var e=qw.pop()||new function(){Cw(this),this.edge=this.site=this.circle=null};return e.site=t,e}function Ww(t){Bw(t),Qw.remove(t),qw.push(t),Cw(t)}function Hw(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];Ww(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Jw&&Math.abs(r-u.circle.cy)<Jw;)o=u.P,s.unshift(u),Ww(u),u=o;s.unshift(u),Bw(u);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Jw&&Math.abs(r-c.circle.cy)<Jw;)a=c.N,s.push(c),Ww(c),c=a;s.push(c),Bw(c);var l,f=s.length;for(l=1;l<f;++l)c=s[l],u=s[l-1],Ow(c.edge,u.site,c.site,i);u=s[0],(c=s[f-1]).edge=Aw(u.site,c.site,null,i),jw(u),jw(c)}function zw(t){for(var e,n,r,i,o=t[0],a=t[1],s=Qw._;s;)if((r=Kw(s,a)-o)>Jw)s=s.L;else{if(!((i=o-Gw(s,a))>Jw)){r>-Jw?(e=s.P,n=s):i>-Jw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){Yw[t.index]={site:t,halfedges:[]}}(t);var u=Vw(t);if(Qw.insert(e,u),e||n){if(e===n)return Bw(e),n=Vw(e.site),Qw.insert(u,n),u.edge=n.edge=Aw(e.site,u.site),jw(e),void jw(n);if(n){Bw(e),Bw(n);var c=e.site,l=c[0],f=c[1],h=t[0]-l,p=t[1]-f,d=n.site,v=d[0]-l,m=d[1]-f,y=2*(h*m-p*v),g=h*h+p*p,b=v*v+m*m,_=[(m*g-p*b)/y+l,(h*b-v*g)/y+f];Ow(n.edge,c,d,_),u.edge=Aw(c,t,null,_),n.edge=Aw(t,d,null,_),jw(e),jw(n)}else u.edge=Aw(e.site,u.site)}}function Kw(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,f=1/o-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-o/2)))/f+r:(r+s)/2}function Gw(t,e){var n=t.N;if(n)return Kw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Qw,Yw,Xw,$w,Jw=1e-6,Zw=1e-12;function tE(t,e){return e[1]-t[1]||e[0]-t[0]}function eE(t,e){var n,r,i,o=t.sort(tE).pop();for($w=[],Yw=new Array(t.length),Qw=new Nw,Xw=new Nw;;)if(i=Fw,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(zw(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;Hw(i.arc)}if(function(){for(var t,e,n,r,i=0,o=Yw.length;i<o;++i)if((t=Yw[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=Dw(t,$w[e[n]]);for(a.sort(function(t,e){return s[e]-s[t]}),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var a=+e[0][0],s=+e[0][1],u=+e[1][0],c=+e[1][1];!function(t,e,n,r){for(var i,o=$w.length;o--;)Rw(i=$w[o],t,e,n,r)&&Pw(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Jw||Math.abs(i[0][1]-i[1][1])>Jw)||delete $w[o]}(a,s,u,c),function(t,e,n,r){var i,o,a,s,u,c,l,f,h,p,d,v,m=Yw.length,y=!0;for(i=0;i<m;++i)if(o=Yw[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)$w[u[s]]||u.splice(s,1);for(s=0,c=u.length;s<c;)d=(p=Lw(o,$w[u[s]]))[0],v=p[1],f=(l=Mw(o,$w[u[++s%c]]))[0],h=l[1],(Math.abs(d-f)>Jw||Math.abs(v-h)>Jw)&&(u.splice(s,0,$w.push(Iw(a,p,Math.abs(d-t)<Jw&&r-v>Jw?[t,Math.abs(f-t)<Jw?h:r]:Math.abs(v-r)<Jw&&n-d>Jw?[Math.abs(h-r)<Jw?f:n,r]:Math.abs(d-n)<Jw&&v-e>Jw?[n,Math.abs(f-n)<Jw?h:e]:Math.abs(v-e)<Jw&&d-t>Jw?[Math.abs(h-e)<Jw?f:t,e]:null))-1),++c);c&&(y=!1)}if(y){var g,b,_,w=1/0;for(i=0,y=null;i<m;++i)(o=Yw[i])&&(_=(g=(a=o.site)[0]-t)*g+(b=a[1]-e)*b)<w&&(w=_,y=o);if(y){var E=[t,e],T=[t,r],C=[n,r],x=[n,e];y.halfedges.push($w.push(Iw(a=y.site,E,T))-1,$w.push(Iw(a,T,C))-1,$w.push(Iw(a,C,x))-1,$w.push(Iw(a,x,E))-1)}}for(i=0;i<m;++i)(o=Yw[i])&&(o.halfedges.length||delete Yw[i])}(a,s,u,c)}this.edges=$w,this.cells=Yw,Qw=Xw=$w=Yw=null}eE.prototype={constructor:eE,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return Mw(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,u,c,l=n.site,f=-1,h=e[i[o-1]],p=h.left===l?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===l?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(u=a,c=p,((s=l)[0]-c[0])*(u[1]-s[1])-(s[0]-u[0])*(c[1]-s[1])<0)&&t.push([l.data,a.data,p.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],f=u*u+c*c;f<l&&(l=f,a=s.index)}})}while(null!==a);return o._found=r,null==n||l<=n*n?i.site:null}};var nE=function(){var t=ww,e=Ew,n=null;function r(r){return new eE(r.map(function(n,i){var o=[Math.round(t(n,i,r)/Jw)*Jw,Math.round(e(n,i,r)/Jw)*Jw];return o.index=i,o.data=n,o}),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:_w(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:_w(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},rE=function(t){return function(){return t}};function iE(t,e,n){this.k=t,this.x=e,this.y=n}iE.prototype={constructor:iE,scale:function(t){return 1===t?this:new iE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new iE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var oE=new iE(1,0,0);function aE(t){return t.__zoom||oE}function sE(){Gt.stopImmediatePropagation()}aE.prototype=iE.prototype;var uE=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()};function cE(){return!Gt.button}function lE(){var t,e,n=this;return n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function fE(){return this.__zoom||oE}function hE(){return-Gt.deltaY*(Gt.deltaMode?120:1)/500}function pE(){return"ontouchstart"in this}function dE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var vE=function(){var t,e,n=cE,r=lE,i=dE,o=hE,a=pE,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=sr,f=[],h=ht("start","zoom","end"),p=500,d=150,v=0;function m(t){t.property("__zoom",fE).on("wheel.zoom",T).on("mousedown.zoom",C).on("dblclick.zoom",x).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new iE(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new iE(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n){t.on("start.zoom",function(){w(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).end()}).tween("zoom",function(){var t=arguments,i=w(this,t),o=r.apply(this,t),a=n||b(o),s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=l(u.invert(a).concat(s/u.k),c.invert(a).concat(s/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=s/e[2];t=new iE(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function w(t,e){for(var n,r=0,i=f.length;r<i;++r)if((n=f[r]).that===t)return n;return new E(t,e)}function E(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=r.apply(t,e)}function T(){if(n.apply(this,arguments)){var t=w(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,o.apply(this,arguments)))),a=fe(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],ti(this),t.start()}uE(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},d),t.zoom("mouse",i(g(y(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}}function C(){if(!e&&n.apply(this,arguments)){var t=w(this,arguments),r=ie(Gt.view).on("mousemove.zoom",function(){if(uE(),!t.moved){var e=Gt.clientX-a,n=Gt.clientY-s;t.moved=e*e+n*n>v}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=fe(t.that),t.mouse[1]),t.extent,u))},!0).on("mouseup.zoom",function(){r.on("mousemove.zoom mouseup.zoom",null),ge(Gt.view,t.moved),uE(),t.end()},!0),o=fe(this),a=Gt.clientX,s=Gt.clientY;ye(Gt.view),sE(),t.mouse=[o,this.__zoom.invert(o)],ti(this),t.start()}}function x(){if(n.apply(this,arguments)){var t=this.__zoom,e=fe(this),o=t.invert(e),a=t.k*(Gt.shiftKey?.5:2),s=i(g(y(t,a),e,o),r.apply(this,arguments),u);uE(),c>0?ie(this).transition().duration(c).call(_,s,e):ie(this).call(m.transform,s)}}function S(){if(n.apply(this,arguments)){var e,r,i,o,a=w(this,arguments),s=Gt.changedTouches,u=s.length;for(sE(),r=0;r<u;++r)i=s[r],o=[o=pe(this,s,i.identifier),this.__zoom.invert(o),i.identifier],a.touch0?a.touch1||(a.touch1=o):(a.touch0=o,e=!0);if(t&&(t=clearTimeout(t),!a.touch1))return a.end(),void((o=ie(this).on("dblclick.zoom"))&&o.apply(this,arguments));e&&(t=setTimeout(function(){t=null},p),ti(this),a.start())}}function k(){var e,n,r,o,a=w(this,arguments),s=Gt.changedTouches,c=s.length;for(uE(),t&&(t=clearTimeout(t)),e=0;e<c;++e)n=s[e],r=pe(this,s,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var l=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],d=(d=h[0]-l[0])*d+(d=h[1]-l[1])*d,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;n=y(n,Math.sqrt(d/v)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(g(n,r,o),a.extent,u))}function N(){var t,n,r=w(this,arguments),i=Gt.changedTouches,o=i.length;for(sE(),e&&clearTimeout(e),e=setTimeout(function(){e=null},p),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}return m.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",fE),t!==n?_(t,e):n.interrupt().each(function(){w(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},m.scaleBy=function(t,e){m.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)})},m.scaleTo=function(t,e){m.transform(t,function(){var t=r.apply(this,arguments),n=this.__zoom,o=b(t),a=n.invert(o),s="function"==typeof e?e.apply(this,arguments):e;return i(g(y(n,s),o,a),t,u)})},m.translateBy=function(t,e,n){m.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),u)})},m.translateTo=function(t,e,n){m.transform(t,function(){var t=r.apply(this,arguments),o=this.__zoom,a=b(t);return i(oE.translate(a[0],a[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)})},E.prototype={start:function(){return 1==++this.active&&(this.index=f.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(f.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){Jt(new function(t,e,n){this.target=t,this.type=e,this.transform=n}(m,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},m.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:rE(+t),m):o},m.filter=function(t){return arguments.length?(n="function"==typeof t?t:rE(!!t),m):n},m.touchable=function(t){return arguments.length?(a="function"==typeof t?t:rE(!!t),m):a},m.extent=function(t){return arguments.length?(r="function"==typeof t?t:rE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),m):r},m.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],m):[s[0],s[1]]},m.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],m):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},m.constrain=function(t){return arguments.length?(i=t,m):i},m.duration=function(t){return arguments.length?(c=+t,m):c},m.interpolate=function(t){return arguments.length?(l=t,m):l},m.on=function(){var t=h.on.apply(h,arguments);return t===h?m:t},m.clickDistance=function(t){return arguments.length?(v=(t=+t)*t,m):Math.sqrt(v)},m};n.d(e,"version",function(){return"5.5.0"}),n.d(e,"bisect",function(){return u}),n.d(e,"bisectRight",function(){return a}),n.d(e,"bisectLeft",function(){return s}),n.d(e,"ascending",function(){return r}),n.d(e,"bisector",function(){return i}),n.d(e,"cross",function(){return f}),n.d(e,"descending",function(){return h}),n.d(e,"deviation",function(){return v}),n.d(e,"extent",function(){return m}),n.d(e,"histogram",function(){return I}),n.d(e,"thresholdFreedmanDiaconis",function(){return P}),n.d(e,"thresholdScott",function(){return R}),n.d(e,"thresholdSturges",function(){return A}),n.d(e,"max",function(){return D}),n.d(e,"mean",function(){return M}),n.d(e,"median",function(){return L}),n.d(e,"merge",function(){return F}),n.d(e,"min",function(){return U}),n.d(e,"pairs",function(){return c}),n.d(e,"permute",function(){return j}),n.d(e,"quantile",function(){return O}),n.d(e,"range",function(){return E}),n.d(e,"scan",function(){return B}),n.d(e,"shuffle",function(){return q}),n.d(e,"sum",function(){return V}),n.d(e,"ticks",function(){return S}),n.d(e,"tickIncrement",function(){return k}),n.d(e,"tickStep",function(){return N}),n.d(e,"transpose",function(){return W}),n.d(e,"variance",function(){return d}),n.d(e,"zip",function(){return z}),n.d(e,"axisTop",function(){return rt}),n.d(e,"axisRight",function(){return it}),n.d(e,"axisBottom",function(){return ot}),n.d(e,"axisLeft",function(){return at}),n.d(e,"brush",function(){return xo}),n.d(e,"brushX",function(){return To}),n.d(e,"brushY",function(){return Co}),n.d(e,"brushSelection",function(){return Eo}),n.d(e,"chord",function(){return Ro}),n.d(e,"ribbon",function(){return Go}),n.d(e,"nest",function(){return $o}),n.d(e,"set",function(){return oa}),n.d(e,"map",function(){return Xo}),n.d(e,"keys",function(){return aa}),n.d(e,"values",function(){return sa}),n.d(e,"entries",function(){return ua}),n.d(e,"color",function(){return qe}),n.d(e,"rgb",function(){return ze}),n.d(e,"hsl",function(){return Ye}),n.d(e,"lab",function(){return ln}),n.d(e,"hcl",function(){return gn}),n.d(e,"lch",function(){return yn}),n.d(e,"gray",function(){return cn}),n.d(e,"cubehelix",function(){return Sn}),n.d(e,"contours",function(){return ga}),n.d(e,"contourDensity",function(){return Ta}),n.d(e,"dispatch",function(){return ht}),n.d(e,"drag",function(){return xe}),n.d(e,"dragDisable",function(){return ye}),n.d(e,"dragEnable",function(){return ge}),n.d(e,"dsvFormat",function(){return Ia}),n.d(e,"csvParse",function(){return Pa}),n.d(e,"csvParseRows",function(){return Ra}),n.d(e,"csvFormat",function(){return Da}),n.d(e,"csvFormatRows",function(){return Ma}),n.d(e,"tsvParse",function(){return Fa}),n.d(e,"tsvParseRows",function(){return Ua}),n.d(e,"tsvFormat",function(){return ja}),n.d(e,"tsvFormatRows",function(){return Ba}),n.d(e,"easeLinear",function(){return ci}),n.d(e,"easeQuad",function(){return hi}),n.d(e,"easeQuadIn",function(){return li}),n.d(e,"easeQuadOut",function(){return fi}),n.d(e,"easeQuadInOut",function(){return hi}),n.d(e,"easeCubic",function(){return vi}),n.d(e,"easeCubicIn",function(){return pi}),n.d(e,"easeCubicOut",function(){return di}),n.d(e,"easeCubicInOut",function(){return vi}),n.d(e,"easePoly",function(){return gi}),n.d(e,"easePolyIn",function(){return mi}),n.d(e,"easePolyOut",function(){return yi}),n.d(e,"easePolyInOut",function(){return gi}),n.d(e,"easeSin",function(){return Ti}),n.d(e,"easeSinIn",function(){return wi}),n.d(e,"easeSinOut",function(){return Ei}),n.d(e,"easeSinInOut",function(){return Ti}),n.d(e,"easeExp",function(){return Si}),n.d(e,"easeExpIn",function(){return Ci}),n.d(e,"easeExpOut",function(){return xi}),n.d(e,"easeExpInOut",function(){return Si}),n.d(e,"easeCircle",function(){return Ai}),n.d(e,"easeCircleIn",function(){return ki}),n.d(e,"easeCircleOut",function(){return Ni}),n.d(e,"easeCircleInOut",function(){return Ai}),n.d(e,"easeBounce",function(){return qi}),n.d(e,"easeBounceIn",function(){return Bi}),n.d(e,"easeBounceOut",function(){return qi}),n.d(e,"easeBounceInOut",function(){return Vi}),n.d(e,"easeBack",function(){return zi}),n.d(e,"easeBackIn",function(){return Wi}),n.d(e,"easeBackOut",function(){return Hi}),n.d(e,"easeBackInOut",function(){return zi}),n.d(e,"easeElastic",function(){return Qi}),n.d(e,"easeElasticIn",function(){return Gi}),n.d(e,"easeElasticOut",function(){return Qi}),n.d(e,"easeElasticInOut",function(){return Yi}),n.d(e,"blob",function(){return Va}),n.d(e,"buffer",function(){return Ha}),n.d(e,"dsv",function(){return Qa}),n.d(e,"csv",function(){return Ya}),n.d(e,"tsv",function(){return Xa}),n.d(e,"image",function(){return $a}),n.d(e,"json",function(){return Za}),n.d(e,"text",function(){return Ka}),n.d(e,"xml",function(){return es}),n.d(e,"html",function(){return ns}),n.d(e,"svg",function(){return rs}),n.d(e,"forceCenter",function(){return is}),n.d(e,"forceCollide",function(){return ys}),n.d(e,"forceLink",function(){return _s}),n.d(e,"forceManyBody",function(){return Ss}),n.d(e,"forceRadial",function(){return ks}),n.d(e,"forceSimulation",function(){return xs}),n.d(e,"forceX",function(){return Ns}),n.d(e,"forceY",function(){return As}),n.d(e,"formatDefaultLocale",function(){return zs}),n.d(e,"format",function(){return Fs}),n.d(e,"formatPrefix",function(){return Us}),n.d(e,"formatLocale",function(){return Hs}),n.d(e,"formatSpecifier",function(){return Rs}),n.d(e,"precisionFixed",function(){return Ks}),n.d(e,"precisionPrefix",function(){return Gs}),n.d(e,"precisionRound",function(){return Qs}),n.d(e,"geoArea",function(){return Bu}),n.d(e,"geoBounds",function(){return Pc}),n.d(e,"geoCentroid",function(){return Hc}),n.d(e,"geoCircle",function(){return el}),n.d(e,"geoClipAntimeridian",function(){return hl}),n.d(e,"geoClipCircle",function(){return pl}),n.d(e,"geoClipExtent",function(){return wl}),n.d(e,"geoClipRectangle",function(){return yl}),n.d(e,"geoContains",function(){return jl}),n.d(e,"geoDistance",function(){return Il}),n.d(e,"geoGraticule",function(){return Vl}),n.d(e,"geoGraticule10",function(){return Wl}),n.d(e,"geoInterpolate",function(){return Ql}),n.d(e,"geoLength",function(){return kl}),n.d(e,"geoPath",function(){return Gf}),n.d(e,"geoAlbers",function(){return hh}),n.d(e,"geoAlbersUsa",function(){return ph}),n.d(e,"geoAzimuthalEqualArea",function(){return yh}),n.d(e,"geoAzimuthalEqualAreaRaw",function(){return mh}),n.d(e,"geoAzimuthalEquidistant",function(){return bh}),n.d(e,"geoAzimuthalEquidistantRaw",function(){return gh}),n.d(e,"geoConicConformal",function(){return xh}),n.d(e,"geoConicConformalRaw",function(){return Ch}),n.d(e,"geoConicEqualArea",function(){return fh}),n.d(e,"geoConicEqualAreaRaw",function(){return lh}),n.d(e,"geoConicEquidistant",function(){return Ah}),n.d(e,"geoConicEquidistantRaw",function(){return Nh}),n.d(e,"geoEquirectangular",function(){return kh}),n.d(e,"geoEquirectangularRaw",function(){return Sh}),n.d(e,"geoGnomonic",function(){return Oh}),n.d(e,"geoGnomonicRaw",function(){return Ih}),n.d(e,"geoIdentity",function(){return Rh}),n.d(e,"geoProjection",function(){return sh}),n.d(e,"geoProjectionMutator",function(){return uh}),n.d(e,"geoMercator",function(){return wh}),n.d(e,"geoMercatorRaw",function(){return _h}),n.d(e,"geoNaturalEarth1",function(){return Mh}),n.d(e,"geoNaturalEarth1Raw",function(){return Dh}),n.d(e,"geoOrthographic",function(){return Fh}),n.d(e,"geoOrthographicRaw",function(){return Lh}),n.d(e,"geoStereographic",function(){return jh}),n.d(e,"geoStereographicRaw",function(){return Uh}),n.d(e,"geoTransverseMercator",function(){return qh}),n.d(e,"geoTransverseMercatorRaw",function(){return Bh}),n.d(e,"geoRotation",function(){return Jc}),n.d(e,"geoStream",function(){return Pu}),n.d(e,"geoTransform",function(){return Qf}),n.d(e,"cluster",function(){return zh}),n.d(e,"hierarchy",function(){return Gh}),n.d(e,"pack",function(){return yp}),n.d(e,"packSiblings",function(){return hp}),n.d(e,"packEnclose",function(){return Zh}),n.d(e,"partition",function(){return Tp}),n.d(e,"stratify",function(){return Ap}),n.d(e,"tree",function(){return Lp}),n.d(e,"treemap",function(){return qp}),n.d(e,"treemapBinary",function(){return Vp}),n.d(e,"treemapDice",function(){return Ep}),n.d(e,"treemapSlice",function(){return Fp}),n.d(e,"treemapSliceDice",function(){return Wp}),n.d(e,"treemapSquarify",function(){return Bp}),n.d(e,"treemapResquarify",function(){return Hp}),n.d(e,"interpolate",function(){return $n}),n.d(e,"interpolateArray",function(){return Bn}),n.d(e,"interpolateBasis",function(){return An}),n.d(e,"interpolateBasisClosed",function(){return In}),n.d(e,"interpolateDate",function(){return qn}),n.d(e,"interpolateNumber",function(){return Vn}),n.d(e,"interpolateObject",function(){return Wn}),n.d(e,"interpolateRound",function(){return Jn}),n.d(e,"interpolateString",function(){return Xn}),n.d(e,"interpolateTransformCss",function(){return rr}),n.d(e,"interpolateTransformSvg",function(){return ir}),n.d(e,"interpolateZoom",function(){return sr}),n.d(e,"interpolateRgb",function(){return Ln}),n.d(e,"interpolateRgbBasis",function(){return Un}),n.d(e,"interpolateRgbBasisClosed",function(){return jn}),n.d(e,"interpolateHsl",function(){return cr}),n.d(e,"interpolateHslLong",function(){return lr}),n.d(e,"interpolateLab",function(){return fr}),n.d(e,"interpolateHcl",function(){return pr}),n.d(e,"interpolateHclLong",function(){return dr}),n.d(e,"interpolateCubehelix",function(){return mr}),n.d(e,"interpolateCubehelixLong",function(){return yr}),n.d(e,"piecewise",function(){return gr}),n.d(e,"quantize",function(){return wr}),n.d(e,"path",function(){return qo}),n.d(e,"polygonArea",function(){return zp}),n.d(e,"polygonCentroid",function(){return Kp}),n.d(e,"polygonHull",function(){return Xp}),n.d(e,"polygonContains",function(){return $p}),n.d(e,"polygonLength",function(){return Jp}),n.d(e,"quadtree",function(){return fs}),n.d(e,"randomUniform",function(){return td}),n.d(e,"randomNormal",function(){return ed}),n.d(e,"randomLogNormal",function(){return nd}),n.d(e,"randomBates",function(){return id}),n.d(e,"randomIrwinHall",function(){return rd}),n.d(e,"randomExponential",function(){return od}),n.d(e,"scaleBand",function(){return fd}),n.d(e,"scalePoint",function(){return hd}),n.d(e,"scaleIdentity",function(){return Cd}),n.d(e,"scaleLinear",function(){return Td}),n.d(e,"scaleLog",function(){return Pd}),n.d(e,"scaleOrdinal",function(){return ld}),n.d(e,"scaleImplicit",function(){return cd}),n.d(e,"scalePow",function(){return Dd}),n.d(e,"scaleSqrt",function(){return Md}),n.d(e,"scaleQuantile",function(){return Ld}),n.d(e,"scaleQuantize",function(){return Fd}),n.d(e,"scaleThreshold",function(){return Ud}),n.d(e,"scaleTime",function(){return Dy}),n.d(e,"scaleUtc",function(){return My}),n.d(e,"scaleSequential",function(){return Ly}),n.d(e,"scaleDiverging",function(){return Fy}),n.d(e,"schemeCategory10",function(){return jy}),n.d(e,"schemeAccent",function(){return By}),n.d(e,"schemeDark2",function(){return qy}),n.d(e,"schemePaired",function(){return Vy}),n.d(e,"schemePastel1",function(){return Wy}),n.d(e,"schemePastel2",function(){return Hy}),n.d(e,"schemeSet1",function(){return zy}),n.d(e,"schemeSet2",function(){return Ky}),n.d(e,"schemeSet3",function(){return Gy}),n.d(e,"interpolateBrBG",function(){return Xy}),n.d(e,"schemeBrBG",function(){return Yy}),n.d(e,"interpolatePRGn",function(){return Jy}),n.d(e,"schemePRGn",function(){return $y}),n.d(e,"interpolatePiYG",function(){return tg}),n.d(e,"schemePiYG",function(){return Zy}),n.d(e,"interpolatePuOr",function(){return ng}),n.d(e,"schemePuOr",function(){return eg}),n.d(e,"interpolateRdBu",function(){return ig}),n.d(e,"schemeRdBu",function(){return rg}),n.d(e,"interpolateRdGy",function(){return ag}),n.d(e,"schemeRdGy",function(){return og}),n.d(e,"interpolateRdYlBu",function(){return ug}),n.d(e,"schemeRdYlBu",function(){return sg}),n.d(e,"interpolateRdYlGn",function(){return lg}),n.d(e,"schemeRdYlGn",function(){return cg}),n.d(e,"interpolateSpectral",function(){return hg}),n.d(e,"schemeSpectral",function(){return fg}),n.d(e,"interpolateBuGn",function(){return dg}),n.d(e,"schemeBuGn",function(){return pg}),n.d(e,"interpolateBuPu",function(){return mg}),n.d(e,"schemeBuPu",function(){return vg}),n.d(e,"interpolateGnBu",function(){return gg}),n.d(e,"schemeGnBu",function(){return yg}),n.d(e,"interpolateOrRd",function(){return _g}),n.d(e,"schemeOrRd",function(){return bg}),n.d(e,"interpolatePuBuGn",function(){return Eg}),n.d(e,"schemePuBuGn",function(){return wg}),n.d(e,"interpolatePuBu",function(){return Cg}),n.d(e,"schemePuBu",function(){return Tg}),n.d(e,"interpolatePuRd",function(){return Sg}),n.d(e,"schemePuRd",function(){return xg}),n.d(e,"interpolateRdPu",function(){return Ng}),n.d(e,"schemeRdPu",function(){return kg}),n.d(e,"interpolateYlGnBu",function(){return Ig}),n.d(e,"schemeYlGnBu",function(){return Ag}),n.d(e,"interpolateYlGn",function(){return Pg}),n.d(e,"schemeYlGn",function(){return Og}),n.d(e,"interpolateYlOrBr",function(){return Dg}),n.d(e,"schemeYlOrBr",function(){return Rg}),n.d(e,"interpolateYlOrRd",function(){return Lg}),n.d(e,"schemeYlOrRd",function(){return Mg}),n.d(e,"interpolateBlues",function(){return Ug}),n.d(e,"schemeBlues",function(){return Fg}),n.d(e,"interpolateGreens",function(){return Bg}),n.d(e,"schemeGreens",function(){return jg}),n.d(e,"interpolateGreys",function(){return Vg}),n.d(e,"schemeGreys",function(){return qg}),n.d(e,"interpolatePurples",function(){return Hg}),n.d(e,"schemePurples",function(){return Wg}),n.d(e,"interpolateReds",function(){return Kg}),n.d(e,"schemeReds",function(){return zg}),n.d(e,"interpolateOranges",function(){return Qg}),n.d(e,"schemeOranges",function(){return Gg}),n.d(e,"interpolateCubehelixDefault",function(){return Yg}),n.d(e,"interpolateRainbow",function(){return Zg}),n.d(e,"interpolateWarm",function(){return Xg}),n.d(e,"interpolateCool",function(){return $g}),n.d(e,"interpolateSinebow",function(){return rb}),n.d(e,"interpolateViridis",function(){return ob}),n.d(e,"interpolateMagma",function(){return ab}),n.d(e,"interpolateInferno",function(){return sb}),n.d(e,"interpolatePlasma",function(){return ub}),n.d(e,"create",function(){return oe}),n.d(e,"creator",function(){return mt}),n.d(e,"local",function(){return se}),n.d(e,"matcher",function(){return Ct}),n.d(e,"mouse",function(){return fe}),n.d(e,"namespace",function(){return vt}),n.d(e,"namespaces",function(){return dt}),n.d(e,"clientPoint",function(){return le}),n.d(e,"select",function(){return ie}),n.d(e,"selectAll",function(){return he}),n.d(e,"selection",function(){return re}),n.d(e,"selector",function(){return gt}),n.d(e,"selectorAll",function(){return _t}),n.d(e,"style",function(){return Pt}),n.d(e,"touch",function(){return pe}),n.d(e,"touches",function(){return de}),n.d(e,"window",function(){return Ot}),n.d(e,"event",function(){return Gt}),n.d(e,"customEvent",function(){return Jt}),n.d(e,"arc",function(){return Nb}),n.d(e,"area",function(){return Db}),n.d(e,"line",function(){return Rb}),n.d(e,"pie",function(){return Fb}),n.d(e,"areaRadial",function(){return Wb}),n.d(e,"radialArea",function(){return Wb}),n.d(e,"lineRadial",function(){return Vb}),n.d(e,"radialLine",function(){return Vb}),n.d(e,"pointRadial",function(){return Hb}),n.d(e,"linkHorizontal",function(){return Jb}),n.d(e,"linkVertical",function(){return Zb}),n.d(e,"linkRadial",function(){return t_}),n.d(e,"symbol",function(){return g_}),n.d(e,"symbols",function(){return y_}),n.d(e,"symbolCircle",function(){return e_}),n.d(e,"symbolCross",function(){return n_}),n.d(e,"symbolDiamond",function(){return o_}),n.d(e,"symbolSquare",function(){return l_}),n.d(e,"symbolStar",function(){return c_}),n.d(e,"symbolTriangle",function(){return h_}),n.d(e,"symbolWye",function(){return m_}),n.d(e,"curveBasisClosed",function(){return C_}),n.d(e,"curveBasisOpen",function(){return S_}),n.d(e,"curveBasis",function(){return E_}),n.d(e,"curveBundle",function(){return N_}),n.d(e,"curveCardinalClosed",function(){return R_}),n.d(e,"curveCardinalOpen",function(){return M_}),n.d(e,"curveCardinal",function(){return O_}),n.d(e,"curveCatmullRomClosed",function(){return B_}),n.d(e,"curveCatmullRomOpen",function(){return V_}),n.d(e,"curveCatmullRom",function(){return U_}),n.d(e,"curveLinearClosed",function(){return H_}),n.d(e,"curveLinear",function(){return Ib}),n.d(e,"curveMonotoneX",function(){return J_}),n.d(e,"curveMonotoneY",function(){return Z_}),n.d(e,"curveNatural",function(){return nw}),n.d(e,"curveStep",function(){return iw}),n.d(e,"curveStepAfter",function(){return aw}),n.d(e,"curveStepBefore",function(){return ow}),n.d(e,"stack",function(){return lw}),n.d(e,"stackOffsetExpand",function(){return fw}),n.d(e,"stackOffsetDiverging",function(){return hw}),n.d(e,"stackOffsetNone",function(){return sw}),n.d(e,"stackOffsetSilhouette",function(){return pw}),n.d(e,"stackOffsetWiggle",function(){return dw}),n.d(e,"stackOrderAscending",function(){return vw}),n.d(e,"stackOrderDescending",function(){return yw}),n.d(e,"stackOrderInsideOut",function(){return gw}),n.d(e,"stackOrderNone",function(){return uw}),n.d(e,"stackOrderReverse",function(){return bw}),n.d(e,"timeInterval",function(){return qd}),n.d(e,"timeMillisecond",function(){return Wd}),n.d(e,"timeMilliseconds",function(){return Hd}),n.d(e,"utcMillisecond",function(){return Wd}),n.d(e,"utcMilliseconds",function(){return Hd}),n.d(e,"timeSecond",function(){return Qd}),n.d(e,"timeSeconds",function(){return Yd}),n.d(e,"utcSecond",function(){return Qd}),n.d(e,"utcSeconds",function(){return Yd}),n.d(e,"timeMinute",function(){return $d}),n.d(e,"timeMinutes",function(){return Jd}),n.d(e,"timeHour",function(){return tv}),n.d(e,"timeHours",function(){return ev}),n.d(e,"timeDay",function(){return rv}),n.d(e,"timeDays",function(){return iv}),n.d(e,"timeWeek",function(){return av}),n.d(e,"timeWeeks",function(){return pv}),n.d(e,"timeSunday",function(){return av}),n.d(e,"timeSundays",function(){return pv}),n.d(e,"timeMonday",function(){return sv}),n.d(e,"timeMondays",function(){return dv}),n.d(e,"timeTuesday",function(){return uv}),n.d(e,"timeTuesdays",function(){return vv}),n.d(e,"timeWednesday",function(){return cv}),n.d(e,"timeWednesdays",function(){return mv}),n.d(e,"timeThursday",function(){return lv}),n.d(e,"timeThursdays",function(){return yv}),n.d(e,"timeFriday",function(){return fv}),n.d(e,"timeFridays",function(){return gv}),n.d(e,"timeSaturday",function(){return hv}),n.d(e,"timeSaturdays",function(){return bv}),n.d(e,"timeMonth",function(){return wv}),n.d(e,"timeMonths",function(){return Ev}),n.d(e,"timeYear",function(){return Cv}),n.d(e,"timeYears",function(){return xv}),n.d(e,"utcMinute",function(){return kv}),n.d(e,"utcMinutes",function(){return Nv}),n.d(e,"utcHour",function(){return Iv}),n.d(e,"utcHours",function(){return Ov}),n.d(e,"utcDay",function(){return Rv}),n.d(e,"utcDays",function(){return Dv}),n.d(e,"utcWeek",function(){return Lv}),n.d(e,"utcWeeks",function(){return Wv}),n.d(e,"utcSunday",function(){return Lv}),n.d(e,"utcSundays",function(){return Wv}),n.d(e,"utcMonday",function(){return Fv}),n.d(e,"utcMondays",function(){return Hv}),n.d(e,"utcTuesday",function(){return Uv}),n.d(e,"utcTuesdays",function(){return zv}),n.d(e,"utcWednesday",function(){return jv}),n.d(e,"utcWednesdays",function(){return Kv}),n.d(e,"utcThursday",function(){return Bv}),n.d(e,"utcThursdays",function(){return Gv}),n.d(e,"utcFriday",function(){return qv}),n.d(e,"utcFridays",function(){return Qv}),n.d(e,"utcSaturday",function(){return Vv}),n.d(e,"utcSaturdays",function(){return Yv}),n.d(e,"utcMonth",function(){return $v}),n.d(e,"utcMonths",function(){return Jv}),n.d(e,"utcYear",function(){return tm}),n.d(e,"utcYears",function(){return em}),n.d(e,"timeFormatDefaultLocale",function(){return wy}),n.d(e,"timeFormat",function(){return sm}),n.d(e,"timeParse",function(){return um}),n.d(e,"utcFormat",function(){return cm}),n.d(e,"utcParse",function(){return lm}),n.d(e,"timeFormatLocale",function(){return om}),n.d(e,"isoFormat",function(){return Ey}),n.d(e,"isoParse",function(){return Ty}),n.d(e,"now",function(){return Or}),n.d(e,"timer",function(){return Dr}),n.d(e,"timerFlush",function(){return Mr}),n.d(e,"timeout",function(){return jr}),n.d(e,"interval",function(){return Br}),n.d(e,"transition",function(){return ai}),n.d(e,"active",function(){return Zi}),n.d(e,"interrupt",function(){return ti}),n.d(e,"voronoi",function(){return nE}),n.d(e,"zoom",function(){return vE}),n.d(e,"zoomTransform",function(){return aE}),n.d(e,"zoomIdentity",function(){return oE})},function(t,e,n){var r=n(315);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";n.r(e),n.d(e,"setLogLevel",function(){return u}),n.d(e,"Logger",function(){return s}),n.d(e,"LogLevel",function(){return r});var r,i=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(r||(r={}));var o=r.INFO,a=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString();switch(e){case r.DEBUG:case r.VERBOSE:console.log.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.INFO:console.info.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.WARN:console.warn.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.ERROR:console.error.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}},s=function(){function t(t){this.name=t,this._logLevel=o,this._logHandler=a,i.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in r))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.DEBUG].concat(t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.VERBOSE].concat(t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.INFO].concat(t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.WARN].concat(t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.ERROR].concat(t))},t}();function u(t){i.forEach(function(e){e.logLevel=t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(330);((r=i)&&r.__esModule?r:{default:r}).default.initializeApp({apiKey:"AIzaSyCvzQxxjxFKPL6pLT00_iiChoEJwwvgjZ4",authDomain:"igem-7f6f6.firebaseapp.com",databaseURL:"https://igem-7f6f6.firebaseio.com",projectId:"igem-7f6f6",storageBucket:"igem-7f6f6.appspot.com",messagingSenderId:"184454883093"});var o=fetch("https://igem-7f6f6.firebaseio.com/.json",{method:"get"});e.default=o},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(120),s=n(363),u=n(113),c=200;t.exports=function(t,e,n){var l=-1,f=i,h=t.length,p=!0,d=[],v=d;if(n)p=!1,f=o;else if(h>=c){var m=e?null:s(t);if(m)return u(m);p=!1,f=a,v=new r}else v=e?[]:d;t:for(;++l<h;){var y=t[l],g=e?e(y):y;if(y=n||0!==y?y:0,p&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue t;e&&v.push(g),d.push(y)}else f(v,g,n)||(v!==d&&v.push(g),d.push(y))}return d}},function(t,e,n){var r=n(62),i=n(38);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,function(t,r,i){o[++n]=e(t,r,i)}),o}},function(t,e,n){var r=n(125),i=n(376),o=n(92);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var c=e[a],l=r(t,c);n(l,c)&&i(u,o(c,t),l)}return u}},function(t,e,n){var r=n(230),i=n(205),o=n(206);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(162),i=n(107),o=n(157),a=n(229),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e,n){var r=n(238),i=n(405),o=n(38);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(159),i=n(87),o=n(108),a=n(208),s=n(406),u=n(403),c=n(85),l=n(402),f=n(401),h=n(231),p=n(204),d=n(52),v=n(400),m=n(399),y=n(394),g=n(18),b=n(89),_=n(393),w=n(39),E=n(391),T=n(28),C=1,x=2,S=4,k="[object Arguments]",N="[object Function]",A="[object GeneratorFunction]",I="[object Object]",O={};O[k]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[I]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[N]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,P,R,D,M){var L,F=n&C,U=n&x,j=n&S;if(P&&(L=D?P(e,R,D,M):P(e)),void 0!==L)return L;if(!w(e))return e;var B=g(e);if(B){if(L=v(e),!F)return c(e,L)}else{var q=d(e),V=q==N||q==A;if(b(e))return u(e,F);if(q==I||q==k||V&&!D){if(L=U||V?{}:y(e),!F)return U?f(e,s(L,e)):l(e,a(L,e))}else{if(!O[q])return D?e:{};L=m(e,q,F)}}M||(M=new r);var W=M.get(e);if(W)return W;if(M.set(e,L),E(e))return e.forEach(function(r){L.add(t(r,n,P,r,e,M))}),L;if(_(e))return e.forEach(function(r,i){L.set(i,t(r,n,P,i,e,M))}),L;var H=j?U?p:h:U?keysIn:T,z=B?void 0:H(e);return i(z||e,function(r,i){z&&(r=e[i=r]),o(L,i,t(r,n,P,i,e,M))}),L}},function(t,e,n){var r=n(84),i=n(28);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(413),i=n(412),o=n(164),a=n(411);t.exports=function(t,e,n){var s=e+"";return o(t,i(s,a(r(s),n)))}},function(t,e,n){var r=n(219),i=n(246)(r);t.exports=i},function(t,e,n){var r=n(416),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",n=r[e],o=i.call(r,e)?n.length:0;o--;){var a=n[o],s=a.func;if(null==s||s==t)return a.name}return e}},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(156),i=n(154),o=n(211),a=n(415);t.exports=function(t){var e=o(t),n=a[e];if("function"!=typeof n||!(e in r.prototype))return!1;if(t===n)return!0;var s=i(n);return!!s&&t===s[0]}},function(t,e,n){var r=n(213),i=n(210),o=n(209),a=1,s=2,u=4,c=8,l=32,f=64;t.exports=function(t,e,n,h,p,d,v,m,y,g){var b=e&c;e|=b?l:f,(e&=~(b?f:l))&u||(e&=~(a|s));var _=[t,e,p,b?d:void 0,b?v:void 0,b?void 0:d,b?void 0:v,m,y,g],w=n.apply(void 0,_);return r(t)&&i(w,_),w.placeholder=h,o(w,t,e)}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=-1,u=r.length,c=-1,l=e.length,f=n(a-u,0),h=Array(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+r[s]]=t[o++]);return h}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=r.length,u=-1,c=e.length,l=n(a-s,0),f=Array(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[r[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}},function(t,e,n){var r=n(216),i=n(215),o=n(417),a=n(110),s=n(214),u=n(152),c=n(410),l=n(109),f=n(33),h=1,p=2,d=8,v=16,m=128,y=512;t.exports=function t(e,n,g,b,_,w,E,T,C,x){var S=n&m,k=n&h,N=n&p,A=n&(d|v),I=n&y,O=N?void 0:a(e);return function h(){for(var p=arguments.length,d=Array(p),v=p;v--;)d[v]=arguments[v];if(A)var m=u(h),y=o(d,m);if(b&&(d=r(d,b,_,A)),w&&(d=i(d,w,E,A)),p-=y,A&&p<x){var P=l(d,m);return s(e,n,t,h.placeholder,g,d,P,T,C,x-p)}var R=k?g:this,D=N?R[e]:e;return p=d.length,T?d=c(d,T):I&&p>1&&d.reverse(),S&&C<p&&(d.length=C),this&&this!==f&&this instanceof h&&(D=O||a(D)),D.apply(R,d)}}},function(t,e,n){var r=n(227),i=r&&new r;t.exports=i},function(t,e,n){var r=n(47),i=n(218),o=i?function(t,e){return i.set(t,e),t}:r;t.exports=o},function(t,e,n){var r=n(182),i=n(42)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(220),i=n(42)("iterator"),o=n(78);t.exports=n(26).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(47);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(453),i=n(253);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(39);t.exports=function(t){return t==t&&!r(t)}},function(t,e,n){var r=n(65)(n(33),"WeakMap");t.exports=r},function(t,e,n){var r=n(65)(n(33),"Set");t.exports=r},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(162),i=n(18);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(230),i=n(157),o=n(28);t.exports=function(t){return r(t,o,i)}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},function(t,e,n){var r=n(33).Uint8Array;t.exports=r},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(123),i=n(234),o=n(120),a=1,s=2;t.exports=function(t,e,n,u,c,l){var f=n&a,h=t.length,p=e.length;if(h!=p&&!(f&&p>h))return!1;var d=l.get(t);if(d&&l.get(e))return d==e;var v=-1,m=!0,y=n&s?new r:void 0;for(l.set(t,e),l.set(e,t);++v<h;){var g=t[v],b=e[v];if(u)var _=f?u(b,g,v,e,t,l):u(g,b,v,t,e,l);if(void 0!==_){if(_)continue;m=!1;break}if(y){if(!i(e,function(t,e){if(!o(y,e)&&(g===t||c(g,t,n,u,l)))return y.push(e)})){m=!1;break}}else if(g!==b&&!c(g,b,n,u,l)){m=!1;break}}return l.delete(t),l.delete(e),m}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(237),i=n(127),o=n(18),a=n(89),s=n(91),u=n(116),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&a(t),h=!n&&!l&&!f&&u(t),p=n||l||f||h,d=p?r(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||d.push(m);return d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=200;t.exports=function(t,e,n,l){var f=-1,h=i,p=!0,d=t.length,v=[],m=e.length;if(!d)return v;n&&(e=a(e,s(n))),l?(h=o,p=!1):e.length>=c&&(h=u,p=!1,e=new r(e));t:for(;++f<d;){var y=t[f],g=null==n?y:n(y);if(y=l||0!==y?y:0,p&&g==g){for(var b=m;b--;)if(e[b]===g)continue t;v.push(y)}else h(e,g,l)||v.push(y)}return v}},function(t,e,n){t.exports=n(482)},function(t,e,n){t.exports=n(483)},function(t,e,n){t.exports=n(485)},function(t,e){var n=800,r=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var a=i(),s=r-(a-o);if(o=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(65),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(126),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(167),i="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},function(t,e,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=n(513)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)}),e});t.exports=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(66))},function(t,e,n){var r=n(92),i=n(127),o=n(18),a=n(91),s=n(165),u=n(64);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&a(h,l)&&(o(t)||i(t))}},function(t,e,n){t.exports=n(523)},function(t,e,n){var r=n(262),i=n(177).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(57),i=n(54),o=n(70),a=n(49),s=n(257),u=n(533).KEY,c=n(79),l=n(178),f=n(174),h=n(137),p=n(42),d=n(171),v=n(170),m=n(532),y=n(531),g=n(55),b=n(71),_=n(69),w=n(183),E=n(95),T=n(175),C=n(530),x=n(134),S=n(56),k=n(94),N=x.f,A=S.f,I=C.f,O=r.Symbol,P=r.JSON,R=P&&P.stringify,D=p("_hidden"),M=p("toPrimitive"),L={}.propertyIsEnumerable,F=l("symbol-registry"),U=l("symbols"),j=l("op-symbols"),B=Object.prototype,q="function"==typeof O,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,H=o&&c(function(){return 7!=T(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=N(B,e);r&&delete B[e],A(t,e,n),r&&t!==B&&A(B,e,r)}:A,z=function(t){var e=U[t]=T(O.prototype);return e._k=t,e},K=q&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},G=function(t,e,n){return t===B&&G(j,e,n),g(t),e=w(e,!0),g(n),i(U,e)?(n.enumerable?(i(t,D)&&t[D][e]&&(t[D][e]=!1),n=T(n,{enumerable:E(0,!1)})):(i(t,D)||A(t,D,E(1,{})),t[D][e]=!0),H(t,e,n)):A(t,e,n)},Q=function(t,e){g(t);for(var n,r=m(e=_(e)),i=0,o=r.length;o>i;)G(t,n=r[i++],e[n]);return t},Y=function(t){var e=L.call(this,t=w(t,!0));return!(this===B&&i(U,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,D)&&this[D][t])||e)},X=function(t,e){if(t=_(t),e=w(e,!0),t!==B||!i(U,e)||i(j,e)){var n=N(t,e);return!n||!i(U,e)||i(t,D)&&t[D][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(_(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==D||e==u||r.push(e);return r},J=function(t){for(var e,n=t===B,r=I(n?j:_(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(B,e)||o.push(U[e]);return o};q||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(j,n),i(this,D)&&i(this[D],t)&&(this[D][t]=!1),H(this,t,E(1,n))};return o&&W&&H(B,t,{configurable:!0,set:e}),z(t)}).prototype,"toString",function(){return this._k}),x.f=X,S.f=G,n(255).f=C.f=$,n(136).f=Y,n(176).f=J,o&&!n(138)&&s(B,"propertyIsEnumerable",Y,!0),d.f=function(t){return z(p(t))}),a(a.G+a.W+a.F*!q,{Symbol:O});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)p(Z[tt++]);for(var et=k(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!q,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!q,"Object",{create:function(t,e){return void 0===e?T(t):Q(T(t),e)},defineProperty:G,defineProperties:Q,getOwnPropertyDescriptor:X,getOwnPropertyNames:$,getOwnPropertySymbols:J}),P&&a(a.S+a.F*(!q||c(function(){var t=O();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,R.apply(P,r)}}),O.prototype[M]||n(80)(O.prototype,M,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(80)},function(t,e,n){"use strict";var r=n(138),i=n(49),o=n(257),a=n(80),s=n(78),u=n(541),c=n(174),l=n(173),f=n(42)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,m,y){u(n,e,d);var g,b,_,w=function(t){if(!h&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",T="values"==v,C=!1,x=t.prototype,S=x[f]||x["@@iterator"]||v&&x[v],k=S||w(v),N=v?T?w("entries"):k:void 0,A="Array"==e&&x.entries||S;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),r||"function"==typeof _[f]||a(_,f,p)),T&&S&&"values"!==S.name&&(C=!0,k=function(){return S.call(this)}),r&&!y||!h&&!C&&x[f]||a(x,f,k),s[e]=k,s[E]=p,v)if(g={values:T?k:w("values"),keys:m?k:w("keys"),entries:N},y)for(b in g)b in x||o(x,b,g[b]);else i(i.P+i.F*(h||C),e,g);return g}},function(t,e,n){t.exports=n(546)},function(t,e,n){var r=n(180),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(182);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(54),i=n(69),o=n(548)(!1),a=n(179)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(71),i=n(57).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){t.exports=!n(70)&&!n(79)(function(){return 7!=Object.defineProperty(n(263)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";
 
/*
 
/*
 
object-assign
 
object-assign
 
(c) Sindre Sorhus
 
(c) Sindre Sorhus
 
@license MIT
 
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(t,e,n){var r=n(53),i=n(111),o=n(152),a=n(109),s=r(function(t,e){var n=a(e,o(s));return i(t,64,void 0,e,n)});s.placeholder={},t.exports=s},function(t,e,n){var r=n(236),i=n(221),o=n(46),a=9007199254740991,s=4294967295,u=Math.min;t.exports=function(t,e){if((t=o(t))<1||t>a)return[];var n=s,c=u(t,s);e=i(e),t-=s;for(var l=r(c,e);++n<t;)e(n);return l}},function(t,e,n){var r=n(239),i=n(118);t.exports=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=i(n))==n?n:0),void 0!==e&&(e=(e=i(e))==e?e:0),r(i(t),e,n)}},function(t,e,n){var r=n(331)("round");t.exports=r},function(t,e,n){var r=n(108),i=n(84),o=n(332),a=n(38),s=n(88),u=n(28),c=Object.prototype.hasOwnProperty,l=o(function(t,e){if(s(e)||a(e))i(e,u(e),t);else for(var n in e)c.call(e,n)&&r(t,n,e[n])});t.exports=l},function(t,e,n){var r=n(48),i=n(34),o=n(202),a=n(203);t.exports=function(t,e){if(null==t)return{};var n=r(a(t),function(t){return[t]});return e=i(e),o(t,n,function(t,n){return e(t,n[0])})}},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){var o=null==t?0:t.length;return o?(e=n||void 0===e?1:i(e),r(t,0,(e=o-e)<0?0:e)):[]}},function(t,e,n){var r=n(43),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);t.exports=function(t){return(t=r(t))&&o.test(t)?t.replace(i,"\\$&"):t}},function(t,e,n){var r=n(337),i=n(336),o=n(34),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:i;return n&&s(t,e,n)&&(e=void 0),u(t,o(e,3))}},function(t,e,n){var r=n(350),i=n(343),o=r(function(t,e,n){return t+(n?" ":"")+i(e)});t.exports=o},function(t,e,n){var r=n(23)("toArray",n(352),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("flatMap",n(353));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("split",n(356));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("filter",n(73));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("identity",n(47),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("uniq",n(74),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(87),i=n(86),o=n(160),a=n(34),s=n(107),u=n(18),c=n(89),l=n(44),f=n(39),h=n(116);t.exports=function(t,e,n){var p=u(t),d=p||c(t)||h(t);if(e=a(e,4),null==n){var v=t&&t.constructor;n=d?p?new v:[]:f(t)&&l(v)?i(s(t)):{}}return(d?r:o)(t,function(t,r,i){return e(n,t,r,i)}),n}},function(t,e,n){var r=n(359)();t.exports=r},function(t,e,n){t.exports=n(360)},function(t,e,n){var r=n(41),i=n(30),o="[object Boolean]";t.exports=function(t){return!0===t||!1===t||i(t)&&r(t)==o}},function(t,e,n){var r=n(23)("memoize",n(249));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sortBy",n(374));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("take",n(375));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isFunction",n(44),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isPlainObject",n(81),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("pick",n(97));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isObject",n(39),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("trim",n(382));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("difference",n(99));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(112),i=n(441)(function(t,e,n){r(t,n,e)});t.exports=i},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,f){if("string"!=typeof n){if(l){var h=c(n);h&&h!==l&&t(e,h,f)}var p=a(n);s&&(p=p.concat(s(n)));for(var d=0;d<p.length;++d){var v=p[d];if(!(r[v]||i[v]||f&&f[v])){var m=u(n,v);try{o(e,v,m)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";n.r(e);var r=n(82),i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};
+
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(t,e,n){var r=n(53),i=n(111),o=n(152),a=n(109),s=r(function(t,e){var n=a(e,o(s));return i(t,64,void 0,e,n)});s.placeholder={},t.exports=s},function(t,e,n){var r=n(237),i=n(222),o=n(46),a=9007199254740991,s=4294967295,u=Math.min;t.exports=function(t,e){if((t=o(t))<1||t>a)return[];var n=s,c=u(t,s);e=i(e),t-=s;for(var l=r(c,e);++n<t;)e(n);return l}},function(t,e,n){var r=n(240),i=n(118);t.exports=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=i(n))==n?n:0),void 0!==e&&(e=(e=i(e))==e?e:0),r(i(t),e,n)}},function(t,e,n){var r=n(331)("round");t.exports=r},function(t,e,n){var r=n(108),i=n(84),o=n(332),a=n(38),s=n(88),u=n(28),c=Object.prototype.hasOwnProperty,l=o(function(t,e){if(s(e)||a(e))i(e,u(e),t);else for(var n in e)c.call(e,n)&&r(t,n,e[n])});t.exports=l},function(t,e,n){var r=n(48),i=n(34),o=n(203),a=n(204);t.exports=function(t,e){if(null==t)return{};var n=r(a(t),function(t){return[t]});return e=i(e),o(t,n,function(t,n){return e(t,n[0])})}},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){var o=null==t?0:t.length;return o?(e=n||void 0===e?1:i(e),r(t,0,(e=o-e)<0?0:e)):[]}},function(t,e,n){var r=n(43),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);t.exports=function(t){return(t=r(t))&&o.test(t)?t.replace(i,"\\$&"):t}},function(t,e,n){var r=n(337),i=n(336),o=n(34),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:i;return n&&s(t,e,n)&&(e=void 0),u(t,o(e,3))}},function(t,e,n){var r=n(350),i=n(343),o=r(function(t,e,n){return t+(n?" ":"")+i(e)});t.exports=o},function(t,e,n){var r=n(23)("toArray",n(352),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("flatMap",n(353));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("split",n(356));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("filter",n(73));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("identity",n(47),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("uniq",n(74),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(87),i=n(86),o=n(160),a=n(34),s=n(107),u=n(18),c=n(89),l=n(44),f=n(39),h=n(116);t.exports=function(t,e,n){var p=u(t),d=p||c(t)||h(t);if(e=a(e,4),null==n){var v=t&&t.constructor;n=d?p?new v:[]:f(t)&&l(v)?i(s(t)):{}}return(d?r:o)(t,function(t,r,i){return e(n,t,r,i)}),n}},function(t,e,n){var r=n(359)();t.exports=r},function(t,e,n){t.exports=n(360)},function(t,e,n){var r=n(41),i=n(30),o="[object Boolean]";t.exports=function(t){return!0===t||!1===t||i(t)&&r(t)==o}},function(t,e,n){var r=n(23)("memoize",n(250));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sortBy",n(374));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("take",n(375));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isFunction",n(44),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isPlainObject",n(81),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("pick",n(97));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isObject",n(39),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("trim",n(382));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("difference",n(99));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(112),i=n(441)(function(t,e,n){r(t,n,e)});t.exports=i},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,f){if("string"!=typeof n){if(l){var h=c(n);h&&h!==l&&t(e,h,f)}var p=a(n);s&&(p=p.concat(s(n)));for(var d=0;d<p.length;++d){var v=p[d];if(!(r[v]||i[v]||f&&f[v])){var m=u(n,v);try{o(e,v,m)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";n.r(e);var r=n(82),i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};
 
/*! *****************************************************************************
 
/*! *****************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
 
Copyright (c) Microsoft Corporation. All rights reserved.
Line 37: Line 37:
 
See the Apache Version 2.0 License for specific language governing permissions
 
See the Apache Version 2.0 License for specific language governing permissions
 
and limitations under the License.
 
and limitations under the License.
***************************************************************************** */function o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function s(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function u(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var c=n(14),l=n.n(c);n.d(e,"registerMessaging",function(){return L}),n.d(e,"isSupported",function(){return F});var f,h,p,d={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},v=((f={})[d.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",f[d.AVAILABLE_IN_SW]="This method is available in a service worker context.",f[d.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",f[d.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",f[d.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",f[d.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",f[d.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",f[d.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",f[d.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",f[d.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",f[d.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",f[d.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",f[d.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",f[d.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",f[d.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",f[d.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",f[d.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",f[d.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",f[d.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",f[d.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",f[d.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",f[d.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",f[d.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",f[d.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",f[d.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",f[d.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",f[d.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",f[d.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",f[d.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",f[d.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",f[d.BAD_SCOPE]="The service worker scope must be a string with at least one character.",f[d.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",f[d.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",f[d.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",f[d.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",f[d.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",f[d.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",f[d.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",f),m=new r.ErrorFactory("messaging","Messaging",v),y=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),g="https://fcm.googleapis.com";function b(t,e){if(null==t||null==e)return!1;if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<t.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function _(t){return function(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(null,e))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(t){t.TYPE_OF_MSG="firebase-messaging-msg-type",t.DATA="firebase-messaging-msg-data"}(h||(h={})),function(t){t.PUSH_MSG_RECEIVED="push-msg-received",t.NOTIFICATION_CLICKED="notification-clicked"}(p||(p={}));var w=function(){function t(){}return t.prototype.getToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s,c,l,f;return u(this,function(u){switch(u.label){case 0:r=_(e.getKey("p256dh")),i=_(e.getKey("auth")),o="authorized_entity="+t+"&endpoint="+e.endpoint+"&encryption_key="+r+"&encryption_auth="+i,b(n.buffer,y.buffer)||(a=_(n),o+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:o},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",c)];case 2:return[4,u.sent().json()];case 3:return l=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_SUBSCRIBE_FAILED);case 5:if(l.error)throw f=l.error.message,m.create(d.TOKEN_SUBSCRIBE_FAILED,{message:f});if(!l.token)throw m.create(d.TOKEN_SUBSCRIBE_NO_TOKEN);if(!l.pushSet)throw m.create(d.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:l.token,pushSet:l.pushSet}]}})})},t.prototype.updateToken=function(t,e,n,r,i){return s(this,void 0,void 0,function(){var o,a,s,c,l,f,h,p;return u(this,function(u){switch(u.label){case 0:o=_(r.getKey("p256dh")),a=_(r.getKey("auth")),s="push_set="+n+"&token="+e+"&authorized_entity="+t+"&endpoint="+r.endpoint+"&encryption_key="+o+"&encryption_auth="+a,b(i.buffer,y.buffer)||(c=_(i),s+="&application_pub_key="+c),(l=new Headers).append("Content-Type","application/x-www-form-urlencoded"),f={method:"POST",headers:l,body:s},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",f)];case 2:return[4,u.sent().json()];case 3:return h=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UPDATE_FAILED);case 5:if(h.error)throw p=h.error.message,m.create(d.TOKEN_UPDATE_FAILED,{message:p});if(!h.token)throw m.create(d.TOKEN_UPDATE_NO_TOKEN);return[2,h.token]}})})},t.prototype.deleteToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:r="authorized_entity="+t+"&token="+e+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:i,body:r},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/unsubscribe",o)];case 2:return[4,u.sent().json()];case 3:if((a=u.sent()).error)throw s=a.error.message,m.create(d.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},t}();function E(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var T="undefined",C="fcm_token_object_Store";function x(){var t=indexedDB.open(T);t.onerror=function(t){},t.onsuccess=function(e){!function(t){if(t.objectStoreNames.contains(C)){var e=t.transaction(C).objectStore(C),n=new w,r=e.openCursor();r.onerror=function(t){console.warn("Unable to cleanup old IDB.",t)},r.onsuccess=function(){var e=r.result;if(e){var i=e.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),e.continue()}else t.close(),indexedDB.deleteDatabase(T)}}}(t.result)}}var S=function(){function t(){this.dbPromise=null}return t.prototype.get=function(t){return this.createTransaction(function(e){return e.get(t)})},t.prototype.getIndex=function(t,e){return this.createTransaction(function(n){return n.index(t).get(e)})},t.prototype.put=function(t){return this.createTransaction(function(e){return e.put(t)},"readwrite")},t.prototype.delete=function(t){return this.createTransaction(function(e){return e.delete(t)},"readwrite")},t.prototype.closeDatabase=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:t.sent().close(),this.dbPromise=null,t.label=2;case 2:return[2]}})})},t.prototype.createTransaction=function(t,e){return void 0===e&&(e="readonly"),s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),r=n.transaction(this.objectStoreName,e),i=r.objectStore(this.objectStoreName),[4,function(t){return new Promise(function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}})}(t(i))];case 2:return o=a.sent(),[2,new Promise(function(t,e){r.oncomplete=function(){t(o)},r.onerror=function(){e(r.error)}})]}})})},t.prototype.getDb=function(){var t=this;return this.dbPromise||(this.dbPromise=new Promise(function(e,n){var r=indexedDB.open(t.dbName,t.dbVersion);r.onsuccess=function(){e(r.result)},r.onerror=function(){t.dbPromise=null,n(r.error)},r.onupgradeneeded=function(e){return t.onDbUpgrade(r,e)}})),this.dbPromise},t}();var k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_token_details_db",e.dbVersion=3,e.objectStoreName="fcm_token_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t,e){var n=t.result;switch(e.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:x();case 2:var r,i=(r=t.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var t=i.result;if(t){var e=t.value,n=a({},e);e.createTime||(n.createTime=Date.now()),"string"==typeof e.vapidKey&&(n.vapidKey=E(e.vapidKey)),"string"==typeof e.auth&&(n.auth=E(e.auth).buffer),"string"==typeof e.auth&&(n.p256dh=E(e.p256dh).buffer),t.update(n),t.continue()}}}},e.prototype.getTokenDetailsFromToken=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_TOKEN);return N({fcmToken:t}),[2,this.getIndex("fcmToken",t)]})})},e.prototype.getTokenDetailsFromSWScope=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_SCOPE);return N({swScope:t}),[2,this.get(t)]})})},e.prototype.saveTokenDetails=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t.swScope)throw m.create(d.BAD_SCOPE);if(!t.vapidKey)throw m.create(d.BAD_VAPID_KEY);if(!t.endpoint||!t.auth||!t.p256dh)throw m.create(d.BAD_SUBSCRIPTION);if(!t.fcmSenderId)throw m.create(d.BAD_SENDER_ID);if(!t.fcmToken)throw m.create(d.BAD_TOKEN);if(!t.fcmPushSet)throw m.create(d.BAD_PUSH_SET);return N(t),[2,this.put(t)]})})},e.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return"string"!=typeof t||0===t.length?[2,Promise.reject(m.create(d.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(e.swScope)];case 2:return n.sent(),[2,e]}})})},e}(S);function N(t){if(t.fcmToken&&("string"!=typeof t.fcmToken||0===t.fcmToken.length))throw m.create(d.BAD_TOKEN);if(t.swScope&&("string"!=typeof t.swScope||0===t.swScope.length))throw m.create(d.BAD_SCOPE);if(t.vapidKey&&(!(t.vapidKey instanceof Uint8Array)||65!==t.vapidKey.length))throw m.create(d.BAD_VAPID_KEY);if(t.endpoint&&("string"!=typeof t.endpoint||0===t.endpoint.length))throw m.create(d.BAD_SUBSCRIPTION);if(t.auth&&!(t.auth instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.p256dh&&!(t.p256dh instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.fcmSenderId&&("string"!=typeof t.fcmSenderId||0===t.fcmSenderId.length))throw m.create(d.BAD_SENDER_ID);if(t.fcmPushSet&&("string"!=typeof t.fcmPushSet||0===t.fcmPushSet.length))throw m.create(d.BAD_PUSH_SET)}var A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_vapid_details_db",e.dbVersion=1,e.objectStoreName="fcm_vapid_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t){t.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},e.prototype.getVapidFromSWScope=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);return[4,this.get(t)];case 1:return[2,(e=n.sent())?e.vapidKey:void 0]}})})},e.prototype.saveVapidDetails=function(t,e){return s(this,void 0,void 0,function(){var n;return u(this,function(r){if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);if(null===e||65!==e.length)throw m.create(d.BAD_VAPID_KEY);return n={swScope:t,vapidKey:e},[2,this.put(n)]})})},e.prototype.deleteVapidDetails=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(t)];case 2:return n.sent(),[2,e]}})})},e}(S),I="messagingSenderId",O=function(){function t(t){var e=this;if(!t.options[I]||"string"!=typeof t.options[I])throw m.create(d.BAD_SENDER_ID);this.messagingSenderId=t.options[I],this.tokenDetailsModel=new k,this.vapidDetailsModel=new A,this.iidModel=new w,this.app=t,this.INTERNAL={delete:function(){return e.delete()}}}return t.prototype.getToken=function(){return s(this,void 0,void 0,function(){var t,e,n,r,i;return u(this,function(o){switch(o.label){case 0:if("denied"===(t=this.getNotificationPermission_()))throw m.create(d.NOTIFICATIONS_BLOCKED);return"granted"!==t?[2,null]:[4,this.getSWRegistration_()];case 1:return e=o.sent(),[4,this.getPublicVapidKey_()];case 2:return n=o.sent(),[4,this.getPushSubscription(e,n)];case 3:return r=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(e.scope)];case 4:return(i=o.sent())?[2,this.manageExistingToken(e,r,n,i)]:[2,this.getNewToken(e,r,n)]}})})},t.prototype.manageExistingToken=function(t,e,n,r){return s(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return function(t,e,n){if(!n.vapidKey||!b(e.buffer,n.vapidKey.buffer))return!1;var r=t.endpoint===n.endpoint,i=b(t.getKey("auth"),n.auth),o=b(t.getKey("p256dh"),n.p256dh);return r&&i&&o}(e,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(t,e,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(t,e,n)]}})})},t.prototype.updateToken=function(t,e,n,r){return s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,e,n)];case 1:return i=s.sent(),o={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return s.sent(),[2,i];case 4:return a=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}})})},t.prototype.getNewToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,e,n)];case 1:return r=o.sent(),i={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return o.sent(),[2,r.token]}})})},t.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e,n;return u(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(t)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(e=r.sent())?[4,e.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},t.prototype.deleteTokenFromDB=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(t)];case 1:return e=n.sent(),[4,this.iidModel.deleteToken(e.fcmSenderId,e.fcmToken,e.fcmPushSet)];case 2:return n.sent(),[2]}})})},t.prototype.getPushSubscription=function(t,e){return t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e})})},t.prototype.requestPermission=function(){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.useServiceWorker=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.usePublicVapidKey=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onMessage=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onTokenRefresh=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.setBackgroundMessageHandler=function(t){throw m.create(d.AVAILABLE_IN_SW)},t.prototype.delete=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return t.sent(),[2]}})})},t.prototype.getNotificationPermission_=function(){return Notification.permission},t.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},t.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},t.prototype.getIidModel=function(){return this.iidModel},t}();var P=function(t){function e(e){var n=t.call(this,e)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(t){n.onPush(t)}),self.addEventListener("pushsubscriptionchange",function(t){n.onSubChange(t)}),self.addEventListener("notificationclick",function(t){n.onNotificationClick(t)}),n}return o(e,t),e.prototype.onPush=function(t){t.waitUntil(this.onPush_(t))},e.prototype.onSubChange=function(t){t.waitUntil(this.onSubChange_(t))},e.prototype.onNotificationClick=function(t){t.waitUntil(this.onNotificationClick_(t))},e.prototype.onPush_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i,o,a;return u(this,function(s){switch(s.label){case 0:if(!t.data)return[2];try{e=t.data.json()}catch(t){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(e)]:(n=this.getNotificationData_(e))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),o=n.actions,a=Notification.maxActions,o&&a&&o.length>a&&console.warn("This browser only supports "+a+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},e.prototype.onSubChange_=function(t){return s(this,void 0,void 0,function(){var t,e,n,r;return u(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return t=i.sent(),[3,3];case 2:throw e=i.sent(),m.create(d.UNABLE_TO_RESUBSCRIBE,{message:e});case 3:return i.trys.push([3,5,,8]),[4,t.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(t.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},e.prototype.onNotificationClick_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return t.notification&&t.notification.data&&t.notification.data.FCM_MSG?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(e=t.notification.data.FCM_MSG).notification&&(n=e.fcmOptions&&e.fcmOptions.link||e.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=o.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=o.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=o.sent(),o.label=5;case 5:return r?(delete e.notification,delete e.fcmOptions,i=D(p.NOTIFICATION_CLICKED,e),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},e.prototype.getNotificationData_=function(t){if(t&&"object"==typeof t.notification){var e,n=a({},t.notification);return n.data=a({},t.notification.data,((e={}).FCM_MSG=t,e)),n}},e.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw m.create(d.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=t},e.prototype.getWindowClient_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return e=new URL(t,self.location.href).href,[4,R()];case 1:for(n=o.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===e){r=n[i];break}return[2,r]}})})},e.prototype.attemptToMessageClient_=function(t,e){return s(this,void 0,void 0,function(){return u(this,function(n){if(!t)throw m.create(d.NO_WINDOW_CLIENT_TO_MSG);return t.postMessage(e),[2]})})},e.prototype.hasVisibleClients_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,R()];case 1:return[2,t.sent().some(function(t){return"visible"===t.visibilityState})]}})})},e.prototype.sendMessageToWindowClients_=function(t){return s(this,void 0,void 0,function(){var e,n,r=this;return u(this,function(i){switch(i.label){case 0:return[4,R()];case 1:return e=i.sent(),n=D(p.PUSH_MSG_RECEIVED,t),[4,Promise.all(e.map(function(t){return r.attemptToMessageClient_(t,n)}))];case 2:return i.sent(),[2]}})})},e.prototype.getSWRegistration_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,self.registration]})})},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(t=n.sent()))throw m.create(d.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(t.scope)];case 2:return null==(e=n.sent())?[2,y]:[2,e]}})})},e}(O);function R(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function D(t,e){return(n={})[h.TYPE_OF_MSG]=t,n[h.DATA]=e,n;var n}var M=function(t){function e(e){var n=t.call(this,e)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(r.createSubscribe)(function(t){n.messageObserver=t}),n.onTokenRefreshInternal=Object(r.createSubscribe)(function(t){n.tokenRefreshObserver=t}),n.setupSWMessageListener_(),n}return o(e,t),e.prototype.getToken=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:if(!(t=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(t.href)];case 2:return[4,n.sent().json()];case 3:return e=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!e||!e.gcm_sender_id)return[2];if("103953800507"!==e.gcm_sender_id)throw m.create(d.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return e.sent(),[2,t.prototype.getToken.call(this)]}})})},e.prototype.requestPermission=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?m.create(d.PERMISSION_BLOCKED):m.create(d.PERMISSION_DEFAULT)}})})},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw m.create(d.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw m.create(d.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=t},e.prototype.usePublicVapidKey=function(t){if("string"!=typeof t)throw m.create(d.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw m.create(d.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var e=E(t);if(65!==e.length)throw m.create(d.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=e},e.prototype.onMessage=function(t,e,n){return"function"==typeof t?this.onMessageInternal(t,e,n):this.onMessageInternal(t)},e.prototype.onTokenRefresh=function(t,e,n){return"function"==typeof t?this.onTokenRefreshInternal(t,e,n):this.onTokenRefreshInternal(t)},e.prototype.waitForRegistrationToActivate_=function(t){var e=t.installing||t.waiting||t.active;return new Promise(function(n,r){if(e)if("activated"!==e.state)if("redundant"!==e.state){var i=function(){if("activated"===e.state)n(t);else{if("redundant"!==e.state)return;r(m.create(d.SW_REG_REDUNDANT))}e.removeEventListener("statechange",i)};e.addEventListener("statechange",i)}else r(m.create(d.SW_REG_REDUNDANT));else n(t);else r(m.create(d.NO_SW_IN_REG))})},e.prototype.getSWRegistration_=function(){var t=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(t){throw m.create(d.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(e){return t.waitForRegistrationToActivate_(e).then(function(){return t.registrationToUse=e,e.update(),e})}))},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,y]})})},e.prototype.setupSWMessageListener_=function(){var t=this;navigator.serviceWorker.addEventListener("message",function(e){if(e.data&&e.data[h.TYPE_OF_MSG]){var n=e.data;switch(n[h.TYPE_OF_MSG]){case p.PUSH_MSG_RECEIVED:case p.NOTIFICATION_CLICKED:var r=n[h.DATA];t.messageObserver&&t.messageObserver.next(r)}}},!1)},e}(O);function L(t){var e={isSupported:F};t.INTERNAL.registerService("messaging",function(t){if(!F())throw m.create(d.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(t):new M(t)},e)}function F(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}L(l.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t=this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Sidebar example")),o.default.createElement(a.default,{color:"grey",style:{paddingBottom:"30px"}},o.default.createElement(u.Grid,{columns:2,textAlign:"left",stackable:!0},o.default.createElement(u.Grid.Column,{width:13},o.default.createElement(u.Segment,{style:{padding:"30px"}},o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Title one. Yay :)"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Second title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Finally, third title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null))),o.default.createElement(u.Grid.Column,{width:3,textAlign:"center"},o.default.createElement(u.Menu,{vertical:!0,fluid:!0},o.default.createElement(u.Menu.Item,{name:"Title one. Yay :)",active:"Title one. Yay :)"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Second title",active:"Second title"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Finally, third title",active:"Finally, third title"===t,onClick:this.handleItemClick}))))))}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t;this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Outreach")),o.default.createElement(a.default,{color:"white"},o.default.createElement(u.Container,{text:!0},o.default.createElement(u.Grid,(l(t={stackable:!0,divided:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"Work with us!"),o.default.createElement("p",null,"We would love to collaborate with other iGem teams. To get in contact, use the details below.")),o.default.createElement(u.Grid.Column,{verticalAlign:"center"},o.default.createElement(u.Segment,{style:{marginTop:"1em"}},o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Email: ",o.default.createElement("a",{href:"#"},"nottinghamigem@outlook.com")),o.default.createElement(u.List.Item,null,"Phone: (+44) 0115 846 8001"),o.default.createElement(u.List.Item,{style:{marginTop:"1em"}},o.default.createElement("strong",null,"Address: "),o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Centre for Biomolecular Sciences"),o.default.createElement(u.List.Item,null,"University of Nottingham"),o.default.createElement(u.List.Item,null,"Nottingham"),o.default.createElement(u.List.Item,null,"NG7 2RD")))))))))))}}]),e}();e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(61))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(a.default,{color:"white",style:{paddingBottom:"30px",backgroundColor:"white"}},o.default.createElement(s.Grid,{verticalAlign:"middle",columns:8,inverted:!0,doubling:!0},o.default.createElement(s.Grid.Row,null,o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/BBSRC%20.jpg?alt=media&token=4bf35f00-9185-4693-b9c4-bdf4182a48a2"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/DW%20Logo.jpg?alt=media&token=84bd9fe3-59c9-4c0c-a6b5-7db2117fe24a"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Eppendorf.png?alt=media&token=5fc72b9d-bbca-4c3d-bdf2-536638c40615"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Labfolder.png?alt=media&token=3dde8225-2853-4f7b-8b1d-51c3813b9174"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/NEB.png?alt=media&token=c8504b3a-e60d-42d7-bcc0-d17921822bd6"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Qiagen.png?alt=media&token=0d3417a9-f532-4ae0-b209-0f9cdbf5e40f"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Snapgene%20logo.png?alt=media&token=8bd2b021-05a4-4952-b29c-7c6388d2010e"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/SynBio.png?alt=media&token=30fb2ec3-18ca-45d0-a9f1-a5a30a28f334"})))))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=l(i),a=l(n(61)),s=l(n(102)),u=(l(n(76)),n(37)),c=n(101);function l(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"blue",style:{height:"30vh"}},o.default.createElement(c.Link,{to:"/Team"},o.default.createElement("div",{style:{color:"white",position:"absolute",right:"20px",top:"15px",fontSize:"2.5em",cursor:"pointer"}},"×")),o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},unescape(window.location.hash.split("?name=")[1]))),o.default.createElement(a.default,{color:"white",style:{height:"100vh"}}),o.default.createElement("style",null,".ui.menu {display:none}"))}}]),e}();e.default=f},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp{padding:0!important}.Team_profileName_1XfIKGYChuTmXuK_SxlpeJ{position:absolute;top:3em;padding-left:.5em;background-color:#ffffff6b;padding:.5em;margin-left:.5em}.Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF{height:10em}.Team_profilePicture_20LK8DeEyHHschQzoZXrdm{width:10em;margin-top:2.5em;float:right;border-radius:50%;margin-right:2.5em}.Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT{padding:2em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Team/Team.css"],names:[],mappings:"AAAA,6CACC,mBAAuB,CACvB,AACD,yCACI,kBAAmB,AACnB,QAAW,AACX,kBAAoB,AACpB,2BAA4B,AAC5B,aAAqB,AACrB,gBAAmB,CACtB,AACD,0CACC,WAAY,CACZ,AACD,4CACI,WAAY,AACZ,iBAAkB,AAClB,YAAa,AACb,kBAAmB,AACnB,kBAAoB,CACvB,AACD,gDACC,WAAW,CACX",file:"Team.css",sourcesContent:[".unpaddedContent {\n\tpadding:0px !important;\n}\n.profileName {\n    position: absolute;\n    top: 3.0em;\n    padding-left: 0.5em;\n    background-color: #ffffff6b;\n    padding: 0.5em 0.5em;\n    margin-left: 0.5em;\n}\n.profileHeader { \n\theight:10em;\n}\n.profilePicture {\n    width: 10em;\n    margin-top: 2.5em;\n    float: right;\n    border-radius: 50%;\n    margin-right: 2.5em;\n}\n.profileDescription {\n\tpadding:2em\n}"],sourceRoot:""}]),e.locals={unpaddedContent:"Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp",profileName:"Team_profileName_1XfIKGYChuTmXuK_SxlpeJ",profileHeader:"Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF",profilePicture:"Team_profilePicture_20LK8DeEyHHschQzoZXrdm",profileDescription:"Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT"}},function(t,e,n){var r=n(302);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=[{name:"Hassan Al-ubeidi",role:"Wiki / Modeller",paragraph:"I study Computer Science and I work within the lab to help out with the modelling and create the Wiki. I found iGem appealing because I wanted to do something interdisciplenary, and enjoyed Biology and Chemistry at A level/ Highschool.\n An interesting fact about me is that I have flappy hands and can clap with one hand.",hierarchy:"student",profilePicture:"https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png",coverPicture:"https://preview.ibb.co/fHndn8/Screen_Shot_2018_06_25_at_10_41_58.png"},{name:"Daniel Partridge",role:"Web Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Fatima Taha",role:"Team Leader / Wet Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lucy Allen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Nemira Žilinskaitė",role:"Wet lab/ Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Varun Lobo",role:"Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Ruth Bentley",role:"Modeller",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Eun Cho",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Sofya Berestova",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lukas Hoen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Chris Humphreys",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Daphne Groothius",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Craig Woods",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Louise",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n,i,o=960,a=200,s=96,u=50,c=50,l="role",f="name",h="views",p=-550,d="hearts",v=!1,m=!1;function y(y){var g=y.datum();y;var b=y,_=b.selectAll("svg");_.attr("width",o).attr("height",a),g.forEach(function(t){_.append("defs").append("pattern").attr("id",t.name.split(" ")[0]).attr("height","100%").attr("width","100%").append("image").attr("height","100").attr("width","100").attr("preserveAspectRatio","none").attr("xlink:href","dist/images/"+t.name.split(" ")[0]+" Square.jpg")}),i=_;var w=y.append("div").style("position","absolute").style("visibility","hidden").style("color","black").style("padding","8px").style("background-color","#e9ecef").style("border-radius","6px").style("text-align","center").style("width","200px").text("");r.forceSimulation(g).force("charge",r.forceManyBody().strength([p])).force("x",r.forceX()).force("y",r.forceY()).on("tick",function(t){C.attr("transform",function(t){return"translate("+[t.x+o/2,t.y+(a+s)/2]+")"})});v?r.scaleOrdinal().domain(n).range(e):r.scaleOrdinal(r.schemeCategory10);var E=r.min(g,function(t){return+t[h]}),T=r.max(g,function(t){return+t[h]}),C=(r.scaleLinear().domain([E,T]).range([u,c]),_.selectAll("circle").data(g).enter().append("g").attr("transform","translate("+[o/2,a/2]+")").style("opacity",1));_.append("circle").attr("id","petri-dish").attr("r","350").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#e4e4e4").style("stroke-width",30),_.append("circle").attr("id","petri-dish").attr("r","320").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#b9b9b9").style("stroke-width",30),C.append("circle").attr("id",function(t,e){return e}).attr("r",50).attr("fill",function(t){return"url(#"+t.name.split(" ")[0]+")"}).style("stroke",function(t){return"student"==t.hierarchy?"#00547f":"#ffd300"}).style("stroke-width",3).on("mouseover",function(t){return w.html(t[f]+"<br/>"+t[l]+"<br/>"),w.style("visibility","visible")}).on("mousemove",function(){return r.select(this).style("stroke-width",6),r.select(this).style("cursor","pointer"),w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return r.select(this).style("stroke-width",3),r.select(this).style("cursor","default"),w.style("visibility","hidden")}).on("click",function(e){console.log(e),t(e.name,e.paragraph,e.role,e.profilePicture,e.coverPicture)}),C.append("clipPath").attr("id",function(t,e){return"clip-"+e}).append("use").attr("xlink:href",function(t,e){return"#"+e}),m&&C.append("text").attr("clip-path",function(t,e){return"url(#clip-"+e+")"}).attr("text-anchor","middle").append("tspan").attr("x",function(t){return 0}).attr("y",function(t){return".3em"}).text(function(t){return t[f]}).on("mouseover",function(t){return w.html(t[f]+"<br/>"+t[l]+"<br/>"+t[h]+" "+d),w.style("visibility","visible")}).on("mousemove",function(){return w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return w.style("visibility","hidden")})}return y.width=function(t){return arguments.length?(o=t,y):o},y.height=function(t){return arguments.length?(s=.05*(a=t),y):a},y.columnForColors=function(t){return arguments.length?(l=t,y):l},y.columnForRadius=function(t){return arguments.length?(h=t,y):h},y.columnForTitle=function(t){return arguments.length?(f=t,y):f},y.minRadius=function(t){return arguments.length?(u=t,y):u},y.maxRadius=function(t){return arguments.length?(c=t,y):c},y.forceApart=function(t){return arguments.length?(p=t,y):p},y.unitName=function(t){return arguments.length?(d=t,y):d},y.customColors=function(t,r){return v=!0,n=t,e=r,y},y.showTitleOnCircle=function(t){return arguments.length?(m=t,y):m},y.title=function(t){return arguments.length?(title=t,y):title},y.remove=function(t){return i.selectAll("text").style("opacity",1).transition().duration(500).style("opacity","0").remove(),arguments.length?i.selectAll("g").style("opacity",1).duration(500).style("opacity","0").remove().on("end",t):i.selectAll("g").style("opacity",1).transition().duration(500).style("opacity","0").remove(),y},y};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196)),s=c(n(305)),u=c(n(304));n(37);function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){var t=u.default,e=(0,s.default)(this.props.toggle).width(800).height(800);a.select("#chart").datum(t).call(e)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement("div",{class:"chart-example",id:"chart"},o.default.createElement("svg",null)))}}]),e}();e.default=l},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#f25d53;text-align:center}.Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#c23616;text-align:center}.Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#e1b12c;text-align:center}.Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#0097e6;text-align:center}.Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#192a56;text-align:center}.Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#2f3640;text-align:center}.Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ{height:400px;padding:5.5em 0;min-width:100vw;background-color:#f5f6fa;text-align:center}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Jumbotron/Jumbotron.css"],names:[],mappings:"AAAA,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAiB,AACjB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,+CACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,iDACC,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB",file:"Jumbotron.css",sourcesContent:[".orangeJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n\ttext-align:center;\n}\n.redJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #c23616;\n\ttext-align:center;\n}\n.yellowJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #e1b12c;\n\ttext-align:center;\n}\n.blueJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #0097e6;\n\ttext-align:center;\n}\n.navyJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #192a56;\n\ttext-align:center;\n}\n.darkJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #2f3640;\n\ttext-align:center;\n}\n.whiteJumbotron {\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #f5f6fa;\n\ttext-align:center;\n}"],sourceRoot:""}]),e.locals={orangeJumbotron:"Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9",redJumbotron:"Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy",yellowJumbotron:"Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL",blueJumbotron:"Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id",navyJumbotron:"Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF",darkJumbotron:"Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG",whiteJumbotron:"Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ"}},function(t,e,n){var r=n(307);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=f(i),a=f(n(61)),s=f(n(102)),u=(f(n(76)),f(n(306))),c=n(37),l=f(n(303));n(101);function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={showModal:!1,userInfo:{name:null,paragraph:null,profilePicture:null,role:null,profileCover:null}},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"toggleProfile",value:function(t,e,n,r,i){this.setState({showModal:!0,userInfo:{name:t,paragraph:e,profilePicture:r,role:n,profileCover:i}})}},{key:"closeModal",value:function(){this.setState({showModal:!1})}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"red",style:{height:"30vh"}},o.default.createElement(c.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Meet the team!")),o.default.createElement(a.default,{color:"white",style:{height:"130vh"}},o.default.createElement(u.default,{toggle:this.toggleProfile.bind(this)})),o.default.createElement(c.Modal,{size:"small",open:this.state.showModal,closeOnRootNodeClick:!0},o.default.createElement(c.Modal.Content,{className:l.default.unpaddedContent},o.default.createElement("div",{className:l.default.profileHeader,style:{backgroundImage:"url('"+this.state.userInfo.profileCover+"')",backgroundSize:"cover"}},o.default.createElement("h2",{className:l.default.profileName},this.state.userInfo.name),o.default.createElement("img",{src:this.state.userInfo.profilePicture,className:l.default.profilePicture}),o.default.createElement(c.Icon,{onClick:this.closeModal.bind(this),circular:!0,inverted:!0,color:"blue",link:!0,name:"delete",style:{position:"absolute",right:"-1.125em",top:"-1.125em",fontSize:"1.5em",opacity:1}})),o.default.createElement(c.Modal.Description,{className:l.default.profileDescription},o.default.createElement(c.Header,null,this.state.userInfo.role),o.default.createElement("p",null,this.state.userInfo.paragraph),o.default.createElement("div",{style:{textAlign:"left"}},o.default.createElement("strong",null,"Follow me on:")," ",o.default.createElement(c.Button,{basic:!0,circular:!0,icon:!0},o.default.createElement(c.Icon,{name:"twitter"}))," ",o.default.createElement(c.Button,{basic:!0,circular:!0,icon:!0},o.default.createElement(c.Icon,{name:"instagram"}))," ",o.default.createElement(c.Button,{basic:!0,circular:!0,icon:!0},o.default.createElement(c.Icon,{name:"email"})))))))}}]),e}();e.default=h},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Home_pageHeader_B_ekbgPPnqW8er8XvLnwf{margin-top:2em;text-align:left;padding:1em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Home/Home.css"],names:[],mappings:"AAAA,uCACC,eAAe,AACf,gBAAgB,AAChB,WAAY,CACZ",file:"Home.css",sourcesContent:[".pageHeader {\n\tmargin-top:2em;\n\ttext-align:left;\n\tpadding:1em;\n}"],sourceRoot:""}]),e.locals={pageHeader:"Home_pageHeader_B_ekbgPPnqW8er8XvLnwf"}},function(t,e,n){var r=n(310);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(76)),u=n(37);c(n(311));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){}},{key:"scrollToElementRef",value:function(t){this[t].scrollIntoView()}},{key:"render",value:function(){var t,e=this;return o.default.createElement("div",null,o.default.createElement(a.default,{color:"navy"},o.default.createElement(s.default,{header:"Team Nottingham!",subheader:"Engineering bacteriophages to silence toxin expression in Clostridium difficile",scrollTarget:function(){return e.scrollToElementRef("whatWhyHow")}})),o.default.createElement("a",{ref:function(t){return e.whatWhyHow=t}}),o.default.createElement(a.default,{color:"white",containerStyle:{padding:"50px",paddingBottom:"65px"}},o.default.createElement(u.Grid,{stackable:!0,columns:3,divided:!0},o.default.createElement(u.Grid.Row,{style:{marginTop:"2em"}},o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,{style:{fontSize:"1em"}},"What is C. difficile infection?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em",fontSize:"0.8em"}},"Clostridium difficile infection is the most common cause of antibiotic-associated diarrhoea in the Western World and is a big problem in hospitals and care-facilities. The disease symptoms are caused by two major toxins, TcdA and TcdB. The use of broad-spectrum antibiotics causes a reduction in the natural diversity of the gut microbiota allowing C. difficile to take advantage. It is thought that non-toxigenic C. difficile present in the gut microbiota could act as a possible probiotic, out-competing toxigenic C. difficile.")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,{style:{fontSize:"1em"}},"What is the problem?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em",fontSize:"0.8em"}},"A consequence of antibiotic misuse and the capability of bacteria to readily evolve has allowed antibiotic resistance to become a worldwide major dilemma. Each year in the US alone 2 million people are subject to infection from antibiotic resistant bacteria. Currently C. difficile is only treatable with a handful of antibiotics which is problematic when antibiotic use is a major risk factor for the infection and in the view of the global concern over antibiotic resistance. The use of bacteriophages has been proposed as a major alternative treatment for many diseases including C. difficile infection.")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,{style:{fontSize:"1em"}},"What are we going to do?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em",fontSize:"0.8em"}},"The goal of our project is to engineer a phage which will infect C. difficile and express genetic constructs designed to suppress toxin production. We will pursue two strategies to achieve this: asRNA and dCas9, both of which will target the toxin genes,tcdA and tcdB. Ultimately we aim to produce a highly specific phage therapeutic which will reduce toxigenicity of resident strains of C. difficile without significantly affecting the native gut microbiota."))))),o.default.createElement(a.default,{color:"dark",id:"what-why-how"},o.default.createElement(u.Grid,(l(t={stackable:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Statistic,{inverted:!0},o.default.createElement(u.Statistic.Value,null,"£103,990,800"),o.default.createElement(u.Statistic.Label,{style:{marginTop:"1em",color:"#9db4da"}},o.default.createElement("a",{href:"https://www.gov.uk/government/statistics/clostridium-difficile-infection-monthly-data-by-nhs-acute-trust"},"Amount spent treating C. Diff. by the NHS"))))))))}}]),e}();e.default=f},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS{color:#fff;min-width:100vw;background-color:#f25d53}.PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT{color:#fff;min-width:100vw;background-color:#c23616}.PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf{color:#fff;min-width:100vw;background-color:#e1b12c}.PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF{color:#fff;min-width:100vw;background-color:#0097e6}.PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36{color:#fff;min-width:100vw;background-color:#192a56}.PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2{min-width:100vw;background-color:#dcdde1;color:#464e67}.PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w{color:#fff;min-width:100vw;background-color:#2f3640}.PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG{min-width:100vw;background-color:#f5f6fa}.PageCard_container_1ok2Drx5q2skrrX8ItRY6X{text-align:center;padding-top:30px}.PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0{font-size:4rem!important;font-weight:400!important;margin-bottom:0!important;padding-top:25%!important;text-align:center}.PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds{font-size:1.7rem!important;font-weight:400!important;margin-top:1.5rem!important;text-align:center}.PageCard_pageDown_oHQuAa3AvckqK3vgxCT68{margin-top:30%!important}.PageCard_footer_1aaHIPN4H4iCi2PegG278N{padding:2.5em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/PageCard/PageCard.css"],names:[],mappings:"AAAA,gDACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,4CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CAEC,gBAAiB,AACd,yBAA0B,AAC1B,aAAe,CAClB,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,2CACC,kBAAkB,AAClB,gBAAiB,CACjB,AACD,4CACC,yBAA2B,AACxB,0BAA+B,AAC/B,0BAA8B,AAC9B,0BAA4B,AAC5B,iBAAkB,CACrB,AACD,+CACC,2BAA6B,AAC1B,0BAA+B,AAC/B,4BAA8B,AAC9B,iBAAkB,CACrB,AACD,yCACC,wBAA0B,CAC1B,AACD,wCACC,aAAc,CACd",file:"PageCard.css",sourcesContent:[".orangePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n}\n.redPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #c23616;\n}\n.yellowPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #e1b12c;\n}\n.bluePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #0097e6;\n}\n.navyPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #192a56;\n}\n.greyPageCard {\n\n\tmin-width: 100vw;\n    background-color: #dcdde1;\n    color: #464e67;\n}\n.darkPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #2f3640;\n}\n.whitePageCard {\n\tmin-width: 100vw;\n\tbackground-color: #f5f6fa;\n}\n.container {\n\ttext-align:center;\n\tpadding-top:30px;\n}\n.pageHeader {\n\tfont-size: 4rem !important;\n    font-weight: normal !important;\n    margin-bottom: 0px !important;\n    padding-top: 25% !important;\n    text-align:center;\n}\n.pageSubHeader {\n\tfont-size: 1.7rem !important;\n    font-weight: normal !important;\n    margin-top: 1.5rem !important;\n    text-align:center;\n}\n.pageDown {\n\tmargin-top:30% !important;\n}\n.footer {\n\tpadding:2.5em;\n}"],sourceRoot:""}]),e.locals={orangePageCard:"PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS",redPageCard:"PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT",yellowPageCard:"PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf",bluePageCard:"PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF",navyPageCard:"PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36",greyPageCard:"PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2",darkPageCard:"PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w",whitePageCard:"PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG",container:"PageCard_container_1ok2Drx5q2skrrX8ItRY6X",pageHeader:"PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0",pageSubHeader:"PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds",pageDown:"PageCard_pageDown_oHQuAa3AvckqK3vgxCT68",footer:"PageCard_footer_1aaHIPN4H4iCi2PegG278N"}},function(t,e,n){"use strict";n.r(e),n.d(e,"registerStorage",function(){return Kt});var r=n(14),i=n.n(r),o="https://firebasestorage.googleapis.com",a="https://firebasestorage.googleapis.com",s="/v0",u="/v0",c=12e4,l=6e4,f=-9007199254740991,h=function(){function t(t,e){this.code_=d(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return d(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),t}(),p={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"};function d(t){return"storage/"+t}function v(){return new h(p.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(){return new h(p.CANCELED,"User canceled the upload/download.")}function y(){return new h(p.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function g(t,e,n){return new h(p.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function b(){return new h(p.APP_DELETED,"The Firebase app was deleted.")}function _(t,e){return new h(p.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new h(p.INTERNAL_ERROR,"Internal error: "+t)}var E={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function T(t){switch(t){case E.RAW:case E.BASE64:case E.BASE64URL:case E.DATA_URL:return;default:throw"Expected one of the event types: ["+E.RAW+", "+E.BASE64+", "+E.BASE64URL+", "+E.DATA_URL+"]."}}var C=function(){return function(t,e){this.data=t,this.contentType=e||null}}();function x(t,e){switch(t){case E.RAW:return new C(S(e));case E.BASE64:case E.BASE64URL:return new C(k(t,e));case E.DATA_URL:return new C(function(t){var e=new N(t);return e.base64?k(E.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(t){throw _(E.DATA_URL,"Malformed data URL.")}return S(e)}(e.rest)}(e),function(t){return new N(t).contentType}(e))}throw v()}function S(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r))if(n<t.length-1&&56320==(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function k(t,e){switch(t){case E.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw _(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case E.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw _(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(e)}catch(e){throw _(t,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;u++)s[u]=a.charCodeAt(u);return s}var N=function(){return function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw _(E.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i}}();var A,I={STATE_CHANGED:"state_changed"},O={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},P={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function R(t){switch(t){case O.RUNNING:case O.PAUSING:case O.CANCELING:return P.RUNNING;case O.PAUSED:return P.PAUSED;case O.SUCCESS:return P.SUCCESS;case O.CANCELED:return P.CANCELED;case O.ERROR:default:return P.ERROR}}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function M(t,e){for(var n in t)D(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return M(t,function(t,n){e[t]=n}),e}function F(t){return new Promise(t)}function U(t){return Promise.resolve(t)}function j(t){return null!=t}function B(t){return void 0!==t}function q(t){return"function"==typeof t}function V(t){return"object"==typeof t}function W(t){return V(t)&&null!==t}function H(t){return"string"==typeof t||t instanceof String}function z(t){return K()&&t instanceof Blob}function K(){return"undefined"!=typeof Blob}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(A||(A={}));var G=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=A.NO_ERROR,this.sendPromise_=F(function(e,n){t.xhr_.addEventListener("abort",function(n){t.errorCode_=A.ABORT,e(t)}),t.xhr_.addEventListener("error",function(n){t.errorCode_=A.NETWORK_ERROR,e(t)}),t.xhr_.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var i=this;if(this.sent_)throw w("cannot .send() more than once");(this.sent_=!0,this.xhr_.open(e,t,!0),j(r))&&M(r,function(t,e){i.xhr_.setRequestHeader(t,e.toString())});return j(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw w("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),Q=function(){function t(){}return t.prototype.createXhrIo=function(){return new G},t}();function Y(t){var e,n;try{e=JSON.parse(t)}catch(t){return null}return V(n=e)&&!Array.isArray(n)?e:null}var X=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n,r;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw r=e,new h(p.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.")},t.makeFromUrl=function(e){var n=null;for(var r=[{regex:new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:function(t){t.path_=decodeURIComponent(t.path)}}],i=0;i<r.length;i++){var o=r[i],a=o.regex.exec(e);if(a){var s=a[o.indices.bucket],u=a[o.indices.path];u||(u=""),n=new t(s,u),o.postModify(n);break}}if(null==n)throw function(t){return new h(p.INVALID_URL,"Invalid URL '"+t+"'.")}(e);return n},t}();function $(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function J(t){return o+s+t}function Z(t){return o+u+t}function tt(t){var e=encodeURIComponent,n="?";return M(t,function(t,r){var i=e(t)+"="+e(r);n=n+i+"&"}),n=n.slice(0,-1)}function et(t,e){return e}var nt=function(){return function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||et}}(),rt=null;function it(){if(rt)return rt;var t=[];t.push(new nt("bucket")),t.push(new nt("generation")),t.push(new nt("metageneration")),t.push(new nt("name","fullPath",!0));var e=new nt("name");e.xform=function(t,e){return function(t){return!H(t)||t.length<2?t:$(t=t)}(e)},t.push(e);var n=new nt("size");return n.xform=function(t,e){return j(e)?+e:e},t.push(n),t.push(new nt("timeCreated")),t.push(new nt("updated")),t.push(new nt("md5Hash",null,!0)),t.push(new nt("cacheControl",null,!0)),t.push(new nt("contentDisposition",null,!0)),t.push(new nt("contentEncoding",null,!0)),t.push(new nt("contentLanguage",null,!0)),t.push(new nt("contentType",null,!0)),t.push(new nt("metadata","customMetadata",!0)),rt=t}function ot(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new X(n,r);return e.makeStorageReference(i)}})}(r,t),r}function at(t,e,n){var r=Y(e);return null===r?null:ot(t,r,n)}function st(t,e){var n=Y(e);if(null===n)return null;if(!H(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map(function(e){var n=t.bucket,r=t.fullPath;return function(t){return a+s+t}("/b/"+i(n)+"/o/"+i(r))+tt({alt:"media",token:e})})[0]}function ut(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function ct(t){if(!(t&&V(t)))throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if(!V(n))throw"Expected object for 'customMetadata' mapping."}else if(W(n))throw"Mapping for '"+e+"' cannot be an object."}}function lt(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}var a,s,u,c,l,f;if(!(r<=n.length&&n.length<=i))throw a=r,s=i,u=t,c=n.length,a===s?(l=a,f=1===a?"argument":"arguments"):(l="between "+a+" and "+s,f="arguments"),new h(p.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+u+"`: Expected "+l+" "+f+", received "+c+".");for(o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(e){throw e instanceof Error?g(o,t,e.message):g(o,t,e)}}var ft=function(){return function(t,e){var n=this;this.validator=function(e){n.optional&&!B(e)||t(e)},this.optional=!!e}}();function ht(t,e){function n(t){if(!H(t))throw"Expected string."}var r,i,o;return t?(i=n,o=t,r=function(t){i(t),o(t)}):r=n,new ft(r,e)}function pt(t){return new ft(ct,t)}function dt(){return new ft(function(t){if(!(function(t){return"number"==typeof t||t instanceof Number}(t)&&t>=0))throw"Expected a number 0 or greater."})}function vt(t,e){return new ft(function(e){if(!(null===e||j(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)},e)}function mt(t){return new ft(function(t){if(null!==t&&!q(t))throw"Expected a Function."},t)}function yt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}var gt=function(){function t(t,e){var n=0,r="";z(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(z(this.data_)){var r=this.data_,i=(a=e,s=n,(o=r).webkitSlice?o.webkitSlice(a,s):o.mozSlice?o.mozSlice(a,s):o.slice?o.slice(a,s):null);return null===i?null:new t(i)}var o,a,s;return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(K()){var r=e.map(function(e){return e instanceof t?e.data_:e});return new t(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=yt();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(K())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}.apply(null,r))}var i=e.map(function(t){return H(t)?x(E.RAW,t).data:t.data_}),o=0;i.forEach(function(t){o+=t.byteLength});var a=new Uint8Array(o),s=0;return i.forEach(function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]}),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}();function bt(t,e){return-1!==t.indexOf(e)}var _t=function(){return function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}();function wt(t){if(!t)throw v()}function Et(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),i}}function Tt(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new h(p.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new h(p.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new h(p.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function Ct(t){var e=Tt(t);return function(n,r){var i,o=e(n,r);return 404===n.getStatus()&&(i=t.path,o=new h(p.OBJECT_NOT_FOUND,"Object '"+i+"' does not exist.")),o.setServerResponseProp(r.serverResponseProp()),o}}function xt(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",Et(t,n),i);return o.errorHandler=Ct(e),o}function St(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",function(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),st(i,r)}}(t,n),i);return o.errorHandler=Ct(e),o}function kt(t,e,n){var r=L(n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var Nt=function(){return function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null}}();function At(t,e){var n;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(t){wt(!1)}return wt(bt(e||["active"],n)),n}function It(t,e,n,r,i,o,a,s){var u=new Nt(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new h(p.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,l=c;i>0&&(l=Math.min(l,i));var f=u.current,d=f+l,v={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},m=r.slice(f,d);if(null===m)throw y();var g=e.maxUploadRetryTime(),b=new _t(n,"POST",function(t,n){var i,a=At(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?Et(e,o)(t,n):null,new Nt(s,c,"final"===a,i)},g);return b.headers=v,b.body=m.uploadData(),b.progressCallback=s||null,b.errorHandler=Tt(t),b}var Ot=function(){return function(t,e,n){if(q(t)||j(e)||j(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}}(),Pt=function(){return function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o}}();function Rt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];U(!0).then(function(){t.apply(null,e)})}}var Dt=function(){function t(t,e,n,r,i,o){void 0===o&&(o=null);var a=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=O.RUNNING,this.errorHandler_=function(t){a.request_=null,a.chunkMultiplier_=1,t.codeEquals(p.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=t,a.transition_(O.ERROR))},this.metadataErrorHandler_=function(t){a.request_=null,t.codeEquals(p.CANCELED)?a.completeTransitions_():(a.error_=t,a.transition_(O.ERROR))},this.promise_=F(function(t,e){a.resolve_=t,a.reject_=e,a.start_()}),this.promise_.then(null,function(){})}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n,r){t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===O.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then(function(n){switch(e.state_){case O.RUNNING:t(n);break;case O.CANCELING:e.transition_(O.CANCELED);break;case O.PAUSING:e.transition_(O.PAUSED)}})},t.prototype.createResumable_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a=kt(e,r,i),s={name:a.fullPath},u=Z(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=ut(a,n),f=t.maxUploadRetryTime(),h=new _t(u,"POST",function(t,e){var n;At(t);try{n=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){wt(!1)}return wt(H(n)),n},f);return h.urlParams=s,h.headers=c,h.body=l,h.errorHandler=Tt(e),h}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()},t.errorHandler_)})},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_(function(n){var r=function(t,e,n,r){var i=t.maxUploadRetryTime(),o=new _t(n,"POST",function(t,e){var n,i=At(t,["active","final"]);try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){wt(!1)}var o=parseInt(n,10);return wt(!isNaN(o)),new Nt(o,r.size(),"final"===i)},i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=Tt(e),o}(t.authWrapper_,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then(function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()},t.errorHandler_)})},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new Nt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=It(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(e){return t.error_=e,void t.transition_(O.ERROR)}var a=t.authWrapper_.makeRequest(o,i);t.request_=a,a.getPromise().then(function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(O.SUCCESS)):t.completeTransitions_()},t.errorHandler_)})},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_(function(e){var n=xt(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.transition_(O.SUCCESS)},t.metadataErrorHandler_)})},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=kt(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ut(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=gt.getBlob(c,r,l);if(null===f)throw y();var h={name:u.fullPath},p=Z(o),d=t.maxUploadRetryTime(),v=new _t(p,"POST",Et(t,n),d);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=Tt(e),v}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(O.SUCCESS)},t.errorHandler_)})},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case O.CANCELING:case O.PAUSING:this.state_=t,null!==this.request_&&this.request_.cancel();break;case O.RUNNING:var e=this.state_===O.PAUSED;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case O.PAUSED:this.state_=t,this.notifyObservers_();break;case O.CANCELED:this.error_=m(),this.state_=t,this.notifyObservers_();break;case O.ERROR:case O.SUCCESS:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case O.PAUSING:this.transition_(O.PAUSED);break;case O.CANCELING:this.transition_(O.CANCELED);break;case O.RUNNING:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=R(this.state_);return new Pt(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var i="Expected a function or an Object with one of `next`, `error`, `complete` properties.",o=mt(!0).validator,a=vt(null,!0).validator;function s(t){try{return void o(t)}catch(t){}try{if(a(t),!(B(t.next)||B(t.error)||B(t.complete)))throw"";return}catch(t){throw i}}lt("on",[ht(function(e){if(t!==I.STATE_CHANGED)throw"Expected one of the event types: ["+I.STATE_CHANGED+"]."}),vt(s,!0),mt(!0),mt(!0)],arguments);var u=this;function c(t){return function(e,n,i){null!==t&&lt("on",t,arguments);var o=new Ot(e,n,r);return u.addObserver_(o),function(){u.removeObserver_(o)}}}var l=[vt(function(t){if(null===t)throw i;s(t)}),mt(!0),mt(!0)];return!(B(e)||B(n)||B(r))?c(l):c(null)(e,n,r)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){var e,n,r;e=this.observers_,n=t,-1!==(r=e.indexOf(n))&&e.splice(r,1)},t.prototype.notifyObservers_=function(){var t,e=this;this.finishPromise_(),(t=this.observers_,Array.prototype.slice.call(t)).forEach(function(t){e.notifyObserver_(t)})},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(R(this.state_)){case P.SUCCESS:Rt(this.resolve_.bind(null,this.snapshot))();break;case P.CANCELED:case P.ERROR:Rt(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(R(this.state_)){case P.RUNNING:case P.PAUSED:null!==t.next&&Rt(t.next.bind(t,this.snapshot))();break;case P.SUCCESS:null!==t.complete&&Rt(t.complete.bind(t))();break;case P.CANCELED:case P.ERROR:null!==t.error&&Rt(t.error.bind(t,this.error_))();break;default:null!==t.error&&Rt(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){lt("resume",[],arguments);var t=this.state_===O.PAUSED||this.state_===O.PAUSING;return t&&this.transition_(O.RUNNING),t},t.prototype.pause=function(){lt("pause",[],arguments);var t=this.state_===O.RUNNING;return t&&this.transition_(O.PAUSING),t},t.prototype.cancel=function(){lt("cancel",[],arguments);var t=this.state_===O.RUNNING||this.state_===O.PAUSING;return t&&this.transition_(O.CANCELING),t},t}(),Mt=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof X?e:X.makeFromUrl(e)}return t.prototype.toString=function(){return lt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return it()},t.prototype.child=function(t){lt("child",[ht()],arguments);var e=function(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}(this.location.path,t),n=new X(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=function(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this.location.path);if(null===t)return null;var e=new X(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new X(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return $(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),lt("put",[new ft(function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||K()&&t instanceof Blob))throw"Expected Blob or File."}),pt(!0)],arguments),this.throwIfRoot_("put"),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=E.RAW),lt("putString",[ht(),ht(T,!0),pt(!0)],arguments),this.throwIfRoot_("putString");var r=x(e,t),i=L(n);return!j(i.contentType)&&j(r.contentType)&&(i.contentType=r.contentType),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(r.data,!0),i)},t.prototype.delete=function(){lt("delete",[],arguments),this.throwIfRoot_("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=function(t,e){var n=J(e.fullServerUrl()),r=t.maxOperationRetryTime(),i=new _t(n,"DELETE",function(t,e){},r);return i.successCodes=[200,204],i.errorHandler=Ct(e),i}(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){lt("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=xt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){lt("updateMetadata",[pt()],arguments),this.throwIfRoot_("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=function(t,e,n,r){var i=J(e.fullServerUrl()),o=ut(n,r),a=t.maxOperationRetryTime(),s=new _t(i,"PATCH",Et(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Ct(e),s}(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){lt("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=St(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise().then(function(t){if(null===t)throw new h(p.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return t})})},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw function(t){return new h(p.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(t)},t}(),Lt=function(){function t(t){this.promise_=function(t){return Promise.reject(t)}(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ft=function(){function t(){this.map_={},this.id_=f}return t.prototype.addRequest=function(t){var e=this.id_;this.id_++,this.map_[e]=t;var n=this;function r(){delete n.map_[e]}t.getPromise().then(r,r)},t.prototype.clear=function(){M(this.map_,function(t,e){e&&e.cancel(!0)}),this.map_={}},t}(),Ut=function(){function t(e,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var a=this.app_.options;j(a)&&(this.bucket_=t.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=c,this.maxUploadRetryTime_=l,this.requestMap_=new Ft}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:X.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.app_&&j(this.app_.INTERNAL)&&j(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):U(null)},t.prototype.bucket=function(){if(this.deleted_)throw b();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new Lt(b());var n=this.requestMaker_(t,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}();var jt=function(){function t(t,e,n,r,i,o,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var f=this;this.promise_=F(function(t,e){f.resolve_=t,f.reject_=e,f.start_()})}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,a=n.xhr;if(n.wasSuccessCode)try{var s=t.callback_(a,a.getResponseText());B(s)?i(s):i()}catch(t){o(t)}else null!==a?((r=v()).setServerResponseProp(a.getResponseText()),t.errorCallback_?o(t.errorCallback_(a,r)):o(r)):n.canceled?o(r=t.appDelete_?b():m()):o(r=new h(p.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Bt(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){u||(u=!0,e.apply(null,arguments))}function l(e){i=setTimeout(function(){i=null,t(f,s())},e)}function f(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];u||(t?c.apply(null,arguments):s()||o?c.apply(null,arguments):(r<64&&(r*=2),1===a?(a=2,e=0):e=1e3*(r+Math.random()),l(e)))}var h=!1;function p(t){h||(h=!0,u||(null!==i?(t||(a=2),clearTimeout(i),l(0)):t||(a=1)))}return l(0),setTimeout(function(){o=!0,p(!0)},n),p}(function(e,n){if(n)e(!1,new Bt(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then(function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;var r=(n=n).getErrorCode()===A.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=bt(t.successCodes_,o);e(!0,new Bt(a,n))}else{var s=n.getErrorCode()===A.ABORT;e(!1,new Bt(!1,null,s))}})}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}},e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=bt([408,429],t),r=bt(this.additionalRetryCodes_,t);return e||n||r},t}(),Bt=function(){return function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}}();function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,a=L(t.headers);return function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(a,e),function(t){var e=void 0!==i.a?i.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(a),new jt(o,t.method,a,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}var Vt=function(){function t(t,e,n){if(this.bucket_=null,this.authWrapper_=new Ut(t,function(t,e){return new Mt(t,e)},qt,this,e),this.app_=t,null!=n)this.bucket_=X.makeFromBucketSpec(n);else{var r=this.authWrapper_.bucket();null!=r&&(this.bucket_=new X(r,""))}this.internals_=new Wt(this)}return t.prototype.ref=function(t){if(lt("ref",[ht(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var e=new Mt(this.authWrapper_,this.bucket_);return null!=t?e.child(t):e},t.prototype.refFromURL=function(t){return lt("refFromURL",[ht(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{X.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new Mt(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){lt("setMaxUploadRetryTime",[dt()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){lt("setMaxOperationRetryTime",[dt()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),t}(),Wt=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),U(void 0)},t}(),Ht="storage";function zt(t,e,n){return new Vt(t,new Q,n)}function Kt(t){var e={TaskState:P,TaskEvent:I,StringFormat:E,Storage:Vt,Reference:Mt};t.INTERNAL.registerService(Ht,zt,e,void 0,!0)}Kt(i.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
+
***************************************************************************** */function o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function s(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function u(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var c=n(14),l=n.n(c);n.d(e,"registerMessaging",function(){return L}),n.d(e,"isSupported",function(){return F});var f,h,p,d={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},v=((f={})[d.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",f[d.AVAILABLE_IN_SW]="This method is available in a service worker context.",f[d.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",f[d.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",f[d.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",f[d.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",f[d.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",f[d.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",f[d.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",f[d.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",f[d.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",f[d.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",f[d.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",f[d.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",f[d.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",f[d.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",f[d.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",f[d.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",f[d.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",f[d.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",f[d.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",f[d.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",f[d.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",f[d.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",f[d.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",f[d.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",f[d.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",f[d.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",f[d.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",f[d.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",f[d.BAD_SCOPE]="The service worker scope must be a string with at least one character.",f[d.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",f[d.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",f[d.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",f[d.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",f[d.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",f[d.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",f[d.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",f),m=new r.ErrorFactory("messaging","Messaging",v),y=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),g="https://fcm.googleapis.com";function b(t,e){if(null==t||null==e)return!1;if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<t.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function _(t){return function(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(null,e))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(t){t.TYPE_OF_MSG="firebase-messaging-msg-type",t.DATA="firebase-messaging-msg-data"}(h||(h={})),function(t){t.PUSH_MSG_RECEIVED="push-msg-received",t.NOTIFICATION_CLICKED="notification-clicked"}(p||(p={}));var w=function(){function t(){}return t.prototype.getToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s,c,l,f;return u(this,function(u){switch(u.label){case 0:r=_(e.getKey("p256dh")),i=_(e.getKey("auth")),o="authorized_entity="+t+"&endpoint="+e.endpoint+"&encryption_key="+r+"&encryption_auth="+i,b(n.buffer,y.buffer)||(a=_(n),o+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:o},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",c)];case 2:return[4,u.sent().json()];case 3:return l=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_SUBSCRIBE_FAILED);case 5:if(l.error)throw f=l.error.message,m.create(d.TOKEN_SUBSCRIBE_FAILED,{message:f});if(!l.token)throw m.create(d.TOKEN_SUBSCRIBE_NO_TOKEN);if(!l.pushSet)throw m.create(d.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:l.token,pushSet:l.pushSet}]}})})},t.prototype.updateToken=function(t,e,n,r,i){return s(this,void 0,void 0,function(){var o,a,s,c,l,f,h,p;return u(this,function(u){switch(u.label){case 0:o=_(r.getKey("p256dh")),a=_(r.getKey("auth")),s="push_set="+n+"&token="+e+"&authorized_entity="+t+"&endpoint="+r.endpoint+"&encryption_key="+o+"&encryption_auth="+a,b(i.buffer,y.buffer)||(c=_(i),s+="&application_pub_key="+c),(l=new Headers).append("Content-Type","application/x-www-form-urlencoded"),f={method:"POST",headers:l,body:s},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",f)];case 2:return[4,u.sent().json()];case 3:return h=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UPDATE_FAILED);case 5:if(h.error)throw p=h.error.message,m.create(d.TOKEN_UPDATE_FAILED,{message:p});if(!h.token)throw m.create(d.TOKEN_UPDATE_NO_TOKEN);return[2,h.token]}})})},t.prototype.deleteToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:r="authorized_entity="+t+"&token="+e+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:i,body:r},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/unsubscribe",o)];case 2:return[4,u.sent().json()];case 3:if((a=u.sent()).error)throw s=a.error.message,m.create(d.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},t}();function E(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var T="undefined",C="fcm_token_object_Store";function x(){var t=indexedDB.open(T);t.onerror=function(t){},t.onsuccess=function(e){!function(t){if(t.objectStoreNames.contains(C)){var e=t.transaction(C).objectStore(C),n=new w,r=e.openCursor();r.onerror=function(t){console.warn("Unable to cleanup old IDB.",t)},r.onsuccess=function(){var e=r.result;if(e){var i=e.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),e.continue()}else t.close(),indexedDB.deleteDatabase(T)}}}(t.result)}}var S=function(){function t(){this.dbPromise=null}return t.prototype.get=function(t){return this.createTransaction(function(e){return e.get(t)})},t.prototype.getIndex=function(t,e){return this.createTransaction(function(n){return n.index(t).get(e)})},t.prototype.put=function(t){return this.createTransaction(function(e){return e.put(t)},"readwrite")},t.prototype.delete=function(t){return this.createTransaction(function(e){return e.delete(t)},"readwrite")},t.prototype.closeDatabase=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:t.sent().close(),this.dbPromise=null,t.label=2;case 2:return[2]}})})},t.prototype.createTransaction=function(t,e){return void 0===e&&(e="readonly"),s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),r=n.transaction(this.objectStoreName,e),i=r.objectStore(this.objectStoreName),[4,function(t){return new Promise(function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}})}(t(i))];case 2:return o=a.sent(),[2,new Promise(function(t,e){r.oncomplete=function(){t(o)},r.onerror=function(){e(r.error)}})]}})})},t.prototype.getDb=function(){var t=this;return this.dbPromise||(this.dbPromise=new Promise(function(e,n){var r=indexedDB.open(t.dbName,t.dbVersion);r.onsuccess=function(){e(r.result)},r.onerror=function(){t.dbPromise=null,n(r.error)},r.onupgradeneeded=function(e){return t.onDbUpgrade(r,e)}})),this.dbPromise},t}();var k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_token_details_db",e.dbVersion=3,e.objectStoreName="fcm_token_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t,e){var n=t.result;switch(e.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:x();case 2:var r,i=(r=t.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var t=i.result;if(t){var e=t.value,n=a({},e);e.createTime||(n.createTime=Date.now()),"string"==typeof e.vapidKey&&(n.vapidKey=E(e.vapidKey)),"string"==typeof e.auth&&(n.auth=E(e.auth).buffer),"string"==typeof e.auth&&(n.p256dh=E(e.p256dh).buffer),t.update(n),t.continue()}}}},e.prototype.getTokenDetailsFromToken=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_TOKEN);return N({fcmToken:t}),[2,this.getIndex("fcmToken",t)]})})},e.prototype.getTokenDetailsFromSWScope=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_SCOPE);return N({swScope:t}),[2,this.get(t)]})})},e.prototype.saveTokenDetails=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t.swScope)throw m.create(d.BAD_SCOPE);if(!t.vapidKey)throw m.create(d.BAD_VAPID_KEY);if(!t.endpoint||!t.auth||!t.p256dh)throw m.create(d.BAD_SUBSCRIPTION);if(!t.fcmSenderId)throw m.create(d.BAD_SENDER_ID);if(!t.fcmToken)throw m.create(d.BAD_TOKEN);if(!t.fcmPushSet)throw m.create(d.BAD_PUSH_SET);return N(t),[2,this.put(t)]})})},e.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return"string"!=typeof t||0===t.length?[2,Promise.reject(m.create(d.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(e.swScope)];case 2:return n.sent(),[2,e]}})})},e}(S);function N(t){if(t.fcmToken&&("string"!=typeof t.fcmToken||0===t.fcmToken.length))throw m.create(d.BAD_TOKEN);if(t.swScope&&("string"!=typeof t.swScope||0===t.swScope.length))throw m.create(d.BAD_SCOPE);if(t.vapidKey&&(!(t.vapidKey instanceof Uint8Array)||65!==t.vapidKey.length))throw m.create(d.BAD_VAPID_KEY);if(t.endpoint&&("string"!=typeof t.endpoint||0===t.endpoint.length))throw m.create(d.BAD_SUBSCRIPTION);if(t.auth&&!(t.auth instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.p256dh&&!(t.p256dh instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.fcmSenderId&&("string"!=typeof t.fcmSenderId||0===t.fcmSenderId.length))throw m.create(d.BAD_SENDER_ID);if(t.fcmPushSet&&("string"!=typeof t.fcmPushSet||0===t.fcmPushSet.length))throw m.create(d.BAD_PUSH_SET)}var A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_vapid_details_db",e.dbVersion=1,e.objectStoreName="fcm_vapid_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t){t.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},e.prototype.getVapidFromSWScope=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);return[4,this.get(t)];case 1:return[2,(e=n.sent())?e.vapidKey:void 0]}})})},e.prototype.saveVapidDetails=function(t,e){return s(this,void 0,void 0,function(){var n;return u(this,function(r){if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);if(null===e||65!==e.length)throw m.create(d.BAD_VAPID_KEY);return n={swScope:t,vapidKey:e},[2,this.put(n)]})})},e.prototype.deleteVapidDetails=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(t)];case 2:return n.sent(),[2,e]}})})},e}(S),I="messagingSenderId",O=function(){function t(t){var e=this;if(!t.options[I]||"string"!=typeof t.options[I])throw m.create(d.BAD_SENDER_ID);this.messagingSenderId=t.options[I],this.tokenDetailsModel=new k,this.vapidDetailsModel=new A,this.iidModel=new w,this.app=t,this.INTERNAL={delete:function(){return e.delete()}}}return t.prototype.getToken=function(){return s(this,void 0,void 0,function(){var t,e,n,r,i;return u(this,function(o){switch(o.label){case 0:if("denied"===(t=this.getNotificationPermission_()))throw m.create(d.NOTIFICATIONS_BLOCKED);return"granted"!==t?[2,null]:[4,this.getSWRegistration_()];case 1:return e=o.sent(),[4,this.getPublicVapidKey_()];case 2:return n=o.sent(),[4,this.getPushSubscription(e,n)];case 3:return r=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(e.scope)];case 4:return(i=o.sent())?[2,this.manageExistingToken(e,r,n,i)]:[2,this.getNewToken(e,r,n)]}})})},t.prototype.manageExistingToken=function(t,e,n,r){return s(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return function(t,e,n){if(!n.vapidKey||!b(e.buffer,n.vapidKey.buffer))return!1;var r=t.endpoint===n.endpoint,i=b(t.getKey("auth"),n.auth),o=b(t.getKey("p256dh"),n.p256dh);return r&&i&&o}(e,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(t,e,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(t,e,n)]}})})},t.prototype.updateToken=function(t,e,n,r){return s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,e,n)];case 1:return i=s.sent(),o={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return s.sent(),[2,i];case 4:return a=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}})})},t.prototype.getNewToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,e,n)];case 1:return r=o.sent(),i={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return o.sent(),[2,r.token]}})})},t.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e,n;return u(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(t)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(e=r.sent())?[4,e.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},t.prototype.deleteTokenFromDB=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(t)];case 1:return e=n.sent(),[4,this.iidModel.deleteToken(e.fcmSenderId,e.fcmToken,e.fcmPushSet)];case 2:return n.sent(),[2]}})})},t.prototype.getPushSubscription=function(t,e){return t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e})})},t.prototype.requestPermission=function(){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.useServiceWorker=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.usePublicVapidKey=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onMessage=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onTokenRefresh=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.setBackgroundMessageHandler=function(t){throw m.create(d.AVAILABLE_IN_SW)},t.prototype.delete=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return t.sent(),[2]}})})},t.prototype.getNotificationPermission_=function(){return Notification.permission},t.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},t.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},t.prototype.getIidModel=function(){return this.iidModel},t}();var P=function(t){function e(e){var n=t.call(this,e)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(t){n.onPush(t)}),self.addEventListener("pushsubscriptionchange",function(t){n.onSubChange(t)}),self.addEventListener("notificationclick",function(t){n.onNotificationClick(t)}),n}return o(e,t),e.prototype.onPush=function(t){t.waitUntil(this.onPush_(t))},e.prototype.onSubChange=function(t){t.waitUntil(this.onSubChange_(t))},e.prototype.onNotificationClick=function(t){t.waitUntil(this.onNotificationClick_(t))},e.prototype.onPush_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i,o,a;return u(this,function(s){switch(s.label){case 0:if(!t.data)return[2];try{e=t.data.json()}catch(t){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(e)]:(n=this.getNotificationData_(e))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),o=n.actions,a=Notification.maxActions,o&&a&&o.length>a&&console.warn("This browser only supports "+a+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},e.prototype.onSubChange_=function(t){return s(this,void 0,void 0,function(){var t,e,n,r;return u(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return t=i.sent(),[3,3];case 2:throw e=i.sent(),m.create(d.UNABLE_TO_RESUBSCRIBE,{message:e});case 3:return i.trys.push([3,5,,8]),[4,t.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(t.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},e.prototype.onNotificationClick_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return t.notification&&t.notification.data&&t.notification.data.FCM_MSG?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(e=t.notification.data.FCM_MSG).notification&&(n=e.fcmOptions&&e.fcmOptions.link||e.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=o.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=o.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=o.sent(),o.label=5;case 5:return r?(delete e.notification,delete e.fcmOptions,i=D(p.NOTIFICATION_CLICKED,e),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},e.prototype.getNotificationData_=function(t){if(t&&"object"==typeof t.notification){var e,n=a({},t.notification);return n.data=a({},t.notification.data,((e={}).FCM_MSG=t,e)),n}},e.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw m.create(d.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=t},e.prototype.getWindowClient_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return e=new URL(t,self.location.href).href,[4,R()];case 1:for(n=o.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===e){r=n[i];break}return[2,r]}})})},e.prototype.attemptToMessageClient_=function(t,e){return s(this,void 0,void 0,function(){return u(this,function(n){if(!t)throw m.create(d.NO_WINDOW_CLIENT_TO_MSG);return t.postMessage(e),[2]})})},e.prototype.hasVisibleClients_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,R()];case 1:return[2,t.sent().some(function(t){return"visible"===t.visibilityState})]}})})},e.prototype.sendMessageToWindowClients_=function(t){return s(this,void 0,void 0,function(){var e,n,r=this;return u(this,function(i){switch(i.label){case 0:return[4,R()];case 1:return e=i.sent(),n=D(p.PUSH_MSG_RECEIVED,t),[4,Promise.all(e.map(function(t){return r.attemptToMessageClient_(t,n)}))];case 2:return i.sent(),[2]}})})},e.prototype.getSWRegistration_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,self.registration]})})},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(t=n.sent()))throw m.create(d.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(t.scope)];case 2:return null==(e=n.sent())?[2,y]:[2,e]}})})},e}(O);function R(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function D(t,e){return(n={})[h.TYPE_OF_MSG]=t,n[h.DATA]=e,n;var n}var M=function(t){function e(e){var n=t.call(this,e)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(r.createSubscribe)(function(t){n.messageObserver=t}),n.onTokenRefreshInternal=Object(r.createSubscribe)(function(t){n.tokenRefreshObserver=t}),n.setupSWMessageListener_(),n}return o(e,t),e.prototype.getToken=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:if(!(t=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(t.href)];case 2:return[4,n.sent().json()];case 3:return e=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!e||!e.gcm_sender_id)return[2];if("103953800507"!==e.gcm_sender_id)throw m.create(d.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return e.sent(),[2,t.prototype.getToken.call(this)]}})})},e.prototype.requestPermission=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?m.create(d.PERMISSION_BLOCKED):m.create(d.PERMISSION_DEFAULT)}})})},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw m.create(d.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw m.create(d.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=t},e.prototype.usePublicVapidKey=function(t){if("string"!=typeof t)throw m.create(d.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw m.create(d.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var e=E(t);if(65!==e.length)throw m.create(d.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=e},e.prototype.onMessage=function(t,e,n){return"function"==typeof t?this.onMessageInternal(t,e,n):this.onMessageInternal(t)},e.prototype.onTokenRefresh=function(t,e,n){return"function"==typeof t?this.onTokenRefreshInternal(t,e,n):this.onTokenRefreshInternal(t)},e.prototype.waitForRegistrationToActivate_=function(t){var e=t.installing||t.waiting||t.active;return new Promise(function(n,r){if(e)if("activated"!==e.state)if("redundant"!==e.state){var i=function(){if("activated"===e.state)n(t);else{if("redundant"!==e.state)return;r(m.create(d.SW_REG_REDUNDANT))}e.removeEventListener("statechange",i)};e.addEventListener("statechange",i)}else r(m.create(d.SW_REG_REDUNDANT));else n(t);else r(m.create(d.NO_SW_IN_REG))})},e.prototype.getSWRegistration_=function(){var t=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(t){throw m.create(d.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(e){return t.waitForRegistrationToActivate_(e).then(function(){return t.registrationToUse=e,e.update(),e})}))},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,y]})})},e.prototype.setupSWMessageListener_=function(){var t=this;navigator.serviceWorker.addEventListener("message",function(e){if(e.data&&e.data[h.TYPE_OF_MSG]){var n=e.data;switch(n[h.TYPE_OF_MSG]){case p.PUSH_MSG_RECEIVED:case p.NOTIFICATION_CLICKED:var r=n[h.DATA];t.messageObserver&&t.messageObserver.next(r)}}},!1)},e}(O);function L(t){var e={isSupported:F};t.INTERNAL.registerService("messaging",function(t){if(!F())throw m.create(d.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(t):new M(t)},e)}function F(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}L(l.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t=this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Sidebar example")),o.default.createElement(a.default,{color:"grey",style:{paddingBottom:"30px"}},o.default.createElement(u.Grid,{columns:2,textAlign:"left",stackable:!0},o.default.createElement(u.Grid.Column,{width:13},o.default.createElement(u.Segment,{style:{padding:"30px"}},o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Title one. Yay :)"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Second title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Finally, third title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"https://react.semantic-ui.com/images/wireframe/paragraph.png"}),o.default.createElement("p",null))),o.default.createElement(u.Grid.Column,{width:3,textAlign:"center"},o.default.createElement(u.Menu,{vertical:!0,fluid:!0},o.default.createElement(u.Menu.Item,{name:"Title one. Yay :)",active:"Title one. Yay :)"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Second title",active:"Second title"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Finally, third title",active:"Finally, third title"===t,onClick:this.handleItemClick}))))))}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t;this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Outreach")),o.default.createElement(a.default,{color:"white"},o.default.createElement(u.Container,{text:!0},o.default.createElement(u.Grid,(l(t={stackable:!0,divided:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"Work with us!"),o.default.createElement("p",null,"We would love to collaborate with other iGem teams. To get in contact, use the details below.")),o.default.createElement(u.Grid.Column,{verticalAlign:"center"},o.default.createElement(u.Segment,{style:{marginTop:"1em"}},o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Email: ",o.default.createElement("a",{href:"#"},"nottinghamigem@outlook.com")),o.default.createElement(u.List.Item,null,"Phone: (+44) 0115 846 8001"),o.default.createElement(u.List.Item,{style:{marginTop:"1em"}},o.default.createElement("strong",null,"Address: "),o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Centre for Biomolecular Sciences"),o.default.createElement(u.List.Item,null,"University of Nottingham"),o.default.createElement(u.List.Item,null,"Nottingham"),o.default.createElement(u.List.Item,null,"NG7 2RD")))))))))))}}]),e}();e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(61))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(a.default,{color:"white",style:{paddingBottom:"30px",backgroundColor:"white"}},o.default.createElement(s.Grid,{verticalAlign:"middle",columns:9,inverted:!0,doubling:!0},o.default.createElement(s.Grid.Row,null,o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/BBSRC%20.jpg?alt=media&token=4bf35f00-9185-4693-b9c4-bdf4182a48a2"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/DW%20Logo.jpg?alt=media&token=84bd9fe3-59c9-4c0c-a6b5-7db2117fe24a"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Eppendorf.png?alt=media&token=5fc72b9d-bbca-4c3d-bdf2-536638c40615"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Labfolder.png?alt=media&token=3dde8225-2853-4f7b-8b1d-51c3813b9174"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/NEB.png?alt=media&token=c8504b3a-e60d-42d7-bcc0-d17921822bd6"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Qiagen.png?alt=media&token=0d3417a9-f532-4ae0-b209-0f9cdbf5e40f"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Snapgene%20logo.png?alt=media&token=8bd2b021-05a4-4952-b29c-7c6388d2010e"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/SynBio.png?alt=media&token=30fb2ec3-18ca-45d0-a9f1-a5a30a28f334"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/wellcome-logo-black.png?alt=media&token=5b2921f8-a279-4cfb-b6ff-10b6fc8d2212"})))))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=l(i),a=l(n(61)),s=l(n(102)),u=(l(n(76)),n(37)),c=n(101);function l(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"blue",style:{height:"30vh"}},o.default.createElement(c.Link,{to:"/Team"},o.default.createElement("div",{style:{color:"white",position:"absolute",right:"20px",top:"15px",fontSize:"2.5em",cursor:"pointer"}},"×")),o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},unescape(window.location.hash.split("?name=")[1]))),o.default.createElement(a.default,{color:"white",style:{height:"100vh"}}),o.default.createElement("style",null,".ui.menu {display:none}"))}}]),e}();e.default=f},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp{padding:0!important}.Team_profileName_1XfIKGYChuTmXuK_SxlpeJ{position:absolute;top:3em;padding-left:.5em;background-color:#ffffff6b;padding:.5em;margin-left:.5em}.Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF{height:10em}.Team_profilePicture_20LK8DeEyHHschQzoZXrdm{width:10em;margin-top:2.5em;float:right;border-radius:50%;margin-right:2.5em}.Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT{padding:2em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Team/Team.css"],names:[],mappings:"AAAA,6CACC,mBAAuB,CACvB,AACD,yCACI,kBAAmB,AACnB,QAAW,AACX,kBAAoB,AACpB,2BAA4B,AAC5B,aAAqB,AACrB,gBAAmB,CACtB,AACD,0CACC,WAAY,CACZ,AACD,4CACI,WAAY,AACZ,iBAAkB,AAClB,YAAa,AACb,kBAAmB,AACnB,kBAAoB,CACvB,AACD,gDACC,WAAW,CACX",file:"Team.css",sourcesContent:[".unpaddedContent {\n\tpadding:0px !important;\n}\n.profileName {\n    position: absolute;\n    top: 3.0em;\n    padding-left: 0.5em;\n    background-color: #ffffff6b;\n    padding: 0.5em 0.5em;\n    margin-left: 0.5em;\n}\n.profileHeader { \n\theight:10em;\n}\n.profilePicture {\n    width: 10em;\n    margin-top: 2.5em;\n    float: right;\n    border-radius: 50%;\n    margin-right: 2.5em;\n}\n.profileDescription {\n\tpadding:2em\n}"],sourceRoot:""}]),e.locals={unpaddedContent:"Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp",profileName:"Team_profileName_1XfIKGYChuTmXuK_SxlpeJ",profileHeader:"Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF",profilePicture:"Team_profilePicture_20LK8DeEyHHschQzoZXrdm",profileDescription:"Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT"}},function(t,e,n){var r=n(303);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=[{name:"Hassan Al-ubeidi",role:"Wiki / Modeller",paragraph:"I study Computer Science and I work within the lab to help out with the modelling and create the Wiki. I found iGem appealing because I wanted to do something interdisciplenary, and enjoyed Biology and Chemistry at A level/ Highschool.\n An interesting fact about me is that I have flappy hands and can clap with one hand.",hierarchy:"student",profilePicture:"https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png",coverPicture:"https://preview.ibb.co/fHndn8/Screen_Shot_2018_06_25_at_10_41_58.png"},{name:"Daniel Partridge",role:"Web Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Fatima Taha",role:"Team Leader / Wet Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lucy Allen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Nemira Žilinskaitė",role:"Wet lab/ Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Varun Lobo",role:"Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Ruth Bentley",role:"Modeller",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Eun Cho",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Sofya Berestova",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lukas Hoen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Chris Humphreys",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Daphne Groothius",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Craig Woods",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Louise",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n,i,o=960,a=200,s=96,u=50,c=50,l="role",f="name",h="views",p=-550,d="hearts",v=!1,m=!1;function y(y){var g=y.datum();y;var b=y,_=b.selectAll("svg");_.attr("width",o).attr("height",a),g.forEach(function(t){_.append("defs").append("pattern").attr("id",t.name.split(" ")[0]).attr("height","100%").attr("width","100%").append("image").attr("height","100").attr("width","100").attr("preserveAspectRatio","none").attr("xlink:href","dist/images/"+t.name.split(" ")[0]+" Square.jpg")}),i=_;var w=y.append("div").style("position","absolute").style("visibility","hidden").style("color","black").style("padding","8px").style("background-color","#e9ecef").style("border-radius","6px").style("text-align","center").style("width","200px").text("");r.forceSimulation(g).force("charge",r.forceManyBody().strength([p])).force("x",r.forceX()).force("y",r.forceY()).on("tick",function(t){C.attr("transform",function(t){return"translate("+[t.x+o/2,t.y+(a+s)/2]+")"})});v?r.scaleOrdinal().domain(n).range(e):r.scaleOrdinal(r.schemeCategory10);var E=r.min(g,function(t){return+t[h]}),T=r.max(g,function(t){return+t[h]}),C=(r.scaleLinear().domain([E,T]).range([u,c]),_.selectAll("circle").data(g).enter().append("g").attr("transform","translate("+[o/2,a/2]+")").style("opacity",1));_.append("circle").attr("id","petri-dish").attr("r","350").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#e4e4e4").style("stroke-width",30),_.append("circle").attr("id","petri-dish").attr("r","320").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#b9b9b9").style("stroke-width",30),C.append("circle").attr("id",function(t,e){return e}).attr("r",50).attr("fill",function(t){return"url(#"+t.name.split(" ")[0]+")"}).style("stroke",function(t){return"student"==t.hierarchy?"#00547f":"#ffd300"}).style("stroke-width",3).on("mouseover",function(t){return w.html(t[f]+"<br/>"+t[l]+"<br/>"),w.style("visibility","visible")}).on("mousemove",function(){return r.select(this).style("stroke-width",6),r.select(this).style("cursor","pointer"),w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return r.select(this).style("stroke-width",3),r.select(this).style("cursor","default"),w.style("visibility","hidden")}).on("click",function(e){console.log(e),t(e.name,e.paragraph,e.role,e.profilePicture,e.coverPicture)}),C.append("clipPath").attr("id",function(t,e){return"clip-"+e}).append("use").attr("xlink:href",function(t,e){return"#"+e}),m&&C.append("text").attr("clip-path",function(t,e){return"url(#clip-"+e+")"}).attr("text-anchor","middle").append("tspan").attr("x",function(t){return 0}).attr("y",function(t){return".3em"}).text(function(t){return t[f]}).on("mouseover",function(t){return w.html(t[f]+"<br/>"+t[l]+"<br/>"+t[h]+" "+d),w.style("visibility","visible")}).on("mousemove",function(){return w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return w.style("visibility","hidden")})}return y.width=function(t){return arguments.length?(o=t,y):o},y.height=function(t){return arguments.length?(s=.05*(a=t),y):a},y.columnForColors=function(t){return arguments.length?(l=t,y):l},y.columnForRadius=function(t){return arguments.length?(h=t,y):h},y.columnForTitle=function(t){return arguments.length?(f=t,y):f},y.minRadius=function(t){return arguments.length?(u=t,y):u},y.maxRadius=function(t){return arguments.length?(c=t,y):c},y.forceApart=function(t){return arguments.length?(p=t,y):p},y.unitName=function(t){return arguments.length?(d=t,y):d},y.customColors=function(t,r){return v=!0,n=t,e=r,y},y.showTitleOnCircle=function(t){return arguments.length?(m=t,y):m},y.title=function(t){return arguments.length?(title=t,y):title},y.remove=function(t){return i.selectAll("text").style("opacity",1).transition().duration(500).style("opacity","0").remove(),arguments.length?i.selectAll("g").style("opacity",1).duration(500).style("opacity","0").remove().on("end",t):i.selectAll("g").style("opacity",1).transition().duration(500).style("opacity","0").remove(),y},y};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196)),s=c(n(306)),u=c(n(305));n(37);function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){var t=u.default,e=(0,s.default)(this.props.toggle).width(800).height(800);a.select("#chart").datum(t).call(e)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement("div",{class:"chart-example",id:"chart"},o.default.createElement("svg",null)))}}]),e}();e.default=l},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#f25d53;text-align:center}.Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#c23616;text-align:center}.Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#e1b12c;text-align:center}.Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#0097e6;text-align:center}.Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#192a56;text-align:center}.Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#2f3640;text-align:center}.Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ{height:400px;padding:5.5em 0;min-width:100vw;background-color:#f5f6fa;text-align:center}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Jumbotron/Jumbotron.css"],names:[],mappings:"AAAA,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAiB,AACjB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,+CACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,iDACC,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB",file:"Jumbotron.css",sourcesContent:[".orangeJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n\ttext-align:center;\n}\n.redJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #c23616;\n\ttext-align:center;\n}\n.yellowJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #e1b12c;\n\ttext-align:center;\n}\n.blueJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #0097e6;\n\ttext-align:center;\n}\n.navyJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #192a56;\n\ttext-align:center;\n}\n.darkJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #2f3640;\n\ttext-align:center;\n}\n.whiteJumbotron {\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #f5f6fa;\n\ttext-align:center;\n}"],sourceRoot:""}]),e.locals={orangeJumbotron:"Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9",redJumbotron:"Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy",yellowJumbotron:"Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL",blueJumbotron:"Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id",navyJumbotron:"Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF",darkJumbotron:"Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG",whiteJumbotron:"Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ"}},function(t,e,n){var r=n(308);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=f(i),a=f(n(61)),s=f(n(102)),u=(f(n(76)),f(n(307))),c=n(37),l=f(n(304));n(101);function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={showModal:!1,userInfo:{name:null,paragraph:null,profilePicture:null,role:null,profileCover:null}},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"toggleProfile",value:function(t,e,n,r,i){this.setState({showModal:!0,userInfo:{name:t,paragraph:e,profilePicture:r,role:n,profileCover:i}})}},{key:"closeModal",value:function(){this.setState({showModal:!1})}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"red",style:{height:"30vh"}},o.default.createElement(c.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Meet the team!")),o.default.createElement(a.default,{color:"white",style:{height:"130vh"}},o.default.createElement(u.default,{toggle:this.toggleProfile.bind(this)})),o.default.createElement(c.Modal,{size:"small",open:this.state.showModal,closeOnRootNodeClick:!0},o.default.createElement(c.Modal.Content,{className:l.default.unpaddedContent},o.default.createElement("div",{className:l.default.profileHeader,style:{backgroundImage:"url('"+this.state.userInfo.profileCover+"')",backgroundSize:"cover"}},o.default.createElement("h2",{className:l.default.profileName},this.state.userInfo.name),o.default.createElement("img",{src:this.state.userInfo.profilePicture,className:l.default.profilePicture}),o.default.createElement(c.Icon,{onClick:this.closeModal.bind(this),circular:!0,inverted:!0,color:"blue",link:!0,name:"delete",style:{position:"absolute",right:"-1.125em",top:"-1.125em",fontSize:"1.5em",opacity:1}})),o.default.createElement(c.Modal.Description,{className:l.default.profileDescription},o.default.createElement(c.Header,null,this.state.userInfo.role),o.default.createElement("p",null,this.state.userInfo.paragraph)))))}}]),e}();e.default=h},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Home_pageHeader_B_ekbgPPnqW8er8XvLnwf{margin-top:2em;text-align:left;padding:1em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Home/Home.css"],names:[],mappings:"AAAA,uCACC,eAAe,AACf,gBAAgB,AAChB,WAAY,CACZ",file:"Home.css",sourcesContent:[".pageHeader {\n\tmargin-top:2em;\n\ttext-align:left;\n\tpadding:1em;\n}"],sourceRoot:""}]),e.locals={pageHeader:"Home_pageHeader_B_ekbgPPnqW8er8XvLnwf"}},function(t,e,n){var r=n(311);"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(76)),u=n(37);c(n(312));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){}},{key:"scrollToElementRef",value:function(t){this[t].scrollIntoView()}},{key:"render",value:function(){var t,e=this;return o.default.createElement("div",null,o.default.createElement(a.default,{color:"navy"},o.default.createElement(s.default,{header:"Team Nottingham!",subheader:o.default.createElement("span",null,"Engineering bacteriophages to silence toxin expression in ",o.default.createElement("em",null,"Clostridium difficile")),scrollTarget:function(){return e.scrollToElementRef("whatWhyHow")}})),o.default.createElement("a",{ref:function(t){return e.whatWhyHow=t}}),o.default.createElement(a.default,{color:"white",containerStyle:{padding:"50px",paddingBottom:"65px"}},o.default.createElement(u.Grid,{stackable:!0,columns:3,divided:!0},o.default.createElement(u.Grid.Row,{style:{marginTop:"2em"}},o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What is ",o.default.createElement("em",null,"C. difficile")," infection?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},o.default.createElement("em",null,"Clostridium difficile")," infection is the most common cause of antibiotic-associated diarrhoea in the Western World and is a big problem in hospitals and care-facilities. The disease symptoms are caused by two major toxins, TcdA and TcdB. The use of broad-spectrum antibiotics causes a reduction in the natural diversity of the gut microbiota allowing ",o.default.createElement("em",null,"C. difficile")," to take advantage. It is thought that non-toxigenic ",o.default.createElement("em",null,"C. difficile")," present in the gut microbiota could act as a possible probiotic, out-competing toxigenic ",o.default.createElement("em",null,"C. difficile"),".")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What is the problem?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},"A consequence of antibiotic misuse and the capability of bacteria to readily evolve has allowed antibiotic resistance to become a worldwide major dilemma. Each year in the US alone 2 million people are subject to infection from antibiotic resistant bacteria. Currently ",o.default.createElement("em",null,"C. difficile")," is only treatable with a handful of antibiotics which is problematic when antibiotic use is a major risk factor for the infection and in the view of the global concern over antibiotic resistance. The use of bacteriophages has been proposed as a major alternative treatment for many diseases including ",o.default.createElement("em",null,"C. difficile")," infection.")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What are we going to do?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},"The goal of our project is to engineer a phage which will infect ",o.default.createElement("em",null,"C. difficile")," and express genetic constructs designed to suppress toxin production. We will pursue two strategies to achieve this: asRNA and dCas9, both of which will target the toxin genes,tcdA and tcdB. Ultimately we aim to produce a highly specific phage therapeutic which will reduce toxigenicity of resident strains of ",o.default.createElement("em",null,"C. difficile")," without significantly affecting the native gut microbiota."))))),o.default.createElement(a.default,{color:"dark",id:"what-why-how"},o.default.createElement(u.Grid,(l(t={stackable:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Statistic,{inverted:!0},o.default.createElement(u.Statistic.Value,null,"£103,990,800"),o.default.createElement(u.Statistic.Label,{style:{marginTop:"1em",color:"#9db4da"}},o.default.createElement("a",{href:"https://www.gov.uk/government/statistics/clostridium-difficile-infection-monthly-data-by-nhs-acute-trust"},"Amount spent treating C. Diff. by the NHS"))))))))}}]),e}();e.default=f},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS{color:#fff;min-width:100vw;background-color:#f25d53}.PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT{color:#fff;min-width:100vw;background-color:#c23616}.PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf{color:#fff;min-width:100vw;background-color:#e1b12c}.PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF{color:#fff;min-width:100vw;background-color:#0097e6}.PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36{color:#fff;min-width:100vw;background-color:#192a56}.PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2{min-width:100vw;background-color:#dcdde1;color:#464e67}.PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w{color:#fff;min-width:100vw;background-color:#2f3640}.PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG{min-width:100vw;background-color:#f5f6fa}.PageCard_container_1ok2Drx5q2skrrX8ItRY6X{text-align:center;padding-top:30px}.PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0{font-size:4rem!important;font-weight:400!important;margin-bottom:0!important;padding-top:25%!important;text-align:center}.PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds{font-size:1.7rem!important;font-weight:400!important;margin-top:1.5rem!important;text-align:center}.PageCard_pageDown_oHQuAa3AvckqK3vgxCT68{margin-top:30%!important}.PageCard_footer_1aaHIPN4H4iCi2PegG278N{padding:2.5em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/PageCard/PageCard.css"],names:[],mappings:"AAAA,gDACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,4CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CAEC,gBAAiB,AACd,yBAA0B,AAC1B,aAAe,CAClB,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,2CACC,kBAAkB,AAClB,gBAAiB,CACjB,AACD,4CACC,yBAA2B,AACxB,0BAA+B,AAC/B,0BAA8B,AAC9B,0BAA4B,AAC5B,iBAAkB,CACrB,AACD,+CACC,2BAA6B,AAC1B,0BAA+B,AAC/B,4BAA8B,AAC9B,iBAAkB,CACrB,AACD,yCACC,wBAA0B,CAC1B,AACD,wCACC,aAAc,CACd",file:"PageCard.css",sourcesContent:[".orangePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n}\n.redPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #c23616;\n}\n.yellowPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #e1b12c;\n}\n.bluePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #0097e6;\n}\n.navyPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #192a56;\n}\n.greyPageCard {\n\n\tmin-width: 100vw;\n    background-color: #dcdde1;\n    color: #464e67;\n}\n.darkPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #2f3640;\n}\n.whitePageCard {\n\tmin-width: 100vw;\n\tbackground-color: #f5f6fa;\n}\n.container {\n\ttext-align:center;\n\tpadding-top:30px;\n}\n.pageHeader {\n\tfont-size: 4rem !important;\n    font-weight: normal !important;\n    margin-bottom: 0px !important;\n    padding-top: 25% !important;\n    text-align:center;\n}\n.pageSubHeader {\n\tfont-size: 1.7rem !important;\n    font-weight: normal !important;\n    margin-top: 1.5rem !important;\n    text-align:center;\n}\n.pageDown {\n\tmargin-top:30% !important;\n}\n.footer {\n\tpadding:2.5em;\n}"],sourceRoot:""}]),e.locals={orangePageCard:"PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS",redPageCard:"PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT",yellowPageCard:"PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf",bluePageCard:"PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF",navyPageCard:"PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36",greyPageCard:"PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2",darkPageCard:"PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w",whitePageCard:"PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG",container:"PageCard_container_1ok2Drx5q2skrrX8ItRY6X",pageHeader:"PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0",pageSubHeader:"PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds",pageDown:"PageCard_pageDown_oHQuAa3AvckqK3vgxCT68",footer:"PageCard_footer_1aaHIPN4H4iCi2PegG278N"}},function(t,e,n){"use strict";n.r(e),n.d(e,"registerStorage",function(){return Kt});var r=n(14),i=n.n(r),o="https://firebasestorage.googleapis.com",a="https://firebasestorage.googleapis.com",s="/v0",u="/v0",c=12e4,l=6e4,f=-9007199254740991,h=function(){function t(t,e){this.code_=d(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return d(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),t}(),p={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"};function d(t){return"storage/"+t}function v(){return new h(p.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(){return new h(p.CANCELED,"User canceled the upload/download.")}function y(){return new h(p.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function g(t,e,n){return new h(p.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function b(){return new h(p.APP_DELETED,"The Firebase app was deleted.")}function _(t,e){return new h(p.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new h(p.INTERNAL_ERROR,"Internal error: "+t)}var E={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function T(t){switch(t){case E.RAW:case E.BASE64:case E.BASE64URL:case E.DATA_URL:return;default:throw"Expected one of the event types: ["+E.RAW+", "+E.BASE64+", "+E.BASE64URL+", "+E.DATA_URL+"]."}}var C=function(){return function(t,e){this.data=t,this.contentType=e||null}}();function x(t,e){switch(t){case E.RAW:return new C(S(e));case E.BASE64:case E.BASE64URL:return new C(k(t,e));case E.DATA_URL:return new C(function(t){var e=new N(t);return e.base64?k(E.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(t){throw _(E.DATA_URL,"Malformed data URL.")}return S(e)}(e.rest)}(e),function(t){return new N(t).contentType}(e))}throw v()}function S(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r))if(n<t.length-1&&56320==(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function k(t,e){switch(t){case E.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw _(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case E.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw _(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(e)}catch(e){throw _(t,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;u++)s[u]=a.charCodeAt(u);return s}var N=function(){return function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw _(E.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i}}();var A,I={STATE_CHANGED:"state_changed"},O={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},P={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function R(t){switch(t){case O.RUNNING:case O.PAUSING:case O.CANCELING:return P.RUNNING;case O.PAUSED:return P.PAUSED;case O.SUCCESS:return P.SUCCESS;case O.CANCELED:return P.CANCELED;case O.ERROR:default:return P.ERROR}}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function M(t,e){for(var n in t)D(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return M(t,function(t,n){e[t]=n}),e}function F(t){return new Promise(t)}function U(t){return Promise.resolve(t)}function j(t){return null!=t}function B(t){return void 0!==t}function q(t){return"function"==typeof t}function V(t){return"object"==typeof t}function W(t){return V(t)&&null!==t}function H(t){return"string"==typeof t||t instanceof String}function z(t){return K()&&t instanceof Blob}function K(){return"undefined"!=typeof Blob}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(A||(A={}));var G=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=A.NO_ERROR,this.sendPromise_=F(function(e,n){t.xhr_.addEventListener("abort",function(n){t.errorCode_=A.ABORT,e(t)}),t.xhr_.addEventListener("error",function(n){t.errorCode_=A.NETWORK_ERROR,e(t)}),t.xhr_.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var i=this;if(this.sent_)throw w("cannot .send() more than once");(this.sent_=!0,this.xhr_.open(e,t,!0),j(r))&&M(r,function(t,e){i.xhr_.setRequestHeader(t,e.toString())});return j(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw w("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),Q=function(){function t(){}return t.prototype.createXhrIo=function(){return new G},t}();function Y(t){var e,n;try{e=JSON.parse(t)}catch(t){return null}return V(n=e)&&!Array.isArray(n)?e:null}var X=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n,r;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw r=e,new h(p.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.")},t.makeFromUrl=function(e){var n=null;for(var r=[{regex:new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:function(t){t.path_=decodeURIComponent(t.path)}}],i=0;i<r.length;i++){var o=r[i],a=o.regex.exec(e);if(a){var s=a[o.indices.bucket],u=a[o.indices.path];u||(u=""),n=new t(s,u),o.postModify(n);break}}if(null==n)throw function(t){return new h(p.INVALID_URL,"Invalid URL '"+t+"'.")}(e);return n},t}();function $(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function J(t){return o+s+t}function Z(t){return o+u+t}function tt(t){var e=encodeURIComponent,n="?";return M(t,function(t,r){var i=e(t)+"="+e(r);n=n+i+"&"}),n=n.slice(0,-1)}function et(t,e){return e}var nt=function(){return function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||et}}(),rt=null;function it(){if(rt)return rt;var t=[];t.push(new nt("bucket")),t.push(new nt("generation")),t.push(new nt("metageneration")),t.push(new nt("name","fullPath",!0));var e=new nt("name");e.xform=function(t,e){return function(t){return!H(t)||t.length<2?t:$(t=t)}(e)},t.push(e);var n=new nt("size");return n.xform=function(t,e){return j(e)?+e:e},t.push(n),t.push(new nt("timeCreated")),t.push(new nt("updated")),t.push(new nt("md5Hash",null,!0)),t.push(new nt("cacheControl",null,!0)),t.push(new nt("contentDisposition",null,!0)),t.push(new nt("contentEncoding",null,!0)),t.push(new nt("contentLanguage",null,!0)),t.push(new nt("contentType",null,!0)),t.push(new nt("metadata","customMetadata",!0)),rt=t}function ot(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new X(n,r);return e.makeStorageReference(i)}})}(r,t),r}function at(t,e,n){var r=Y(e);return null===r?null:ot(t,r,n)}function st(t,e){var n=Y(e);if(null===n)return null;if(!H(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map(function(e){var n=t.bucket,r=t.fullPath;return function(t){return a+s+t}("/b/"+i(n)+"/o/"+i(r))+tt({alt:"media",token:e})})[0]}function ut(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function ct(t){if(!(t&&V(t)))throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if(!V(n))throw"Expected object for 'customMetadata' mapping."}else if(W(n))throw"Mapping for '"+e+"' cannot be an object."}}function lt(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}var a,s,u,c,l,f;if(!(r<=n.length&&n.length<=i))throw a=r,s=i,u=t,c=n.length,a===s?(l=a,f=1===a?"argument":"arguments"):(l="between "+a+" and "+s,f="arguments"),new h(p.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+u+"`: Expected "+l+" "+f+", received "+c+".");for(o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(e){throw e instanceof Error?g(o,t,e.message):g(o,t,e)}}var ft=function(){return function(t,e){var n=this;this.validator=function(e){n.optional&&!B(e)||t(e)},this.optional=!!e}}();function ht(t,e){function n(t){if(!H(t))throw"Expected string."}var r,i,o;return t?(i=n,o=t,r=function(t){i(t),o(t)}):r=n,new ft(r,e)}function pt(t){return new ft(ct,t)}function dt(){return new ft(function(t){if(!(function(t){return"number"==typeof t||t instanceof Number}(t)&&t>=0))throw"Expected a number 0 or greater."})}function vt(t,e){return new ft(function(e){if(!(null===e||j(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)},e)}function mt(t){return new ft(function(t){if(null!==t&&!q(t))throw"Expected a Function."},t)}function yt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}var gt=function(){function t(t,e){var n=0,r="";z(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(z(this.data_)){var r=this.data_,i=(a=e,s=n,(o=r).webkitSlice?o.webkitSlice(a,s):o.mozSlice?o.mozSlice(a,s):o.slice?o.slice(a,s):null);return null===i?null:new t(i)}var o,a,s;return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(K()){var r=e.map(function(e){return e instanceof t?e.data_:e});return new t(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=yt();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(K())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}.apply(null,r))}var i=e.map(function(t){return H(t)?x(E.RAW,t).data:t.data_}),o=0;i.forEach(function(t){o+=t.byteLength});var a=new Uint8Array(o),s=0;return i.forEach(function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]}),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}();function bt(t,e){return-1!==t.indexOf(e)}var _t=function(){return function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}();function wt(t){if(!t)throw v()}function Et(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),i}}function Tt(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new h(p.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new h(p.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new h(p.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function Ct(t){var e=Tt(t);return function(n,r){var i,o=e(n,r);return 404===n.getStatus()&&(i=t.path,o=new h(p.OBJECT_NOT_FOUND,"Object '"+i+"' does not exist.")),o.setServerResponseProp(r.serverResponseProp()),o}}function xt(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",Et(t,n),i);return o.errorHandler=Ct(e),o}function St(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",function(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),st(i,r)}}(t,n),i);return o.errorHandler=Ct(e),o}function kt(t,e,n){var r=L(n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var Nt=function(){return function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null}}();function At(t,e){var n;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(t){wt(!1)}return wt(bt(e||["active"],n)),n}function It(t,e,n,r,i,o,a,s){var u=new Nt(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new h(p.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,l=c;i>0&&(l=Math.min(l,i));var f=u.current,d=f+l,v={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},m=r.slice(f,d);if(null===m)throw y();var g=e.maxUploadRetryTime(),b=new _t(n,"POST",function(t,n){var i,a=At(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?Et(e,o)(t,n):null,new Nt(s,c,"final"===a,i)},g);return b.headers=v,b.body=m.uploadData(),b.progressCallback=s||null,b.errorHandler=Tt(t),b}var Ot=function(){return function(t,e,n){if(q(t)||j(e)||j(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}}(),Pt=function(){return function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o}}();function Rt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];U(!0).then(function(){t.apply(null,e)})}}var Dt=function(){function t(t,e,n,r,i,o){void 0===o&&(o=null);var a=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=O.RUNNING,this.errorHandler_=function(t){a.request_=null,a.chunkMultiplier_=1,t.codeEquals(p.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=t,a.transition_(O.ERROR))},this.metadataErrorHandler_=function(t){a.request_=null,t.codeEquals(p.CANCELED)?a.completeTransitions_():(a.error_=t,a.transition_(O.ERROR))},this.promise_=F(function(t,e){a.resolve_=t,a.reject_=e,a.start_()}),this.promise_.then(null,function(){})}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n,r){t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===O.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then(function(n){switch(e.state_){case O.RUNNING:t(n);break;case O.CANCELING:e.transition_(O.CANCELED);break;case O.PAUSING:e.transition_(O.PAUSED)}})},t.prototype.createResumable_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a=kt(e,r,i),s={name:a.fullPath},u=Z(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=ut(a,n),f=t.maxUploadRetryTime(),h=new _t(u,"POST",function(t,e){var n;At(t);try{n=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){wt(!1)}return wt(H(n)),n},f);return h.urlParams=s,h.headers=c,h.body=l,h.errorHandler=Tt(e),h}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()},t.errorHandler_)})},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_(function(n){var r=function(t,e,n,r){var i=t.maxUploadRetryTime(),o=new _t(n,"POST",function(t,e){var n,i=At(t,["active","final"]);try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){wt(!1)}var o=parseInt(n,10);return wt(!isNaN(o)),new Nt(o,r.size(),"final"===i)},i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=Tt(e),o}(t.authWrapper_,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then(function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()},t.errorHandler_)})},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new Nt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=It(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(e){return t.error_=e,void t.transition_(O.ERROR)}var a=t.authWrapper_.makeRequest(o,i);t.request_=a,a.getPromise().then(function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(O.SUCCESS)):t.completeTransitions_()},t.errorHandler_)})},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_(function(e){var n=xt(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.transition_(O.SUCCESS)},t.metadataErrorHandler_)})},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=kt(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ut(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=gt.getBlob(c,r,l);if(null===f)throw y();var h={name:u.fullPath},p=Z(o),d=t.maxUploadRetryTime(),v=new _t(p,"POST",Et(t,n),d);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=Tt(e),v}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(O.SUCCESS)},t.errorHandler_)})},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case O.CANCELING:case O.PAUSING:this.state_=t,null!==this.request_&&this.request_.cancel();break;case O.RUNNING:var e=this.state_===O.PAUSED;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case O.PAUSED:this.state_=t,this.notifyObservers_();break;case O.CANCELED:this.error_=m(),this.state_=t,this.notifyObservers_();break;case O.ERROR:case O.SUCCESS:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case O.PAUSING:this.transition_(O.PAUSED);break;case O.CANCELING:this.transition_(O.CANCELED);break;case O.RUNNING:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=R(this.state_);return new Pt(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var i="Expected a function or an Object with one of `next`, `error`, `complete` properties.",o=mt(!0).validator,a=vt(null,!0).validator;function s(t){try{return void o(t)}catch(t){}try{if(a(t),!(B(t.next)||B(t.error)||B(t.complete)))throw"";return}catch(t){throw i}}lt("on",[ht(function(e){if(t!==I.STATE_CHANGED)throw"Expected one of the event types: ["+I.STATE_CHANGED+"]."}),vt(s,!0),mt(!0),mt(!0)],arguments);var u=this;function c(t){return function(e,n,i){null!==t&&lt("on",t,arguments);var o=new Ot(e,n,r);return u.addObserver_(o),function(){u.removeObserver_(o)}}}var l=[vt(function(t){if(null===t)throw i;s(t)}),mt(!0),mt(!0)];return!(B(e)||B(n)||B(r))?c(l):c(null)(e,n,r)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){var e,n,r;e=this.observers_,n=t,-1!==(r=e.indexOf(n))&&e.splice(r,1)},t.prototype.notifyObservers_=function(){var t,e=this;this.finishPromise_(),(t=this.observers_,Array.prototype.slice.call(t)).forEach(function(t){e.notifyObserver_(t)})},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(R(this.state_)){case P.SUCCESS:Rt(this.resolve_.bind(null,this.snapshot))();break;case P.CANCELED:case P.ERROR:Rt(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(R(this.state_)){case P.RUNNING:case P.PAUSED:null!==t.next&&Rt(t.next.bind(t,this.snapshot))();break;case P.SUCCESS:null!==t.complete&&Rt(t.complete.bind(t))();break;case P.CANCELED:case P.ERROR:null!==t.error&&Rt(t.error.bind(t,this.error_))();break;default:null!==t.error&&Rt(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){lt("resume",[],arguments);var t=this.state_===O.PAUSED||this.state_===O.PAUSING;return t&&this.transition_(O.RUNNING),t},t.prototype.pause=function(){lt("pause",[],arguments);var t=this.state_===O.RUNNING;return t&&this.transition_(O.PAUSING),t},t.prototype.cancel=function(){lt("cancel",[],arguments);var t=this.state_===O.RUNNING||this.state_===O.PAUSING;return t&&this.transition_(O.CANCELING),t},t}(),Mt=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof X?e:X.makeFromUrl(e)}return t.prototype.toString=function(){return lt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return it()},t.prototype.child=function(t){lt("child",[ht()],arguments);var e=function(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}(this.location.path,t),n=new X(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=function(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this.location.path);if(null===t)return null;var e=new X(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new X(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return $(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),lt("put",[new ft(function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||K()&&t instanceof Blob))throw"Expected Blob or File."}),pt(!0)],arguments),this.throwIfRoot_("put"),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=E.RAW),lt("putString",[ht(),ht(T,!0),pt(!0)],arguments),this.throwIfRoot_("putString");var r=x(e,t),i=L(n);return!j(i.contentType)&&j(r.contentType)&&(i.contentType=r.contentType),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(r.data,!0),i)},t.prototype.delete=function(){lt("delete",[],arguments),this.throwIfRoot_("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=function(t,e){var n=J(e.fullServerUrl()),r=t.maxOperationRetryTime(),i=new _t(n,"DELETE",function(t,e){},r);return i.successCodes=[200,204],i.errorHandler=Ct(e),i}(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){lt("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=xt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){lt("updateMetadata",[pt()],arguments),this.throwIfRoot_("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=function(t,e,n,r){var i=J(e.fullServerUrl()),o=ut(n,r),a=t.maxOperationRetryTime(),s=new _t(i,"PATCH",Et(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Ct(e),s}(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){lt("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=St(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise().then(function(t){if(null===t)throw new h(p.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return t})})},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw function(t){return new h(p.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(t)},t}(),Lt=function(){function t(t){this.promise_=function(t){return Promise.reject(t)}(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ft=function(){function t(){this.map_={},this.id_=f}return t.prototype.addRequest=function(t){var e=this.id_;this.id_++,this.map_[e]=t;var n=this;function r(){delete n.map_[e]}t.getPromise().then(r,r)},t.prototype.clear=function(){M(this.map_,function(t,e){e&&e.cancel(!0)}),this.map_={}},t}(),Ut=function(){function t(e,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var a=this.app_.options;j(a)&&(this.bucket_=t.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=c,this.maxUploadRetryTime_=l,this.requestMap_=new Ft}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:X.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.app_&&j(this.app_.INTERNAL)&&j(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):U(null)},t.prototype.bucket=function(){if(this.deleted_)throw b();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new Lt(b());var n=this.requestMaker_(t,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}();var jt=function(){function t(t,e,n,r,i,o,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var f=this;this.promise_=F(function(t,e){f.resolve_=t,f.reject_=e,f.start_()})}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,a=n.xhr;if(n.wasSuccessCode)try{var s=t.callback_(a,a.getResponseText());B(s)?i(s):i()}catch(t){o(t)}else null!==a?((r=v()).setServerResponseProp(a.getResponseText()),t.errorCallback_?o(t.errorCallback_(a,r)):o(r)):n.canceled?o(r=t.appDelete_?b():m()):o(r=new h(p.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Bt(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){u||(u=!0,e.apply(null,arguments))}function l(e){i=setTimeout(function(){i=null,t(f,s())},e)}function f(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];u||(t?c.apply(null,arguments):s()||o?c.apply(null,arguments):(r<64&&(r*=2),1===a?(a=2,e=0):e=1e3*(r+Math.random()),l(e)))}var h=!1;function p(t){h||(h=!0,u||(null!==i?(t||(a=2),clearTimeout(i),l(0)):t||(a=1)))}return l(0),setTimeout(function(){o=!0,p(!0)},n),p}(function(e,n){if(n)e(!1,new Bt(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then(function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;var r=(n=n).getErrorCode()===A.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=bt(t.successCodes_,o);e(!0,new Bt(a,n))}else{var s=n.getErrorCode()===A.ABORT;e(!1,new Bt(!1,null,s))}})}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}},e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=bt([408,429],t),r=bt(this.additionalRetryCodes_,t);return e||n||r},t}(),Bt=function(){return function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}}();function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,a=L(t.headers);return function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(a,e),function(t){var e=void 0!==i.a?i.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(a),new jt(o,t.method,a,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}var Vt=function(){function t(t,e,n){if(this.bucket_=null,this.authWrapper_=new Ut(t,function(t,e){return new Mt(t,e)},qt,this,e),this.app_=t,null!=n)this.bucket_=X.makeFromBucketSpec(n);else{var r=this.authWrapper_.bucket();null!=r&&(this.bucket_=new X(r,""))}this.internals_=new Wt(this)}return t.prototype.ref=function(t){if(lt("ref",[ht(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var e=new Mt(this.authWrapper_,this.bucket_);return null!=t?e.child(t):e},t.prototype.refFromURL=function(t){return lt("refFromURL",[ht(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{X.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new Mt(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){lt("setMaxUploadRetryTime",[dt()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){lt("setMaxOperationRetryTime",[dt()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),t}(),Wt=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),U(void 0)},t}(),Ht="storage";function zt(t,e,n){return new Vt(t,new Q,n)}function Kt(t){var e={TaskState:P,TaskEvent:I,StringFormat:E,Storage:Vt,Reference:Mt};t.INTERNAL.registerService(Ht,zt,e,void 0,!0)}Kt(i.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
 
/*! *****************************************************************************
 
/*! *****************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
 
Copyright (c) Microsoft Corporation. All rights reserved.
Line 52: Line 52:
 
and limitations under the License.
 
and limitations under the License.
 
***************************************************************************** */
 
***************************************************************************** */
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(316),o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},s=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return i.__extends(e,t),e}(Error);var u=function(){function t(t){this.app=t}return t.prototype.getAuthToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.app.INTERNAL.getToken()];case 1:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getInstanceIdToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.app.messaging?[4,this.app.messaging().getToken()]:[2,void 0];case 1:return(t=e.sent())?[2,t]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getContext=function(){return i.__awaiter(this,void 0,void 0,function(){var t,e;return i.__generator(this,function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}})})},t}();function c(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var l=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null===t||void 0===t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"==typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map(function(t){return e.encode(t)});if("function"==typeof t||"object"==typeof t)return c(t,function(t){return e.encode(t)});throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null===t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=parseFloat(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(function(t){return e.decode(t)}):"function"==typeof t||"object"==typeof t?c(t,function(t){return e.decode(t)}):t},t}(),f=function(){function t(t,e){void 0===e&&(e="us-central1"),this.app_=t,this.region_=e,this.serializer=new l,this.contextProvider=new u(t)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return"https://"+this.region_+"-"+e+".cloudfunctions.net/"+t},t.prototype.httpsCallable=function(t){var e=this;return function(n){return e.call(t,n)}},t.prototype.postJSON=function(t,e,n){return i.__awaiter(this,void 0,void 0,function(){var r,o;return i.__generator(this,function(i){switch(i.label){case 0:n.append("Content-Type","application/json"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),[2,{status:0,json:null}];case 4:o=null,i.label=5;case 5:return i.trys.push([5,7,,8]),[4,r.json()];case 6:return o=i.sent(),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,{status:r.status,json:o}]}})})},t.prototype.call=function(t,e){return i.__awaiter(this,void 0,void 0,function(){var n,r,o,u,c,l,f;return i.__generator(this,function(i){switch(i.label){case 0:return n=this._url(t),e=this.serializer.encode(e),r={data:e},o=new Headers,[4,this.contextProvider.getContext()];case 1:return(u=i.sent()).authToken&&o.append("Authorization","Bearer "+u.authToken),u.instanceIdToken&&o.append("Firebase-Instance-ID-Token",u.instanceIdToken),[4,this.postJSON(n,r,o)];case 2:if(c=i.sent(),l=function(t,e,n){var r=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),i=r,o=void 0;try{var u=e.error;if(u){var c=u.status;if("string"==typeof c){if(!a[c])return new s("internal","internal");r=a[c]}i=c;var l=u.message;"string"==typeof l&&(i=l),void 0!==(o=u.details)&&(o=n.decode(o))}}catch(t){}return"ok"===r?null:new s(r,i,o)}(c.status,c.json,this.serializer))throw l;if(!c.json)throw new s("internal","Response is not valid JSON object.");if(void 0===(f=c.json.data)&&(f=c.json.result),void 0===f)throw new s("internal","Response is missing data field.");return[2,{data:this.serializer.decode(f)}]}})})},t}(),h="functions";function p(t,e,n){return new f(t,n)}function d(t){var e={Functions:f};t.INTERNAL.registerService(h,p,e,void 0,!0)}d(o),e.registerFunctions=d},function(module,exports,__webpack_require__){(function(global){(function(){var g,goog=goog||{},k=this;function l(t){return"string"==typeof t}function n(t,e){t=t.split("."),e=e||k;for(var n=0;n<t.length;n++)if(null==(e=e[t[n]]))return null;return e}function aa(){}function ba(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function p(t){return"array"==ba(t)}function ca(t){var e=ba(t);return"array"==e||"object"==e&&"number"==typeof t.length}function da(t){return"function"==ba(t)}function ea(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var q="closure_uid_"+(1e9*Math.random()>>>0),fa=0;function ha(t,e,n){return t.call.apply(t.bind,arguments)}function ia(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function r(t,e,n){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia).apply(null,arguments)}function ja(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var t=Date.now||function(){return+new Date};function u(t,e){function n(){}n.prototype=e.prototype,t.H=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Ib=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function ka(t){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function la(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");ka.call(this,n+t[r])}function ma(t,e){throw new la("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function w(){0!=na&&(pa[this[q]||(this[q]=++fa)]=this),this.i=this.i,this.m=this.m}u(ka,Error),ka.prototype.name="CustomError",u(la,ka),la.prototype.name="AssertionError";var na=0,pa={};w.prototype.i=!1,w.prototype.$=function(){if(!this.i&&(this.i=!0,this.w(),0!=na)){var t=this[q]||(this[q]=++fa);if(0!=na&&this.m&&0<this.m.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete pa[t]}},w.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var qa=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(l(t))return l(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},ra=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i=l(t)?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function sa(t){t:{for(var e=ta,n=t.length,r=l(t)?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:l(t)?t.charAt(e):t[e]}function ua(t){if(!p(t))for(var e=t.length-1;0<=e;e--)delete t[e];t.length=0}function va(t){return Array.prototype.concat.apply([],arguments)}function wa(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function xa(t){return/^[\s\xa0]*$/.test(t)}var ya=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},x;function za(t,e){return t<e?-1:t>e?1:0}t:{var Aa=k.navigator;if(Aa){var Ba=Aa.userAgent;if(Ba){x=Ba;break t}}x=""}function y(t){return-1!=x.indexOf(t)}function Ca(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function Da(t){var e,n=[],r=0;for(e in t)n[r++]=t[e];return n}function Ea(t){var e,n=[],r=0;for(e in t)n[r++]=e;return n}function Fa(t){var e,n={};for(e in t)n[e]=t[e];return n}var Ga="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ha(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<Ga.length;o++)n=Ga[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function Ia(t){return Ia[" "](t),t}function Ja(t,e){var n=Ka;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}Ia[" "]=aa;var La=y("Opera"),z=y("Trident")||y("MSIE"),Ma=y("Edge"),Na=Ma||z,Oa=y("Gecko")&&!(-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),Pa=-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"),Ra,a;function Qa(){var t=k.document;return t?t.documentMode:void 0}t:{var Sa="",Ta=(a=x,Oa?/rv:([^\);]+)(\)|;)/.exec(a):Ma?/Edge\/([\d\.]+)/.exec(a):z?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):Pa?/WebKit\/(\S+)/.exec(a):La?/(?:Version)[ \/]?(\S+)/.exec(a):void 0);if(Ta&&(Sa=Ta?Ta[1]:""),z){var Ua=Qa();if(null!=Ua&&Ua>parseFloat(Sa)){Ra=String(Ua);break t}}Ra=Sa}var Ka={},Wa;function Va(t){return Ja(t,function(){for(var e=0,n=ya(String(Ra)).split("."),r=ya(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=za(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||za(0==a[2].length,0==s[2].length)||za(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var Xa=k.document;Wa=Xa&&z?Qa()||("CSS1Compat"==Xa.compatMode?parseInt(Ra,10):5):void 0;var Ya=Object.freeze||function(t){return t},Za=!z||9<=Number(Wa),$a=z&&!Va("9"),ab=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return k.addEventListener("test",aa,e),k.removeEventListener("test",aa,e),t}();function A(t,e){this.type=t,this.a=this.target=e,this.Ra=!0}function bb(t,e){if(A.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(Oa){t:{try{Ia(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=l(t.pointerType)?t.pointerType:cb[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}A.prototype.b=function(){this.Ra=!1},u(bb,A);var cb=Ya({2:"touch",3:"pen",4:"mouse"});bb.prototype.b=function(){bb.H.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,$a)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}};var db="closure_listenable_"+(1e6*Math.random()|0),eb=0;function fb(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ga=i,this.key=++eb,this.Z=this.ba=!1}function gb(t){t.Z=!0,t.listener=null,t.proxy=null,t.src=null,t.ga=null}function hb(t){this.src=t,this.a={},this.b=0}function jb(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=qa(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(gb(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ib(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Z&&o.listener==e&&o.capture==!!n&&o.ga==r)return i}return-1}hb.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ib(t,e,r,i);return-1<a?(e=t[a],n||(e.ba=!1)):((e=new fb(e,this.src,o,!!r,i)).ba=n,t.push(e)),e};var kb="closure_lm_"+(1e6*Math.random()|0),lb={},mb=0;function nb(t,e,n,r,i){if(r&&r.once)return ob(t,e,n,r,i);if(p(e)){for(var o=0;o<e.length;o++)nb(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ia(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!1,r,i)}function qb(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=ea(i)?!!i.capture:!!i,s=rb(t);if(s||(t[kb]=s=new hb(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=sb(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)ab||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(tb(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return mb++,n}function sb(){var t=ub,e=Za?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}function ob(t,e,n,r,i){if(p(e)){for(var o=0;o<e.length;o++)ob(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ja(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!0,r,i)}function vb(t,e,n,r,i){if(p(e))for(var o=0;o<e.length;o++)vb(t,e[o],n,r,i);else r=ea(r)?!!r.capture:!!r,n=pb(n),t&&t[db]?(t=t.f,(e=String(e).toString())in t.a&&(-1<(n=ib(o=t.a[e],n,r,i))&&(gb(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=rb(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ib(e,n,r,i)),(n=-1<t?e[t]:null)&&wb(n))}function wb(t){if("number"!=typeof t&&t&&!t.Z){var e=t.src;if(e&&e[db])jb(e.f,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(tb(n),r):e.addListener&&e.removeListener&&e.removeListener(r),mb--,(n=rb(e))?(jb(n,t),0==n.b&&(n.src=null,e[kb]=null)):gb(t)}}}function tb(t){return t in lb?lb[t]:lb[t]="on"+t}function xb(t,e,n,r){var i=!0;if((t=rb(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.Z&&(o=yb(o,r),i=i&&!1!==o)}return i}function yb(t,e){var n=t.listener,r=t.ga||t.src;return t.ba&&wb(t),n.call(r,e)}function ub(t,e){if(t.Z)return!0;if(!Za){var r=e||n("window.event");e=new bb(r,this);var i=!0;if(!(0>r.keyCode||void 0!=r.returnValue)){t:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=e.a;o;o=o.parentNode)r.push(o);for(t=t.type,o=r.length-1;0<=o;o--){e.a=r[o];var a=xb(r[o],t,!0,e);i=i&&a}for(o=0;o<r.length;o++)e.a=r[o],a=xb(r[o],t,!1,e),i=i&&a}return i}return yb(t,new bb(e,this))}function rb(t){return(t=t[kb])instanceof hb?t:null}var zb="__closure_events_fn_"+(1e9*Math.random()>>>0);function pb(t){return da(t)?t:(t[zb]||(t[zb]=function(e){return t.handleEvent(e)}),t[zb])}function B(){w.call(this),this.f=new hb(this),this.N=this,this.J=null}function Ab(t,e,n,r){if(!(e=t.f.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Z&&a.capture==n){var s=a.listener,u=a.ga||a.src;a.ba&&jb(t.f,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Ra}function Bb(t){return!/^\s*$/.test(t)&&/^[\],:{}\s\u2028\u2029]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))}function Cb(a){if(a=String(a),Bb(a))try{return eval("("+a+")")}catch(t){}throw Error("Invalid JSON string: "+a)}function Db(t){var e=[];return Eb(new Fb,t,e),e.join("")}function Fb(){}function Eb(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(p(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),Eb(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),Gb(r,n),n.push(":"),Eb(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":Gb(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}u(B,w),B.prototype[db]=!0,g=B.prototype,g.addEventListener=function(t,e,n,r){nb(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){vb(this,t,e,n,r)},g.dispatchEvent=function(t){var e,n=this.J;if(n)for(e=[];n;n=n.J)e.push(n);n=this.N;var r=t.type||t;if(l(t))t=new A(t,n);else if(t instanceof A)t.target=t.target||n;else{var i=t;Ha(t=new A(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.a=e[o];i=Ab(a,r,!0,t)&&i}if(i=Ab(a=t.a=n,r,!0,t)&&i,i=Ab(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=Ab(a=t.a=e[o],r,!1,t)&&i;return i},g.w=function(){if(B.H.w.call(this),this.f){var t,e=this.f;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,gb(n[r]);delete e.a[t],e.b--}}this.J=null},g.Ia=function(t,e,n,r){return this.f.add(String(t),e,!1,n,r)},g.Ja=function(t,e,n,r){return this.f.add(String(t),e,!0,n,r)};var Hb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Ib=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function Gb(t,e){e.push('"',t.replace(Ib,function(t){var e=Hb[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Hb[t]=e),e}),'"')}function Jb(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function Kb(){this.b=this.a=null}Jb.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var Nb=new Jb(function(){return new Lb},function(t){t.reset()}),Rb,Tb;function Ob(){var t=Pb,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Lb(){this.next=this.b=this.a=null}function Qb(t){k.setTimeout(function(){throw t},0)}function Sb(){var t=k.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!y("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=r(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),void 0!==t&&!y("Trident")&&!y("MSIE")){var e=new t,n={},i=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).za;n.za=null,t()}},function(t){i.next={za:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){k.setTimeout(t,0)}}function Ub(){if(-1!=String(k.Promise).indexOf("[native code]")){var t=k.Promise.resolve(void 0);Tb=function(){t.then(Vb)}}else Tb=function(){var t=Vb;!da(k.setImmediate)||k.Window&&k.Window.prototype&&!y("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(Rb||(Rb=Sb()),Rb(t)):k.setImmediate(t)}}Kb.prototype.add=function(t,e){var n=Nb.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Lb.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Lb.prototype.reset=function(){this.next=this.b=this.a=null};var Wb=!1,Pb=new Kb;function Vb(){for(var t;t=Ob();){try{t.a.call(t.b)}catch(t){Qb(t)}var e=Nb;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Wb=!1}function Xb(e,n){B.call(this),this.b=e||1,this.a=n||k,this.c=r(this.qb,this),this.g=t()}function Yb(t){t.ea=!1,t.O&&(t.a.clearTimeout(t.O),t.O=null)}function Zb(t,e,n){if(da(t))n&&(t=r(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=r(t.handleEvent,t)}return 2147483647<Number(e)?-1:k.setTimeout(t,e||0)}function $b(t,e,n){w.call(this),this.f=null!=n?r(t,n):t,this.c=e,this.b=r(this.kb,this),this.a=[]}function ac(t){t.Y=Zb(t.b,t.c),t.f.apply(null,t.a)}function bc(t){w.call(this),this.b=t,this.a={}}u(Xb,B),g=Xb.prototype,g.ea=!1,g.O=null,g.qb=function(){if(this.ea){var e=t()-this.g;0<e&&e<.8*this.b?this.O=this.a.setTimeout(this.c,this.b-e):(this.O&&(this.a.clearTimeout(this.O),this.O=null),this.dispatchEvent("tick"),this.ea&&(this.O=this.a.setTimeout(this.c,this.b),this.g=t()))}},g.start=function(){this.ea=!0,this.O||(this.O=this.a.setTimeout(this.c,this.b),this.g=t())},g.w=function(){Xb.H.w.call(this),Yb(this),delete this.a},u($b,w),g=$b.prototype,g.ha=!1,g.Y=null,g.cb=function(t){this.a=arguments,this.Y?this.ha=!0:ac(this)},g.w=function(){$b.H.w.call(this),this.Y&&(k.clearTimeout(this.Y),this.Y=null,this.ha=!1,this.a=[])},g.kb=function(){this.Y=null,this.ha&&(this.ha=!1,ac(this))},u(bc,w);var cc=[];function dc(t,e,n,r){p(n)||(n&&(cc[0]=n.toString()),n=cc);for(var i=0;i<n.length;i++){var o=nb(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function ec(t){Ca(t.a,function(t,e){this.a.hasOwnProperty(e)&&wb(t)},t),t.a={}}function fc(t,e,n){this.reset(t,e,n,void 0,void 0)}bc.prototype.w=function(){bc.H.w.call(this),ec(this)},bc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},fc.prototype.a=null;var gc=0;function hc(t){this.f=t,this.b=this.c=this.a=null}function C(t,e){this.name=t,this.value=e}fc.prototype.reset=function(e,n,r,i,o){"number"==typeof o||gc++,i||t(),delete this.a},C.prototype.toString=function(){return this.name};var ic=new C("SEVERE",1e3),jc=new C("WARNING",900),kc=new C("INFO",800),lc=new C("CONFIG",700),mc=new C("FINE",500);function nc(t){return t.c?t.c:t.a?nc(t.a):(ma("Root logger has no level set."),null)}hc.prototype.log=function(t,e,n){if(t.value>=nc(this).value)for(da(e)&&(e=e()),t=new fc(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var oc={},pc=null;function qc(t){var e;if(pc||(pc=new hc(""),oc[""]=pc,pc.c=lc),!(e=oc[t])){e=new hc(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=qc(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,oc[t]=e}return e}function D(t,e){t&&t.log(jc,e,void 0)}function rc(t,e){t&&t.log(kc,e,void 0)}function E(t,e){t&&t.log(mc,e,void 0)}function sc(){this.a=qc("goog.labs.net.webChannel.WebChannelDebug"),this.b=!0}function tc(t,e,n,r,i,o){F(t,function(){if(t.b)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a})}function uc(t,e,n,r,i,o,a){F(t,function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a})}function G(t,e,n,r){F(t,function(){return"XMLHTTP TEXT ("+e+"): "+vc(t,n)+(r?" "+r:"")})}function wc(t,e){F(t,function(){return"TIMEOUT: "+e})}function H(t,e){E(t.a,e)}function xc(t,e,n){(t=t.a)&&t.log(ic,n||"Exception",e)}function F(t,e){rc(t.a,e)}function J(t,e){(t=t.a)&&t.log(ic,e,void 0)}function vc(t,e){if(!t.b)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(var r=0;r<n.length;r++)if(p(n[r])){var i=n[r];if(!(2>i.length)){var o=i[1];if(p(o)&&!(1>o.length)){var a=o[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var s=1;s<o.length;s++)o[s]=""}}}return Db(n)}catch(n){return H(t,"Exception parsing expected JS array - probably was not JS"),e}}sc.prototype.Fa=function(){this.b=!1};var yc=new B;function zc(t){A.call(this,"serverreachability",t)}function Ac(t){yc.dispatchEvent(new zc(yc,t))}function Bc(t){A.call(this,"statevent",t)}function K(t){yc.dispatchEvent(new Bc(yc,t))}function Cc(t){A.call(this,"timingevent",t)}function Dc(t,e,n){yc.dispatchEvent(new Cc(yc,t,e,n))}function Ec(t,e){if(!da(t))throw Error("Fn must not be null and must be a function");return k.setTimeout(function(){t()},e)}u(zc,A),u(Bc,A),u(Cc,A);var Fc={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Gc={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};function Hc(){}function Ic(t){var e;return(e=t.a)||(e={},Jc(t)&&(e[0]=!0,e[1]=!0),e=t.a=e),e}function Kc(){}Hc.prototype.a=null;var Lc={OPEN:"a",sb:"b",Va:"c",Bb:"d"},Oc;function Mc(){A.call(this,"d")}function Nc(){A.call(this,"c")}function Pc(){}function Qc(t){return(t=Jc(t))?new ActiveXObject(t):new XMLHttpRequest}function Jc(t){if(!t.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.b=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.b}function L(t,e,n,r){this.i=t,this.b=e,this.c=n,this.T=r||1,this.L=new bc(this),this.R=Rc,t=Na?125:void 0,this.S=new Xb(t),this.j=null,this.f=!1,this.l=this.g=this.h=this.J=this.D=this.U=this.s=null,this.u=[],this.a=null,this.G=0,this.m=this.o=null,this.C=-1,this.B=!1,this.N=0,this.I=null,this.v=this.X=this.K=!1}u(Mc,A),u(Nc,A),u(Pc,Hc),Oc=new Pc;var Rc=45e3;function Sc(t,e){switch(t){case 0:return"Non-200 return code ("+e+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}var Tc={},Uc={};function Vc(t,e,n){t.J=1,t.h=Wc(M(e)),t.l=n,t.K=!0,Xc(t,null)}function Yc(t,e,n,r){t.J=1,t.h=Wc(M(e)),t.l=null,t.K=n,Xc(t,r)}function Xc(e,n){e.D=t(),Zc(e),e.g=M(e.h),$c(e.g,"t",e.T),e.G=0,e.a=e.i.ca(e.i.ia()?n:null),0<e.N&&(e.I=new $b(r(e.Sa,e,e.a),e.N)),dc(e.L,e.a,"readystatechange",e.nb),n=e.j?Fa(e.j):{},e.l?(e.o||(e.o="POST"),n["Content-Type"]="application/x-www-form-urlencoded",e.a.fa(e.g,e.o,e.l,n)):(e.o="GET",e.a.fa(e.g,e.o,null,n)),Ac(1),tc(e.b,e.o,e.g,e.c,e.T,e.l)}function ad(t){var e=N(t.a),n=t.a.Ga(),r=t.a.W();if(!(3>e||3==e&&!Na&&!t.a.V())){t.B||4!=e||7==n||Ac(8==n||0>=r?3:2),bd(t);var i=t.a.W();t.C=i,(n=t.a.V())||H(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,uc(t.b,t.o,t.g,t.c,t.T,e,i),t.f?((r=cd(t))&&(G(t.b,t.c,r,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,dd(t,r)),t.K?(ed(t,e,n),Na&&t.f&&3==e&&fd(t)):(G(t.b,t.c,n,null),dd(t,n)),4==e&&gd(t),t.f&&!t.B&&(4==e?t.i.ta(t):(t.f=!1,Zc(t)))):(400==i&&0<n.indexOf("Unknown SID")?(t.m=3,K(12),D(t.b.a,"XMLHTTP Unknown SID ("+t.c+")")):(t.m=0,K(13),D(t.b.a,"XMLHTTP Bad status "+i+" ("+t.c+")")),gd(t),hd(t))}}function cd(t){return!t.X||t.v?null:t.a&&(t=id(t.a,"X-HTTP-Initial-Response"))&&!xa(t)?t:null}function ed(t,e,n){for(var r=!0;!t.B&&t.G<n.length;){var i=jd(t,n);if(i==Uc){4==e&&(t.m=4,K(14),r=!1),G(t.b,t.c,null,"[Incomplete Response]");break}if(i==Tc){t.m=4,K(15),G(t.b,t.c,n,"[Invalid Chunk]"),r=!1;break}G(t.b,t.c,i,null),dd(t,i)}4==e&&0==n.length&&(t.m=1,K(16),r=!1),t.f=t.f&&r,r||(G(t.b,t.c,n,"[Invalid Chunked Response]"),gd(t),hd(t))}function fd(t){dc(t.L,t.S,"tick",t.mb),t.S.start()}function jd(t,e){var n=t.G,r=e.indexOf("\n",n);return-1==r?Uc:(n=Number(e.substring(n,r)),isNaN(n)?Tc:(r+=1)+n>e.length?Uc:(e=e.substr(r,n),t.G=r+n,e))}function Zc(e){e.U=t()+e.R,kd(e,e.R)}function kd(t,e){if(null!=t.s)throw Error("WatchDog timer not null");t.s=Ec(r(t.lb,t),e)}function bd(t){t.s&&(k.clearTimeout(t.s),t.s=null)}function hd(t){t.i.La()||t.B||t.i.ta(t)}function gd(t){bd(t);var e=t.I;e&&"function"==typeof e.$&&e.$(),t.I=null,Yb(t.S),ec(t.L),t.a&&(e=t.a,t.a=null,e.abort(),e.$())}function dd(t,e){try{t.i.Oa(t,e),Ac(4)}catch(e){xc(t.b,e,"Error in httprequest callback")}}function ld(t){if(t.A&&"function"==typeof t.A)return t.A();if(l(t))return t.split("");if(ca(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}return Da(t)}function md(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(ca(t)||l(t))ra(t,e,void 0);else{if(t.M&&"function"==typeof t.M)var n=t.M();else if(t.A&&"function"==typeof t.A)n=void 0;else if(ca(t)||l(t)){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else n=Ea(t);i=(r=ld(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function O(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof O)for(n=t.M(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function od(t){t.b={},t.a.length=0,t.c=0}function pd(t,e){return!!P(t.b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&nd(t),!0)}function nd(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];P(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)P(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}g=L.prototype,g.setTimeout=function(t){this.R=t},g.nb=function(t){t=t.target;var e=this.I;e&&3==N(t)?(H(this.b,"Throttling readystatechange."),e.cb()):this.Sa(t)},g.Sa=function(t){try{t==this.a?ad(this):D(this.b.a,"Called back with an unexpected xmlhttp")}catch(t){if(H(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var e=this;xc(this.b,t,function(){return"ResponseText: "+e.a.V()})}else xc(this.b,t,"No response text")}},g.mb=function(){if(this.a){var t=N(this.a),e=this.a.V();this.G<e.length&&(bd(this),ed(this,t,e),this.f&&4!=t&&Zc(this))}},g.cancel=function(){this.B=!0,gd(this)},g.lb=function(){this.s=null;var e=t();0<=e-this.U?(this.f&&J(this.b,"Received watchdog timeout even though request loaded successfully"),wc(this.b,this.g),2!=this.J&&(Ac(3),K(17)),gd(this),this.m=2,hd(this)):(D(this.b.a,"WatchDog timer called too early"),kd(this,this.U-e))},g=O.prototype,g.A=function(){nd(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},g.M=function(){return nd(this),this.a.concat()},g.get=function(t,e){return P(this.b,t)?this.b[t]:e},g.set=function(t,e){P(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},g.forEach=function(t,e){for(var n=this.M(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var qd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function rd(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Q(t,e){var n;this.b=this.j=this.f="",this.i=null,this.g=this.a="",this.h=!1,t instanceof Q?(this.h=void 0!==e?e:t.h,sd(this,t.f),this.j=t.j,td(this,t.b),ud(this,t.i),this.a=t.a,vd(this,wd(t.c)),this.g=t.g):t&&(n=String(t).match(qd))?(this.h=!!e,sd(this,n[1]||"",!0),this.j=xd(n[2]||""),td(this,n[3]||"",!0),ud(this,n[4]),this.a=xd(n[5]||"",!0),vd(this,n[6]||"",!0),this.g=xd(n[7]||"")):(this.h=!!e,this.c=new yd(null,this.h))}function M(t){return new Q(t)}function sd(t,e,n){t.f=n?xd(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function td(t,e,n){t.b=n?xd(e,!0):e}function ud(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function vd(t,e,n){e instanceof yd?(t.c=e,Ed(t.c,t.h)):(n||(e=zd(e,Fd)),t.c=new yd(e,t.h))}function R(t,e,n){t.c.set(e,n)}function $c(t,e,n){p(n)||(n=[String(n)]),Gd(t.c,e,n)}function Wc(e){return R(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36)),e}function Hd(t){return t instanceof Q?M(t):new Q(t,void 0)}function Id(t,e,n,r){var i=new Q(null,void 0);return t&&sd(i,t),e&&td(i,e),n&&ud(i,n),r&&(i.a=r),i}function xd(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function zd(t,e,n){return l(t)?(t=encodeURI(t).replace(e,Jd),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Jd(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Q.prototype.toString=function(){var t=[],e=this.f;e&&t.push(zd(e,Ad,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(zd(e,Ad,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.a)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(zd(n,"/"==n.charAt(0)?Bd:Cd,!0))),(n=this.c.toString())&&t.push("?",n),(n=this.g)&&t.push("#",zd(n,Dd)),t.join("")},Q.prototype.resolve=function(t){var e=M(this),n=!!t.f;n?sd(e,t.f):n=!!t.j,n?e.j=t.j:n=!!t.b,n?td(e,t.b):n=null!=t.i;var r=t.a;if(n)ud(e,t.i);else if(n=!!t.a){if("/"!=r.charAt(0))if(this.b&&!this.a)r="/"+r;else{var i=e.a.lastIndexOf("/");-1!=i&&(r=e.a.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.a=r:n=""!==t.c.toString(),n?vd(e,wd(t.c)):n=!!t.g,n&&(e.g=t.g),e};var Ad=/[#\/\?@]/g,Cd=/[#\?:]/g,Bd=/[#\?]/g,Fd=/[#\?@]/g,Dd=/#/g;function yd(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function S(t){t.a||(t.a=new O,t.b=0,t.c&&rd(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function Ld(t,e){S(t),e=Kd(t,e),P(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,pd(t.a,e))}function Md(t,e){return S(t),e=Kd(t,e),P(t.a.b,e)}function Gd(t,e,n){Ld(t,e),0<n.length&&(t.c=null,t.a.set(Kd(t,e),wa(n)),t.b+=n.length)}function wd(t){var e=new yd;return e.c=t.c,t.a&&(e.a=new O(t.a),e.b=t.b),e}function Kd(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function Ed(t,e){e&&!t.f&&(S(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(Ld(this,e),Gd(this,n,t))},t)),t.f=e}function Nd(){this.a=t()}g=yd.prototype,g.add=function(t,e){S(this),this.c=null,t=Kd(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},g.forEach=function(t,e){S(this),this.a.forEach(function(n,r){ra(n,function(n){t.call(e,n,r,this)},this)},this)},g.M=function(){S(this);for(var t=this.a.A(),e=this.a.M(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},g.A=function(t){S(this);var e=[];if(l(t))Md(this,t)&&(e=va(e,this.a.get(Kd(this,t))));else{t=this.a.A();for(var n=0;n<t.length;n++)e=va(e,t[n])}return e},g.set=function(t,e){return S(this),this.c=null,Md(this,t=Kd(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},g.get=function(t,e){return 0<(t=t?this.A(t):[]).length?String(t[0]):e},g.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.M(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.A(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var Od=null;function Pd(){Od||(Od=new Nd)}function Qd(){Od||(Od=new Nd)}function Rd(t,e){this.a=t,this.b=e,this.c=this.i=null,this.h=!1,this.m=null,this.f=-1,this.l=this.g=null}function Sd(t){H(t.b,"TestConnection: starting stage 2");var e=t.a.I.a;if(null!=e)H(t.b,function(){return"Buffered"}),K(4),e?(K(10),Td(t.a,t,!1)):(K(11),Td(t.a,t,!0));else{t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i;var n=Ud(t.a,t.g,t.m);K(4),$c(n,"TYPE","xmlhttp");var r=t.a.j,i=t.a.K;r&&i&&R(n,r,i),Yc(t.c,n,!1,t.g)}}function Wd(){this.a=this.b=null}function Xd(){this.a=new O}function Yd(t){var e=typeof t;return"object"==e&&t||"function"==e?"o"+(t[q]||(t[q]=++fa)):e.charAt(0)+t}function Zd(t,e){this.a=t,this.b=e}function $d(t){this.g=t||ae,k.PerformanceNavigationTiming?t=0<(t=k.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(k.oa&&k.oa.Ma&&k.oa.Ma()&&k.oa.Ma().Jb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Xd),this.b=null,this.c=[]}Nd.prototype.set=function(t){this.a=t},Nd.prototype.reset=function(){this.set(t())},Nd.prototype.get=function(){return this.a},u(Qd,Pd),g=Rd.prototype,g.P=null,g.ca=function(t){return this.a.ca(t)},g.abort=function(){this.c&&(this.c.cancel(),this.c=null),this.f=-1},g.La=function(){return!1},g.Oa=function(t,e){if(this.f=t.C,0==this.P){if(H(this.b,"TestConnection: Got data for stage 1"),!this.a.o&&(t=t.a)){var n=id(t,"X-Client-Wire-Protocol");this.l=n||null,this.a.j&&((t=id(t,"X-HTTP-Session-Id"))?this.a.K=t:D(this.b.a,"Missing X_HTTP_SESSION_ID in the handshake response"))}if(e){try{var r=this.a.la.a.parse(e)}catch(t){return xc(this.b,t),void Vd(this.a,this)}this.g=r[0]}else H(this.b,"TestConnection: Null responseText"),Vd(this.a,this)}else 1==this.P&&(this.h?K(6):"11111"==e?(K(5),this.h=!0,(!z||10<=Number(Wa))&&(this.f=200,this.c.cancel(),H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0))):(K(7),this.h=!1))},g.ta=function(){this.f=this.c.C,this.c.f?0==this.P?(this.P=1,H(this.b,"TestConnection: request complete for initial check"),Sd(this)):1==this.P&&(H(this.b,"TestConnection: request complete for stage 2"),this.h?(H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0)):(H(this.b,"Test connection failed; not using streaming"),K(10),Td(this.a,this,!1))):(H(this.b,"TestConnection: request failed, in state "+this.P),0==this.P?K(8):1==this.P&&K(9),Vd(this.a,this))},g.ia=function(){return this.a.ia()},g.qa=function(){return this.a.qa()},Xd.prototype.add=function(t){this.a.set(Yd(t),t)},Xd.prototype.A=function(){return this.a.A()};var ae=10;function be(t,e){t.a||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(t.f=t.g,t.a=new Xd,t.b&&(ce(t,t.b),t.b=null))}function de(t){return!!t.b||!!t.a&&t.a.a.c>=t.f}function ee(t,e){return t.b?t=t.b==e:t.a?(e=Yd(e),t=P(t.a.a.b,e)):t=!1,t}function ce(t,e){t.a?t.a.add(e):t.b=e}function fe(t,e){var n;t.b&&t.b==e?t.b=null:((n=t.a)&&(n=Yd(e),n=P(t.a.a.b,n)),n&&pd(t.a.a,Yd(e)))}function ge(t){if(null!=t.b)return t.c.concat(t.b.u);if(null!=t.a&&0!=t.a.a.c){var e=t.c;return ra(t.a.A(),function(t){e=e.concat(t.u)}),e}return wa(t.c)}function he(t,e){t.c=t.c.concat(e)}function ie(){}function je(){this.a=new ie}function ke(t,e,n){var r=n||"";try{md(t,function(t,n){var i=t;ea(t)&&(i=Db(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}function le(t,e){var n=new sc;H(n,"TestLoadImage: loading "+t);var r=new Image;r.onload=ja(me,n,r,"TestLoadImage: loaded",!0,e),r.onerror=ja(me,n,r,"TestLoadImage: error",!1,e),r.onabort=ja(me,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=ja(me,n,r,"TestLoadImage: timeout",!1,e),k.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}function me(t,e,n,r,i){try{H(t,n),e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(e){xc(t,e)}}function T(t){B.call(this),this.headers=new O,this.s=t||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ne,this.v=this.o=!1}$d.prototype.cancel=function(){this.c=ge(this),this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ra(this.a.A(),function(t){t.cancel()}),od(this.a.a))},ie.prototype.stringify=function(t){return k.JSON.stringify(t,void 0)},ie.prototype.parse=function(t){return k.JSON.parse(t,void 0)},u(T,B);var ne="";T.prototype.b=qc("goog.net.XhrIo");var oe=/^https?$/i,pe=["POST","PUT"];function se(t){return z&&Va(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}function ta(t){return"content-type"==t.toLowerCase()}function qe(t,e){t.c=!1,t.a&&(t.h=!0,t.a.abort(),t.h=!1),t.g=e,t.j=5,te(t),ue(t)}function te(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function ve(t){if(t.c&&void 0!==goog)if(t.D[1]&&4==N(t)&&2==t.W())E(t.b,U(t,"Local request error detected and ignored"));else if(t.u&&4==N(t))Zb(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==N(t)){E(t.b,U(t,"Request complete")),t.c=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(qd)[1]||null;if(!o&&k.self&&k.self.location){var a=k.self.location.protocol;o=a.substr(0,a.length-1)}i=!oe.test(o?o.toLowerCase():"")}e=i}e?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",te(t))}finally{ue(t)}}}function ue(t,e){if(t.a){re(t);var n=t.a,r=t.D[0]?aa:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(ic,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function re(t){t.a&&t.v&&(t.a.ontimeout=null),t.C&&(k.clearTimeout(t.C),t.C=null)}function N(t){return t.a?t.a.readyState:0}function id(t,e){return t.a?t.a.getResponseHeader(e):null}function U(t,e){return e+" ["+t.K+" "+t.B+" "+t.W()+"]"}function we(t){var e="";return Ca(t,function(t,n){e+=n,e+=":",e+=t,e+="\r\n"}),e}function xe(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}if(r)return t;if(n=we(n),l(t)){if(e=encodeURIComponent(String(e)),e+=n=null!=n?"="+encodeURIComponent(String(n)):""){if(0>(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n){r=n;var i=""}else i=t.substring(r+1,n);n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return R(t,e,n),t}function ye(t){this.ya=0,this.g=[],this.a=new sc,this.I=new Wd,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!n("internalChannelParams.failFast",t),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=n("internalChannelParams.baseRetryDelayMs",t)||5e3,this.$a=n("internalChannelParams.retryDelaySeedMs",t)||1e4,this.Ya=n("internalChannelParams.forwardChannelMaxRetries",t)||2,this.wa=n("internalChannelParams.forwardChannelRequestTimeoutMs",t)||2e4,this.Ta=t&&t.Kb||void 0,this.G=void 0,this.S=t&&t.supportsCrossDomainXhr||!1,this.J="",this.c=new $d(t&&t.concurrentRequestLimit),this.la=new je,this.o=!t||void 0===t.backgroundChannelTest||t.backgroundChannelTest,(this.va=t&&t.fastHandshake||!1)&&!this.o&&(D(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),t&&t.Fa&&this.a.Fa()}function ze(e){if(H(e.a,"disconnect()"),Ae(e),3==e.F){var n=e.R++,r=M(e.D);R(r,"SID",e.J),R(r,"RID",n),R(r,"TYPE","terminate"),Be(e,r),(n=new L(e,e.a,n,void 0)).J=2,n.h=Wc(M(r)),r=!1,k.navigator&&k.navigator.sendBeacon&&(r=k.navigator.sendBeacon(n.h.toString(),"")),!r&&k.Image&&((new Image).src=n.h,r=!0),r||(n.a=n.i.ca(null),n.a.fa(n.h)),n.D=t(),Zc(n)}Ce(e)}function Ae(t){t.C&&(t.C.abort(),t.C=null),t.b&&(t.b.cancel(),t.b=null),t.l&&(k.clearTimeout(t.l),t.l=null),De(t),t.c.cancel(),t.m&&(k.clearTimeout(t.m),t.m=null)}function Ee(t,e){1e3==t.g.length&&J(t.a,function(){return"Already have 1000 queued maps upon queueing "+Db(e)}),t.g.push(new Zd(t.Za++,e)),3==t.F&&Fe(t)}function Fe(t){de(t.c)||t.m||(t.m=Ec(r(t.Qa,t),0),t.v=0)}function Ge(t,e){var n=t.c;return(n.b?1:n.a?n.a.a.c:0)>=t.c.f-(t.m?1:0)?(J(t.a,"Unexpected retry request is scheduled."),!1):t.m?(H(t.a,"Use the retry request that is already scheduled."),t.g=e.u.concat(t.g),!0):!(1==t.F||2==t.F||t.v>=(t.Xa?0:t.Ya))&&(H(t.a,"Going to retry POST"),t.m=Ec(r(t.Qa,t,e),He(t,t.v)),t.v++,!0)}function Je(t,e){var n;n=e?e.c:t.R++;var r=M(t.D);R(r,"SID",t.J),R(r,"RID",n),R(r,"AID",t.N),Be(t,r),t.h&&t.i&&xe(r,t.h,t.i),n=new L(t,t.a,n,t.v+1),null===t.h&&(n.j=t.i),e&&(t.g=e.u.concat(t.g)),e=Ie(t,n),n.setTimeout(Math.round(.5*t.wa)+Math.round(.5*t.wa*Math.random())),ce(t.c,n),Vc(n,r,e)}function Be(t,e){t.f&&md({},function(t,n){R(e,n,t)})}function Ie(t,e){var n=Math.min(t.g.length,1e3),i=t.f?r(t.f.ab,t.f,t):null;t:for(var o=t.g,a=-1;;){var s=["count="+n];-1==a?0<n?(a=o[0].a,s.push("ofs="+a)):a=0:s.push("ofs="+a);for(var u=!0,c=0;c<n;c++){var l=o[c].a,f=o[c].b;if(0>(l-=a))a=Math.max(0,o[c].a-100),u=!1;else try{ke(f,s,"req"+l+"_")}catch(t){i&&i(f)}}if(u){i=s.join("&");break t}}return t=t.g.splice(0,n),e.u=t,i}function Ke(t){if(!t.b&&!t.l){t.T=1;var e=t.Pa;Tb||Ub(),Wb||(Tb(),Wb=!0),Pb.add(e,t),t.B=0}}function Le(t){return t.b||t.l?(J(t.a,"Request already in progress"),!1):!(3<=t.B)&&(H(t.a,"Going to retry GET"),t.T++,t.l=Ec(r(t.Pa,t),He(t,t.B)),t.B++,!0)}function Td(t,e,n){H(t.a,"Test Connection Finished");var r=e.l;r&&be(t.c,r),t.ka=n,t.u=e.f,H(t.a,"connectChannel_()"),t.D=Me(t,t.ja),Fe(t)}function Vd(t,e){H(t.a,"Test Connection Failed"),t.u=e.f,V(t,2)}function De(t){null!=t.s&&(k.clearTimeout(t.s),t.s=null)}function He(t,e){var n=t.Wa+Math.floor(Math.random()*t.$a);return t.qa()||(H(t.a,"Inactive channel"),n*=2),n*e}function V(t,e){if(F(t.a,"Error code "+e),2==e){var n=null;t.f&&(n=null);var i=r(t.pb,t);n||(n=new Q("//www.google.com/images/cleardot.gif"),k.location&&"http"==k.location.protocol||sd(n,"https"),Wc(n)),le(n.toString(),i)}else K(2);H(t.a,"HttpChannel: error - "+e),t.F=0,t.f&&t.f.Ba(e),Ce(t),Ae(t)}function Ce(t){if(t.F=0,t.u=-1,t.f){var e=ge(t.c);0==e.length&&0==t.g.length||(H(t.a,function(){return"Number of undelivered maps, pending: "+e.length+", outgoing: "+t.g.length}),t.c.c.length=0,wa(t.g),t.g.length=0),t.f.Aa()}}function Me(t,e){return e=Ne(t,null,e),H(t.a,"GetForwardChannelUri: "+e),e}function Ud(t,e,n){return e=Ne(t,t.ia()?e:null,n),H(t.a,"GetBackChannelUri: "+e),e}function Ne(t,e,n){var r=Hd(n);if(""!=r.b)e&&td(r,e+"."+r.b),ud(r,r.i);else{var i,o=k.location;i=e?e+"."+o.hostname:o.hostname,r=Id(o.protocol,i,o.port,n)}return t.U&&Ca(t.U,function(t,e){R(r,e,t)}),e=t.j,n=t.K,e&&n&&R(r,e,n),R(r,"VER",t.na),Be(t,r),r}function Oe(){}function Pe(t){for(var e=arguments[0],n=1;n<arguments.length;n++){var r,i=arguments[n];if(0==i.lastIndexOf("/",0))e=i;else(r=""==e)||(r=0<=(r=e.length-1)&&e.indexOf("/",r)==r),e+=r?i:"/"+i}return e}function Qe(){if(z&&!(10<=Number(Wa)))throw Error("Environmental error: no available transport.")}function W(t,e){B.call(this),this.a=new ye(e),this.b=t,this.o=e&&e.testUrl?e.testUrl:Pe(this.b,"test"),this.c=qc("goog.labs.net.webChannel.WebChannelBaseTransport"),this.g=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.i=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ea&&(t?t["X-WebChannel-Client-Profile"]=e.Ea:t={"X-WebChannel-Client-Profile":e.Ea}),this.a.L=t,(t=e&&e.httpHeadersOverwriteParam)&&!xa(t)&&(this.a.h=t),this.l=e&&e.supportsCrossDomainXhr||!1,this.j=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!xa(e)&&(this.a.j=e,null!==(t=this.g)&&e in t&&(e in(t=this.g)&&delete t[e],D(this.c,"Ignore httpSessionIdParam also specified with messageUrlParams: "+e))),this.h=new Re(this)}function Se(t){Mc.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Te(){Nc.call(this),this.status=1}function Re(t){this.a=t}g=T.prototype,g.fa=function(t,e,n,i){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.g="",this.j=0,this.K=e,this.G=!1,this.c=!0,this.a=this.s?Qc(this.s):Qc(Oc),this.D=this.s?Ic(this.s):Ic(Oc),this.a.onreadystatechange=r(this.Na,this);try{E(this.b,U(this,"Opening Xhr")),this.I=!0,this.a.open(e,String(t),!0),this.I=!1}catch(t){return E(this.b,U(this,"Error opening Xhr: "+t.message)),void qe(this,t)}t=n||"";var o=new O(this.headers);i&&md(i,function(t,e){o.set(e,t)}),i=sa(o.M()),n=k.FormData&&t instanceof k.FormData,!(0<=qa(pe,e))||i||n||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.L&&(this.a.responseType=this.L),"withCredentials"in this.a&&this.a.withCredentials!==this.o&&(this.a.withCredentials=this.o);try{re(this),0<this.l&&(this.v=se(this.a),E(this.b,U(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.v)),this.v?(this.a.timeout=this.l,this.a.ontimeout=r(this.Ka,this)):this.C=Zb(this.Ka,this.l,this)),E(this.b,U(this,"Sending request")),this.u=!0,this.a.send(t),this.u=!1}catch(t){E(this.b,U(this,"Send error: "+t.message)),qe(this,t)}},g.Ka=function(){void 0!==goog&&this.a&&(this.g="Timed out after "+this.l+"ms, aborting",this.j=8,E(this.b,U(this,this.g)),this.dispatchEvent("timeout"),this.abort(8))},g.abort=function(t){this.a&&this.c&&(E(this.b,U(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.j=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ue(this))},g.w=function(){this.a&&(this.c&&(this.c=!1,this.h=!0,this.a.abort(),this.h=!1),ue(this,!0)),T.H.w.call(this)},g.Na=function(){this.i||(this.I||this.u||this.h?ve(this):this.jb())},g.jb=function(){ve(this)},g.W=function(){try{return 2<N(this)?this.a.status:-1}catch(t){return-1}},g.Ha=function(){try{return 2<N(this)?this.a.statusText:""}catch(t){return E(this.b,"Can not get status: "+t.message),""}},g.V=function(){try{return this.a?this.a.responseText:""}catch(t){return E(this.b,"Can not get responseText: "+t.message),""}},g.eb=function(t){if(this.a){var e=this.a.responseText;t&&0==e.indexOf(t)&&(e=e.substring(t.length));t:{if(t=e,k.JSON)try{var n=k.JSON.parse(t);break t}catch(t){}n=Cb(t)}return n}},g.Ga=function(){return this.j},g.hb=function(){return l(this.g)?this.g:String(this.g)},g=ye.prototype,g.na=8,g.F=1,g.La=function(){return 0==this.F},g.Qa=function(t){if(this.m=null,H(this.a,"startForwardChannel_"),1==this.F)if(t)J(this.a,"Not supposed to retry the open");else{H(this.a,"open_()"),this.R=Math.floor(1e5*Math.random()),t=this.R++;var e=new L(this,this.a,t,void 0),n=this.i;this.L&&(n?Ha(n=Fa(n),this.L):n=this.L),null===this.h&&(e.j=n);var r=Ie(this,e),i=M(this.D);R(i,"RID",t),R(i,"CVER",22),this.o&&this.j&&R(i,"X-HTTP-Session-Id",this.j),Be(this,i),this.h&&n&&xe(i,this.h,n),ce(this.c,e),this.va?(R(i,"$req",r),R(i,"SID","null"),e.X=!0,Vc(e,i,null)):Vc(e,i,r),this.F=2}else 3==this.F&&(t?Je(this,t):0==this.g.length?H(this.a,"startForwardChannel_ returned: nothing to send"):de(this.c)?J(this.a,"startForwardChannel_ returned: connection already in progress"):(Je(this),H(this.a,"startForwardChannel_ finished, sent request")))},g.Pa=function(){this.l=null,H(this.a,"Creating new HttpRequest"),this.b=new L(this,this.a,"rpc",this.T),null===this.h&&(this.b.j=this.i),this.b.N=0;var t=M(this.ua);R(t,"RID","rpc"),R(t,"SID",this.J),R(t,"CI",this.ka?"0":"1"),R(t,"AID",this.N),Be(this,t),R(t,"TYPE","xmlhttp"),this.h&&this.i&&xe(t,this.h,this.i),this.G&&this.b.setTimeout(this.G),Yc(this.b,t,!0,this.X),H(this.a,"New Request created")},g.Oa=function(t,e){if(0!=this.F&&(this.b==t||ee(this.c,t)))if(this.u=t.C,!t.v&&ee(this.c,t)&&3==this.F){try{var n=this.la.a.parse(e)}catch(t){n=null}if(p(n)&&3==n.length)if(0==(e=n)[0])t:if(H(this.a,"Server claims our backchannel is missing."),this.l)H(this.a,"But we are currently starting the request.");else{if(this.b){if(!(this.b.D+3e3<t.D))break t;De(this),this.b.cancel(),this.b=null}else D(this.a.a,"We do not have a BackChannel established");Le(this),K(18)}else this.xa=e[1],0<(t=this.xa-this.N)&&(e=e[2],H(this.a,e+" bytes (in "+t+" arrays) are outstanding on the BackChannel"),37500>e&&this.ka&&0==this.B&&!this.s&&(this.s=Ec(r(this.ib,this),6e3)));else H(this.a,"Bad POST response data returned"),V(this,11)}else if((t.v||this.b==t)&&De(this),!xa(e))for(e=n=this.la.a.parse(e),n=0;n<e.length;n++){var i=e[n];if(this.N=i[0],i=i[1],2==this.F)if("c"==i[0]){this.J=i[1],this.X=i[2];var o=i[3];null!=o&&(this.na=o,F(this.a,"VER="+this.na)),null!=(o=i[4])&&(this.ya=o,F(this.a,"SVER="+this.ya)),null!=(i=i[5])&&"number"==typeof i&&0<i&&(this.G=i*=1.5,F(this.a,"backChannelRequestTimeoutMs_="+i)),this.o&&(i=t.a)&&((o=id(i,"X-Client-Wire-Protocol"))&&be(this.c,o),this.j&&((i=id(i,"X-HTTP-Session-Id"))?(this.K=i,R(this.D,this.j,i)):D(this.a.a,"Missing X_HTTP_SESSION_ID in the handshake response"))),this.F=3,this.f&&this.f.Da(),i=t,this.ua=Ud(this,this.X,this.ja),i.v?(H(this.a,"Upgrade the handshake request to a backchannel."),fe(this.c,i),(o=this.G)&&i.setTimeout(o),i.s&&(bd(i),Zc(i)),this.b=i):Ke(this)}else"stop"!=i[0]&&"close"!=i[0]||V(this,7);else 3==this.F&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?V(this,7):ze(this):"noop"!=i[0]&&this.f&&this.f.Ca(i),this.B=0)}},g.ib=function(){null!=this.s&&(this.s=null,this.b.cancel(),this.b=null,Le(this),K(19))},g.ta=function(e){H(this.a,"Request complete");var n=null;if(this.b==e){De(this),this.b=null;var r=2}else{if(!ee(this.c,e))return;n=e.u,fe(this.c,e),r=1}if(this.u=e.C,0!=this.F)if(e.f)1==r?(Dc(e.l?e.l.length:0,t()-e.D,this.v),Fe(this)):Ke(this);else{var i=e.m;if(3==i||0==i&&0<this.u)H(this.a,"Not retrying due to error type");else{var o=this;if(H(this.a,function(){return"Maybe retrying, last error: "+Sc(i,o.u)}),1==r&&Ge(this,e)||2==r&&Le(this))return;H(this.a,"Exceeded max number of retries")}switch(n&&0<n.length&&he(this.c,n),H(this.a,"Error: HTTP request failed"),i){case 1:V(this,5);break;case 4:V(this,10);break;case 3:V(this,6);break;default:V(this,2)}}},g.pb=function(t){t?(F(this.a,"Successfully pinged google.com"),K(2)):(F(this.a,"Failed to ping google.com"),K(1))},g.ca=function(t){if(t&&!this.S)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new T(this.Ta)).o=this.S,t},g.qa=function(){return!!this.f&&!0},g.ia=function(){return this.S},new Qd,g=Oe.prototype,g.Da=function(){},g.Ca=function(){},g.Ba=function(){},g.Aa=function(){},g.ab=function(){},Qe.prototype.a=function(t,e){return new W(t,e)},u(W,B),g=W.prototype,g.addEventListener=function(t,e,n,r){W.H.addEventListener.call(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){W.H.removeEventListener.call(this,t,e,n,r)},g.fb=function(){this.a.f=this.h,this.l&&(this.a.S=!0);var t=this.a,e=this.o,n=this.b,r=this.g||void 0;H(t.a,"connect()"),K(0),t.ja=n,t.U=r||{},t.o&&(H(t.a,"connect() bypassed channel-test."),t.I.b=[],t.I.a=!1),H(t.a,"connectTest_()"),t.C=new Rd(t,t.a),null===t.h&&(t.C.i=t.i),n=e,t.h&&t.i&&(n=xe(e,t.h,t.i)),(t=t.C).m=n,e=Me(t.a,t.m),K(3),null!=(n=t.a.I.b)?(t.g=n[0],t.P=1,Sd(t)):($c(e,"MODE","init"),!t.a.o&&t.a.j&&$c(e,"X-HTTP-Session-Id",t.a.j),t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i,Yc(t.c,e,!1,null),t.P=0)},g.close=function(){ze(this.a)},g.gb=function(t){if(l(t)){var e={};e.__data__=t,Ee(this.a,e)}else this.j?((e={}).__data__=Db(t),Ee(this.a,e)):Ee(this.a,t)},g.w=function(){this.a.f=null,delete this.h,ze(this.a),delete this.a,W.H.w.call(this)},u(Se,Mc),u(Te,Nc),u(Re,Oe),Re.prototype.Da=function(){rc(this.a.c,"WebChannel opened on "+this.a.b),this.a.dispatchEvent("a")},Re.prototype.Ca=function(t){this.a.dispatchEvent(new Se(t))},Re.prototype.Ba=function(t){rc(this.a.c,"WebChannel aborted on "+this.a.b+" due to channel error: "+t),this.a.dispatchEvent(new Te(t))},Re.prototype.Aa=function(){rc(this.a.c,"WebChannel closed on "+this.a.b),this.a.dispatchEvent("b")};var Ue=ja(function(t,e){function n(){}n.prototype=t.prototype;var r=new n;return t.apply(r,Array.prototype.slice.call(arguments,1)),r},Qe);function Ve(){this.b=[],this.a=[]}function We(t){return 0==t.b.length&&(t.b=t.a,t.b.reverse(),t.a=[]),t.b.pop()}function Xe(t){return t.b.length+t.a.length}function Ye(t,e){if(w.call(this),this.h=t||0,this.c=e||10,this.h>this.c)throw Error(Ze);this.a=new Ve,this.b=new Xd,this.g=null,this.aa()}Ve.prototype.A=function(){for(var t=[],e=this.b.length-1;0<=e;--e)t.push(this.b[e]);var n=this.a.length;for(e=0;e<n;++e)t.push(this.a[e]);return t},u(Ye,w);var Ze="[goog.structs.Pool] Min can not be greater than max";function af(t){if("function"==typeof t.$)t.$();else for(var e in t)t[e]=null}function $e(t){return Xe(t.a)+t.b.a.c}function bf(t,e){this.a=t,this.b=e}function cf(t){if(this.a=[],t)t:{if(t instanceof cf){var e=t.M();if(t=t.A(),0>=this.a.length){for(var n=this.a,r=0;r<e.length;r++)n.push(new bf(e[r],t[r]));break t}}else e=Ea(t),t=Da(t);for(r=0;r<e.length;r++)df(this,e[r],t[r])}}function df(t,e,n){var r=t.a;for(r.push(new bf(e,n)),e=r.length-1,n=(t=t.a)[e];0<e&&t[r=e-1>>1].a>n.a;)t[e]=t[r],e=r;t[e]=n}function ef(){cf.call(this)}function Y(t,e){this.f=new ef,Ye.call(this,t,e)}function Z(t,e,n,r){this.l=t,this.j=!!r,Y.call(this,e,n)}g=Ye.prototype,g.da=function(){var e=t();if(!(null!=this.g&&0>e-this.g)){for(var n;0<Xe(this.a)&&(n=We(this.a),!this.sa(n));)this.aa();return!n&&$e(this)<this.c&&(n=this.pa()),n&&(this.g=e,this.b.add(n)),n}},g.ob=function(t){return!!pd(this.b.a,Yd(t))&&(this.ma(t),!0)},g.ma=function(t){pd(this.b.a,Yd(t)),this.sa(t)&&$e(this)<this.c?this.a.a.push(t):af(t)},g.aa=function(){for(var t=this.a;$e(this)<this.h;){var e=this.pa();t.a.push(e)}for(;$e(this)>this.c&&0<Xe(this.a);)af(We(t))},g.pa=function(){return{}},g.sa=function(t){return"function"!=typeof t.bb||t.bb()},g.w=function(){if(Ye.H.w.call(this),0<this.b.a.c)throw Error("[goog.structs.Pool] Objects not released");delete this.b;for(var t=this.a;0!=t.b.length||0!=t.a.length;)af(We(t));delete this.a},cf.prototype.A=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].b);return e},cf.prototype.M=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].a);return e},u(ef,cf),u(Y,Ye),g=Y.prototype,g.da=function(t,e){if(!t)return Y.H.da.call(this);df(this.f,void 0!==e?e:100,t),this.ra()},g.ra=function(){for(var t=this.f;0<t.a.length;){var e=this.da();if(!e)break;var n=t,r=n.a,i=r.length,o=r[0];if(0>=i)o=void 0;else{if(1==i)ua(r);else{r[0]=r.pop(),r=0,i=(n=n.a).length;for(var a=n[r];r<i>>1;){var s=2*r+1,u=2*r+2;if(n[s=u<i&&n[u].a<n[s].a?u:s].a>a.a)break;n[r]=n[s],r=s}n[r]=a}o=o.b}o.apply(this,[e])}},g.ma=function(t){Y.H.ma.call(this,t),this.ra()},g.aa=function(){Y.H.aa.call(this),this.ra()},g.w=function(){Y.H.w.call(this),k.clearTimeout(void 0),ua(this.f.a),this.f=null},u(Z,Y),Z.prototype.pa=function(){var t=new T,e=this.l;return e&&e.forEach(function(e,n){t.headers.set(n,e)}),this.j&&(t.o=!0),t},Z.prototype.sa=function(t){return!t.i&&!t.a},Qe.prototype.createWebChannel=Qe.prototype.a,W.prototype.send=W.prototype.gb,W.prototype.open=W.prototype.fb,W.prototype.close=W.prototype.close,Fc.NO_ERROR=0,Fc.TIMEOUT=8,Fc.HTTP_ERROR=6,Gc.COMPLETE="complete",Kc.EventType=Lc,Lc.OPEN="a",Lc.CLOSE="b",Lc.ERROR="c",Lc.MESSAGE="d",B.prototype.listen=B.prototype.Ia,Z.prototype.getObject=Z.prototype.da,Z.prototype.releaseObject=Z.prototype.ob,T.prototype.listenOnce=T.prototype.Ja,T.prototype.getLastError=T.prototype.hb,T.prototype.getLastErrorCode=T.prototype.Ga,T.prototype.getStatus=T.prototype.W,T.prototype.getStatusText=T.prototype.Ha,T.prototype.getResponseJson=T.prototype.eb,T.prototype.getResponseText=T.prototype.V,T.prototype.getResponseText=T.prototype.V,T.prototype.send=T.prototype.fa,module.exports={createWebChannelTransport:Ue,ErrorCode:Fc,EventType:Gc,WebChannel:Kc,XhrIoPool:Z}}).call(void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(this,__webpack_require__(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
+
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(317),o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},s=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return i.__extends(e,t),e}(Error);var u=function(){function t(t){this.app=t}return t.prototype.getAuthToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.app.INTERNAL.getToken()];case 1:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getInstanceIdToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.app.messaging?[4,this.app.messaging().getToken()]:[2,void 0];case 1:return(t=e.sent())?[2,t]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getContext=function(){return i.__awaiter(this,void 0,void 0,function(){var t,e;return i.__generator(this,function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}})})},t}();function c(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var l=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null===t||void 0===t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"==typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map(function(t){return e.encode(t)});if("function"==typeof t||"object"==typeof t)return c(t,function(t){return e.encode(t)});throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null===t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=parseFloat(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(function(t){return e.decode(t)}):"function"==typeof t||"object"==typeof t?c(t,function(t){return e.decode(t)}):t},t}(),f=function(){function t(t,e){void 0===e&&(e="us-central1"),this.app_=t,this.region_=e,this.serializer=new l,this.contextProvider=new u(t)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return"https://"+this.region_+"-"+e+".cloudfunctions.net/"+t},t.prototype.httpsCallable=function(t){var e=this;return function(n){return e.call(t,n)}},t.prototype.postJSON=function(t,e,n){return i.__awaiter(this,void 0,void 0,function(){var r,o;return i.__generator(this,function(i){switch(i.label){case 0:n.append("Content-Type","application/json"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),[2,{status:0,json:null}];case 4:o=null,i.label=5;case 5:return i.trys.push([5,7,,8]),[4,r.json()];case 6:return o=i.sent(),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,{status:r.status,json:o}]}})})},t.prototype.call=function(t,e){return i.__awaiter(this,void 0,void 0,function(){var n,r,o,u,c,l,f;return i.__generator(this,function(i){switch(i.label){case 0:return n=this._url(t),e=this.serializer.encode(e),r={data:e},o=new Headers,[4,this.contextProvider.getContext()];case 1:return(u=i.sent()).authToken&&o.append("Authorization","Bearer "+u.authToken),u.instanceIdToken&&o.append("Firebase-Instance-ID-Token",u.instanceIdToken),[4,this.postJSON(n,r,o)];case 2:if(c=i.sent(),l=function(t,e,n){var r=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),i=r,o=void 0;try{var u=e.error;if(u){var c=u.status;if("string"==typeof c){if(!a[c])return new s("internal","internal");r=a[c]}i=c;var l=u.message;"string"==typeof l&&(i=l),void 0!==(o=u.details)&&(o=n.decode(o))}}catch(t){}return"ok"===r?null:new s(r,i,o)}(c.status,c.json,this.serializer))throw l;if(!c.json)throw new s("internal","Response is not valid JSON object.");if(void 0===(f=c.json.data)&&(f=c.json.result),void 0===f)throw new s("internal","Response is missing data field.");return[2,{data:this.serializer.decode(f)}]}})})},t}(),h="functions";function p(t,e,n){return new f(t,n)}function d(t){var e={Functions:f};t.INTERNAL.registerService(h,p,e,void 0,!0)}d(o),e.registerFunctions=d},function(module,exports,__webpack_require__){(function(global){(function(){var g,goog=goog||{},k=this;function l(t){return"string"==typeof t}function n(t,e){t=t.split("."),e=e||k;for(var n=0;n<t.length;n++)if(null==(e=e[t[n]]))return null;return e}function aa(){}function ba(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function p(t){return"array"==ba(t)}function ca(t){var e=ba(t);return"array"==e||"object"==e&&"number"==typeof t.length}function da(t){return"function"==ba(t)}function ea(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var q="closure_uid_"+(1e9*Math.random()>>>0),fa=0;function ha(t,e,n){return t.call.apply(t.bind,arguments)}function ia(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function r(t,e,n){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia).apply(null,arguments)}function ja(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var t=Date.now||function(){return+new Date};function u(t,e){function n(){}n.prototype=e.prototype,t.H=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Ib=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function ka(t){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function la(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");ka.call(this,n+t[r])}function ma(t,e){throw new la("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function w(){0!=na&&(pa[this[q]||(this[q]=++fa)]=this),this.i=this.i,this.m=this.m}u(ka,Error),ka.prototype.name="CustomError",u(la,ka),la.prototype.name="AssertionError";var na=0,pa={};w.prototype.i=!1,w.prototype.$=function(){if(!this.i&&(this.i=!0,this.w(),0!=na)){var t=this[q]||(this[q]=++fa);if(0!=na&&this.m&&0<this.m.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete pa[t]}},w.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var qa=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(l(t))return l(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},ra=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i=l(t)?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function sa(t){t:{for(var e=ta,n=t.length,r=l(t)?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:l(t)?t.charAt(e):t[e]}function ua(t){if(!p(t))for(var e=t.length-1;0<=e;e--)delete t[e];t.length=0}function va(t){return Array.prototype.concat.apply([],arguments)}function wa(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function xa(t){return/^[\s\xa0]*$/.test(t)}var ya=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},x;function za(t,e){return t<e?-1:t>e?1:0}t:{var Aa=k.navigator;if(Aa){var Ba=Aa.userAgent;if(Ba){x=Ba;break t}}x=""}function y(t){return-1!=x.indexOf(t)}function Ca(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function Da(t){var e,n=[],r=0;for(e in t)n[r++]=t[e];return n}function Ea(t){var e,n=[],r=0;for(e in t)n[r++]=e;return n}function Fa(t){var e,n={};for(e in t)n[e]=t[e];return n}var Ga="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ha(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<Ga.length;o++)n=Ga[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function Ia(t){return Ia[" "](t),t}function Ja(t,e){var n=Ka;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}Ia[" "]=aa;var La=y("Opera"),z=y("Trident")||y("MSIE"),Ma=y("Edge"),Na=Ma||z,Oa=y("Gecko")&&!(-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),Pa=-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"),Ra,a;function Qa(){var t=k.document;return t?t.documentMode:void 0}t:{var Sa="",Ta=(a=x,Oa?/rv:([^\);]+)(\)|;)/.exec(a):Ma?/Edge\/([\d\.]+)/.exec(a):z?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):Pa?/WebKit\/(\S+)/.exec(a):La?/(?:Version)[ \/]?(\S+)/.exec(a):void 0);if(Ta&&(Sa=Ta?Ta[1]:""),z){var Ua=Qa();if(null!=Ua&&Ua>parseFloat(Sa)){Ra=String(Ua);break t}}Ra=Sa}var Ka={},Wa;function Va(t){return Ja(t,function(){for(var e=0,n=ya(String(Ra)).split("."),r=ya(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=za(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||za(0==a[2].length,0==s[2].length)||za(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var Xa=k.document;Wa=Xa&&z?Qa()||("CSS1Compat"==Xa.compatMode?parseInt(Ra,10):5):void 0;var Ya=Object.freeze||function(t){return t},Za=!z||9<=Number(Wa),$a=z&&!Va("9"),ab=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return k.addEventListener("test",aa,e),k.removeEventListener("test",aa,e),t}();function A(t,e){this.type=t,this.a=this.target=e,this.Ra=!0}function bb(t,e){if(A.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(Oa){t:{try{Ia(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=l(t.pointerType)?t.pointerType:cb[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}A.prototype.b=function(){this.Ra=!1},u(bb,A);var cb=Ya({2:"touch",3:"pen",4:"mouse"});bb.prototype.b=function(){bb.H.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,$a)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}};var db="closure_listenable_"+(1e6*Math.random()|0),eb=0;function fb(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ga=i,this.key=++eb,this.Z=this.ba=!1}function gb(t){t.Z=!0,t.listener=null,t.proxy=null,t.src=null,t.ga=null}function hb(t){this.src=t,this.a={},this.b=0}function jb(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=qa(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(gb(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ib(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Z&&o.listener==e&&o.capture==!!n&&o.ga==r)return i}return-1}hb.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ib(t,e,r,i);return-1<a?(e=t[a],n||(e.ba=!1)):((e=new fb(e,this.src,o,!!r,i)).ba=n,t.push(e)),e};var kb="closure_lm_"+(1e6*Math.random()|0),lb={},mb=0;function nb(t,e,n,r,i){if(r&&r.once)return ob(t,e,n,r,i);if(p(e)){for(var o=0;o<e.length;o++)nb(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ia(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!1,r,i)}function qb(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=ea(i)?!!i.capture:!!i,s=rb(t);if(s||(t[kb]=s=new hb(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=sb(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)ab||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(tb(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return mb++,n}function sb(){var t=ub,e=Za?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}function ob(t,e,n,r,i){if(p(e)){for(var o=0;o<e.length;o++)ob(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ja(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!0,r,i)}function vb(t,e,n,r,i){if(p(e))for(var o=0;o<e.length;o++)vb(t,e[o],n,r,i);else r=ea(r)?!!r.capture:!!r,n=pb(n),t&&t[db]?(t=t.f,(e=String(e).toString())in t.a&&(-1<(n=ib(o=t.a[e],n,r,i))&&(gb(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=rb(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ib(e,n,r,i)),(n=-1<t?e[t]:null)&&wb(n))}function wb(t){if("number"!=typeof t&&t&&!t.Z){var e=t.src;if(e&&e[db])jb(e.f,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(tb(n),r):e.addListener&&e.removeListener&&e.removeListener(r),mb--,(n=rb(e))?(jb(n,t),0==n.b&&(n.src=null,e[kb]=null)):gb(t)}}}function tb(t){return t in lb?lb[t]:lb[t]="on"+t}function xb(t,e,n,r){var i=!0;if((t=rb(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.Z&&(o=yb(o,r),i=i&&!1!==o)}return i}function yb(t,e){var n=t.listener,r=t.ga||t.src;return t.ba&&wb(t),n.call(r,e)}function ub(t,e){if(t.Z)return!0;if(!Za){var r=e||n("window.event");e=new bb(r,this);var i=!0;if(!(0>r.keyCode||void 0!=r.returnValue)){t:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=e.a;o;o=o.parentNode)r.push(o);for(t=t.type,o=r.length-1;0<=o;o--){e.a=r[o];var a=xb(r[o],t,!0,e);i=i&&a}for(o=0;o<r.length;o++)e.a=r[o],a=xb(r[o],t,!1,e),i=i&&a}return i}return yb(t,new bb(e,this))}function rb(t){return(t=t[kb])instanceof hb?t:null}var zb="__closure_events_fn_"+(1e9*Math.random()>>>0);function pb(t){return da(t)?t:(t[zb]||(t[zb]=function(e){return t.handleEvent(e)}),t[zb])}function B(){w.call(this),this.f=new hb(this),this.N=this,this.J=null}function Ab(t,e,n,r){if(!(e=t.f.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Z&&a.capture==n){var s=a.listener,u=a.ga||a.src;a.ba&&jb(t.f,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Ra}function Bb(t){return!/^\s*$/.test(t)&&/^[\],:{}\s\u2028\u2029]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))}function Cb(a){if(a=String(a),Bb(a))try{return eval("("+a+")")}catch(t){}throw Error("Invalid JSON string: "+a)}function Db(t){var e=[];return Eb(new Fb,t,e),e.join("")}function Fb(){}function Eb(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(p(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),Eb(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),Gb(r,n),n.push(":"),Eb(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":Gb(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}u(B,w),B.prototype[db]=!0,g=B.prototype,g.addEventListener=function(t,e,n,r){nb(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){vb(this,t,e,n,r)},g.dispatchEvent=function(t){var e,n=this.J;if(n)for(e=[];n;n=n.J)e.push(n);n=this.N;var r=t.type||t;if(l(t))t=new A(t,n);else if(t instanceof A)t.target=t.target||n;else{var i=t;Ha(t=new A(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.a=e[o];i=Ab(a,r,!0,t)&&i}if(i=Ab(a=t.a=n,r,!0,t)&&i,i=Ab(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=Ab(a=t.a=e[o],r,!1,t)&&i;return i},g.w=function(){if(B.H.w.call(this),this.f){var t,e=this.f;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,gb(n[r]);delete e.a[t],e.b--}}this.J=null},g.Ia=function(t,e,n,r){return this.f.add(String(t),e,!1,n,r)},g.Ja=function(t,e,n,r){return this.f.add(String(t),e,!0,n,r)};var Hb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Ib=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function Gb(t,e){e.push('"',t.replace(Ib,function(t){var e=Hb[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Hb[t]=e),e}),'"')}function Jb(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function Kb(){this.b=this.a=null}Jb.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var Nb=new Jb(function(){return new Lb},function(t){t.reset()}),Rb,Tb;function Ob(){var t=Pb,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Lb(){this.next=this.b=this.a=null}function Qb(t){k.setTimeout(function(){throw t},0)}function Sb(){var t=k.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!y("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=r(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),void 0!==t&&!y("Trident")&&!y("MSIE")){var e=new t,n={},i=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).za;n.za=null,t()}},function(t){i.next={za:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){k.setTimeout(t,0)}}function Ub(){if(-1!=String(k.Promise).indexOf("[native code]")){var t=k.Promise.resolve(void 0);Tb=function(){t.then(Vb)}}else Tb=function(){var t=Vb;!da(k.setImmediate)||k.Window&&k.Window.prototype&&!y("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(Rb||(Rb=Sb()),Rb(t)):k.setImmediate(t)}}Kb.prototype.add=function(t,e){var n=Nb.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Lb.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Lb.prototype.reset=function(){this.next=this.b=this.a=null};var Wb=!1,Pb=new Kb;function Vb(){for(var t;t=Ob();){try{t.a.call(t.b)}catch(t){Qb(t)}var e=Nb;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Wb=!1}function Xb(e,n){B.call(this),this.b=e||1,this.a=n||k,this.c=r(this.qb,this),this.g=t()}function Yb(t){t.ea=!1,t.O&&(t.a.clearTimeout(t.O),t.O=null)}function Zb(t,e,n){if(da(t))n&&(t=r(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=r(t.handleEvent,t)}return 2147483647<Number(e)?-1:k.setTimeout(t,e||0)}function $b(t,e,n){w.call(this),this.f=null!=n?r(t,n):t,this.c=e,this.b=r(this.kb,this),this.a=[]}function ac(t){t.Y=Zb(t.b,t.c),t.f.apply(null,t.a)}function bc(t){w.call(this),this.b=t,this.a={}}u(Xb,B),g=Xb.prototype,g.ea=!1,g.O=null,g.qb=function(){if(this.ea){var e=t()-this.g;0<e&&e<.8*this.b?this.O=this.a.setTimeout(this.c,this.b-e):(this.O&&(this.a.clearTimeout(this.O),this.O=null),this.dispatchEvent("tick"),this.ea&&(this.O=this.a.setTimeout(this.c,this.b),this.g=t()))}},g.start=function(){this.ea=!0,this.O||(this.O=this.a.setTimeout(this.c,this.b),this.g=t())},g.w=function(){Xb.H.w.call(this),Yb(this),delete this.a},u($b,w),g=$b.prototype,g.ha=!1,g.Y=null,g.cb=function(t){this.a=arguments,this.Y?this.ha=!0:ac(this)},g.w=function(){$b.H.w.call(this),this.Y&&(k.clearTimeout(this.Y),this.Y=null,this.ha=!1,this.a=[])},g.kb=function(){this.Y=null,this.ha&&(this.ha=!1,ac(this))},u(bc,w);var cc=[];function dc(t,e,n,r){p(n)||(n&&(cc[0]=n.toString()),n=cc);for(var i=0;i<n.length;i++){var o=nb(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function ec(t){Ca(t.a,function(t,e){this.a.hasOwnProperty(e)&&wb(t)},t),t.a={}}function fc(t,e,n){this.reset(t,e,n,void 0,void 0)}bc.prototype.w=function(){bc.H.w.call(this),ec(this)},bc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},fc.prototype.a=null;var gc=0;function hc(t){this.f=t,this.b=this.c=this.a=null}function C(t,e){this.name=t,this.value=e}fc.prototype.reset=function(e,n,r,i,o){"number"==typeof o||gc++,i||t(),delete this.a},C.prototype.toString=function(){return this.name};var ic=new C("SEVERE",1e3),jc=new C("WARNING",900),kc=new C("INFO",800),lc=new C("CONFIG",700),mc=new C("FINE",500);function nc(t){return t.c?t.c:t.a?nc(t.a):(ma("Root logger has no level set."),null)}hc.prototype.log=function(t,e,n){if(t.value>=nc(this).value)for(da(e)&&(e=e()),t=new fc(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var oc={},pc=null;function qc(t){var e;if(pc||(pc=new hc(""),oc[""]=pc,pc.c=lc),!(e=oc[t])){e=new hc(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=qc(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,oc[t]=e}return e}function D(t,e){t&&t.log(jc,e,void 0)}function rc(t,e){t&&t.log(kc,e,void 0)}function E(t,e){t&&t.log(mc,e,void 0)}function sc(){this.a=qc("goog.labs.net.webChannel.WebChannelDebug"),this.b=!0}function tc(t,e,n,r,i,o){F(t,function(){if(t.b)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a})}function uc(t,e,n,r,i,o,a){F(t,function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a})}function G(t,e,n,r){F(t,function(){return"XMLHTTP TEXT ("+e+"): "+vc(t,n)+(r?" "+r:"")})}function wc(t,e){F(t,function(){return"TIMEOUT: "+e})}function H(t,e){E(t.a,e)}function xc(t,e,n){(t=t.a)&&t.log(ic,n||"Exception",e)}function F(t,e){rc(t.a,e)}function J(t,e){(t=t.a)&&t.log(ic,e,void 0)}function vc(t,e){if(!t.b)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(var r=0;r<n.length;r++)if(p(n[r])){var i=n[r];if(!(2>i.length)){var o=i[1];if(p(o)&&!(1>o.length)){var a=o[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var s=1;s<o.length;s++)o[s]=""}}}return Db(n)}catch(n){return H(t,"Exception parsing expected JS array - probably was not JS"),e}}sc.prototype.Fa=function(){this.b=!1};var yc=new B;function zc(t){A.call(this,"serverreachability",t)}function Ac(t){yc.dispatchEvent(new zc(yc,t))}function Bc(t){A.call(this,"statevent",t)}function K(t){yc.dispatchEvent(new Bc(yc,t))}function Cc(t){A.call(this,"timingevent",t)}function Dc(t,e,n){yc.dispatchEvent(new Cc(yc,t,e,n))}function Ec(t,e){if(!da(t))throw Error("Fn must not be null and must be a function");return k.setTimeout(function(){t()},e)}u(zc,A),u(Bc,A),u(Cc,A);var Fc={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Gc={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};function Hc(){}function Ic(t){var e;return(e=t.a)||(e={},Jc(t)&&(e[0]=!0,e[1]=!0),e=t.a=e),e}function Kc(){}Hc.prototype.a=null;var Lc={OPEN:"a",sb:"b",Va:"c",Bb:"d"},Oc;function Mc(){A.call(this,"d")}function Nc(){A.call(this,"c")}function Pc(){}function Qc(t){return(t=Jc(t))?new ActiveXObject(t):new XMLHttpRequest}function Jc(t){if(!t.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.b=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.b}function L(t,e,n,r){this.i=t,this.b=e,this.c=n,this.T=r||1,this.L=new bc(this),this.R=Rc,t=Na?125:void 0,this.S=new Xb(t),this.j=null,this.f=!1,this.l=this.g=this.h=this.J=this.D=this.U=this.s=null,this.u=[],this.a=null,this.G=0,this.m=this.o=null,this.C=-1,this.B=!1,this.N=0,this.I=null,this.v=this.X=this.K=!1}u(Mc,A),u(Nc,A),u(Pc,Hc),Oc=new Pc;var Rc=45e3;function Sc(t,e){switch(t){case 0:return"Non-200 return code ("+e+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}var Tc={},Uc={};function Vc(t,e,n){t.J=1,t.h=Wc(M(e)),t.l=n,t.K=!0,Xc(t,null)}function Yc(t,e,n,r){t.J=1,t.h=Wc(M(e)),t.l=null,t.K=n,Xc(t,r)}function Xc(e,n){e.D=t(),Zc(e),e.g=M(e.h),$c(e.g,"t",e.T),e.G=0,e.a=e.i.ca(e.i.ia()?n:null),0<e.N&&(e.I=new $b(r(e.Sa,e,e.a),e.N)),dc(e.L,e.a,"readystatechange",e.nb),n=e.j?Fa(e.j):{},e.l?(e.o||(e.o="POST"),n["Content-Type"]="application/x-www-form-urlencoded",e.a.fa(e.g,e.o,e.l,n)):(e.o="GET",e.a.fa(e.g,e.o,null,n)),Ac(1),tc(e.b,e.o,e.g,e.c,e.T,e.l)}function ad(t){var e=N(t.a),n=t.a.Ga(),r=t.a.W();if(!(3>e||3==e&&!Na&&!t.a.V())){t.B||4!=e||7==n||Ac(8==n||0>=r?3:2),bd(t);var i=t.a.W();t.C=i,(n=t.a.V())||H(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,uc(t.b,t.o,t.g,t.c,t.T,e,i),t.f?((r=cd(t))&&(G(t.b,t.c,r,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,dd(t,r)),t.K?(ed(t,e,n),Na&&t.f&&3==e&&fd(t)):(G(t.b,t.c,n,null),dd(t,n)),4==e&&gd(t),t.f&&!t.B&&(4==e?t.i.ta(t):(t.f=!1,Zc(t)))):(400==i&&0<n.indexOf("Unknown SID")?(t.m=3,K(12),D(t.b.a,"XMLHTTP Unknown SID ("+t.c+")")):(t.m=0,K(13),D(t.b.a,"XMLHTTP Bad status "+i+" ("+t.c+")")),gd(t),hd(t))}}function cd(t){return!t.X||t.v?null:t.a&&(t=id(t.a,"X-HTTP-Initial-Response"))&&!xa(t)?t:null}function ed(t,e,n){for(var r=!0;!t.B&&t.G<n.length;){var i=jd(t,n);if(i==Uc){4==e&&(t.m=4,K(14),r=!1),G(t.b,t.c,null,"[Incomplete Response]");break}if(i==Tc){t.m=4,K(15),G(t.b,t.c,n,"[Invalid Chunk]"),r=!1;break}G(t.b,t.c,i,null),dd(t,i)}4==e&&0==n.length&&(t.m=1,K(16),r=!1),t.f=t.f&&r,r||(G(t.b,t.c,n,"[Invalid Chunked Response]"),gd(t),hd(t))}function fd(t){dc(t.L,t.S,"tick",t.mb),t.S.start()}function jd(t,e){var n=t.G,r=e.indexOf("\n",n);return-1==r?Uc:(n=Number(e.substring(n,r)),isNaN(n)?Tc:(r+=1)+n>e.length?Uc:(e=e.substr(r,n),t.G=r+n,e))}function Zc(e){e.U=t()+e.R,kd(e,e.R)}function kd(t,e){if(null!=t.s)throw Error("WatchDog timer not null");t.s=Ec(r(t.lb,t),e)}function bd(t){t.s&&(k.clearTimeout(t.s),t.s=null)}function hd(t){t.i.La()||t.B||t.i.ta(t)}function gd(t){bd(t);var e=t.I;e&&"function"==typeof e.$&&e.$(),t.I=null,Yb(t.S),ec(t.L),t.a&&(e=t.a,t.a=null,e.abort(),e.$())}function dd(t,e){try{t.i.Oa(t,e),Ac(4)}catch(e){xc(t.b,e,"Error in httprequest callback")}}function ld(t){if(t.A&&"function"==typeof t.A)return t.A();if(l(t))return t.split("");if(ca(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}return Da(t)}function md(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(ca(t)||l(t))ra(t,e,void 0);else{if(t.M&&"function"==typeof t.M)var n=t.M();else if(t.A&&"function"==typeof t.A)n=void 0;else if(ca(t)||l(t)){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else n=Ea(t);i=(r=ld(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function O(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof O)for(n=t.M(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function od(t){t.b={},t.a.length=0,t.c=0}function pd(t,e){return!!P(t.b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&nd(t),!0)}function nd(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];P(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)P(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}g=L.prototype,g.setTimeout=function(t){this.R=t},g.nb=function(t){t=t.target;var e=this.I;e&&3==N(t)?(H(this.b,"Throttling readystatechange."),e.cb()):this.Sa(t)},g.Sa=function(t){try{t==this.a?ad(this):D(this.b.a,"Called back with an unexpected xmlhttp")}catch(t){if(H(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var e=this;xc(this.b,t,function(){return"ResponseText: "+e.a.V()})}else xc(this.b,t,"No response text")}},g.mb=function(){if(this.a){var t=N(this.a),e=this.a.V();this.G<e.length&&(bd(this),ed(this,t,e),this.f&&4!=t&&Zc(this))}},g.cancel=function(){this.B=!0,gd(this)},g.lb=function(){this.s=null;var e=t();0<=e-this.U?(this.f&&J(this.b,"Received watchdog timeout even though request loaded successfully"),wc(this.b,this.g),2!=this.J&&(Ac(3),K(17)),gd(this),this.m=2,hd(this)):(D(this.b.a,"WatchDog timer called too early"),kd(this,this.U-e))},g=O.prototype,g.A=function(){nd(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},g.M=function(){return nd(this),this.a.concat()},g.get=function(t,e){return P(this.b,t)?this.b[t]:e},g.set=function(t,e){P(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},g.forEach=function(t,e){for(var n=this.M(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var qd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function rd(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Q(t,e){var n;this.b=this.j=this.f="",this.i=null,this.g=this.a="",this.h=!1,t instanceof Q?(this.h=void 0!==e?e:t.h,sd(this,t.f),this.j=t.j,td(this,t.b),ud(this,t.i),this.a=t.a,vd(this,wd(t.c)),this.g=t.g):t&&(n=String(t).match(qd))?(this.h=!!e,sd(this,n[1]||"",!0),this.j=xd(n[2]||""),td(this,n[3]||"",!0),ud(this,n[4]),this.a=xd(n[5]||"",!0),vd(this,n[6]||"",!0),this.g=xd(n[7]||"")):(this.h=!!e,this.c=new yd(null,this.h))}function M(t){return new Q(t)}function sd(t,e,n){t.f=n?xd(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function td(t,e,n){t.b=n?xd(e,!0):e}function ud(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function vd(t,e,n){e instanceof yd?(t.c=e,Ed(t.c,t.h)):(n||(e=zd(e,Fd)),t.c=new yd(e,t.h))}function R(t,e,n){t.c.set(e,n)}function $c(t,e,n){p(n)||(n=[String(n)]),Gd(t.c,e,n)}function Wc(e){return R(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36)),e}function Hd(t){return t instanceof Q?M(t):new Q(t,void 0)}function Id(t,e,n,r){var i=new Q(null,void 0);return t&&sd(i,t),e&&td(i,e),n&&ud(i,n),r&&(i.a=r),i}function xd(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function zd(t,e,n){return l(t)?(t=encodeURI(t).replace(e,Jd),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Jd(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Q.prototype.toString=function(){var t=[],e=this.f;e&&t.push(zd(e,Ad,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(zd(e,Ad,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.a)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(zd(n,"/"==n.charAt(0)?Bd:Cd,!0))),(n=this.c.toString())&&t.push("?",n),(n=this.g)&&t.push("#",zd(n,Dd)),t.join("")},Q.prototype.resolve=function(t){var e=M(this),n=!!t.f;n?sd(e,t.f):n=!!t.j,n?e.j=t.j:n=!!t.b,n?td(e,t.b):n=null!=t.i;var r=t.a;if(n)ud(e,t.i);else if(n=!!t.a){if("/"!=r.charAt(0))if(this.b&&!this.a)r="/"+r;else{var i=e.a.lastIndexOf("/");-1!=i&&(r=e.a.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.a=r:n=""!==t.c.toString(),n?vd(e,wd(t.c)):n=!!t.g,n&&(e.g=t.g),e};var Ad=/[#\/\?@]/g,Cd=/[#\?:]/g,Bd=/[#\?]/g,Fd=/[#\?@]/g,Dd=/#/g;function yd(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function S(t){t.a||(t.a=new O,t.b=0,t.c&&rd(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function Ld(t,e){S(t),e=Kd(t,e),P(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,pd(t.a,e))}function Md(t,e){return S(t),e=Kd(t,e),P(t.a.b,e)}function Gd(t,e,n){Ld(t,e),0<n.length&&(t.c=null,t.a.set(Kd(t,e),wa(n)),t.b+=n.length)}function wd(t){var e=new yd;return e.c=t.c,t.a&&(e.a=new O(t.a),e.b=t.b),e}function Kd(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function Ed(t,e){e&&!t.f&&(S(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(Ld(this,e),Gd(this,n,t))},t)),t.f=e}function Nd(){this.a=t()}g=yd.prototype,g.add=function(t,e){S(this),this.c=null,t=Kd(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},g.forEach=function(t,e){S(this),this.a.forEach(function(n,r){ra(n,function(n){t.call(e,n,r,this)},this)},this)},g.M=function(){S(this);for(var t=this.a.A(),e=this.a.M(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},g.A=function(t){S(this);var e=[];if(l(t))Md(this,t)&&(e=va(e,this.a.get(Kd(this,t))));else{t=this.a.A();for(var n=0;n<t.length;n++)e=va(e,t[n])}return e},g.set=function(t,e){return S(this),this.c=null,Md(this,t=Kd(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},g.get=function(t,e){return 0<(t=t?this.A(t):[]).length?String(t[0]):e},g.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.M(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.A(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var Od=null;function Pd(){Od||(Od=new Nd)}function Qd(){Od||(Od=new Nd)}function Rd(t,e){this.a=t,this.b=e,this.c=this.i=null,this.h=!1,this.m=null,this.f=-1,this.l=this.g=null}function Sd(t){H(t.b,"TestConnection: starting stage 2");var e=t.a.I.a;if(null!=e)H(t.b,function(){return"Buffered"}),K(4),e?(K(10),Td(t.a,t,!1)):(K(11),Td(t.a,t,!0));else{t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i;var n=Ud(t.a,t.g,t.m);K(4),$c(n,"TYPE","xmlhttp");var r=t.a.j,i=t.a.K;r&&i&&R(n,r,i),Yc(t.c,n,!1,t.g)}}function Wd(){this.a=this.b=null}function Xd(){this.a=new O}function Yd(t){var e=typeof t;return"object"==e&&t||"function"==e?"o"+(t[q]||(t[q]=++fa)):e.charAt(0)+t}function Zd(t,e){this.a=t,this.b=e}function $d(t){this.g=t||ae,k.PerformanceNavigationTiming?t=0<(t=k.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(k.oa&&k.oa.Ma&&k.oa.Ma()&&k.oa.Ma().Jb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Xd),this.b=null,this.c=[]}Nd.prototype.set=function(t){this.a=t},Nd.prototype.reset=function(){this.set(t())},Nd.prototype.get=function(){return this.a},u(Qd,Pd),g=Rd.prototype,g.P=null,g.ca=function(t){return this.a.ca(t)},g.abort=function(){this.c&&(this.c.cancel(),this.c=null),this.f=-1},g.La=function(){return!1},g.Oa=function(t,e){if(this.f=t.C,0==this.P){if(H(this.b,"TestConnection: Got data for stage 1"),!this.a.o&&(t=t.a)){var n=id(t,"X-Client-Wire-Protocol");this.l=n||null,this.a.j&&((t=id(t,"X-HTTP-Session-Id"))?this.a.K=t:D(this.b.a,"Missing X_HTTP_SESSION_ID in the handshake response"))}if(e){try{var r=this.a.la.a.parse(e)}catch(t){return xc(this.b,t),void Vd(this.a,this)}this.g=r[0]}else H(this.b,"TestConnection: Null responseText"),Vd(this.a,this)}else 1==this.P&&(this.h?K(6):"11111"==e?(K(5),this.h=!0,(!z||10<=Number(Wa))&&(this.f=200,this.c.cancel(),H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0))):(K(7),this.h=!1))},g.ta=function(){this.f=this.c.C,this.c.f?0==this.P?(this.P=1,H(this.b,"TestConnection: request complete for initial check"),Sd(this)):1==this.P&&(H(this.b,"TestConnection: request complete for stage 2"),this.h?(H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0)):(H(this.b,"Test connection failed; not using streaming"),K(10),Td(this.a,this,!1))):(H(this.b,"TestConnection: request failed, in state "+this.P),0==this.P?K(8):1==this.P&&K(9),Vd(this.a,this))},g.ia=function(){return this.a.ia()},g.qa=function(){return this.a.qa()},Xd.prototype.add=function(t){this.a.set(Yd(t),t)},Xd.prototype.A=function(){return this.a.A()};var ae=10;function be(t,e){t.a||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(t.f=t.g,t.a=new Xd,t.b&&(ce(t,t.b),t.b=null))}function de(t){return!!t.b||!!t.a&&t.a.a.c>=t.f}function ee(t,e){return t.b?t=t.b==e:t.a?(e=Yd(e),t=P(t.a.a.b,e)):t=!1,t}function ce(t,e){t.a?t.a.add(e):t.b=e}function fe(t,e){var n;t.b&&t.b==e?t.b=null:((n=t.a)&&(n=Yd(e),n=P(t.a.a.b,n)),n&&pd(t.a.a,Yd(e)))}function ge(t){if(null!=t.b)return t.c.concat(t.b.u);if(null!=t.a&&0!=t.a.a.c){var e=t.c;return ra(t.a.A(),function(t){e=e.concat(t.u)}),e}return wa(t.c)}function he(t,e){t.c=t.c.concat(e)}function ie(){}function je(){this.a=new ie}function ke(t,e,n){var r=n||"";try{md(t,function(t,n){var i=t;ea(t)&&(i=Db(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}function le(t,e){var n=new sc;H(n,"TestLoadImage: loading "+t);var r=new Image;r.onload=ja(me,n,r,"TestLoadImage: loaded",!0,e),r.onerror=ja(me,n,r,"TestLoadImage: error",!1,e),r.onabort=ja(me,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=ja(me,n,r,"TestLoadImage: timeout",!1,e),k.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}function me(t,e,n,r,i){try{H(t,n),e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(e){xc(t,e)}}function T(t){B.call(this),this.headers=new O,this.s=t||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ne,this.v=this.o=!1}$d.prototype.cancel=function(){this.c=ge(this),this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ra(this.a.A(),function(t){t.cancel()}),od(this.a.a))},ie.prototype.stringify=function(t){return k.JSON.stringify(t,void 0)},ie.prototype.parse=function(t){return k.JSON.parse(t,void 0)},u(T,B);var ne="";T.prototype.b=qc("goog.net.XhrIo");var oe=/^https?$/i,pe=["POST","PUT"];function se(t){return z&&Va(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}function ta(t){return"content-type"==t.toLowerCase()}function qe(t,e){t.c=!1,t.a&&(t.h=!0,t.a.abort(),t.h=!1),t.g=e,t.j=5,te(t),ue(t)}function te(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function ve(t){if(t.c&&void 0!==goog)if(t.D[1]&&4==N(t)&&2==t.W())E(t.b,U(t,"Local request error detected and ignored"));else if(t.u&&4==N(t))Zb(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==N(t)){E(t.b,U(t,"Request complete")),t.c=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(qd)[1]||null;if(!o&&k.self&&k.self.location){var a=k.self.location.protocol;o=a.substr(0,a.length-1)}i=!oe.test(o?o.toLowerCase():"")}e=i}e?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",te(t))}finally{ue(t)}}}function ue(t,e){if(t.a){re(t);var n=t.a,r=t.D[0]?aa:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(ic,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function re(t){t.a&&t.v&&(t.a.ontimeout=null),t.C&&(k.clearTimeout(t.C),t.C=null)}function N(t){return t.a?t.a.readyState:0}function id(t,e){return t.a?t.a.getResponseHeader(e):null}function U(t,e){return e+" ["+t.K+" "+t.B+" "+t.W()+"]"}function we(t){var e="";return Ca(t,function(t,n){e+=n,e+=":",e+=t,e+="\r\n"}),e}function xe(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}if(r)return t;if(n=we(n),l(t)){if(e=encodeURIComponent(String(e)),e+=n=null!=n?"="+encodeURIComponent(String(n)):""){if(0>(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n){r=n;var i=""}else i=t.substring(r+1,n);n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return R(t,e,n),t}function ye(t){this.ya=0,this.g=[],this.a=new sc,this.I=new Wd,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!n("internalChannelParams.failFast",t),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=n("internalChannelParams.baseRetryDelayMs",t)||5e3,this.$a=n("internalChannelParams.retryDelaySeedMs",t)||1e4,this.Ya=n("internalChannelParams.forwardChannelMaxRetries",t)||2,this.wa=n("internalChannelParams.forwardChannelRequestTimeoutMs",t)||2e4,this.Ta=t&&t.Kb||void 0,this.G=void 0,this.S=t&&t.supportsCrossDomainXhr||!1,this.J="",this.c=new $d(t&&t.concurrentRequestLimit),this.la=new je,this.o=!t||void 0===t.backgroundChannelTest||t.backgroundChannelTest,(this.va=t&&t.fastHandshake||!1)&&!this.o&&(D(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),t&&t.Fa&&this.a.Fa()}function ze(e){if(H(e.a,"disconnect()"),Ae(e),3==e.F){var n=e.R++,r=M(e.D);R(r,"SID",e.J),R(r,"RID",n),R(r,"TYPE","terminate"),Be(e,r),(n=new L(e,e.a,n,void 0)).J=2,n.h=Wc(M(r)),r=!1,k.navigator&&k.navigator.sendBeacon&&(r=k.navigator.sendBeacon(n.h.toString(),"")),!r&&k.Image&&((new Image).src=n.h,r=!0),r||(n.a=n.i.ca(null),n.a.fa(n.h)),n.D=t(),Zc(n)}Ce(e)}function Ae(t){t.C&&(t.C.abort(),t.C=null),t.b&&(t.b.cancel(),t.b=null),t.l&&(k.clearTimeout(t.l),t.l=null),De(t),t.c.cancel(),t.m&&(k.clearTimeout(t.m),t.m=null)}function Ee(t,e){1e3==t.g.length&&J(t.a,function(){return"Already have 1000 queued maps upon queueing "+Db(e)}),t.g.push(new Zd(t.Za++,e)),3==t.F&&Fe(t)}function Fe(t){de(t.c)||t.m||(t.m=Ec(r(t.Qa,t),0),t.v=0)}function Ge(t,e){var n=t.c;return(n.b?1:n.a?n.a.a.c:0)>=t.c.f-(t.m?1:0)?(J(t.a,"Unexpected retry request is scheduled."),!1):t.m?(H(t.a,"Use the retry request that is already scheduled."),t.g=e.u.concat(t.g),!0):!(1==t.F||2==t.F||t.v>=(t.Xa?0:t.Ya))&&(H(t.a,"Going to retry POST"),t.m=Ec(r(t.Qa,t,e),He(t,t.v)),t.v++,!0)}function Je(t,e){var n;n=e?e.c:t.R++;var r=M(t.D);R(r,"SID",t.J),R(r,"RID",n),R(r,"AID",t.N),Be(t,r),t.h&&t.i&&xe(r,t.h,t.i),n=new L(t,t.a,n,t.v+1),null===t.h&&(n.j=t.i),e&&(t.g=e.u.concat(t.g)),e=Ie(t,n),n.setTimeout(Math.round(.5*t.wa)+Math.round(.5*t.wa*Math.random())),ce(t.c,n),Vc(n,r,e)}function Be(t,e){t.f&&md({},function(t,n){R(e,n,t)})}function Ie(t,e){var n=Math.min(t.g.length,1e3),i=t.f?r(t.f.ab,t.f,t):null;t:for(var o=t.g,a=-1;;){var s=["count="+n];-1==a?0<n?(a=o[0].a,s.push("ofs="+a)):a=0:s.push("ofs="+a);for(var u=!0,c=0;c<n;c++){var l=o[c].a,f=o[c].b;if(0>(l-=a))a=Math.max(0,o[c].a-100),u=!1;else try{ke(f,s,"req"+l+"_")}catch(t){i&&i(f)}}if(u){i=s.join("&");break t}}return t=t.g.splice(0,n),e.u=t,i}function Ke(t){if(!t.b&&!t.l){t.T=1;var e=t.Pa;Tb||Ub(),Wb||(Tb(),Wb=!0),Pb.add(e,t),t.B=0}}function Le(t){return t.b||t.l?(J(t.a,"Request already in progress"),!1):!(3<=t.B)&&(H(t.a,"Going to retry GET"),t.T++,t.l=Ec(r(t.Pa,t),He(t,t.B)),t.B++,!0)}function Td(t,e,n){H(t.a,"Test Connection Finished");var r=e.l;r&&be(t.c,r),t.ka=n,t.u=e.f,H(t.a,"connectChannel_()"),t.D=Me(t,t.ja),Fe(t)}function Vd(t,e){H(t.a,"Test Connection Failed"),t.u=e.f,V(t,2)}function De(t){null!=t.s&&(k.clearTimeout(t.s),t.s=null)}function He(t,e){var n=t.Wa+Math.floor(Math.random()*t.$a);return t.qa()||(H(t.a,"Inactive channel"),n*=2),n*e}function V(t,e){if(F(t.a,"Error code "+e),2==e){var n=null;t.f&&(n=null);var i=r(t.pb,t);n||(n=new Q("//www.google.com/images/cleardot.gif"),k.location&&"http"==k.location.protocol||sd(n,"https"),Wc(n)),le(n.toString(),i)}else K(2);H(t.a,"HttpChannel: error - "+e),t.F=0,t.f&&t.f.Ba(e),Ce(t),Ae(t)}function Ce(t){if(t.F=0,t.u=-1,t.f){var e=ge(t.c);0==e.length&&0==t.g.length||(H(t.a,function(){return"Number of undelivered maps, pending: "+e.length+", outgoing: "+t.g.length}),t.c.c.length=0,wa(t.g),t.g.length=0),t.f.Aa()}}function Me(t,e){return e=Ne(t,null,e),H(t.a,"GetForwardChannelUri: "+e),e}function Ud(t,e,n){return e=Ne(t,t.ia()?e:null,n),H(t.a,"GetBackChannelUri: "+e),e}function Ne(t,e,n){var r=Hd(n);if(""!=r.b)e&&td(r,e+"."+r.b),ud(r,r.i);else{var i,o=k.location;i=e?e+"."+o.hostname:o.hostname,r=Id(o.protocol,i,o.port,n)}return t.U&&Ca(t.U,function(t,e){R(r,e,t)}),e=t.j,n=t.K,e&&n&&R(r,e,n),R(r,"VER",t.na),Be(t,r),r}function Oe(){}function Pe(t){for(var e=arguments[0],n=1;n<arguments.length;n++){var r,i=arguments[n];if(0==i.lastIndexOf("/",0))e=i;else(r=""==e)||(r=0<=(r=e.length-1)&&e.indexOf("/",r)==r),e+=r?i:"/"+i}return e}function Qe(){if(z&&!(10<=Number(Wa)))throw Error("Environmental error: no available transport.")}function W(t,e){B.call(this),this.a=new ye(e),this.b=t,this.o=e&&e.testUrl?e.testUrl:Pe(this.b,"test"),this.c=qc("goog.labs.net.webChannel.WebChannelBaseTransport"),this.g=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.i=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ea&&(t?t["X-WebChannel-Client-Profile"]=e.Ea:t={"X-WebChannel-Client-Profile":e.Ea}),this.a.L=t,(t=e&&e.httpHeadersOverwriteParam)&&!xa(t)&&(this.a.h=t),this.l=e&&e.supportsCrossDomainXhr||!1,this.j=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!xa(e)&&(this.a.j=e,null!==(t=this.g)&&e in t&&(e in(t=this.g)&&delete t[e],D(this.c,"Ignore httpSessionIdParam also specified with messageUrlParams: "+e))),this.h=new Re(this)}function Se(t){Mc.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Te(){Nc.call(this),this.status=1}function Re(t){this.a=t}g=T.prototype,g.fa=function(t,e,n,i){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.g="",this.j=0,this.K=e,this.G=!1,this.c=!0,this.a=this.s?Qc(this.s):Qc(Oc),this.D=this.s?Ic(this.s):Ic(Oc),this.a.onreadystatechange=r(this.Na,this);try{E(this.b,U(this,"Opening Xhr")),this.I=!0,this.a.open(e,String(t),!0),this.I=!1}catch(t){return E(this.b,U(this,"Error opening Xhr: "+t.message)),void qe(this,t)}t=n||"";var o=new O(this.headers);i&&md(i,function(t,e){o.set(e,t)}),i=sa(o.M()),n=k.FormData&&t instanceof k.FormData,!(0<=qa(pe,e))||i||n||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.L&&(this.a.responseType=this.L),"withCredentials"in this.a&&this.a.withCredentials!==this.o&&(this.a.withCredentials=this.o);try{re(this),0<this.l&&(this.v=se(this.a),E(this.b,U(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.v)),this.v?(this.a.timeout=this.l,this.a.ontimeout=r(this.Ka,this)):this.C=Zb(this.Ka,this.l,this)),E(this.b,U(this,"Sending request")),this.u=!0,this.a.send(t),this.u=!1}catch(t){E(this.b,U(this,"Send error: "+t.message)),qe(this,t)}},g.Ka=function(){void 0!==goog&&this.a&&(this.g="Timed out after "+this.l+"ms, aborting",this.j=8,E(this.b,U(this,this.g)),this.dispatchEvent("timeout"),this.abort(8))},g.abort=function(t){this.a&&this.c&&(E(this.b,U(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.j=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ue(this))},g.w=function(){this.a&&(this.c&&(this.c=!1,this.h=!0,this.a.abort(),this.h=!1),ue(this,!0)),T.H.w.call(this)},g.Na=function(){this.i||(this.I||this.u||this.h?ve(this):this.jb())},g.jb=function(){ve(this)},g.W=function(){try{return 2<N(this)?this.a.status:-1}catch(t){return-1}},g.Ha=function(){try{return 2<N(this)?this.a.statusText:""}catch(t){return E(this.b,"Can not get status: "+t.message),""}},g.V=function(){try{return this.a?this.a.responseText:""}catch(t){return E(this.b,"Can not get responseText: "+t.message),""}},g.eb=function(t){if(this.a){var e=this.a.responseText;t&&0==e.indexOf(t)&&(e=e.substring(t.length));t:{if(t=e,k.JSON)try{var n=k.JSON.parse(t);break t}catch(t){}n=Cb(t)}return n}},g.Ga=function(){return this.j},g.hb=function(){return l(this.g)?this.g:String(this.g)},g=ye.prototype,g.na=8,g.F=1,g.La=function(){return 0==this.F},g.Qa=function(t){if(this.m=null,H(this.a,"startForwardChannel_"),1==this.F)if(t)J(this.a,"Not supposed to retry the open");else{H(this.a,"open_()"),this.R=Math.floor(1e5*Math.random()),t=this.R++;var e=new L(this,this.a,t,void 0),n=this.i;this.L&&(n?Ha(n=Fa(n),this.L):n=this.L),null===this.h&&(e.j=n);var r=Ie(this,e),i=M(this.D);R(i,"RID",t),R(i,"CVER",22),this.o&&this.j&&R(i,"X-HTTP-Session-Id",this.j),Be(this,i),this.h&&n&&xe(i,this.h,n),ce(this.c,e),this.va?(R(i,"$req",r),R(i,"SID","null"),e.X=!0,Vc(e,i,null)):Vc(e,i,r),this.F=2}else 3==this.F&&(t?Je(this,t):0==this.g.length?H(this.a,"startForwardChannel_ returned: nothing to send"):de(this.c)?J(this.a,"startForwardChannel_ returned: connection already in progress"):(Je(this),H(this.a,"startForwardChannel_ finished, sent request")))},g.Pa=function(){this.l=null,H(this.a,"Creating new HttpRequest"),this.b=new L(this,this.a,"rpc",this.T),null===this.h&&(this.b.j=this.i),this.b.N=0;var t=M(this.ua);R(t,"RID","rpc"),R(t,"SID",this.J),R(t,"CI",this.ka?"0":"1"),R(t,"AID",this.N),Be(this,t),R(t,"TYPE","xmlhttp"),this.h&&this.i&&xe(t,this.h,this.i),this.G&&this.b.setTimeout(this.G),Yc(this.b,t,!0,this.X),H(this.a,"New Request created")},g.Oa=function(t,e){if(0!=this.F&&(this.b==t||ee(this.c,t)))if(this.u=t.C,!t.v&&ee(this.c,t)&&3==this.F){try{var n=this.la.a.parse(e)}catch(t){n=null}if(p(n)&&3==n.length)if(0==(e=n)[0])t:if(H(this.a,"Server claims our backchannel is missing."),this.l)H(this.a,"But we are currently starting the request.");else{if(this.b){if(!(this.b.D+3e3<t.D))break t;De(this),this.b.cancel(),this.b=null}else D(this.a.a,"We do not have a BackChannel established");Le(this),K(18)}else this.xa=e[1],0<(t=this.xa-this.N)&&(e=e[2],H(this.a,e+" bytes (in "+t+" arrays) are outstanding on the BackChannel"),37500>e&&this.ka&&0==this.B&&!this.s&&(this.s=Ec(r(this.ib,this),6e3)));else H(this.a,"Bad POST response data returned"),V(this,11)}else if((t.v||this.b==t)&&De(this),!xa(e))for(e=n=this.la.a.parse(e),n=0;n<e.length;n++){var i=e[n];if(this.N=i[0],i=i[1],2==this.F)if("c"==i[0]){this.J=i[1],this.X=i[2];var o=i[3];null!=o&&(this.na=o,F(this.a,"VER="+this.na)),null!=(o=i[4])&&(this.ya=o,F(this.a,"SVER="+this.ya)),null!=(i=i[5])&&"number"==typeof i&&0<i&&(this.G=i*=1.5,F(this.a,"backChannelRequestTimeoutMs_="+i)),this.o&&(i=t.a)&&((o=id(i,"X-Client-Wire-Protocol"))&&be(this.c,o),this.j&&((i=id(i,"X-HTTP-Session-Id"))?(this.K=i,R(this.D,this.j,i)):D(this.a.a,"Missing X_HTTP_SESSION_ID in the handshake response"))),this.F=3,this.f&&this.f.Da(),i=t,this.ua=Ud(this,this.X,this.ja),i.v?(H(this.a,"Upgrade the handshake request to a backchannel."),fe(this.c,i),(o=this.G)&&i.setTimeout(o),i.s&&(bd(i),Zc(i)),this.b=i):Ke(this)}else"stop"!=i[0]&&"close"!=i[0]||V(this,7);else 3==this.F&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?V(this,7):ze(this):"noop"!=i[0]&&this.f&&this.f.Ca(i),this.B=0)}},g.ib=function(){null!=this.s&&(this.s=null,this.b.cancel(),this.b=null,Le(this),K(19))},g.ta=function(e){H(this.a,"Request complete");var n=null;if(this.b==e){De(this),this.b=null;var r=2}else{if(!ee(this.c,e))return;n=e.u,fe(this.c,e),r=1}if(this.u=e.C,0!=this.F)if(e.f)1==r?(Dc(e.l?e.l.length:0,t()-e.D,this.v),Fe(this)):Ke(this);else{var i=e.m;if(3==i||0==i&&0<this.u)H(this.a,"Not retrying due to error type");else{var o=this;if(H(this.a,function(){return"Maybe retrying, last error: "+Sc(i,o.u)}),1==r&&Ge(this,e)||2==r&&Le(this))return;H(this.a,"Exceeded max number of retries")}switch(n&&0<n.length&&he(this.c,n),H(this.a,"Error: HTTP request failed"),i){case 1:V(this,5);break;case 4:V(this,10);break;case 3:V(this,6);break;default:V(this,2)}}},g.pb=function(t){t?(F(this.a,"Successfully pinged google.com"),K(2)):(F(this.a,"Failed to ping google.com"),K(1))},g.ca=function(t){if(t&&!this.S)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new T(this.Ta)).o=this.S,t},g.qa=function(){return!!this.f&&!0},g.ia=function(){return this.S},new Qd,g=Oe.prototype,g.Da=function(){},g.Ca=function(){},g.Ba=function(){},g.Aa=function(){},g.ab=function(){},Qe.prototype.a=function(t,e){return new W(t,e)},u(W,B),g=W.prototype,g.addEventListener=function(t,e,n,r){W.H.addEventListener.call(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){W.H.removeEventListener.call(this,t,e,n,r)},g.fb=function(){this.a.f=this.h,this.l&&(this.a.S=!0);var t=this.a,e=this.o,n=this.b,r=this.g||void 0;H(t.a,"connect()"),K(0),t.ja=n,t.U=r||{},t.o&&(H(t.a,"connect() bypassed channel-test."),t.I.b=[],t.I.a=!1),H(t.a,"connectTest_()"),t.C=new Rd(t,t.a),null===t.h&&(t.C.i=t.i),n=e,t.h&&t.i&&(n=xe(e,t.h,t.i)),(t=t.C).m=n,e=Me(t.a,t.m),K(3),null!=(n=t.a.I.b)?(t.g=n[0],t.P=1,Sd(t)):($c(e,"MODE","init"),!t.a.o&&t.a.j&&$c(e,"X-HTTP-Session-Id",t.a.j),t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i,Yc(t.c,e,!1,null),t.P=0)},g.close=function(){ze(this.a)},g.gb=function(t){if(l(t)){var e={};e.__data__=t,Ee(this.a,e)}else this.j?((e={}).__data__=Db(t),Ee(this.a,e)):Ee(this.a,t)},g.w=function(){this.a.f=null,delete this.h,ze(this.a),delete this.a,W.H.w.call(this)},u(Se,Mc),u(Te,Nc),u(Re,Oe),Re.prototype.Da=function(){rc(this.a.c,"WebChannel opened on "+this.a.b),this.a.dispatchEvent("a")},Re.prototype.Ca=function(t){this.a.dispatchEvent(new Se(t))},Re.prototype.Ba=function(t){rc(this.a.c,"WebChannel aborted on "+this.a.b+" due to channel error: "+t),this.a.dispatchEvent(new Te(t))},Re.prototype.Aa=function(){rc(this.a.c,"WebChannel closed on "+this.a.b),this.a.dispatchEvent("b")};var Ue=ja(function(t,e){function n(){}n.prototype=t.prototype;var r=new n;return t.apply(r,Array.prototype.slice.call(arguments,1)),r},Qe);function Ve(){this.b=[],this.a=[]}function We(t){return 0==t.b.length&&(t.b=t.a,t.b.reverse(),t.a=[]),t.b.pop()}function Xe(t){return t.b.length+t.a.length}function Ye(t,e){if(w.call(this),this.h=t||0,this.c=e||10,this.h>this.c)throw Error(Ze);this.a=new Ve,this.b=new Xd,this.g=null,this.aa()}Ve.prototype.A=function(){for(var t=[],e=this.b.length-1;0<=e;--e)t.push(this.b[e]);var n=this.a.length;for(e=0;e<n;++e)t.push(this.a[e]);return t},u(Ye,w);var Ze="[goog.structs.Pool] Min can not be greater than max";function af(t){if("function"==typeof t.$)t.$();else for(var e in t)t[e]=null}function $e(t){return Xe(t.a)+t.b.a.c}function bf(t,e){this.a=t,this.b=e}function cf(t){if(this.a=[],t)t:{if(t instanceof cf){var e=t.M();if(t=t.A(),0>=this.a.length){for(var n=this.a,r=0;r<e.length;r++)n.push(new bf(e[r],t[r]));break t}}else e=Ea(t),t=Da(t);for(r=0;r<e.length;r++)df(this,e[r],t[r])}}function df(t,e,n){var r=t.a;for(r.push(new bf(e,n)),e=r.length-1,n=(t=t.a)[e];0<e&&t[r=e-1>>1].a>n.a;)t[e]=t[r],e=r;t[e]=n}function ef(){cf.call(this)}function Y(t,e){this.f=new ef,Ye.call(this,t,e)}function Z(t,e,n,r){this.l=t,this.j=!!r,Y.call(this,e,n)}g=Ye.prototype,g.da=function(){var e=t();if(!(null!=this.g&&0>e-this.g)){for(var n;0<Xe(this.a)&&(n=We(this.a),!this.sa(n));)this.aa();return!n&&$e(this)<this.c&&(n=this.pa()),n&&(this.g=e,this.b.add(n)),n}},g.ob=function(t){return!!pd(this.b.a,Yd(t))&&(this.ma(t),!0)},g.ma=function(t){pd(this.b.a,Yd(t)),this.sa(t)&&$e(this)<this.c?this.a.a.push(t):af(t)},g.aa=function(){for(var t=this.a;$e(this)<this.h;){var e=this.pa();t.a.push(e)}for(;$e(this)>this.c&&0<Xe(this.a);)af(We(t))},g.pa=function(){return{}},g.sa=function(t){return"function"!=typeof t.bb||t.bb()},g.w=function(){if(Ye.H.w.call(this),0<this.b.a.c)throw Error("[goog.structs.Pool] Objects not released");delete this.b;for(var t=this.a;0!=t.b.length||0!=t.a.length;)af(We(t));delete this.a},cf.prototype.A=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].b);return e},cf.prototype.M=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].a);return e},u(ef,cf),u(Y,Ye),g=Y.prototype,g.da=function(t,e){if(!t)return Y.H.da.call(this);df(this.f,void 0!==e?e:100,t),this.ra()},g.ra=function(){for(var t=this.f;0<t.a.length;){var e=this.da();if(!e)break;var n=t,r=n.a,i=r.length,o=r[0];if(0>=i)o=void 0;else{if(1==i)ua(r);else{r[0]=r.pop(),r=0,i=(n=n.a).length;for(var a=n[r];r<i>>1;){var s=2*r+1,u=2*r+2;if(n[s=u<i&&n[u].a<n[s].a?u:s].a>a.a)break;n[r]=n[s],r=s}n[r]=a}o=o.b}o.apply(this,[e])}},g.ma=function(t){Y.H.ma.call(this,t),this.ra()},g.aa=function(){Y.H.aa.call(this),this.ra()},g.w=function(){Y.H.w.call(this),k.clearTimeout(void 0),ua(this.f.a),this.f=null},u(Z,Y),Z.prototype.pa=function(){var t=new T,e=this.l;return e&&e.forEach(function(e,n){t.headers.set(n,e)}),this.j&&(t.o=!0),t},Z.prototype.sa=function(t){return!t.i&&!t.a},Qe.prototype.createWebChannel=Qe.prototype.a,W.prototype.send=W.prototype.gb,W.prototype.open=W.prototype.fb,W.prototype.close=W.prototype.close,Fc.NO_ERROR=0,Fc.TIMEOUT=8,Fc.HTTP_ERROR=6,Gc.COMPLETE="complete",Kc.EventType=Lc,Lc.OPEN="a",Lc.CLOSE="b",Lc.ERROR="c",Lc.MESSAGE="d",B.prototype.listen=B.prototype.Ia,Z.prototype.getObject=Z.prototype.da,Z.prototype.releaseObject=Z.prototype.ob,T.prototype.listenOnce=T.prototype.Ja,T.prototype.getLastError=T.prototype.hb,T.prototype.getLastErrorCode=T.prototype.Ga,T.prototype.getStatus=T.prototype.W,T.prototype.getStatusText=T.prototype.Ha,T.prototype.getResponseJson=T.prototype.eb,T.prototype.getResponseText=T.prototype.V,T.prototype.getResponseText=T.prototype.V,T.prototype.send=T.prototype.fa,module.exports={createWebChannelTransport:Ue,ErrorCode:Fc,EventType:Gc,WebChannel:Kc,XhrIoPool:Z}}).call(void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(this,__webpack_require__(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
 
/*! *****************************************************************************
 
/*! *****************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
 
Copyright (c) Microsoft Corporation. All rights reserved.
Line 67: Line 67:
 
and limitations under the License.
 
and limitations under the License.
 
***************************************************************************** */
 
***************************************************************************** */
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a=n(198),s=n(319),u=n(318),c=o.SDK_VERSION,l=new a.Logger("@firebase/firestore");function f(){return l.logLevel===a.LogLevel.DEBUG?i.DEBUG:l.logLevel===a.LogLevel.SILENT?i.SILENT:i.ERROR}function h(t){switch(t){case i.DEBUG:l.logLevel=a.LogLevel.DEBUG;break;case i.ERROR:l.logLevel=a.LogLevel.ERROR;break;case i.SILENT:l.logLevel=a.LogLevel.SILENT;break;default:l.error("Firestore ("+c+"): Invalid value passed to `setLogLevel`")}}function p(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(l.logLevel<=a.LogLevel.DEBUG){var i=n.map(v);l.debug.apply(l,["Firestore ("+c+") ["+t+"]: "+e].concat(i))}}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=a.LogLevel.ERROR){var r=e.map(v);l.error.apply(l,["Firestore ("+c+"): "+t].concat(r))}}function v(t){if("string"==typeof t)return t;var e=g.getPlatform();try{return e.formatJSON(t)}catch(e){return t}}function m(t){var e="FIRESTORE ("+c+") INTERNAL ASSERTION FAILED: "+t;throw d(e),new Error(e)}function y(t,e){t||m(e)}!function(t){t[t.DEBUG=0]="DEBUG",t[t.ERROR=1]="ERROR",t[t.SILENT=2]="SILENT"}(i||(i={}));var g=function(){function t(){}return t.setPlatform=function(e){t.platform&&m("Platform already defined"),t.platform=e},t.getPlatform=function(){return t.platform||m("Platform not set"),t.platform},t}();function b(){return g.getPlatform().emptyByteString}var _={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},w=function(t){function e(e,n){var r=t.call(this,n)||this;return r.code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return s.__extends(e,t),e}(Error);function E(t,e){function n(){var t="This constructor is private.";throw e&&(t+=" ",t+=e),new w(_.INVALID_ARGUMENT,t)}for(var r in n.prototype=t.prototype,t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e){return void 0!==t?t:e}function x(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Number(n);isNaN(r)||e(r,t[n])}}function S(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function k(t){for(var e in y(null!=t&&"object"==typeof t,"isEmpty() expects object parameter."),t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function N(t,e,n){if(e.length!==n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function A(t,e,n){if(e.length<n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires at least "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function I(t,e,n,r){if(e.length<n||e.length>r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+H(e.length,"argument")+".")}function O(t,e,n,r){F(t,e,W(n)+" argument",r)}function P(t,e,n,r){void 0!==r&&O(t,e,n,r)}function R(t,e,n,r){F(t,e,n+" option",r)}function D(t,e,n,r){void 0!==r&&R(t,e,n,r)}function M(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){if(!(r instanceof Array))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+j(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be "+n+", but the value at index "+o+" was: "+j(r[o]))}(t,e,n,r,i)}function L(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){for(var o=[],a=0,s=i;a<s.length;a++){var u=s[a];if(u===r)return;o.push(j(u))}var c=j(r);throw new w(_.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function F(t,e,n,r){if(typeof r!==e||"object"===e&&!U(r)){var i=j(r);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function U(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function j(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":m("Unknown wrong type: "+typeof t)}function B(t,e,n){if(void 0===n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+W(e)+" argument, but it was undefined.")}function q(t,e,n){S(e,function(e,r){if(n.indexOf(e)<0)throw new w(_.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))})}function V(t,e,n,r){var i=j(r);return new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+W(n)+" argument to be a "+e+", but it was: "+i)}function W(t){switch(t){case 1:return"first";case 2:return"second";case 3:return"third";default:return t+"th"}}function H(t,e){return t+" "+e+(1===t?"":"s")}var z=function(){function t(){}return t.newId=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return y(20===e.length,"Invalid auto ID: "+e),e},t}();function K(t,e){return t<e?-1:t>e?1:0}function G(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].isEqual(e[n]))return!1;return!0}function Q(){if("undefined"==typeof Uint8Array)throw new w(_.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function Y(){if(!g.getPlatform().base64Available)throw new w(_.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var X,$,J=function(){function t(t){Y(),this._binaryString=t}return t.fromBase64String=function(e){N("Blob.fromBase64String",arguments,1),O("Blob.fromBase64String","string",1,e),Y();try{return new t(g.getPlatform().atob(e))}catch(t){throw new w(_.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},t.fromUint8Array=function(e){if(N("Blob.fromUint8Array",arguments,1),Q(),!(e instanceof Uint8Array))throw V("Blob.fromUint8Array","Uint8Array",1,e);return new t(Array.prototype.map.call(e,function(t){return String.fromCharCode(t)}).join(""))},t.prototype.toBase64=function(){return N("Blob.toBase64",arguments,0),Y(),g.getPlatform().btoa(this._binaryString)},t.prototype.toUint8Array=function(){N("Blob.toUint8Array",arguments,0),Q();for(var t=new Uint8Array(this._binaryString.length),e=0;e<this._binaryString.length;e++)t[e]=this._binaryString.charCodeAt(e);return t},t.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this._binaryString===t._binaryString},t.prototype._compareTo=function(t){return K(this._binaryString,t._binaryString)},t}(),Z=E(J,"Use Blob.fromUint8Array() or Blob.fromBase64String() instead."),tt=function(){function t(t,e){if(N("GeoPoint",arguments,2),O("GeoPoint","number",1,t),O("GeoPoint","number",2,e),!isFinite(t)||t<-90||t>90)throw new w(_.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new w(_.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this._long},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},t.prototype._compareTo=function(t){return K(this._lat,t._lat)||K(this._long,t._long)},t}(),et=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype._compareTo=function(t){return this.seconds===t.seconds?K(this.nanoseconds,t.nanoseconds):K(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t}(),nt=function(){return function(t,e,n,r){this.databaseId=t,this.persistenceKey=e,this.host=n,this.ssl=r}}(),rt="(default)",it=function(){function t(t,e){this.projectId=t,this.database=e||rt}return Object.defineProperty(t.prototype,"isDefaultDatabase",{get:function(){return this.database===rt},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.compareTo=function(t){return K(this.projectId,t.projectId)||K(this.database,t.database)},t}(),ot=function(){function t(t,e,n){this.init(t,e,n)}return t.prototype.init=function(t,e,n){void 0===e?e=0:e>t.length&&m("offset "+e+" out of range "+t.length),void 0===n?n=t.length-e:n>t.length-e&&m("length "+n+" out of range "+(t.length-e)),this.segments=t,this.offset=e,this.len=n},t.prototype.construct=function(t,e,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(t,e,n),r},Object.defineProperty(t.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.comparator(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(function(t){n.push(t)}):"string"==typeof e?n.push(e):m("Unknown parameter type for Path.child(): "+e),this.construct(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.popFirst=function(t){return t=void 0===t?1:t,y(this.length>=t,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+t,this.length-t)},t.prototype.popLast=function(){return y(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},t.prototype.firstSegment=function(){return y(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},t.prototype.lastSegment=function(){return y(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},t.prototype.get=function(t){return y(t<this.length,"Index out of range"),this.segments[this.offset+t]},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.isPrefixOf=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},t.comparator=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.canonicalString=function(){return this.toArray().join("/")},e.prototype.toString=function(){return this.canonicalString()},e.fromString=function(t){if(t.indexOf("//")>=0)throw new w(_.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter(function(t){return t.length>0}))},e.EMPTY_PATH=new e([]),e}(ot),st=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.isValidIdentifier=function(t){return st.test(t)},e.prototype.canonicalString=function(){return this.toArray().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t}).join(".")},e.prototype.toString=function(){return this.canonicalString()},e.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},e.keyField=function(){return new e(["__name__"])},e.fromServerFormat=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new w(_.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new w(_.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new w(_.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.EMPTY_PATH=new e([]),e}(ot),ct=function(){function t(e){this.path=e,y(t.isDocumentKey(e),"Invalid DocumentKey with an odd number of segments: "+e.toArray().join("/"))}return t.prototype.isEqual=function(t){return null!==t&&0===at.comparator(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.comparator=function(t,e){return at.comparator(t.path,e.path)},t.isDocumentKey=function(t){return t.length%2==0},t.fromSegments=function(e){return new t(new at(e.slice()))},t.fromPathString=function(e){return new t(at.fromString(e))},t.EMPTY=new t(new at([])),t}(),lt=function(){function t(t,e,n,r){this.key=t,this.version=e,this.data=n,this.hasLocalMutations=r.hasLocalMutations}return t.prototype.field=function(t){return this.data.field(t)},t.prototype.fieldValue=function(t){var e=this.field(t);return e?e.value():void 0},t.prototype.value=function(){return this.data.value()},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.data.isEqual(e.data)&&this.hasLocalMutations===e.hasLocalMutations},t.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.data.toString()+", {hasLocalMutations: "+this.hasLocalMutations+"})"},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t.compareByField=function(t,e,n){var r=e.field(t),i=n.field(t);return void 0!==r&&void 0!==i?r.compareTo(i):m("Trying to compare documents on fields that don't exist")},t}(),ft=function(){function t(t,e){this.key=t,this.version=e}return t.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},t.prototype.isEqual=function(t){return t&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t}(),ht=function(){function t(t,e){this.comparator=t,this.root=e||dt.EMPTY}return t.prototype.insert=function(e,n){return new t(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator,this.root.remove(e,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.isEmpty();){var n=this.comparator(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.isEmpty();){var r=this.comparator(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),t.prototype.minKey=function(){return this.root.minKey()},t.prototype.maxKey=function(){return this.root.maxKey()},t.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},t.prototype.forEach=function(t){this.inorderTraversal(function(e,n){return t(e,n),!1})},t.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},t.prototype.getIterator=function(){return new pt(this.root,null,this.comparator,!1)},t.prototype.getIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!1)},t.prototype.getReverseIterator=function(){return new pt(this.root,null,this.comparator,!0)},t.prototype.getReverseIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!0)},t}(),pt=function(){function t(t,e,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!t.isEmpty();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.isReverse?t.left:t.right;else{if(0===i){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return t.prototype.getNext=function(){y(this.nodeStack.length>0,"getNext() called on iterator when hasNext() is false.");var t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e},t.prototype.hasNext=function(){return this.nodeStack.length>0},t.prototype.peek=function(){if(0===this.nodeStack.length)return null;var t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}},t}(),dt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},t.prototype.minKey=function(){return this.min().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp()},t.prototype.removeMin=function(){if(this.left.isEmpty())return t.EMPTY;var e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()},t.prototype.isRed=function(){return this.color},t.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},t.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight())).rotateLeft()).colorFlip()),t},t.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=(t=t.rotateRight()).colorFlip()),t},t.prototype.rotateLeft=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},t.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw m("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw m("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check();if(t!==this.right.check())throw m("Black depths differ");return t+(this.isRed()?0:1)},t.EMPTY=null,t.RED=!0,t.BLACK=!1,t}(),vt=function(){function t(){this.size=0}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new dt(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.isRed=function(){return!1},t.prototype.checkMaxDepth=function(){return!0},t.prototype.check=function(){return 0},t}();dt.EMPTY=new vt,function(t){t[t.NullValue=0]="NullValue",t[t.BooleanValue=1]="BooleanValue",t[t.NumberValue=2]="NumberValue",t[t.TimestampValue=3]="TimestampValue",t[t.StringValue=4]="StringValue",t[t.BlobValue=5]="BlobValue",t[t.RefValue=6]="RefValue",t[t.GeoPointValue=7]="GeoPointValue",t[t.ArrayValue=8]="ArrayValue",t[t.ObjectValue=9]="ObjectValue"}(X||(X={})),function(t){t[t.Default=0]="Default",t[t.Estimate=1]="Estimate",t[t.Previous=2]="Previous"}($||($={}));var mt=function(){function t(t,e){this.serverTimestampBehavior=t,this.timestampsInSnapshots=e}return t.fromSnapshotOptions=function(e,n){switch(e.serverTimestamps){case"estimate":return new t($.Estimate,n);case"previous":return new t($.Previous,n);case"none":case void 0:return new t($.Default,n);default:return m("fromSnapshotOptions() called with invalid options.")}},t}(),yt=function(){function t(){}return t.prototype.toString=function(){var t=this.value();return null===t?"null":t.toString()},t.prototype.defaultCompareTo=function(t){return y(this.typeOrder!==t.typeOrder,"Default compareTo should not be used for values of same type."),K(this.typeOrder,t.typeOrder)},t}(),gt=function(t){function e(){var e=t.call(this)||this;return e.typeOrder=X.NullValue,e.internalValue=null,e}return s.__extends(e,t),e.prototype.value=function(t){return null},e.prototype.isEqual=function(t){return t instanceof e},e.prototype.compareTo=function(t){return t instanceof e?0:this.defaultCompareTo(t)},e.INSTANCE=new e,e}(yt),bt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BooleanValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this,t):this.defaultCompareTo(t)},e.of=function(t){return t?e.TRUE:e.FALSE},e.TRUE=new e(!0),e.FALSE=new e(!1),e}(yt),_t=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.NumberValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.compareTo=function(t){return t instanceof e?(n=this.internalValue,r=t.internalValue,n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1):this.defaultCompareTo(t);var n,r},e}(yt);function wt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var Et=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e}(_t),Tt=function(t){function e(e){var n=t.call(this,e)||this;return n.internalValue=e,n}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e.NAN=new e(NaN),e.POSITIVE_INFINITY=new e(1/0),e.NEGATIVE_INFINITY=new e(-1/0),e}(_t),Ct=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.StringValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this.internalValue,t.internalValue):this.defaultCompareTo(t)},e}(yt),xt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.TimestampValue,n}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):t instanceof St?-1:this.defaultCompareTo(t)},e}(yt),St=function(t){function e(e,n){var r=t.call(this)||this;return r.localWriteTime=e,r.previousValue=n,r.typeOrder=X.TimestampValue,r}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.serverTimestampBehavior===$.Estimate?new xt(this.localWriteTime).value(t):t&&t.serverTimestampBehavior===$.Previous&&this.previousValue?this.previousValue.value(t):null},e.prototype.isEqual=function(t){return t instanceof e&&this.localWriteTime.isEqual(t.localWriteTime)},e.prototype.compareTo=function(t){return t instanceof e?this.localWriteTime._compareTo(t.localWriteTime):t instanceof xt?1:this.defaultCompareTo(t)},e.prototype.toString=function(){return"<ServerTimestamp localTime="+this.localWriteTime.toString()+">"},e}(yt),kt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BlobValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),Nt=function(t){function e(e,n){var r=t.call(this)||this;return r.databaseId=e,r.key=n,r.typeOrder=X.RefValue,r}return s.__extends(e,t),e.prototype.value=function(t){return this.key},e.prototype.isEqual=function(t){return t instanceof e&&(this.key.isEqual(t.key)&&this.databaseId.isEqual(t.databaseId))},e.prototype.compareTo=function(t){if(t instanceof e){var n=this.databaseId.compareTo(t.databaseId);return 0!==n?n:ct.comparator(this.key,t.key)}return this.defaultCompareTo(t)},e}(yt),At=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.GeoPointValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),It=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ObjectValue,n}return s.__extends(e,t),e.prototype.value=function(t){var e={};return this.internalValue.inorderTraversal(function(n,r){e[n]=r.value(t)}),e},e.prototype.forEach=function(t){this.internalValue.inorderTraversal(t)},e.prototype.isEqual=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext();if(i.key!==o.key||!i.value.isEqual(o.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext(),a=K(i.key,o.key)||i.value.compareTo(o.value);if(a)return a}return K(n.hasNext(),r.hasNext())}return this.defaultCompareTo(t)},e.prototype.set=function(t,n){if(y(!t.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===t.length)return this.setChild(t.firstSegment(),n);var r=this.child(t.firstSegment());r instanceof e||(r=e.EMPTY);var i=r.set(t.popFirst(),n);return this.setChild(t.firstSegment(),i)},e.prototype.delete=function(t){if(y(!t.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===t.length)return new e(this.internalValue.remove(t.firstSegment()));var n=this.child(t.firstSegment());if(n instanceof e){var r=n.delete(t.popFirst());return new e(this.internalValue.insert(t.firstSegment(),r))}return this},e.prototype.contains=function(t){return void 0!==this.field(t)},e.prototype.field=function(t){y(!t.isEmpty(),"Can't get field of empty path");var n=this;return t.forEach(function(t){n=n instanceof e&&n.internalValue.get(t)||void 0}),n},e.prototype.toString=function(){return JSON.stringify(this.value())},e.prototype.child=function(t){return this.internalValue.get(t)||void 0},e.prototype.setChild=function(t,n){return new e(this.internalValue.insert(t,n))},e.EMPTY=new e(new ht(K)),e}(yt),Ot=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ArrayValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue.map(function(e){return e.value(t)})},e.prototype.forEach=function(t){this.internalValue.forEach(t)},e.prototype.isEqual=function(t){if(t instanceof e){if(this.internalValue.length!==t.internalValue.length)return!1;for(var n=0;n<this.internalValue.length;n++)if(!this.internalValue[n].isEqual(t.internalValue[n]))return!1;return!0}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=Math.min(this.internalValue.length,t.internalValue.length),r=0;r<n;r++){var i=this.internalValue[r].compareTo(t.internalValue[r]);if(i)return i}return K(this.internalValue.length,t.internalValue.length)}return this.defaultCompareTo(t)},e.prototype.toString=function(){return JSON.stringify(this.value())},e}(yt),Pt=Number,Rt=Pt.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),Dt=Pt.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Mt=Pt.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Lt(t){return null===t||void 0===t}var Ft=function(){function t(t,e,n,r,i,o){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=null),this.path=t,this.explicitOrderBy=e,this.filters=n,this.limit=r,this.startAt=i,this.endAt=o,this.memoizedCanonicalId=null,this.memoizedOrderBy=null,this.startAt&&this.assertValidBound(this.startAt),this.endAt&&this.assertValidBound(this.endAt)}return t.atPath=function(e){return new t(e)},Object.defineProperty(t.prototype,"orderBy",{get:function(){if(null===this.memoizedOrderBy){var t=this.getInequalityFilterField(),e=this.getFirstOrderByField();if(null!==t&&null===e)t.isKeyField()?this.memoizedOrderBy=[Kt]:this.memoizedOrderBy=[new zt(t),Kt];else{y(null===t||null!==e&&t.isEqual(e),"First orderBy should match inequality field."),this.memoizedOrderBy=[];for(var n=!1,r=0,i=this.explicitOrderBy;r<i.length;r++){var o=i[r];this.memoizedOrderBy.push(o),o.field.isKeyField()&&(n=!0)}if(!n){var a=this.explicitOrderBy.length>0?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:Wt.ASCENDING;this.memoizedOrderBy.push(a===Wt.ASCENDING?Kt:Gt)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),t.prototype.addFilter=function(e){y(null==this.getInequalityFilterField()||!(e instanceof jt)||!e.isInequality()||e.field.isEqual(this.getInequalityFilterField()),"Query must only have one inequality field."),y(!ct.isDocumentKey(this.path),"No filtering allowed for document query");var n=this.filters.concat([e]);return new t(this.path,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},t.prototype.addOrderBy=function(e){y(!ct.isDocumentKey(this.path),"No ordering allowed for document query"),y(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([e]);return new t(this.path,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},t.prototype.withLimit=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),e,this.startAt,this.endAt)},t.prototype.withStartAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,e,this.endAt)},t.prototype.withEndAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,e)},t.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var t=this.path.canonicalString();t+="|f:";for(var e=0,n=this.filters;e<n.length;e++){t+=n[e].canonicalId(),t+=","}t+="|ob:";for(var r=0,i=this.orderBy;r<i.length;r++){t+=i[r].canonicalId(),t+=","}Lt(this.limit)||(t+="|l:",t+=this.limit),this.startAt&&(t+="|lb:",t+=this.startAt.canonicalId()),this.endAt&&(t+="|ub:",t+=this.endAt.canonicalId()),this.memoizedCanonicalId=t}return this.memoizedCanonicalId},t.prototype.toString=function(){var t="Query("+this.path.canonicalString();return this.filters.length>0&&(t+=", filters: ["+this.filters.join(", ")+"]"),Lt(this.limit)||(t+=", limit: "+this.limit),this.explicitOrderBy.length>0&&(t+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(t+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(t+=", endAt: "+this.endAt.canonicalId()),t+")"},t.prototype.isEqual=function(t){if(this.limit!==t.limit)return!1;if(this.orderBy.length!==t.orderBy.length)return!1;for(var e=0;e<this.orderBy.length;e++)if(!this.orderBy[e].isEqual(t.orderBy[e]))return!1;if(this.filters.length!==t.filters.length)return!1;for(e=0;e<this.filters.length;e++)if(!this.filters[e].isEqual(t.filters[e]))return!1;return!!this.path.isEqual(t.path)&&(!(null!==this.startAt?!this.startAt.isEqual(t.startAt):null!==t.startAt)&&(null!==this.endAt?this.endAt.isEqual(t.endAt):null===t.endAt))},t.prototype.docComparator=function(t,e){for(var n=!1,r=0,i=this.orderBy;r<i.length;r++){var o=i[r],a=o.compare(t,e);if(0!==a)return a;n=n||o.field.isKeyField()}return y(n,"orderBy used that doesn't compare on key field"),0},t.prototype.matches=function(t){return this.matchesAncestor(t)&&this.matchesOrderBy(t)&&this.matchesFilters(t)&&this.matchesBounds(t)},t.prototype.hasLimit=function(){return!Lt(this.limit)},t.prototype.getFirstOrderByField=function(){return this.explicitOrderBy.length>0?this.explicitOrderBy[0].field:null},t.prototype.getInequalityFilterField=function(){for(var t=0,e=this.filters;t<e.length;t++){var n=e[t];if(n instanceof jt&&n.isInequality())return n.field}return null},t.prototype.hasArrayContainsFilter=function(){return void 0!==this.filters.find(function(t){return t instanceof jt&&t.op===Ut.ARRAY_CONTAINS})},t.prototype.isDocumentQuery=function(){return ct.isDocumentKey(this.path)&&0===this.filters.length},t.prototype.matchesAncestor=function(t){var e=t.key.path;return ct.isDocumentKey(this.path)?this.path.isEqual(e):this.path.isPrefixOf(e)&&this.path.length===e.length-1},t.prototype.matchesOrderBy=function(t){for(var e=0,n=this.explicitOrderBy;e<n.length;e++){var r=n[e];if(!r.field.isKeyField()&&void 0===t.field(r.field))return!1}return!0},t.prototype.matchesFilters=function(t){for(var e=0,n=this.filters;e<n.length;e++){if(!n[e].matches(t))return!1}return!0},t.prototype.matchesBounds=function(t){return!(this.startAt&&!this.startAt.sortsBeforeDocument(this.orderBy,t))&&(!this.endAt||!this.endAt.sortsBeforeDocument(this.orderBy,t))},t.prototype.assertValidBound=function(t){y(t.position.length<=this.orderBy.length,"Bound is longer than orderBy")},t}(),Ut=function(){function t(t){this.name=t}return t.fromString=function(e){switch(e){case"<":return t.LESS_THAN;case"<=":return t.LESS_THAN_OR_EQUAL;case"==":return t.EQUAL;case">=":return t.GREATER_THAN_OR_EQUAL;case">":return t.GREATER_THAN;case"array-contains":return t.ARRAY_CONTAINS;default:return m("Unknown relation: "+e)}},t.prototype.toString=function(){return this.name},t.prototype.isEqual=function(t){return this.name===t.name},t.LESS_THAN=new t("<"),t.LESS_THAN_OR_EQUAL=new t("<="),t.EQUAL=new t("=="),t.GREATER_THAN=new t(">"),t.GREATER_THAN_OR_EQUAL=new t(">="),t.ARRAY_CONTAINS=new t("array-contains"),t}(),jt=function(){function t(t,e,n){this.field=t,this.op=e,this.value=n}return t.prototype.matches=function(t){if(this.field.isKeyField()){y(this.value instanceof Nt,"Comparing on key, but filter value not a RefValue"),y(this.op!==Ut.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var e=this.value,n=ct.comparator(t.key,e.key);return this.matchesComparison(n)}var r=t.field(this.field);return void 0!==r&&this.matchesValue(r)},t.prototype.matchesValue=function(t){var e=this;return this.op===Ut.ARRAY_CONTAINS?t instanceof Ot&&void 0!==t.internalValue.find(function(t){return t.isEqual(e.value)}):this.value.typeOrder===t.typeOrder&&this.matchesComparison(t.compareTo(this.value))},t.prototype.matchesComparison=function(t){switch(this.op){case Ut.LESS_THAN:return t<0;case Ut.LESS_THAN_OR_EQUAL:return t<=0;case Ut.EQUAL:return 0===t;case Ut.GREATER_THAN:return t>0;case Ut.GREATER_THAN_OR_EQUAL:return t>=0;default:return m("Unknown relation op"+this.op)}},t.prototype.isInequality=function(){return this.op!==Ut.EQUAL&&this.op!==Ut.ARRAY_CONTAINS},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.op.toString()+this.value.toString()},t.prototype.isEqual=function(e){return e instanceof t&&(this.op.isEqual(e.op)&&this.field.isEqual(e.field)&&this.value.isEqual(e.value))},t.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},t}(),Bt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field);return void 0!==e&&null===e.value()},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS null"},t.prototype.toString=function(){return this.field.canonicalString()+" IS null"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}(),qt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field).value();return"number"==typeof e&&isNaN(e)},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.toString=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}();var Vt,Wt=function(){function t(t){this.name=t}return t.prototype.toString=function(){return this.name},t.ASCENDING=new t("asc"),t.DESCENDING=new t("desc"),t}(),Ht=function(){function t(t,e){this.position=t,this.before=e}return t.prototype.canonicalId=function(){for(var t=this.before?"b:":"a:",e=0,n=this.position;e<n.length;e++){t+=n[e].toString()}return t},t.prototype.sortsBeforeDocument=function(t,e){y(this.position.length<=t.length,"Bound has more components than query's orderBy");for(var n=0,r=0;r<this.position.length;r++){var i=t[r],o=this.position[r];if(i.field.isKeyField())y(o instanceof Nt,"Bound has a non-key value where the key path is being used."),n=ct.comparator(o.key,e.key);else{var a=e.field(i.field);y(void 0!==a,"Field should exist since document matched the orderBy already."),n=o.compareTo(a)}if(i.dir===Wt.DESCENDING&&(n*=-1),0!==n)break}return this.before?n<=0:n<0},t.prototype.isEqual=function(t){if(null===t)return!1;if(this.before!==t.before||this.position.length!==t.position.length)return!1;for(var e=0;e<this.position.length;e++){var n=this.position[e],r=t.position[e];return n.isEqual(r)}return!0},t}(),zt=function(){function t(t,e){this.field=t,void 0===e&&(e=Wt.ASCENDING),this.dir=e,this.isKeyOrderBy=t.isKeyField()}return t.prototype.compare=function(t,e){var n=this.isKeyOrderBy?lt.compareByKey(t,e):lt.compareByField(this.field,t,e);switch(this.dir){case Wt.ASCENDING:return n;case Wt.DESCENDING:return-1*n;default:return m("Unknown direction: "+this.dir)}},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.dir.toString()},t.prototype.toString=function(){return this.field.canonicalString()+" ("+this.dir+")"},t.prototype.isEqual=function(t){return this.dir===t.dir&&this.field.isEqual(t.field)},t}(),Kt=new zt(ut.keyField(),Wt.ASCENDING),Gt=new zt(ut.keyField(),Wt.DESCENDING),Qt=function(){function t(t){this.timestamp=t}return t.fromMicroseconds=function(e){var n=Math.floor(e/1e6);return new t(new et(n,e%1e6*1e3))},t.fromTimestamp=function(e){return new t(e)},t.forDeletedDoc=function(){return t.MIN},t.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.toTimestamp=function(){return this.timestamp},t.MIN=new t(new et(0,0)),t}();!function(t){t[t.Listen=0]="Listen",t[t.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",t[t.LimboResolution=2]="LimboResolution"}(Vt||(Vt={}));var Yt,Xt=function(){function t(t,e,n,r,i){void 0===r&&(r=Qt.MIN),void 0===i&&(i=b()),this.query=t,this.targetId=e,this.purpose=n,this.snapshotVersion=r,this.resumeToken=i}return t.prototype.update=function(e){return new t(this.query,this.targetId,this.purpose,e.snapshotVersion,e.resumeToken)},t.prototype.isEqual=function(t){return this.targetId===t.targetId&&this.purpose===t.purpose&&this.snapshotVersion.isEqual(t.snapshotVersion)&&this.resumeToken===t.resumeToken&&this.query.isEqual(t.query)},t}(),$t=function(){function t(t){this.fields=t}return t.prototype.covers=function(t){for(var e=0,n=this.fields;e<n.length;e++){if(n[e].isPrefixOf(t))return!0}return!1},t.prototype.isEqual=function(t){return G(this.fields,t.fields)},t}(),Jt=function(){function t(t,e){this.field=t,this.transform=e}return t.prototype.isEqual=function(t){return this.field.isEqual(t.field)&&this.transform.isEqual(t.transform)},t}(),Zt=function(){return function(t,e){this.version=t,this.transformResults=e}}();!function(t){t[t.Set=0]="Set",t[t.Patch=1]="Patch",t[t.Transform=2]="Transform",t[t.Delete=3]="Delete"}(Yt||(Yt={}));var te,ee=function(){function t(t,e){this.updateTime=t,this.exists=e,y(void 0===t||void 0===e,'Precondition can specify "exists" or "updateTime" but not both')}return t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),t.prototype.isValidFor=function(t){return void 0!==this.updateTime?t instanceof lt&&t.version.isEqual(this.updateTime):void 0!==this.exists?this.exists?t instanceof lt:null===t||t instanceof ft:(y(this.isNone,"Precondition should be empty"),!0)},t.prototype.isEqual=function(t){return e=this.updateTime,n=t.updateTime,(null!==e&&void 0!==e?!(!n||!e.isEqual(n)):e===n)&&this.exists===t.exists;var e,n},t.NONE=new t,t}(),ne=function(){function t(){}return t.prototype.verifyKeyMatches=function(t){null!=t&&y(t.key.isEqual(this.key),"Can only apply a mutation to a document with the same key")},t.getPostMutationVersion=function(t){return t instanceof lt?t.version:Qt.MIN},t}(),re=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.value=n,i.precondition=r,i.type=Yt.Set,i}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by SetMutation.");var n=ne.getPostMutationVersion(t);return new lt(this.key,n,this.value,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t);return new lt(this.key,r,this.value,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.value.isEqual(t.value)&&this.precondition.isEqual(t.precondition)},e}(ne),ie=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.key=e,o.data=n,o.fieldMask=r,o.precondition=i,o.type=Yt.Patch,o}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(t))return t;var n=ne.getPostMutationVersion(t),r=this.patchDocument(t);return new lt(this.key,n,r,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t),i=this.patchDocument(t);return new lt(this.key,r,i,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.fieldMask.isEqual(t.fieldMask)&&this.precondition.isEqual(t.precondition)},e.prototype.patchDocument=function(t){var e;return e=t instanceof lt?t.data:It.EMPTY,this.patchObject(e)},e.prototype.patchObject=function(t){for(var e=0,n=this.fieldMask.fields;e<n.length;e++){var r=n[e],i=this.data.field(r);t=void 0!==i?t.set(r,i):t.delete(r)}return t},e}(ne),oe=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.fieldTransforms=n,r.type=Yt.Transform,r.precondition=ee.exists(!0),r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null!=e.transformResults,"Transform results missing for TransformMutation."),!this.precondition.isValidFor(t))return t;var n=this.requireDocument(t),r=this.serverTransformResults(t,e.transformResults),i=this.transformObject(n.data,r);return new lt(this.key,n.version,i,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=this.requireDocument(t),i=this.localTransformResults(n,e),o=this.transformObject(r.data,i);return new lt(this.key,r.version,o,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&G(this.fieldTransforms,t.fieldTransforms)&&this.precondition.isEqual(t.precondition)},e.prototype.requireDocument=function(t){y(t instanceof lt,"Unknown MaybeDocument type "+t);var e=t;return y(e.key.isEqual(this.key),"Can only transform a document with the same key"),e},e.prototype.serverTransformResults=function(t,e){var n=[];y(this.fieldTransforms.length===e.length,"server transform result count ("+e.length+") should match field transform count ("+this.fieldTransforms.length+")");for(var r=0;r<e.length;r++){var i=this.fieldTransforms[r],o=i.transform,a=null;t instanceof lt&&(a=t.field(i.field)||null),n.push(o.applyToRemoteDocument(a,e[r]))}return n},e.prototype.localTransformResults=function(t,e){for(var n=[],r=0,i=this.fieldTransforms;r<i.length;r++){var o=i[r],a=o.transform,s=null;e instanceof lt&&(s=e.field(o.field)||null),n.push(a.applyToLocalView(s,t))}return n},e.prototype.transformObject=function(t,e){y(e.length===this.fieldTransforms.length,"TransformResults length mismatch.");for(var n=0;n<this.fieldTransforms.length;n++){var r=this.fieldTransforms[n].field;t=t.set(r,e[n])}return t},e}(ne),ae=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.precondition=n,r.type=Yt.Delete,r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){return this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by DeleteMutation."),new ft(this.key,Qt.MIN)},e.prototype.applyToLocalView=function(t,e,n){return this.verifyKeyMatches(t),this.precondition.isValidFor(t)?(t&&y(t.key.isEqual(this.key),"Can only apply mutation to document with same key"),new ft(this.key,Qt.forDeletedDoc())):t},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.precondition.isEqual(t.precondition)},e}(ne),se=function(){function t(t){this.count=t}return t.prototype.isEqual=function(t){return t&&t.count===this.count},t}();function ue(t){switch(t){case _.OK:return m("Treated status OK as error");case _.CANCELLED:case _.UNKNOWN:case _.DEADLINE_EXCEEDED:case _.RESOURCE_EXHAUSTED:case _.INTERNAL:case _.UNAVAILABLE:case _.UNAUTHENTICATED:return!1;case _.INVALID_ARGUMENT:case _.NOT_FOUND:case _.ALREADY_EXISTS:case _.PERMISSION_DENIED:case _.FAILED_PRECONDITION:case _.ABORTED:case _.OUT_OF_RANGE:case _.UNIMPLEMENTED:case _.DATA_LOSS:return!0;default:return m("Unknown status code: "+t)}}function ce(t){if(void 0===t)return d("GRPC error has no .code"),_.UNKNOWN;switch(t){case te.OK:return _.OK;case te.CANCELLED:return _.CANCELLED;case te.UNKNOWN:return _.UNKNOWN;case te.DEADLINE_EXCEEDED:return _.DEADLINE_EXCEEDED;case te.RESOURCE_EXHAUSTED:return _.RESOURCE_EXHAUSTED;case te.INTERNAL:return _.INTERNAL;case te.UNAVAILABLE:return _.UNAVAILABLE;case te.UNAUTHENTICATED:return _.UNAUTHENTICATED;case te.INVALID_ARGUMENT:return _.INVALID_ARGUMENT;case te.NOT_FOUND:return _.NOT_FOUND;case te.ALREADY_EXISTS:return _.ALREADY_EXISTS;case te.PERMISSION_DENIED:return _.PERMISSION_DENIED;case te.FAILED_PRECONDITION:return _.FAILED_PRECONDITION;case te.ABORTED:return _.ABORTED;case te.OUT_OF_RANGE:return _.OUT_OF_RANGE;case te.UNIMPLEMENTED:return _.UNIMPLEMENTED;case te.DATA_LOSS:return _.DATA_LOSS;default:return m("Unknown status code: "+t)}}!function(t){t[t.OK=0]="OK",t[t.CANCELLED=1]="CANCELLED",t[t.UNKNOWN=2]="UNKNOWN",t[t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",t[t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",t[t.NOT_FOUND=5]="NOT_FOUND",t[t.ALREADY_EXISTS=6]="ALREADY_EXISTS",t[t.PERMISSION_DENIED=7]="PERMISSION_DENIED",t[t.UNAUTHENTICATED=16]="UNAUTHENTICATED",t[t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",t[t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",t[t.ABORTED=10]="ABORTED",t[t.OUT_OF_RANGE=11]="OUT_OF_RANGE",t[t.UNIMPLEMENTED=12]="UNIMPLEMENTED",t[t.INTERNAL=13]="INTERNAL",t[t.UNAVAILABLE=14]="UNAVAILABLE",t[t.DATA_LOSS=15]="DATA_LOSS"}(te||(te={}));var le=function(){function t(t){this.comparator=t,this.data=new ht(this.comparator)}return t.fromMapKeys=function(e){var n=new t(e.comparator);return e.forEach(function(t){n=n.add(t)}),n},t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.minKey()},t.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!0,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.forEachInRange=function(t,e){for(var n=this.data.getIteratorFrom(t[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}},t.prototype.forEachWhile=function(t,e){var n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();){if(!t(n.getNext().key))return}},t.prototype.firstAfterOrEqual=function(t){var e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null},t.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.isEmpty=function(){return this.data.isEmpty()},t.prototype.unionWith=function(t){var e=this;return t.forEach(function(t){e=e.add(t)}),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.getIterator(),r=e.data.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(0!==this.comparator(i,o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){return t.push(e)}),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.comparator);return n.data=e,n},t}(),fe=new ht(ct.comparator);function he(){return fe}var pe=new ht(ct.comparator);function de(){return pe}var ve=new ht(ct.comparator);function me(){return ve}var ye=new le(ct.comparator);function ge(){return ye}var be,_e,we=function(){return function(t,e,n,r,i){this.snapshotVersion=t,this.targetChanges=e,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}}(),Ee=function(){return function(t,e,n,r,i){this.resumeToken=t,this.current=e,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}}();!function(t){t[t.Added=0]="Added",t[t.Removed=1]="Removed",t[t.Modified=2]="Modified",t[t.Metadata=3]="Metadata"}(be||(be={})),function(t){t[t.Local=0]="Local",t[t.Synced=1]="Synced"}(_e||(_e={}));var Te,Ce=function(){function t(){this.changeMap=new ht(ct.comparator)}return t.prototype.track=function(t){var e=t.doc.key,n=this.changeMap.get(e);n?t.type!==be.Added&&n.type===be.Metadata?this.changeMap=this.changeMap.insert(e,t):t.type===be.Metadata&&n.type!==be.Removed?this.changeMap=this.changeMap.insert(e,{type:n.type,doc:t.doc}):t.type===be.Modified&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):t.type===be.Modified&&n.type===be.Added?this.changeMap=this.changeMap.insert(e,{type:be.Added,doc:t.doc}):t.type===be.Removed&&n.type===be.Added?this.changeMap=this.changeMap.remove(e):t.type===be.Removed&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Removed,doc:n.doc}):t.type===be.Added&&n.type===be.Removed?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):m("unsupported combination of changes: "+JSON.stringify(t)+" after "+JSON.stringify(n)):this.changeMap=this.changeMap.insert(e,t)},t.prototype.getChanges=function(){var t=[];return this.changeMap.inorderTraversal(function(e,n){t.push(n)}),t},t}(),xe=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.fromCache=i,this.hasPendingWrites=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}return t.prototype.isEqual=function(t){if(this.fromCache!==t.fromCache||this.hasPendingWrites!==t.hasPendingWrites||this.syncStateChanged!==t.syncStateChanged||!this.query.isEqual(t.query)||!this.docs.isEqual(t.docs)||!this.oldDocs.isEqual(t.oldDocs))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),Se=function(){return function(t,e,n,r){this.updatedTargetIds=t,this.removedTargetIds=e,this.key=n,this.newDoc=r}}(),ke=function(){return function(t,e){this.targetId=t,this.existenceFilter=e}}();!function(t){t[t.NoChange=0]="NoChange",t[t.Added=1]="Added",t[t.Removed=2]="Removed",t[t.Current=3]="Current",t[t.Reset=4]="Reset"}(Te||(Te={}));var Ne=function(){return function(t,e,n,r){void 0===n&&(n=b()),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r}}(),Ae=function(){function t(){this.pendingResponses=0,this.documentChanges=Pe(),this._resumeToken=b(),this._current=!1,this._hasPendingChanges=!0}return Object.defineProperty(t.prototype,"current",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this._resumeToken},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPending",{get:function(){return 0!==this.pendingResponses},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingChanges",{get:function(){return this._hasPendingChanges},enumerable:!0,configurable:!0}),t.prototype.updateResumeToken=function(t){t.length>0&&(this._hasPendingChanges=!0,this._resumeToken=t)},t.prototype.toTargetChange=function(){var t=ge(),e=ge(),n=ge();return this.documentChanges.forEach(function(r,i){switch(i){case be.Added:t=t.add(r);break;case be.Modified:e=e.add(r);break;case be.Removed:n=n.add(r);break;default:m("Encountered invalid change type: "+i)}}),new Ee(this._resumeToken,this._current,t,e,n)},t.prototype.clearPendingChanges=function(){this._hasPendingChanges=!1,this.documentChanges=Pe()},t.prototype.addDocumentChange=function(t,e){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.insert(t,e)},t.prototype.removeDocumentChange=function(t){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.remove(t)},t.prototype.recordPendingTargetRequest=function(){this.pendingResponses+=1},t.prototype.recordTargetResponse=function(){this.pendingResponses-=1},t.prototype.markCurrent=function(){this._hasPendingChanges=!0,this._current=!0},t}(),Ie=function(){function t(t){this.metadataProvider=t,this.targetStates={},this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K)}return t.prototype.handleDocumentChange=function(t){for(var e=0,n=t.updatedTargetIds;e<n.length;e++){var r=n[e];t.newDoc instanceof lt?this.addDocumentToTarget(r,t.newDoc):t.newDoc instanceof ft&&this.removeDocumentFromTarget(r,t.key,t.newDoc)}for(var i=0,o=t.removedTargetIds;i<o.length;i++){r=o[i];this.removeDocumentFromTarget(r,t.key,t.newDoc)}},t.prototype.handleTargetChange=function(t){var e=this;t.targetIds.forEach(function(n){var r=e.ensureTargetState(n);switch(t.state){case Te.NoChange:e.isActiveTarget(n)&&r.updateResumeToken(t.resumeToken);break;case Te.Added:r.recordTargetResponse(),r.isPending||r.clearPendingChanges(),r.updateResumeToken(t.resumeToken);break;case Te.Removed:r.recordTargetResponse(),r.isPending||e.removeTarget(n),y(!t.cause,"WatchChangeAggregator does not handle errored targets");break;case Te.Current:e.isActiveTarget(n)&&(r.markCurrent(),r.updateResumeToken(t.resumeToken));break;case Te.Reset:e.isActiveTarget(n)&&(e.resetTarget(n),r.updateResumeToken(t.resumeToken));break;default:m("Unknown target watch change state: "+t.state)}})},t.prototype.handleExistenceFilter=function(t){var e=t.targetId,n=t.existenceFilter.count,r=this.queryDataForActiveTarget(e);if(r){var i=r.query;if(i.isDocumentQuery())if(0===n){var o=new ct(i.path);this.removeDocumentFromTarget(e,o,new ft(o,Qt.forDeletedDoc()))}else y(1===n,"Single document existence filter with count: "+n);else this.getCurrentDocumentCountForTarget(e)!==n&&(this.resetTarget(e),this.pendingTargetResets=this.pendingTargetResets.add(e))}},t.prototype.createRemoteEvent=function(t){var e=this,n={};x(this.targetStates,function(r,i){var o=e.queryDataForActiveTarget(r);if(o){if(i.current&&o.query.isDocumentQuery()){var a=new ct(o.query.path);null!==e.pendingDocumentUpdates.get(a)||e.targetContainsDocument(r,a)||e.removeDocumentFromTarget(r,a,new ft(a,t))}i.hasPendingChanges&&(n[r]=i.toTargetChange(),i.clearPendingChanges())}});var r=ge();this.pendingDocumentTargetMapping.forEach(function(t,n){var i=!0;n.forEachWhile(function(t){var n=e.queryDataForActiveTarget(t);return!n||n.purpose===Vt.LimboResolution||(i=!1,!1)}),i&&(r=r.add(t))});var i=new we(t,n,this.pendingTargetResets,this.pendingDocumentUpdates,r);return this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K),i},t.prototype.addDocumentToTarget=function(t,e){if(this.isActiveTarget(t)){var n=this.targetContainsDocument(t,e.key)?be.Modified:be.Added;this.ensureTargetState(t).addDocumentChange(e.key,n),this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e.key,e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e.key,this.ensureDocumentTargetMapping(e.key).add(t))}},t.prototype.removeDocumentFromTarget=function(t,e,n){if(this.isActiveTarget(t)){var r=this.ensureTargetState(t);this.targetContainsDocument(t,e)?r.addDocumentChange(e,be.Removed):r.removeDocumentChange(e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e,this.ensureDocumentTargetMapping(e).delete(t)),n&&(this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e,n))}},t.prototype.removeTarget=function(t){delete this.targetStates[t]},t.prototype.getCurrentDocumentCountForTarget=function(t){var e=this.ensureTargetState(t).toTargetChange();return this.metadataProvider.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size},t.prototype.recordPendingTargetRequest=function(t){this.ensureTargetState(t).recordPendingTargetRequest()},t.prototype.ensureTargetState=function(t){return this.targetStates[t]||(this.targetStates[t]=new Ae),this.targetStates[t]},t.prototype.ensureDocumentTargetMapping=function(t){var e=this.pendingDocumentTargetMapping.get(t);return e||(e=new le(K),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(t,e)),e},t.prototype.isActiveTarget=function(t){return null!==this.queryDataForActiveTarget(t)},t.prototype.queryDataForActiveTarget=function(t){var e=this.targetStates[t];return e&&e.isPending?null:this.metadataProvider.getQueryDataForTarget(t)},t.prototype.resetTarget=function(t){var e=this;y(!this.targetStates[t].isPending,"Should only reset active targets"),this.targetStates[t]=new Ae,this.metadataProvider.getRemoteKeysForTarget(t).forEach(function(n){e.removeDocumentFromTarget(t,n)})},t.prototype.targetContainsDocument=function(t,e){return this.metadataProvider.getRemoteKeysForTarget(t).has(e)},t}();function Oe(){return new ht(ct.comparator)}function Pe(){return new ht(ct.comparator)}var Re=function(){function t(){}return t.prototype.applyToLocalView=function(t,e){return new St(e,t)},t.prototype.applyToRemoteDocument=function(t,e){return e},t.prototype.isEqual=function(e){return e instanceof t},t.instance=new t,t}(),De=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e.find(function(e){return e.isEqual(t)})||e.push(t)},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}(),Me=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e=e.filter(function(e){return!e.isEqual(t)})},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}();function Le(t){return t instanceof Ot?t.internalValue.slice():[]}var Fe,Ue,je=((Fe={})[Wt.ASCENDING.name]="ASCENDING",Fe[Wt.DESCENDING.name]="DESCENDING",Fe),Be=((Ue={})[Ut.LESS_THAN.name]="LESS_THAN",Ue[Ut.LESS_THAN_OR_EQUAL.name]="LESS_THAN_OR_EQUAL",Ue[Ut.GREATER_THAN.name]="GREATER_THAN",Ue[Ut.GREATER_THAN_OR_EQUAL.name]="GREATER_THAN_OR_EQUAL",Ue[Ut.EQUAL.name]="EQUAL",Ue[Ut.ARRAY_CONTAINS.name]="ARRAY_CONTAINS",Ue),qe=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ve(t,e){y(!Lt(t),e+" is missing")}function We(t){return"number"==typeof t?t:"string"==typeof t?Number(t):m("can't parse "+t)}var He=function(){function t(t,e){this.databaseId=t,this.options=e}return t.prototype.emptyByteString=function(){return this.options.useProto3Json?"":new Uint8Array(0)},t.prototype.unsafeCastProtoByteString=function(t){return t},t.prototype.fromRpcStatus=function(t){var e=void 0===t.code?_.UNKNOWN:ce(t.code);return new w(e,t.message||"")},t.prototype.toInt32Value=function(t){return Lt(t)?void 0:{value:t}},t.prototype.fromInt32Value=function(t){var e;return Lt(e="object"==typeof t?t.value:t)?null:e},t.prototype.toTimestamp=function(t){return{seconds:t.seconds,nanos:t.nanoseconds}},t.prototype.fromTimestamp=function(t){if("string"==typeof t)return this.fromIso8601String(t);y(!!t,"Cannot deserialize null or undefined timestamp.");var e=We(t.seconds||"0"),n=t.nanos||0;return new et(e,n)},t.prototype.fromIso8601String=function(t){var e=0,n=qe.exec(t);if(y(!!n,"invalid timestamp: "+t),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t),o=Math.floor(i.getTime()/1e3);return new et(o,e)},t.prototype.toBytes=function(t){return this.options.useProto3Json?t.toBase64():this.unsafeCastProtoByteString(t.toUint8Array())},t.prototype.fromBlob=function(t){return"string"==typeof t?(y(this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),J.fromBase64String(t)):(y(!this.options.useProto3Json,"Expected bytes to be passed in as string, but got something else instead."),J.fromUint8Array(t))},t.prototype.toVersion=function(t){return this.toTimestamp(t.toTimestamp())},t.prototype.fromVersion=function(t){return y(!!t,"Trying to deserialize version that isn't set"),Qt.fromTimestamp(this.fromTimestamp(t))},t.prototype.toResourceName=function(t,e){return this.fullyQualifiedPrefixPath(t).child("documents").child(e).canonicalString()},t.prototype.fromResourceName=function(t){var e=at.fromString(t);return y(this.isValidResourceName(e),"Tried to deserialize invalid key "+e.toString()),e},t.prototype.toName=function(t){return this.toResourceName(this.databaseId,t.path)},t.prototype.fromName=function(t){var e=this.fromResourceName(t);return y(e.get(1)===this.databaseId.projectId,"Tried to deserialize key from different project: "+e.get(1)+" vs "+this.databaseId.projectId),y(!e.get(3)&&!this.databaseId.database||e.get(3)===this.databaseId.database,"Tried to deserialize key from different database: "+e.get(3)+" vs "+this.databaseId.database),new ct(this.extractLocalPathFromResourceName(e))},t.prototype.toQueryPath=function(t){return 0===t.length?this.encodedDatabaseId:this.toResourceName(this.databaseId,t)},t.prototype.fromQueryPath=function(t){var e=this.fromResourceName(t);return 4===e.length?at.EMPTY_PATH:this.extractLocalPathFromResourceName(e)},Object.defineProperty(t.prototype,"encodedDatabaseId",{get:function(){return new at(["projects",this.databaseId.projectId,"databases",this.databaseId.database]).canonicalString()},enumerable:!0,configurable:!0}),t.prototype.fullyQualifiedPrefixPath=function(t){return new at(["projects",t.projectId,"databases",t.database])},t.prototype.extractLocalPathFromResourceName=function(t){return y(t.length>4&&"documents"===t.get(4),"tried to deserialize invalid key "+t.toString()),t.popFirst(5)},t.prototype.isValidResourceName=function(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)},t.prototype.toValue=function(t){if(t instanceof gt)return{nullValue:"NULL_VALUE"};if(t instanceof bt)return{booleanValue:t.value()};if(t instanceof Et)return{integerValue:""+t.value()};if(t instanceof Tt){var e=t.value();if(this.options.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:t.value()}}return t instanceof Ct?{stringValue:t.value()}:t instanceof It?{mapValue:this.toMapValue(t)}:t instanceof Ot?{arrayValue:this.toArrayValue(t)}:t instanceof xt?{timestampValue:this.toTimestamp(t.internalValue)}:t instanceof At?{geoPointValue:{latitude:t.value().latitude,longitude:t.value().longitude}}:t instanceof kt?{bytesValue:this.toBytes(t.value())}:t instanceof Nt?{referenceValue:this.toResourceName(t.databaseId,t.key.path)}:m("Unknown FieldValue "+JSON.stringify(t))},t.prototype.fromValue=function(t){var e=this,n=t.value_type;if(ze(t,n,"nullValue"))return gt.INSTANCE;if(ze(t,n,"booleanValue"))return bt.of(t.booleanValue);if(ze(t,n,"integerValue"))return new Et(We(t.integerValue));if(ze(t,n,"doubleValue")){if(this.options.useProto3Json){if("NaN"===t.doubleValue)return Tt.NAN;if("Infinity"===t.doubleValue)return Tt.POSITIVE_INFINITY;if("-Infinity"===t.doubleValue)return Tt.NEGATIVE_INFINITY}return new Tt(t.doubleValue)}if(ze(t,n,"stringValue"))return new Ct(t.stringValue);if(ze(t,n,"mapValue"))return this.fromFields(t.mapValue.fields||{});if(ze(t,n,"arrayValue")){Ve(t.arrayValue,"arrayValue");var r=t.arrayValue.values||[];return new Ot(r.map(function(t){return e.fromValue(t)}))}if(ze(t,n,"timestampValue"))return Ve(t.timestampValue,"timestampValue"),new xt(this.fromTimestamp(t.timestampValue));if(ze(t,n,"geoPointValue")){Ve(t.geoPointValue,"geoPointValue");var i=t.geoPointValue.latitude||0,o=t.geoPointValue.longitude||0;return new At(new tt(i,o))}if(ze(t,n,"bytesValue")){Ve(t.bytesValue,"bytesValue");var a=this.fromBlob(t.bytesValue);return new kt(a)}if(ze(t,n,"referenceValue")){Ve(t.referenceValue,"referenceValue");var s=this.fromResourceName(t.referenceValue),u=new it(s.get(1),s.get(3)),c=new ct(this.extractLocalPathFromResourceName(s));return new Nt(u,c)}return m("Unknown Value proto "+JSON.stringify(t))},t.prototype.toMutationDocument=function(t,e){return{name:this.toName(t),fields:this.toFields(e)}},t.prototype.toDocument=function(t){return y(!t.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(t.key),fields:this.toFields(t.data),updateTime:this.toTimestamp(t.version.toTimestamp())}},t.prototype.fromDocument=function(t){return new lt(this.fromName(t.name),this.fromVersion(t.updateTime),this.fromFields(t.fields||{}),{hasLocalMutations:!1})},t.prototype.toFields=function(t){var e=this,n={};return t.forEach(function(t,r){n[t]=e.toValue(r)}),n},t.prototype.fromFields=function(t){var e=this,n=t,r=It.EMPTY;return S(n,function(t,n){r=r.set(new ut([t]),e.fromValue(n))}),r},t.prototype.toMapValue=function(t){return{fields:this.toFields(t)}},t.prototype.toArrayValue=function(t){var e=this,n=[];return t.forEach(function(t){n.push(e.toValue(t))}),{values:n}},t.prototype.fromFound=function(t){y(!!t.found,"Tried to deserialize a found document from a missing document."),Ve(t.found.name,"doc.found.name"),Ve(t.found.updateTime,"doc.found.updateTime");var e=this.fromName(t.found.name),n=this.fromVersion(t.found.updateTime),r=this.fromFields(t.found.fields||{});return new lt(e,n,r,{hasLocalMutations:!1})},t.prototype.fromMissing=function(t){y(!!t.missing,"Tried to deserialize a missing document from a found document."),y(!!t.readTime,"Tried to deserialize a missing document without a read time.");var e=this.fromName(t.missing),n=this.fromVersion(t.readTime);return new ft(e,n)},t.prototype.fromMaybeDocument=function(t){var e=t.result;return ze(t,e,"found")?this.fromFound(t):ze(t,e,"missing")?this.fromMissing(t):m("invalid batch get response: "+JSON.stringify(t))},t.prototype.toWatchTargetChangeState=function(t){switch(t){case Te.Added:return"ADD";case Te.Current:return"CURRENT";case Te.NoChange:return"NO_CHANGE";case Te.Removed:return"REMOVE";case Te.Reset:return"RESET";default:return m("Unknown WatchTargetChangeState: "+t)}},t.prototype.toTestWatchChange=function(t){if(t instanceof ke)return{filter:{count:t.existenceFilter.count,targetId:t.targetId}};if(t instanceof Se){if(t.newDoc instanceof lt){var e=t.newDoc;return{documentChange:{document:{name:this.toName(e.key),fields:this.toFields(e.data),updateTime:this.toVersion(e.version)},targetIds:t.updatedTargetIds,removedTargetIds:t.removedTargetIds}}}if(t.newDoc instanceof ft){e=t.newDoc;return{documentDelete:{document:this.toName(e.key),readTime:this.toVersion(e.version),removedTargetIds:t.removedTargetIds}}}if(null===t.newDoc)return{documentRemove:{document:this.toName(t.key),removedTargetIds:t.removedTargetIds}}}if(t instanceof Ne){var n=void 0;return t.cause&&(n={code:function(t){if(void 0===t)return te.OK;switch(t){case _.OK:return te.OK;case _.CANCELLED:return te.CANCELLED;case _.UNKNOWN:return te.UNKNOWN;case _.DEADLINE_EXCEEDED:return te.DEADLINE_EXCEEDED;case _.RESOURCE_EXHAUSTED:return te.RESOURCE_EXHAUSTED;case _.INTERNAL:return te.INTERNAL;case _.UNAVAILABLE:return te.UNAVAILABLE;case _.UNAUTHENTICATED:return te.UNAUTHENTICATED;case _.INVALID_ARGUMENT:return te.INVALID_ARGUMENT;case _.NOT_FOUND:return te.NOT_FOUND;case _.ALREADY_EXISTS:return te.ALREADY_EXISTS;case _.PERMISSION_DENIED:return te.PERMISSION_DENIED;case _.FAILED_PRECONDITION:return te.FAILED_PRECONDITION;case _.ABORTED:return te.ABORTED;case _.OUT_OF_RANGE:return te.OUT_OF_RANGE;case _.UNIMPLEMENTED:return te.UNIMPLEMENTED;case _.DATA_LOSS:return te.DATA_LOSS;default:return m("Unknown status code: "+t)}}(t.cause.code),message:t.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(t.state),targetIds:t.targetIds,resumeToken:this.unsafeCastProtoByteString(t.resumeToken),cause:n}}}return m("Unrecognized watch change: "+JSON.stringify(t))},t.prototype.fromWatchChange=function(t){var e,n=t.response_type;if(ze(t,n,"targetChange")){Ve(t.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=t.targetChange.resumeToken||this.emptyByteString(),a=t.targetChange.cause,s=a&&this.fromRpcStatus(a);e=new Ne(r,i,o,s||null)}else if(ze(t,n,"documentChange")){Ve(t.documentChange,"documentChange"),Ve(t.documentChange.document,"documentChange.name"),Ve(t.documentChange.document.name,"documentChange.document.name"),Ve(t.documentChange.document.updateTime,"documentChange.document.updateTime");var u=t.documentChange,c=this.fromName(u.document.name),l=this.fromVersion(u.document.updateTime),f=this.fromFields(u.document.fields||{}),h=new lt(c,l,f,{hasLocalMutations:!1}),p=u.targetIds||[],d=u.removedTargetIds||[];e=new Se(p,d,h.key,h)}else if(ze(t,n,"documentDelete")){Ve(t.documentDelete,"documentDelete"),Ve(t.documentDelete.document,"documentDelete.document");var v=t.documentDelete;c=this.fromName(v.document),l=v.readTime?this.fromVersion(v.readTime):Qt.forDeletedDoc(),h=new ft(c,l),d=v.removedTargetIds||[];e=new Se([],d,h.key,h)}else if(ze(t,n,"documentRemove")){Ve(t.documentRemove,"documentRemove"),Ve(t.documentRemove.document,"documentRemove");var y=t.documentRemove;c=this.fromName(y.document),d=y.removedTargetIds||[];e=new Se([],d,c,null)}else{if(!ze(t,n,"filter"))return m("Unknown change type "+JSON.stringify(t));Ve(t.filter,"filter"),Ve(t.filter.targetId,"filter.targetId");var g=t.filter,b=g.count||0,_=new se(b),w=g.targetId;e=new ke(w,_)}return e},t.prototype.fromWatchTargetChangeState=function(t){return"NO_CHANGE"===t?Te.NoChange:"ADD"===t?Te.Added:"REMOVE"===t?Te.Removed:"CURRENT"===t?Te.Current:"RESET"===t?Te.Reset:m("Got unexpected TargetChange.state: "+t)},t.prototype.versionFromListenResponse=function(t){if(!ze(t,t.response_type,"targetChange"))return Qt.MIN;var e=t.targetChange;return e.targetIds&&e.targetIds.length?Qt.MIN:e.readTime?this.fromVersion(e.readTime):Qt.MIN},t.prototype.toMutation=function(t){var e,n=this;if(t instanceof re)e={update:this.toMutationDocument(t.key,t.value)};else if(t instanceof ae)e={delete:this.toName(t.key)};else if(t instanceof ie)e={update:this.toMutationDocument(t.key,t.data),updateMask:this.toDocumentMask(t.fieldMask)};else{if(!(t instanceof oe))return m("Unknown mutation type "+t.type);e={transform:{document:this.toName(t.key),fieldTransforms:t.fieldTransforms.map(function(t){return n.toFieldTransform(t)})}}}return t.precondition.isNone||(e.currentDocument=this.toPrecondition(t.precondition)),e},t.prototype.fromMutation=function(t){var e=this,n=t.currentDocument?this.fromPrecondition(t.currentDocument):ee.NONE;if(t.update){Ve(t.update.name,"name");var r=this.fromName(t.update.name),i=this.fromFields(t.update.fields||{});if(t.updateMask){var o=this.fromDocumentMask(t.updateMask);return new ie(r,i,o,n)}return new re(r,i,n)}if(t.delete){r=this.fromName(t.delete);return new ae(r,n)}if(t.transform){r=this.fromName(t.transform.document);var a=t.transform.fieldTransforms.map(function(t){return e.fromFieldTransform(t)});return y(!0===n.exists,'Transforms only support precondition "exists == true"'),new oe(r,a)}return m("unknown mutation proto: "+JSON.stringify(t))},t.prototype.toPrecondition=function(t){return y(!t.isNone,"Can't serialize an empty precondition"),void 0!==t.updateTime?{updateTime:this.toVersion(t.updateTime)}:void 0!==t.exists?{exists:t.exists}:m("Unknown precondition")},t.prototype.fromPrecondition=function(t){return void 0!==t.updateTime?ee.updateTime(this.fromVersion(t.updateTime)):void 0!==t.exists?ee.exists(t.exists):ee.NONE},t.prototype.fromWriteResult=function(t){var e=this,n=t.updateTime?this.fromVersion(t.updateTime):null,r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults.map(function(t){return e.fromValue(t)})),new Zt(n,r)},t.prototype.fromWriteResults=function(t){var e=this;return(t||[]).map(function(t){return e.fromWriteResult(t)})},t.prototype.toFieldTransform=function(t){var e=this,n=t.transform;return n instanceof Re?{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"}:n instanceof De?{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements.map(function(t){return e.toValue(t)})}}:n instanceof Me?{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements.map(function(t){return e.toValue(t)})}}:void m("Unknown transform: "+t.transform)},t.prototype.fromFieldTransform=function(t){var e=this,n=t.transform_type,r=null;if(ze(t,n,"setToServerValue"))y("REQUEST_TIME"===t.setToServerValue,"Unknown server value transform proto: "+JSON.stringify(t)),r=Re.instance;else if(ze(t,n,"appendMissingElements")){var i=t.appendMissingElements.values||[];r=new De(i.map(function(t){return e.fromValue(t)}))}else if(ze(t,n,"removeAllFromArray")){i=t.removeAllFromArray.values||[];r=new Me(i.map(function(t){return e.fromValue(t)}))}else m("Unknown transform proto: "+JSON.stringify(t));var o=ut.fromServerFormat(t.fieldPath);return new Jt(o,r)},t.prototype.toDocumentsTarget=function(t){return{documents:[this.toQueryPath(t.path)]}},t.prototype.fromDocumentsTarget=function(t){var e=t.documents.length;y(1===e,"DocumentsTarget contained other than 1 document: "+e);var n=t.documents[0];return Ft.atPath(this.fromQueryPath(n))},t.prototype.toQueryTarget=function(t){var e={structuredQuery:{}};if(t.path.isEmpty())e.parent=this.toQueryPath(at.EMPTY_PATH);else{var n=t.path;y(n.length%2!=0,"Document queries with filters are not supported."),e.parent=this.toQueryPath(n.popLast()),e.structuredQuery.from=[{collectionId:n.lastSegment()}]}var r=this.toFilter(t.filters);r&&(e.structuredQuery.where=r);var i=this.toOrder(t.orderBy);i&&(e.structuredQuery.orderBy=i);var o=this.toInt32Value(t.limit);return void 0!==o&&(e.structuredQuery.limit=o),t.startAt&&(e.structuredQuery.startAt=this.toCursor(t.startAt)),t.endAt&&(e.structuredQuery.endAt=this.toCursor(t.endAt)),e},t.prototype.fromQueryTarget=function(t){var e=this.fromQueryPath(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0;if(r>0){y(1===r,"StructuredQuery.from with more than one collection is not supported.");var i=n.from[0];e=e.child(i.collectionId)}var o=[];n.where&&(o=this.fromFilter(n.where));var a=[];n.orderBy&&(a=this.fromOrder(n.orderBy));var s=null;n.limit&&(s=this.fromInt32Value(n.limit));var u=null;n.startAt&&(u=this.fromCursor(n.startAt));var c=null;return n.endAt&&(c=this.fromCursor(n.endAt)),new Ft(e,a,o,s,u,c)},t.prototype.toListenRequestLabels=function(t){var e=this.toLabel(t.purpose);return null==e?null:{"goog-listen-tags":e}},t.prototype.toLabel=function(t){switch(t){case Vt.Listen:return null;case Vt.ExistenceFilterMismatch:return"existence-filter-mismatch";case Vt.LimboResolution:return"limbo-document";default:return m("Unrecognized query purpose: "+t)}},t.prototype.toTarget=function(t){var e,n=t.query;return(e=n.isDocumentQuery()?{documents:this.toDocumentsTarget(n)}:{query:this.toQueryTarget(n)}).targetId=t.targetId,t.resumeToken.length>0&&(e.resumeToken=this.unsafeCastProtoByteString(t.resumeToken)),e},t.prototype.toFilter=function(t){var e=this;if(0!==t.length){var n=t.map(function(t){return t instanceof jt?e.toRelationFilter(t):e.toUnaryFilter(t)});return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},t.prototype.fromFilter=function(t){var e=this;return t?void 0!==t.unaryFilter?[this.fromUnaryFilter(t)]:void 0!==t.fieldFilter?[this.fromRelationFilter(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map(function(t){return e.fromFilter(t)}).reduce(function(t,e){return t.concat(e)}):m("Unknown filter: "+JSON.stringify(t)):[]},t.prototype.toOrder=function(t){var e=this;if(0!==t.length)return t.map(function(t){return e.toPropertyOrder(t)})},t.prototype.fromOrder=function(t){var e=this;return t.map(function(t){return e.fromPropertyOrder(t)})},t.prototype.toCursor=function(t){var e=this;return{before:t.before,values:t.position.map(function(t){return e.toValue(t)})}},t.prototype.fromCursor=function(t){var e=this,n=!!t.before,r=t.values.map(function(t){return e.fromValue(t)});return new Ht(r,n)},t.prototype.toDirection=function(t){return je[t.name]},t.prototype.fromDirection=function(t){switch(t){case"ASCENDING":return Wt.ASCENDING;case"DESCENDING":return Wt.DESCENDING;default:return}},t.prototype.toOperatorName=function(t){return Be[t.name]},t.prototype.fromOperatorName=function(t){switch(t){case"EQUAL":return Ut.EQUAL;case"GREATER_THAN":return Ut.GREATER_THAN;case"GREATER_THAN_OR_EQUAL":return Ut.GREATER_THAN_OR_EQUAL;case"LESS_THAN":return Ut.LESS_THAN;case"LESS_THAN_OR_EQUAL":return Ut.LESS_THAN_OR_EQUAL;case"ARRAY_CONTAINS":return Ut.ARRAY_CONTAINS;case"OPERATOR_UNSPECIFIED":return m("Unspecified relation");default:return m("Unknown relation")}},t.prototype.toFieldPathReference=function(t){return{fieldPath:t.canonicalString()}},t.prototype.fromFieldPathReference=function(t){return ut.fromServerFormat(t.fieldPath)},t.prototype.toPropertyOrder=function(t){return{field:this.toFieldPathReference(t.field),direction:this.toDirection(t.dir)}},t.prototype.fromPropertyOrder=function(t){return new zt(this.fromFieldPathReference(t.field),this.fromDirection(t.direction))},t.prototype.toRelationFilter=function(t){return t instanceof jt?{fieldFilter:{field:this.toFieldPathReference(t.field),op:this.toOperatorName(t.op),value:this.toValue(t.value)}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromRelationFilter=function(t){return new jt(this.fromFieldPathReference(t.fieldFilter.field),this.fromOperatorName(t.fieldFilter.op),this.fromValue(t.fieldFilter.value))},t.prototype.toUnaryFilter=function(t){return t instanceof qt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NAN"}}:t instanceof Bt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NULL"}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromUnaryFilter=function(t){switch(t.unaryFilter.op){case"IS_NAN":var e=this.fromFieldPathReference(t.unaryFilter.field);return new qt(e);case"IS_NULL":var n=this.fromFieldPathReference(t.unaryFilter.field);return new Bt(n);case"OPERATOR_UNSPECIFIED":return m("Unspecified filter");default:return m("Unknown filter")}},t.prototype.toDocumentMask=function(t){return{fieldPaths:t.fields.map(function(t){return t.canonicalString()})}},t.prototype.fromDocumentMask=function(t){var e=(t.fieldPaths||[]).map(function(t){return ut.fromServerFormat(t)});return new $t(e)},t}();function ze(t,e,n){return e===n||!e&&n in t}var Ke="FirebaseError",Ge=Error.captureStackTrace,Qe=function(){return function(t,e){if(this.code=t,this.message=e,Ge)Ge(this,Ye.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=Ke,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();Qe.prototype=Object.create(Error.prototype),Qe.prototype.constructor=Qe,Qe.prototype.name=Ke;var Ye=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new Qe(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}(),Xe=(function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}s.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t}}(function(){return function(){this.blockSize=-1}}()),function(){function t(t){this.sendFn=t.sendFn,this.closeFn=t.closeFn}return t.prototype.onOpen=function(t){y(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=t},t.prototype.onClose=function(t){y(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=t},t.prototype.onMessage=function(t){y(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=t},t.prototype.close=function(){this.closeFn()},t.prototype.send=function(t){this.sendFn(t)},t.prototype.callOnOpen=function(){y(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},t.prototype.callOnClose=function(t){y(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(t)},t.prototype.callOnMessage=function(t){y(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(t)},t}()),$e="Connection",Je={BatchGetDocuments:"batchGet",Commit:"commit"},Ze="gl-js/ fire/"+c,tn=function(){function t(t){this.databaseId=t.databaseId,this.pool=new u.XhrIoPool;var e=t.ssl?"https":"http";this.baseUrl=e+"://"+t.host}return t.prototype.modifyHeadersForRequest=function(t,e){if(e)for(var n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n]);t["X-Goog-Api-Client"]=Ze},t.prototype.invokeRPC=function(t,e,n){var r=this,i=this.makeUrl(t);return new Promise(function(o,a){r.pool.getObject(function(s){s.listenOnce(u.EventType.COMPLETE,function(){try{switch(s.getLastErrorCode()){case u.ErrorCode.NO_ERROR:var e=s.getResponseJson();p($e,"XHR received:",JSON.stringify(e)),o(e);break;case u.ErrorCode.TIMEOUT:p($e,'RPC "'+t+'" timed out'),a(new w(_.DEADLINE_EXCEEDED,"Request time out"));break;case u.ErrorCode.HTTP_ERROR:var n=s.getStatus();p($e,'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0?a(new w(function(t){switch(t){case 200:return _.OK;case 400:return _.INVALID_ARGUMENT;case 401:return _.UNAUTHENTICATED;case 403:return _.PERMISSION_DENIED;case 404:return _.NOT_FOUND;case 409:return _.ABORTED;case 416:return _.OUT_OF_RANGE;case 429:return _.RESOURCE_EXHAUSTED;case 499:return _.CANCELLED;case 500:return _.UNKNOWN;case 501:return _.UNIMPLEMENTED;case 503:return _.UNAVAILABLE;case 504:return _.DEADLINE_EXCEEDED;default:return t>=200&&t<300?_.OK:t>=400&&t<500?_.FAILED_PRECONDITION:t>=500&&t<600?_.INTERNAL:_.UNKNOWN}}(n),"Server responded with status "+s.getStatusText())):(p($e,'RPC "'+t+'" failed'),a(new w(_.UNAVAILABLE,"Connection failed.")));break;default:m('RPC "'+t+'" failed with unanticipated webchannel error '+s.getLastErrorCode()+": "+s.getLastError()+", giving up.")}}finally{p($e,'RPC "'+t+'" completed.'),r.pool.releaseObject(s)}});var c=JSON.stringify(e);p($e,"XHR sending: ",i+" "+c);var l={"Content-Type":"text/plain"};r.modifyHeadersForRequest(l,n),s.send(i,"POST",c,l,15)})})},t.prototype.invokeStreamingRPC=function(t,e,n){return this.invokeRPC(t,e,n)},t.prototype.openStream=function(t,e){var n=[this.baseUrl,"/","google.firestore.v1beta1.Firestore","/",t,"/channel"],r=u.createWebChannelTransport(),i={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0};this.modifyHeadersForRequest(i.initMessageHeaders,e),"object"==typeof navigator&&"ReactNative"===navigator.product||(i.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");p($e,"Creating WebChannel: "+o+" "+i);var a=r.createWebChannel(o,i),s=!1,c=!1,l=new Xe({sendFn:function(t){c?p($e,"Not sending because WebChannel is closed:",t):(s||(p($e,"Opening WebChannel transport."),a.open(),s=!0),p($e,"WebChannel sending:",t),a.send(t))},closeFn:function(){return a.close()}}),f=function(t,e){a.listen(t,function(t){try{e(t)}catch(t){setTimeout(function(){throw t},0)}})};return f(u.WebChannel.EventType.OPEN,function(){c||p($e,"WebChannel transport opened.")}),f(u.WebChannel.EventType.CLOSE,function(){c||(c=!0,p($e,"WebChannel transport closed"),l.callOnClose())}),f(u.WebChannel.EventType.ERROR,function(t){c||(c=!0,p($e,"WebChannel transport errored:",t),l.callOnClose(new w(_.UNAVAILABLE,"The operation could not be completed")))}),f(u.WebChannel.EventType.MESSAGE,function(t){if(!c){var e=t.data[0];y(!!e,"Got a webchannel message without data.");var n=e.error||e[0]&&e[0].error;if(n){p($e,"WebChannel received error:",n);var r=n.status,i=function(t){var e=te[t];if(void 0!==e)return ce(e)}(r),o=n.message;void 0===i&&(i=_.INTERNAL,o="Unknown error status: "+r+" with message "+n.message),c=!0,l.callOnClose(new w(i,o)),a.close()}else p($e,"WebChannel received:",e),l.callOnMessage(e)}}),setTimeout(function(){l.callOnOpen()},0),l},t.prototype.makeUrl=function(t){var e=Je[t];y(void 0!==e,"Unknown REST mapping for: "+t);var n=[this.baseUrl,"/","v1beta1"];return n.push("/projects/"),n.push(this.databaseId.projectId),n.push("/databases/"),n.push(this.databaseId.database),n.push("/documents"),n.push(":"),n.push(e),n.join("")},t}(),en=function(){function t(){this.emptyByteString="",this.base64Available="undefined"!=typeof atob}return t.prototype.loadConnection=function(t){return Promise.resolve(new tn(t))},t.prototype.newSerializer=function(t){return new He(t,{useProto3Json:!0})},t.prototype.formatJSON=function(t){return JSON.stringify(t)},t.prototype.atob=function(t){return atob(t)},t.prototype.btoa=function(t){return btoa(t)},t}();g.setPlatform(new en);var nn,rn=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];!function(t,e,n,r){if(!(e instanceof Array)||e.length<r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" argument to be an array with at least "+H(r,"element")+".")}("FieldPath",t,"fieldNames",1);for(var n=0;n<t.length;++n)if(O("FieldPath","string",n,t[n]),0===t[n].length)throw new w(_.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ut(t)}return t.documentId=function(){return t._DOCUMENT_ID},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","FieldPath",1,e);return this._internalPath.isEqual(e._internalPath)},t._DOCUMENT_ID=new t(ut.keyField().canonicalString()),t}(),on=new RegExp("[~\\*/\\[\\]]");!function(t){t[t.Unknown=0]="Unknown",t[t.Online=1]="Online",t[t.Offline=2]="Offline"}(nn||(nn={}));var an,sn=function(){function t(t){this.comparator=t?function(e,n){return t(e,n)||ct.comparator(e.key,n.key)}:function(t,e){return ct.comparator(t.key,e.key)},this.keyedMap=de(),this.sortedSet=new ht(this.comparator)}return t.emptySet=function(e){return new t(e.comparator)},t.prototype.has=function(t){return null!=this.keyedMap.get(t)},t.prototype.get=function(t){return this.keyedMap.get(t)},t.prototype.first=function(){return this.sortedSet.minKey()},t.prototype.last=function(){return this.sortedSet.maxKey()},t.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},t.prototype.indexOf=function(t){var e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.sortedSet.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n  "+t.join("  \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r},t}(),un=function(){function t(t){this.mapKeyFn=t,this.inner={}}return t.prototype.get=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(a.isEqual(t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.mapKeyFn(t),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(r[i][0].isEqual(t))return void(r[i]=[t,e]);r.push([t,e])}else this.inner[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(n[r][0].isEqual(t))return 1===n.length?delete this.inner[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){S(this.inner,function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}})},t.prototype.isEmpty=function(){return k(this.inner)},t}(),cn=function(){return function(){this.listeners=[]}}(),ln=function(){function t(t){this.syncEngine=t,this.queries=new un(function(t){return t.canonicalId()}),this.onlineState=nn.Unknown,this.syncEngine.subscribe(this.onChange.bind(this),this.onError.bind(this))}return t.prototype.listen=function(t){var e=t.query,n=!1,r=this.queries.get(e);return r||(n=!0,r=new cn,this.queries.set(e,r)),r.listeners.push(t),t.applyOnlineStateChange(this.onlineState),r.viewSnap&&t.onViewSnapshot(r.viewSnap),n?this.syncEngine.listen(e).then(function(t){return r.targetId=t,t}):Promise.resolve(r.targetId)},t.prototype.unlisten=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n,r,i;return s.__generator(this,function(o){return e=t.query,n=!1,(r=this.queries.get(e))&&(i=r.listeners.indexOf(t))>=0&&(r.listeners.splice(i,1),n=0===r.listeners.length),n?(this.queries.delete(e),[2,this.syncEngine.unlisten(e)]):[2]})})},t.prototype.onChange=function(t){for(var e=0,n=t;e<n.length;e++){var r=n[e],i=r.query,o=this.queries.get(i);if(o){for(var a=0,s=o.listeners;a<s.length;a++){s[a].onViewSnapshot(r)}o.viewSnap=r}}},t.prototype.onError=function(t,e){var n=this.queries.get(t);if(n)for(var r=0,i=n.listeners;r<i.length;r++){i[r].onError(e)}this.queries.delete(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.queries.forEach(function(e,n){for(var r=0,i=n.listeners;r<i.length;r++){i[r].applyOnlineStateChange(t)}})},t}(),fn=function(){function t(t,e,n){this.query=t,this.queryObserver=e,this.raisedInitialEvent=!1,this.onlineState=nn.Unknown,this.options=n||{}}return t.prototype.onViewSnapshot=function(t){if(y(t.docChanges.length>0||t.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];i.type!==be.Metadata&&e.push(i)}t=new xe(t.query,t.docs,t.oldDocs,e,t.fromCache,t.hasPendingWrites,t.syncStateChanged,!0)}this.raisedInitialEvent?this.shouldRaiseEvent(t)&&this.queryObserver.next(t):this.shouldRaiseInitialEvent(t,this.onlineState)&&this.raiseInitialEvent(t),this.snap=t},t.prototype.onError=function(t){this.queryObserver.error(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.snap&&!this.raisedInitialEvent&&this.shouldRaiseInitialEvent(this.snap,t)&&this.raiseInitialEvent(this.snap)},t.prototype.shouldRaiseInitialEvent=function(t,e){if(y(!this.raisedInitialEvent,"Determining whether to raise first event but already had first event"),!t.fromCache)return!0;var n=e!==nn.Offline;return this.options.waitForSyncWhenOnline&&n?(y(t.fromCache,"Waiting for sync, but snapshot is not from cache"),!1):!t.docs.isEmpty()||e===nn.Offline},t.prototype.shouldRaiseEvent=function(t){if(t.docChanges.length>0)return!0;var e=this.snap&&this.snap.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.raiseInitialEvent=function(e){y(!this.raisedInitialEvent,"Trying to raise initial events for second time"),e=new xe(e.query,e.docs,sn.emptySet(e.docs),t.getInitialViewChanges(e),e.fromCache,e.hasPendingWrites,!0,!1),this.raisedInitialEvent=!0,this.queryObserver.next(e)},t.getInitialViewChanges=function(t){var e=[];return t.docs.forEach(function(t){e.push({type:be.Added,doc:t})}),e},t}(),hn=function(){function t(t){var e=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(function(t){e.isDone=!0,e.result=t,e.nextCallback&&e.nextCallback(t)},function(t){e.isDone=!0,e.error=t,e.catchCallback&&e.catchCallback(t)})}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&m("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t(function(t,i){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,i)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,i)}})},t.prototype.toPromise=function(){var t=this;return new Promise(function(e,n){t.next(e,n)})},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t,n){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.waitFor=function(e){var n=e.length;if(0===n)return t.resolve();var r=0;return new t(function(t,i){for(var o=0,a=e;o<a.length;o++){a[o].next(function(){++r===n&&t()},function(t){return i(t)})}})},t.map=function(e){for(var n=[],r=[],i=function(t){r[t]=e[t].next(function(e){n[t]=e})},o=0;o<e.length;++o)i(o);return t.waitFor(r).next(function(){return n})},t}(),pn=function(){function t(){this.isEager=!0,this.sources=[],this.potentialGarbage=ge()}return t.prototype.addGarbageSource=function(t){this.sources.push(t),t.setGarbageCollector(this)},t.prototype.removeGarbageSource=function(t){this.sources.splice(this.sources.indexOf(t),1),t.setGarbageCollector(null)},t.prototype.addPotentialGarbageKey=function(t){this.potentialGarbage=this.potentialGarbage.add(t)},t.prototype.collectGarbage=function(t){var e=this,n=[],r=ge();return this.potentialGarbage.forEach(function(i){var o=e.documentHasAnyReferences(t,i);n.push(o.next(function(t){return t||(r=r.add(i)),hn.resolve()}))}),this.potentialGarbage=ge(),hn.waitFor(n).next(function(){return r})},t.prototype.documentHasAnyReferences=function(t,e){var n=hn.resolve(!1);return this.sources.map(function(n){return function(){return n.containsKey(t,e)}}).reduce(function(t,e){return t.next(function(t){return t?hn.resolve(!0):e()})},n)},t}(),dn=function(){function t(t,e,n){this.query=t,this.addedKeys=e,this.removedKeys=n}return t.fromSnapshot=function(e){for(var n=ge(),r=ge(),i=0,o=e.docChanges;i<o.length;i++){var a=o[i];switch(a.type){case be.Added:n=n.add(a.doc.key);break;case be.Removed:r=r.add(a.doc.key)}}return new t(e.query,n,r)},t}(),vn=function(){function t(){this.refsByKey=new le(mn.compareByKey),this.refsByTarget=new le(mn.compareByTargetId),this.garbageCollector=null}return t.prototype.isEmpty=function(){return this.refsByKey.isEmpty()},t.prototype.addReference=function(t,e){var n=new mn(t,e);this.refsByKey=this.refsByKey.add(n),this.refsByTarget=this.refsByTarget.add(n)},t.prototype.addReferences=function(t,e){var n=this;t.forEach(function(t){return n.addReference(t,e)})},t.prototype.removeReference=function(t,e){this.removeRef(new mn(t,e))},t.prototype.removeReferences=function(t,e){var n=this;t.forEach(function(t){return n.removeReference(t,e)})},t.prototype.removeReferencesForId=function(t){var e=this,n=ct.EMPTY,r=new mn(n,t),i=new mn(n,t+1);this.refsByTarget.forEachInRange([r,i],function(t){e.removeRef(t)})},t.prototype.removeAllReferences=function(){var t=this;this.refsByKey.forEach(function(e){return t.removeRef(e)})},t.prototype.removeRef=function(t){this.refsByKey=this.refsByKey.delete(t),this.refsByTarget=this.refsByTarget.delete(t),null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(t.key)},t.prototype.referencesForId=function(t){var e=ct.EMPTY,n=new mn(e,t),r=new mn(e,t+1),i=ge();return this.refsByTarget.forEachInRange([n,r],function(t){i=i.add(t.key)}),i},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.refsByKey.firstAfterOrEqual(n);return hn.resolve(null!==r&&e.isEqual(r.key))},t}(),mn=function(){function t(t,e){this.key=t,this.targetOrBatchId=e}return t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)||K(t.targetOrBatchId,e.targetOrBatchId)},t.compareByTargetId=function(t,e){return K(t.targetOrBatchId,e.targetOrBatchId)||ct.comparator(t.key,e.key)},t}(),yn=1;!function(t){t[t.LocalStore=0]="LocalStore",t[t.SyncEngine=1]="SyncEngine"}(an||(an={}));var gn=function(){function t(t,e){void 0===e&&(e=0),this.generatorId=t;var n=e>>yn<<yn,r=e-n;this.previousId=r>=t?n|this.generatorId:(n|this.generatorId)-(1<<yn)}return t.prototype.next=function(){return this.previousId+=1<<yn,this.previousId},t.forLocalStore=function(e){return void 0===e&&(e=0),new t(an.LocalStore,e)},t.forSyncEngine=function(){return new t(an.SyncEngine)},t}(),bn=function(){return function(t){this.key=t}}(),_n=function(){return function(t){this.key=t}}(),wn=function(){function t(t,e){this.query=t,this._syncedDocuments=e,this.syncState=null,this.current=!1,this.limboDocuments=ge(),this.mutatedKeys=ge(),this.documentSet=new sn(t.docComparator.bind(t))}return Object.defineProperty(t.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),t.prototype.computeDocChanges=function(t,e){var n=this,r=e?e.changeSet:new Ce,i=e?e.documentSet:this.documentSet,o=e?e.mutatedKeys:this.mutatedKeys,a=i,s=!1,u=this.query.hasLimit()&&i.size===this.query.limit?i.last():null;if(t.inorderTraversal(function(t,e){var c=i.get(t),l=e instanceof lt?e:null;if(l&&(y(t.isEqual(l.key),"Mismatching keys found in document changes: "+t+" != "+l.key),l=n.query.matches(l)?l:null),l?(a=a.add(l),o=l.hasLocalMutations?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)),c&&l){var f=c.data.isEqual(l.data);f&&c.hasLocalMutations===l.hasLocalMutations||(f?r.track({type:be.Metadata,doc:l}):r.track({type:be.Modified,doc:l}),u&&n.query.docComparator(l,u)>0&&(s=!0))}else!c&&l?r.track({type:be.Added,doc:l}):c&&!l&&(r.track({type:be.Removed,doc:c}),u&&(s=!0))}),this.query.hasLimit())for(;a.size>this.query.limit;){var c=a.last();a=a.delete(c.key),r.track({type:be.Removed,doc:c})}return y(!s||!e,"View was refilled using docs that themselves needed refilling."),{documentSet:a,changeSet:r,needsRefill:s,mutatedKeys:o}},t.prototype.applyChanges=function(t,e){var n=this;y(!t.needsRefill,"Cannot apply changes that need a refill");var r=this.documentSet;this.documentSet=t.documentSet,this.mutatedKeys=t.mutatedKeys;var i=t.changeSet.getChanges();i.sort(function(t,e){return function(t,e){var n=function(t){switch(t){case be.Added:return 1;case be.Modified:case be.Metadata:return 2;case be.Removed:return 0;default:return m("Unknown ChangeType: "+t)}};return n(t)-n(e)}(t.type,e.type)||n.query.docComparator(t.doc,e.doc)}),this.applyTargetChange(e);var o=this.updateLimboDocuments(),a=0===this.limboDocuments.size&&this.current?_e.Synced:_e.Local,s=a!==this.syncState;return this.syncState=a,0!==i.length||s?{snapshot:new xe(this.query,t.documentSet,r,i,a===_e.Local,!t.mutatedKeys.isEmpty(),s,!1),limboChanges:o}:{limboChanges:o}},t.prototype.applyOnlineStateChange=function(t){return this.current&&t===nn.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new Ce,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},t.prototype.shouldBeInLimbo=function(t){return!this._syncedDocuments.has(t)&&(!!this.documentSet.has(t)&&!this.documentSet.get(t).hasLocalMutations)},t.prototype.applyTargetChange=function(t){var e=this;t&&(t.addedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.add(t)}),t.modifiedDocuments.forEach(function(t){return y(e._syncedDocuments.has(t),"Modified document "+t+" not found in view.")}),t.removedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.delete(t)}),this.current=t.current)},t.prototype.updateLimboDocuments=function(){var t=this;if(!this.current)return[];var e=this.limboDocuments;this.limboDocuments=ge(),this.documentSet.forEach(function(e){t.shouldBeInLimbo(e.key)&&(t.limboDocuments=t.limboDocuments.add(e.key))});var n=[];return e.forEach(function(e){t.limboDocuments.has(e)||n.push(new _n(e))}),this.limboDocuments.forEach(function(t){e.has(t)||n.push(new bn(t))}),n},t}();var En=function(){return function(t,e,n,r){this.query=t,this.targetId=e,this.resumeToken=n,this.view=r}}(),Tn=function(){function t(t,e,n){this.localStore=t,this.remoteStore=e,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new un(function(t){return t.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new ht(ct.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new vn,this.limboCollector=new pn,this.mutationUserCallbacks={},this.targetIdGenerator=gn.forSyncEngine()}return t.prototype.subscribe=function(t,e){y(null!==t&&null!==e,"View and error handlers cannot be null"),y(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=t,this.errorHandler=e,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},t.prototype.listen=function(t){var e=this;return this.assertSubscribed("listen()"),y(!this.queryViewsByQuery.has(t),"We already listen to the query: "+t),this.localStore.allocateQuery(t).then(function(n){return e.localStore.executeQuery(t).then(function(r){return e.localStore.remoteDocumentKeys(n.targetId).then(function(i){var o=new wn(t,i),a=o.computeDocChanges(r),s=o.applyChanges(a);y(0===s.limboChanges.length,"View returned limbo docs before target ack from the server."),y(!!s.snapshot,"applyChanges for new view should always return a snapshot");var u=new En(t,n.targetId,n.resumeToken,o);e.queryViewsByQuery.set(t,u),e.queryViewsByTarget[n.targetId]=u,e.viewHandler([s.snapshot]),e.remoteStore.listen(n)})}).then(function(){return n.targetId})})},t.prototype.unlisten=function(t){var e=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(t);return y(!!n,"Trying to unlisten on query not found:"+t),this.localStore.releaseQuery(t).then(function(){return e.remoteStore.unlisten(n.targetId),e.removeAndCleanupQuery(n).then(function(){return e.localStore.collectGarbage()})})},t.prototype.write=function(t,e){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(t).then(function(t){return n.addMutationCallback(t.batchId,e),n.emitNewSnapsAndNotifyLocalStore(t.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},t.prototype.wrapUpdateFunctionError=function(t){return t},t.prototype.runTransaction=function(t,e){var n=this;void 0===e&&(e=5),y(e>=0,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var e=t(r);return!Lt(e)&&e.catch&&e.then?e.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(i){return r.commit().then(function(){return i}).catch(function(r){return 0===e?Promise.reject(r):n.runTransaction(t,e-1)})})},t.prototype.applyRemoteEvent=function(t){var e=this;return this.assertSubscribed("applyRemoteEvent()"),this.localStore.applyRemoteEvent(t).then(function(n){return e.emitNewSnapsAndNotifyLocalStore(n,t)})},t.prototype.applyOnlineStateChange=function(t){var e=[];this.queryViewsByQuery.forEach(function(n,r){var i=r.view.applyOnlineStateChange(t);y(0===i.limboChanges.length,"OnlineState should not affect limbo documents."),i.snapshot&&e.push(i.snapshot)}),this.viewHandler(e)},t.prototype.rejectListen=function(t,e){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[t];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[t];var i=new ht(ct.comparator);i=i.insert(r,new ft(r,Qt.forDeletedDoc()));var o=ge().add(r),a=new we(Qt.MIN,{},new le(K),i,o);return this.applyRemoteEvent(a)}var s=this.queryViewsByTarget[t];return y(!!s,"Unknown targetId: "+t),this.localStore.releaseQuery(s.query).then(function(){return n.removeAndCleanupQuery(s).then(function(){n.errorHandler(s.query,e)})})},t.prototype.applySuccessfulWrite=function(t){var e=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(t.batch.batchId,null),this.localStore.acknowledgeBatch(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.rejectFailedWrite=function(t,e){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(t,e),this.localStore.rejectBatch(t).then(function(t){return n.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.addMutationCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new ht(K)),n=n.insert(t,e),this.mutationUserCallbacks[this.currentUser.toKey()]=n},t.prototype.processUserCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(t);r&&(y(t===n.minKey(),"Mutation callbacks processed out-of-order?"),e?r.reject(e):r.resolve(),n=n.remove(t)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},t.prototype.removeAndCleanupQuery=function(t){return this.queryViewsByQuery.delete(t.query),delete this.queryViewsByTarget[t.targetId],this.limboDocumentRefs.removeReferencesForId(t.targetId),this.gcLimboDocuments()},t.prototype.updateTrackedLimbos=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i instanceof bn?(this.limboDocumentRefs.addReference(i.key,t),this.trackLimboChange(i)):i instanceof _n?(p("SyncEngine","Document no longer in limbo: "+i.key),this.limboDocumentRefs.removeReference(i.key,t)):m("Unknown limbo change: "+JSON.stringify(i))}return this.gcLimboDocuments()},t.prototype.trackLimboChange=function(t){var e=t.key;if(!this.limboTargetsByKey.get(e)){p("SyncEngine","New document in limbo: "+e);var n=this.targetIdGenerator.next(),r=Ft.atPath(e.path);this.limboKeysByTarget[n]=e,this.remoteStore.listen(new Xt(r,n,Vt.LimboResolution)),this.limboTargetsByKey=this.limboTargetsByKey.insert(e,n)}},t.prototype.gcLimboDocuments=function(){var t=this;return this.limboCollector.collectGarbage(null).next(function(e){e.forEach(function(e){var n=t.limboTargetsByKey.get(e);null!==n&&(t.remoteStore.unlisten(n),t.limboTargetsByKey=t.limboTargetsByKey.remove(e),delete t.limboKeysByTarget[n])})}).toPromise()},t.prototype.currentLimboDocs=function(){return this.limboTargetsByKey},t.prototype.emitNewSnapsAndNotifyLocalStore=function(t,e){var n=this,r=[],i=[],o=[];return this.queryViewsByQuery.forEach(function(a,s){o.push(Promise.resolve().then(function(){var e=s.view.computeDocChanges(t);return e.needsRefill?n.localStore.executeQuery(s.query).then(function(t){return s.view.computeDocChanges(t,e)}):e}).then(function(t){var o=e&&e.targetChanges[s.targetId],a=s.view.applyChanges(t,o);return n.updateTrackedLimbos(s.targetId,a.limboChanges).then(function(){if(a.snapshot){r.push(a.snapshot);var t=dn.fromSnapshot(a.snapshot);i.push(t)}})}))}),Promise.all(o).then(function(){return n.viewHandler(r),n.localStore.notifyLocalViewChanges(i)}).then(function(){return n.localStore.collectGarbage()})},t.prototype.assertSubscribed=function(t){y(null!==this.viewHandler&&null!==this.errorHandler,"Trying to call "+t+" before calling subscribe().")},t.prototype.handleUserChange=function(t){var e=this;return this.currentUser=t,this.localStore.handleUserChange(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)}).then(function(){return e.remoteStore.handleUserChange(t)})},t.prototype.getRemoteKeysForTarget=function(t){return this.queryViewsByTarget[t]?this.queryViewsByTarget[t].view.syncedDocuments:ge()},t}(),Cn=-1,xn=function(){function t(t,e,n){this.batchId=t,this.localWriteTime=e,this.mutations=n}return t.prototype.applyToRemoteDocument=function(t,e,n){e&&y(e.key.isEqual(t),"applyToRemoteDocument: key "+t+" should match maybeDoc key\n        "+e.key);var r=n.mutationResults;y(r.length===this.mutations.length,"Mismatch between mutations length\n      ("+this.mutations.length+") and mutation results length\n      ("+r.length+").");for(var i=0;i<this.mutations.length;i++){var o=this.mutations[i];if(o.key.isEqual(t)){var a=r[i];e=o.applyToRemoteDocument(e,a)}}return e},t.prototype.applyToLocalView=function(t,e){e&&y(e.key.isEqual(t),"applyToLocalDocument: key "+t+" should match maybeDoc key\n        "+e.key);for(var n=e,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(t)&&(e=i.applyToLocalView(e,n,this.localWriteTime))}return e},t.prototype.keys=function(){for(var t=ge(),e=0,n=this.mutations;e<n.length;e++){var r=n[e];t=t.add(r.key)}return t},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&G(this.mutations,t.mutations)},t.prototype.isTombstone=function(){return 0===this.mutations.length},t.prototype.toTombstone=function(){return new t(this.batchId,this.localWriteTime,[])},t}(),Sn=function(){function t(t,e,n,r,i){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.streamToken=r,this.docVersions=i}return t.from=function(e,n,r,i){y(e.mutations.length===r.length,"Mutations sent "+e.mutations.length+" must equal results received "+r.length);for(var o=me(),a=e.mutations,s=0;s<a.length;s++){var u=r[s].version;null===u&&(u=n),o=o.insert(a[s].key,u)}return new t(e,n,r,i,o)},t}(),kn="�",Nn="�",An="�",In="�";function On(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=Rn(e)),e=Pn(t.get(n),e);return Rn(e)}function Pn(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+=kn+An;break;case kn:n+=kn+In;break;default:n+=o}}return n}function Rn(t){return t+kn+Nn}function Dn(t){var e=t.length;if(y(e>=2,"Invalid path "+t),2===e)return y(t.charAt(0)===kn&&t.charAt(1)===Nn,"Non-empty path "+t+" had length 2"),at.EMPTY_PATH;for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf(kn,o);switch((a<0||a>n)&&m('Invalid encoded resource path: "'+t+'"'),t.charAt(a+1)){case Nn:var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case An:i+=t.substring(o,a),i+="\0";break;case In:i+=t.substring(o,a+1);break;default:m('Invalid encoded resource path: "'+t+'"')}o=a+2}return new at(r)}function Mn(t,e,n,r){y(n<r&&n>=0&&r<=2,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),n<1&&r>=1&&(function(t){t.createObjectStore(Fn.store)}(t),function(t){t.createObjectStore(Un.store,{keyPath:Un.keyPath}),t.createObjectStore(jn.store,{keyPath:jn.keyPath}),t.createObjectStore(Bn.store)}(t),function(t){t.createObjectStore(Hn.store,{keyPath:Hn.keyPath}).createIndex(Hn.documentTargetsIndex,Hn.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Wn.store,{keyPath:Wn.keyPath}).createIndex(Wn.queryTargetsIndexName,Wn.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(zn.store)}(t),function(t){t.createObjectStore(Vn.store)}(t));var i=hn.resolve();return n<2&&r>=2&&(i=function(t){var e=t.store(zn.store);return e.get(zn.key).next(function(t){return null!=t?hn.resolve(t):(t=new zn(0,0,Qt.MIN.toTimestamp(),0),e.put(zn.key,t).next(function(){return t}))})}(e).next(function(t){return function(t,e){var n=t.store(zn.store);return t.store(Wn.store).count().next(function(t){return e.targetCount=t,n.put(zn.key,e)})}(e,t)})),i}var Ln=function(){return function(t,e){this.seconds=t,this.nanoseconds=e}}(),Fn=function(){function t(t,e){this.ownerId=t,this.leaseTimestampMs=e}return t.store="owner",t}();var Un=function(){function t(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n}return t.store="mutationQueues",t.keyPath="userId",t}(),jn=function(){function t(t,e,n,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.mutations=r}return t.store="mutations",t.keyPath=["userId","batchId"],t}();var Bn=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,On(e)]},t.key=function(t,e,n){return[t,On(e),n]},t.store="documentMutations",t.PLACEHOLDER=new t,t}();var qn=function(){return function(t,e){this.path=t,this.readTime=e}}(),Vn=function(){function t(t,e){this.noDocument=t,this.document=e}return t.store="remoteDocuments",t}(),Wn=function(){function t(t,e,n,r,i,o){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.query=o}return t.store="targets",t.keyPath="targetId",t.queryTargetsIndexName="queryTargetsIndex",t.queryTargetsKeyPath=["canonicalId","targetId"],t}(),Hn=function(){function t(t,e){this.targetId=t,this.path=e}return t.store="targetDocuments",t.keyPath=["targetId","path"],t.documentTargetsIndex="documentTargetsIndex",t.documentTargetsKeyPath=["path","targetId"],t}(),zn=function(){function t(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r}return t.key="targetGlobalKey",t.store="targetGlobal",t}();var Kn=[Un.store,jn.store,Bn.store,Vn.store,Wn.store,Fn.store,zn.store,Hn.store],Gn=function(){return function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}}(),Qn=function(){function e(t){this.db=t}return e.openOrCreate=function(t,n,r){return y(e.isAvailable(),"IndexedDB not supported in current environment."),p("SimpleDb","Opening database:",t),new hn(function(i,o){var a=window.indexedDB.open(t,n);a.onsuccess=function(t){var n=t.target.result;i(new e(n))},a.onerror=function(t){o(t.target.error)},a.onupgradeneeded=function(e){p("SimpleDb",'Database "'+t+'" requires upgrade from version:',e.oldVersion);var n=e.target.result,i=new Xn(a.transaction);r(n,i,e.oldVersion,2).next(function(){p("SimpleDb","Database upgrade to version 2 complete")})}}).toPromise()},e.delete=function(t){return p("SimpleDb","Removing database:",t),Jn(window.indexedDB.deleteDatabase(t)).toPromise()},e.isAvailable=function(){if("undefined"==typeof window||null==window.indexedDB)return!1;if(void 0===window.navigator)return"YES"===t.env.USE_MOCK_PERSISTENCE;var e=window.navigator.userAgent;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0)},e.getStore=function(t,e){return t instanceof Xn?t.store(e):m("Invalid transaction object provided!")},e.prototype.runTransaction=function(t,e,n){var r=Xn.open(this.db,t,e),i=n(r).catch(function(t){r.abort(t)}).toPromise();return r.completionPromise.then(function(){return i})},e.prototype.close=function(){this.db.close()},e}(),Yn=function(){function t(t){this.dbCursor=t,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(t.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.dbCursor=t},enumerable:!0,configurable:!0}),t.prototype.done=function(){this.shouldStop=!0},t.prototype.skip=function(t){this.nextKey=t},t.prototype.delete=function(){return Jn(this.dbCursor.delete())},t}(),Xn=function(){function t(t){var e=this;this.transaction=t,this.aborted=!1,this.completionDeferred=new Gn,this.transaction.oncomplete=function(){e.completionDeferred.resolve()},this.transaction.onabort=function(){t.error?e.completionDeferred.reject(t.error):e.completionDeferred.resolve()},this.transaction.onerror=function(t){e.completionDeferred.reject(t.target.error)}}return t.open=function(e,n,r){return new t(e.transaction(r,n))},Object.defineProperty(t.prototype,"completionPromise",{get:function(){return this.completionDeferred.promise},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){t&&this.completionDeferred.reject(t),this.aborted||(p("SimpleDb","Aborting transaction: %s",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return y(!!e,"Object store not part of transaction: "+t),new $n(e)},t}(),$n=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(p("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(p("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),Jn(n)},t.prototype.get=function(t){var e=this;return Jn(this.store.get(t)).next(function(n){return void 0===n&&(n=null),p("SimpleDb","GET",e.store.name,t,n),n})},t.prototype.delete=function(t){return p("SimpleDb","DELETE",this.store.name,t),Jn(this.store.delete(t))},t.prototype.count=function(){return p("SimpleDb","COUNT",this.store.name),Jn(this.store.count())},t.prototype.loadAll=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.iterateCursor(n,function(t,e){r.push(e)}).next(function(){return r})},t.prototype.deleteAll=function(t,e){p("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(t,e,n){return n.delete()})},t.prototype.iterate=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.iterateCursor(r,e)},t.prototype.iterateCursor=function(t,e){var n=[];return new hn(function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new Yn(i),a=e(i.primaryKey,i.value,o);a instanceof hn&&n.push(a),o.isDone?r():null===o.skipToKey?i.continue():i.continue(o.skipToKey)}else r()}}).next(function(){return hn.waitFor(n)})},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:(y(void 0===e,"3rd argument must not be defined if 2nd is a range."),e=t)),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.keysOnly?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function Jn(t){return new hn(function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){n(t.target.error)}})}var Zn=function(){function t(t,e){this.userId=t,this.serializer=e,this.garbageCollector=null}return t.forUser=function(e,n){return y(""!==e.uid,"UserID must not be an empty string."),new t(e.isAuthenticated()?e.uid:"",n)},t.prototype.start=function(e){var n=this;return t.loadNextBatchIdFromDb(e).next(function(t){return n.nextBatchId=t,rr(e).get(n.userId)}).next(function(t){return t||(t=new Un(n.userId,Cn,"")),n.metadata=t,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(e).next(function(t){return y(t,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Cn,rr(e).put(n.metadata)}):hn.resolve()})},t.loadNextBatchIdFromDb=function(t){var e=Cn;return er(t).iterate({reverse:!0},function(t,n,r){var i,o,a=t[0];if(t[1]>e&&(e=n.batchId),""===a)r.done();else{var s=(o=(i=a).length-1,0===i.length?"":"\0"===i.charAt(o)?i.substring(0,o):i.substring(0,o)+String.fromCharCode(i.charCodeAt(o)-1));r.skip([s])}}).next(function(){return e+1})},t.prototype.checkEmpty=function(t){var e=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).iterate({range:n},function(t,n,r){e=!1,r.done()}).next(function(){return e})},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.metadata.lastAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;return y(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=tr(n),rr(t).put(this.metadata)},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.metadata.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.metadata.lastStreamToken=tr(e),rr(t).put(this.metadata)},t.prototype.addMutationBatch=function(t,e,n){var r=this,i=this.nextBatchId;this.nextBatchId++;var o=new xn(i,e,n),a=this.serializer.toDbMutationBatch(this.userId,o);return er(t).put(a).next(function(){for(var e=[],o=0,a=n;o<a.length;o++){var s=a[o],u=Bn.key(r.userId,s.key.path,i);e.push(nr(t).put(u,Bn.PLACEHOLDER))}return hn.waitFor(e)}).next(function(){return o})},t.prototype.lookupMutationBatch=function(t,e){var n=this;return er(t).get(this.keyForBatchId(e)).next(function(t){return t?n.serializer.fromDbMutationBatch(t):null})},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){var n=this,r=Math.max(e,this.metadata.lastAcknowledgedBatchId)+1,i=IDBKeyRange.lowerBound(this.keyForBatchId(r)),o=null;return er(t).iterate({range:i},function(t,e,i){e.userId===n.userId&&(y(e.batchId>=r,"Should have found mutation after "+r),o=n.serializer.fromDbMutationBatch(e)),i.done()}).next(function(){return o})},t.prototype.getAllMutationBatches=function(t){var e=this,n=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).loadAll(n).next(function(t){return t.map(function(t){return e.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(e));return er(t).loadAll(r).next(function(t){return t.map(function(t){return n.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return nr(t).iterate({range:i},function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Dn(u);if(s===n.userId&&e.path.isEqual(l)){var f=n.keyForBatchId(c);return er(t).get(f).next(function(t){null===t&&m("Dangling document-mutation reference found: "+r+" which points to "+f),o.push(n.serializer.fromDbMutationBatch(t))})}a.done()}).next(function(){return o})},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this;y(!e.isDocumentQuery(),"Document queries shouldn't go down this path");var r=e.path,i=r.length+1,o=Bn.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new le(K);return nr(t).iterate({range:a},function(t,e,o){var a=t[0],u=t[1],c=t[2],l=Dn(u);a===n.userId&&r.isPrefixOf(l)?l.length===i&&(s=s.add(c)):o.done()}).next(function(){var e=[],r=[];return s.forEach(function(i){var o=n.keyForBatchId(i);r.push(er(t).get(o).next(function(t){null===t&&m("Dangling document-mutation reference found, which points to "+o),e.push(n.serializer.fromDbMutationBatch(t))}))}),hn.waitFor(r).next(function(){return e})})},t.prototype.removeMutationBatches=function(t,e){for(var n=er(t),r=nr(t),i=[],o=function(t){var e=IDBKeyRange.only(a.keyForBatchId(t.batchId)),o=0,s=n.iterate({range:e},function(t,e,n){return o++,n.delete()});i.push(s.next(function(){y(1===o,"Dangling document-mutation reference found: Missing batch "+t.batchId)}));for(var u=0,c=t.mutations;u<c.length;u++){var l=c[u],f=Bn.key(a.userId,l.key.path,t.batchId);i.push(r.delete(f)),null!==a.garbageCollector&&a.garbageCollector.addPotentialGarbageKey(l.key)}},a=this,s=0,u=e;s<u.length;s++){o(u[s])}return hn.waitFor(i)},t.prototype.performConsistencyCheck=function(t){var e=this;return this.checkEmpty(t).next(function(n){if(!n)return hn.resolve();var r=IDBKeyRange.lowerBound(Bn.prefixForUser(e.userId)),i=[];return nr(t).iterate({range:r},function(t,n,r){if(t[0]===e.userId){var o=Dn(t[1]);i.push(o)}else r.done()}).next(function(){y(0===i.length,"Document leak -- detected dangling mutation references when queue is empty. Dangling keys: "+i.map(function(t){return t.canonicalString()}))})})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return nr(t).iterate({range:o,keysOnly:!0},function(t,e,r){var o=t[0],s=t[1];t[2];o===n.userId&&s===i&&(a=!0),r.done()}).next(function(){return a})},t.prototype.keyForBatchId=function(t){return[this.userId,t]},t}();function tr(e){return e instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function er(t){return Qn.getStore(t,jn.store)}function nr(t){return Qn.getStore(t,Bn.store)}function rr(t){return Qn.getStore(t,Un.store)}var ir=function(){function t(t){this.serializer=t,this.lastRemoteSnapshotVersion=Qt.MIN,this.metadata=null,this.garbageCollector=null}return t.prototype.start=function(t){var e=this;return ar(t).get(zn.key).next(function(t){y(null!==t,"Missing metadata row that should be added by schema migration."),e.metadata=t;var n=t.lastRemoteSnapshotVersion;return e.lastRemoteSnapshotVersion=Qt.fromTimestamp(new et(n.seconds,n.nanoseconds)),hn.resolve()})},t.prototype.getHighestTargetId=function(){return this.metadata.highestTargetId},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,this.metadata.lastRemoteSnapshotVersion=e.toTimestamp(),ar(t).put(zn.key,this.metadata)},t.prototype.addQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.metadata.targetCount+=1,n.updateMetadataFromQueryData(e),n.saveMetadata(t)})},t.prototype.updateQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.updateMetadataFromQueryData(e)?n.saveMetadata(t):hn.resolve()})},t.prototype.removeQueryData=function(t,e){var n=this;return y(this.metadata.targetCount>0,"Removing from an empty query cache"),this.removeMatchingKeysForTargetId(t,e.targetId).next(function(){return or(t).delete(e.targetId)}).next(function(){return n.metadata.targetCount-=1,n.saveMetadata(t)})},t.prototype.saveMetadata=function(t){return ar(t).put(zn.key,this.metadata)},t.prototype.saveQueryData=function(t,e){return or(t).put(this.serializer.toDbTarget(e))},t.prototype.updateMetadataFromQueryData=function(t){var e=!1;return t.targetId>this.metadata.highestTargetId&&(this.metadata.highestTargetId=t.targetId,e=!0),e},Object.defineProperty(t.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this,r=e.canonicalId(),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),o=null;return or(t).iterate({range:i,index:Wn.queryTargetsIndexName},function(t,r,i){var a=n.serializer.fromDbTarget(r);e.isEqual(a.query)&&(o=a,i.done())}).next(function(){return o})},t.prototype.addMatchingKeys=function(t,e,n){var r=[],i=sr(t);return e.forEach(function(t){var e=On(t.path);r.push(i.put(new Hn(n,e)))}),hn.waitFor(r)},t.prototype.removeMatchingKeys=function(t,e,n){var r=this,i=[],o=sr(t);return e.forEach(function(t){var e=On(t.path);i.push(o.delete([n,e])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(t)}),hn.waitFor(i)},t.prototype.removeMatchingKeysForTargetId=function(t,e){var n=sr(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return this.notifyGCForRemovedKeys(t,r).next(function(){return n.delete(r)})},t.prototype.notifyGCForRemovedKeys=function(t,e){var n=this,r=sr(t);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:e,keysOnly:!0},function(t,e,r){var i=Dn(t[1]),o=new ct(i);y(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=sr(t),i=ge();return r.iterate({range:n,keysOnly:!0},function(t,e,n){var r=Dn(t[1]),o=new ct(r);i=i.add(o)}).next(function(){return i})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){y(null!==t,"Persistence Transaction cannot be null for query cache containsKey");var n,r=On(e.path),i=IDBKeyRange.bound([r],[(n=r,n+"\0")],!1,!0),o=0;return sr(t).iterate({index:Hn.documentTargetsIndex,keysOnly:!0,range:i},function(t,e,n){o++,n.done()}).next(function(){return o>0})},t}();function or(t){return Qn.getStore(t,Wn.store)}function ar(t){return Qn.getStore(t,zn.store)}function sr(t){return Qn.getStore(t,Hn.store)}var ur=function(){function t(t){this.serializer=t}return t.prototype.addEntry=function(t,e){return cr(t).put(lr(e.key),this.serializer.toDbRemoteDocument(e))},t.prototype.removeEntry=function(t,e){return cr(t).delete(lr(e))},t.prototype.getEntry=function(t,e){var n=this;return cr(t).get(lr(e)).next(function(t){return t?n.serializer.fromDbRemoteDocument(t):null})},t.prototype.getDocumentsMatchingQuery=function(t,e){var n=this,r=de(),i=e.path.toArray(),o=IDBKeyRange.lowerBound(i);return cr(t).iterate({range:o},function(t,i,o){var a=n.serializer.fromDbRemoteDocument(i);e.path.isPrefixOf(a.key.path)?a instanceof lt&&e.matches(a)&&(r=r.insert(a.key,a)):o.done()}).next(function(){return r})},t}();function cr(t){return Qn.getStore(t,Vn.store)}function lr(t){return t.path.toArray()}var fr=function(){function e(t){this.remoteSerializer=t}return e.prototype.fromDbRemoteDocument=function(t){if(t.document)return this.remoteSerializer.fromDocument(t.document);if(t.noDocument){var e=ct.fromSegments(t.noDocument.path),n=t.noDocument.readTime,r=new et(n.seconds,n.nanoseconds);return new ft(e,Qt.fromTimestamp(r))}return m("Unexpected DbRemoteDocument")},e.prototype.toDbRemoteDocument=function(t){if(t instanceof lt){var e=this.remoteSerializer.toDocument(t);return new Vn(null,e)}var n=t.key.path.toArray(),r=t.version.toTimestamp(),i=new Ln(r.seconds,r.nanoseconds);return new Vn(new qn(n,i),null)},e.prototype.toDbMutationBatch=function(t,e){var n=this,r=e.mutations.map(function(t){return n.remoteSerializer.toMutation(t)});return new jn(t,e.batchId,e.localWriteTime.toMillis(),r)},e.prototype.fromDbMutationBatch=function(t){var e=this,n=t.mutations.map(function(t){return e.remoteSerializer.fromMutation(t)}),r=et.fromMillis(t.localWriteTimeMs);return new xn(t.batchId,r,n)},e.prototype.fromDbTarget=function(t){var e,n=new et(t.readTime.seconds,t.readTime.nanoseconds),r=Qt.fromTimestamp(n);return e=void 0!==t.query.documents?this.remoteSerializer.fromDocumentsTarget(t.query):this.remoteSerializer.fromQueryTarget(t.query),new Xt(e,t.targetId,Vt.Listen,r,t.resumeToken)},e.prototype.toDbTarget=function(e){y(Vt.Listen===e.purpose,"Only queries with purpose "+Vt.Listen+" may be stored, got "+e.purpose);var n,r,i=e.snapshotVersion.toTimestamp(),o=new Ln(i.seconds,i.nanoseconds);return n=e.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(e.query):this.remoteSerializer.toQueryTarget(e.query),e.resumeToken instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),r=e.resumeToken.toString()):r=e.resumeToken,new Wn(e.targetId,e.query.canonicalId(),o,r,0,n)},e}();var hr,pr="IndexedDbPersistence",dr="There is another tab open with offline persistence enabled. Only one such tab is allowed at a time. The other tab must be closed or persistence must be disabled.",vr=function(){function t(e,n){this.ownerId=this.generateOwnerId(),this.dbName=e+t.MAIN_DATABASE,this.serializer=new fr(n),this.localStoragePrefix=e}return t.prototype.start=function(){var e=this;return t.isAvailable()?(y(!this.started,"IndexedDbPersistence double-started!"),this.started=!0,Qn.openOrCreate(this.dbName,2,Mn).then(function(t){e.simpleDb=t}).then(function(){return e.tryAcquireOwnerLease()}).then(function(){e.scheduleOwnerLeaseRefreshes(),e.attachWindowUnloadHook()})):(this.persistenceError=new w(_.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled."),Promise.reject(this.persistenceError))},t.prototype.shutdown=function(t){var e=this;return y(this.started,"IndexedDbPersistence shutdown without start!"),this.started=!1,this.detachWindowUnloadHook(),this.stopOwnerLeaseRefreshes(),this.releaseOwnerLease().then(function(){if(e.simpleDb.close(),t)return Qn.delete(e.dbName)})},t.prototype.getMutationQueue=function(t){return Zn.forUser(t,this.serializer)},t.prototype.getQueryCache=function(){return new ir(this.serializer)},t.prototype.getRemoteDocumentCache=function(){return new ur(this.serializer)},t.prototype.runTransaction=function(t,e){var n=this;return this.persistenceError?Promise.reject(this.persistenceError):(p(pr,"Starting transaction:",t),this.simpleDb.runTransaction("readwrite",Kn,function(t){return n.ensureOwnerLease(t).next(function(){return e(t)})}))},t.isAvailable=function(){return Qn.isAvailable()},t.buildStoragePrefix=function(t){var e=t.databaseId.projectId;return t.databaseId.isDefaultDatabase||(e+="."+t.databaseId.database),"firestore/"+t.persistenceKey+"/"+e+"/"},t.prototype.tryAcquireOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){if(t.validOwner(e))return p(pr,"Valid owner already. Failing. Current owner:",e),t.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(t.persistenceError);var r=new Fn(t.ownerId,Date.now());return p(pr,"No valid owner. Acquiring owner lease. Current owner:",e,"New owner:",r),n.put("owner",r)})})},t.prototype.releaseOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){return null!==e&&e.ownerId===t.ownerId?(p(pr,"Releasing owner lease."),n.delete("owner")):hn.resolve()})})},t.prototype.ensureOwnerLease=function(t){var e=this;return t.store(Fn.store).get("owner").next(function(t){return null===t||t.ownerId!==e.ownerId?(e.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(e.persistenceError)):hn.resolve()})},t.prototype.validOwner=function(t){var e=Date.now(),n=e-5e3,r=e;return null!==t&&(!(t.leaseTimestampMs<n)&&(t.leaseTimestampMs>r?(d("Persistence owner-lease is in the future. Discarding.",t),!1):t.ownerId!==this.getZombiedOwnerId()))},t.prototype.scheduleOwnerLeaseRefreshes=function(){var t=this;this.ownerLeaseRefreshHandle=setInterval(function(){t.runTransaction("Refresh owner timestamp",function(e){return e.store(Fn.store).put("owner",new Fn(t.ownerId,Date.now()))}).catch(function(e){d(e),t.stopOwnerLeaseRefreshes()})},4e3)},t.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},t.prototype.attachWindowUnloadHook=function(){var t=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){t.setZombiedOwnerId(t.ownerId),t.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},t.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(y("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},t.prototype.getZombiedOwnerId=function(){try{var t=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return p(pr,"Zombied ownerID from LocalStorage:",t),t}catch(t){return d("Failed to get zombie owner id.",t),null}},t.prototype.setZombiedOwnerId=function(t){try{null===t?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),t)}catch(t){d("Failed to set zombie owner id.",t)}},t.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},t.prototype.generateOwnerId=function(){return z.newId()},t.MAIN_DATABASE="main",t}(),mr=function(){function t(t,e){this.remoteDocumentCache=t,this.mutationQueue=e}return t.prototype.getDocument=function(t,e){var n=this;return this.remoteDocumentCache.getEntry(t,e).next(function(r){return n.computeLocalDocument(t,e,r)})},t.prototype.getDocuments=function(t,e){var n=this,r=[],i=he();return e.forEach(function(e){r.push(n.getDocument(t,e).next(function(t){t||(t=new ft(e,Qt.forDeletedDoc())),i=i.insert(e,t)}))}),hn.waitFor(r).next(function(){return i})},t.prototype.getDocumentsMatchingQuery=function(t,e){return ct.isDocumentKey(e.path)?this.getDocumentsMatchingDocumentQuery(t,e.path):this.getDocumentsMatchingCollectionQuery(t,e)},t.prototype.getDocumentsMatchingDocumentQuery=function(t,e){return this.getDocument(t,new ct(e)).next(function(t){var e=de();return t instanceof lt&&(e=e.insert(t.key,t)),e})},t.prototype.getDocumentsMatchingCollectionQuery=function(t,e){var n,r=this;return this.remoteDocumentCache.getDocumentsMatchingQuery(t,e).next(function(e){return r.computeLocalDocuments(t,e)}).next(function(i){return n=i,r.mutationQueue.getAllMutationBatchesAffectingQuery(t,e)}).next(function(e){for(var i=ge(),o=0,a=e;o<a.length;o++)for(var s=0,u=a[o].mutations;s<u.length;s++){var c=u[s];n.get(c.key)||(i=i.add(c.key))}var l=[];return i.forEach(function(e){l.push(r.getDocument(t,e).next(function(t){t instanceof lt&&(n=n.insert(t.key,t))}))}),hn.waitFor(l)}).next(function(){return n.forEach(function(t,r){e.matches(r)||(n=n.remove(t))}),n})},t.prototype.computeLocalDocument=function(t,e,n){return this.mutationQueue.getAllMutationBatchesAffectingDocumentKey(t,e).next(function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];n=o.applyToLocalView(e,n)}return n})},t.prototype.computeLocalDocuments=function(t,e){var n=this,r=[];return e.forEach(function(i,o){r.push(n.computeLocalDocument(t,i,o).next(function(t){t instanceof lt?e=e.insert(t.key,t):t instanceof ft?e=e.remove(t.key):m("Unknown MaybeDocument: "+t)}))}),hn.waitFor(r).next(function(){return e})},t}(),yr=function(){function t(t){this.remoteDocumentCache=t,this.changes=he()}return t.prototype.addEntry=function(t){var e=this.assertChanges();this.changes=e.insert(t.key,t)},t.prototype.getEntry=function(t,e){var n=this.assertChanges().get(e);return n?hn.resolve(n):this.remoteDocumentCache.getEntry(t,e)},t.prototype.apply=function(t){var e=this,n=[];return this.assertChanges().forEach(function(r,i){n.push(e.remoteDocumentCache.addEntry(t,i))}),this.changes=null,hn.waitFor(n)},t.prototype.assertChanges=function(){return y(null!==this.changes,"Changes have already been applied."),this.changes},t}(),gr=function(){function t(t,e,n){this.persistence=t,this.garbageCollector=n,this.localViewReferences=new vn,this.targetIds={},this.targetIdGenerator=gn.forLocalStore(),this.heldBatchResults=[],this.mutationQueue=t.getMutationQueue(e),this.remoteDocuments=t.getRemoteDocumentCache(),this.queryCache=t.getQueryCache(),this.localDocuments=new mr(this.remoteDocuments,this.mutationQueue),this.garbageCollector.addGarbageSource(this.localViewReferences),this.garbageCollector.addGarbageSource(this.queryCache),this.garbageCollector.addGarbageSource(this.mutationQueue)}return t.prototype.start=function(){var t=this;return this.persistence.runTransaction("Start LocalStore",function(e){return t.startMutationQueue(e).next(function(){return t.startQueryCache(e)})})},t.prototype.handleUserChange=function(t){var e=this;return this.persistence.runTransaction("Handle user change",function(n){var r;return e.mutationQueue.getAllMutationBatches(n).next(function(i){return r=i,e.garbageCollector.removeGarbageSource(e.mutationQueue),e.mutationQueue=e.persistence.getMutationQueue(t),e.garbageCollector.addGarbageSource(e.mutationQueue),e.startMutationQueue(n)}).next(function(){return e.localDocuments=new mr(e.remoteDocuments,e.mutationQueue),e.mutationQueue.getAllMutationBatches(n)}).next(function(t){for(var i=ge(),o=0,a=[r,t];o<a.length;o++)for(var s=0,u=a[o];s<u.length;s++)for(var c=0,l=u[s].mutations;c<l.length;c++){var f=l[c];i=i.add(f.key)}return e.localDocuments.getDocuments(n,i)})})},t.prototype.startQueryCache=function(t){var e=this;return this.queryCache.start(t).next(function(){var t=e.queryCache.getHighestTargetId();e.targetIdGenerator=gn.forLocalStore(t)})},t.prototype.startMutationQueue=function(t){var e=this;return this.mutationQueue.start(t).next(function(){return e.heldBatchResults=[],e.mutationQueue.getHighestAcknowledgedBatchId(t)}).next(function(n){return n!==Cn?e.mutationQueue.getAllMutationBatchesThroughBatchId(t,n):hn.resolve([])}).next(function(n){return n.length>0?e.mutationQueue.removeMutationBatches(t,n):hn.resolve()})},t.prototype.localWrite=function(t){var e=this;return this.persistence.runTransaction("Locally write mutations",function(n){var r,i=et.now();return e.mutationQueue.addMutationBatch(n,i,t).next(function(t){var i=(r=t).keys();return e.localDocuments.getDocuments(n,i)}).next(function(t){return{batchId:r.batchId,changes:t}})})},t.prototype.acknowledgeBatch=function(t){var e=this;return this.persistence.runTransaction("Acknowledge batch",function(n){var r;return e.mutationQueue.acknowledgeBatch(n,t.batch,t.streamToken).next(function(){if(e.shouldHoldBatchResult(t.commitVersion))return e.heldBatchResults.push(t),r=ge(),hn.resolve();var i=new yr(e.remoteDocuments);return e.releaseBatchResults(n,[t],i).next(function(t){return r=t,i.apply(n)})}).next(function(){return e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,r)})})},t.prototype.rejectBatch=function(t){var e=this;return this.persistence.runTransaction("Reject batch",function(n){var r,i;return e.mutationQueue.lookupMutationBatch(n,t).next(function(i){return y(null!=i,"Attempt to reject nonexistent batch!"),r=i,e.mutationQueue.getHighestAcknowledgedBatchId(n).next(function(e){return y(t>e,"Acknowledged batches can't be rejected."),r})}).next(function(){return e.removeMutationBatch(n,r)}).next(function(t){return i=t,e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,i)})})},t.prototype.getLastStreamToken=function(){var t=this;return this.persistence.runTransaction("Get last stream token",function(e){return t.mutationQueue.getLastStreamToken(e)})},t.prototype.setLastStreamToken=function(t){var e=this;return this.persistence.runTransaction("Set last stream token",function(n){return e.mutationQueue.setLastStreamToken(n,t)})},t.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},t.prototype.applyRemoteEvent=function(t){var e=this,n=new yr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var i=[];x(t.targetChanges,function(n,o){var a=e.targetIds[n];if(a){i.push(e.queryCache.removeMatchingKeys(r,o.removedDocuments,n).next(function(){return e.queryCache.addMatchingKeys(r,o.addedDocuments,n)}));var s=o.resumeToken;s.length>0&&(a=a.update({resumeToken:s,snapshotVersion:t.snapshotVersion}),e.targetIds[n]=a,i.push(e.queryCache.updateQueryData(r,a)))}});var o=ge();t.documentUpdates.forEach(function(t,a){o=o.add(t),i.push(n.getEntry(r,t).next(function(r){null==r||a.version.isEqual(Qt.MIN)||a.version.compareTo(r.version)>=0?n.addEntry(a):p("LocalStore","Ignoring outdated watch update for ",t,". Current version:",r.version," Watch version:",a.version),e.garbageCollector.addPotentialGarbageKey(t)}))});var a,s=e.queryCache.getLastRemoteSnapshotVersion(),u=t.snapshotVersion;return u.isEqual(Qt.MIN)||(y(u.compareTo(s)>=0,"Watch stream reverted to previous snapshot?? "+u+" < "+s),i.push(e.queryCache.setLastRemoteSnapshotVersion(r,u))),hn.waitFor(i).next(function(){return e.releaseHeldBatchResults(r,n)}).next(function(t){return a=t,n.apply(r)}).next(function(){return e.localDocuments.getDocuments(r,o.unionWith(a))})})},t.prototype.notifyLocalViewChanges=function(t){var e=this;return this.persistence.runTransaction("Notify local view changes",function(n){for(var r=[],i=function(t){r.push(e.queryCache.getQueryData(n,t.query).next(function(n){y(null!==n,"Local view changes contain unallocated query.");var r=n.targetId;e.localViewReferences.addReferences(t.addedKeys,r),e.localViewReferences.removeReferences(t.removedKeys,r)}))},o=0,a=t;o<a.length;o++){i(a[o])}return hn.waitFor(r)})},t.prototype.nextMutationBatch=function(t){var e=this;return this.persistence.runTransaction("Get next mutation batch",function(n){return void 0===t&&(t=Cn),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)})},t.prototype.readDocument=function(t){var e=this;return this.persistence.runTransaction("read document",function(n){return e.localDocuments.getDocument(n,t)})},t.prototype.allocateQuery=function(t){var e=this;return this.persistence.runTransaction("Allocate query",function(n){var r;return e.queryCache.getQueryData(n,t).next(function(i){if(i)return r=i,hn.resolve();var o=e.targetIdGenerator.next();return r=new Xt(t,o,Vt.Listen),e.queryCache.addQueryData(n,r)}).next(function(){return y(!e.targetIds[r.targetId],"Tried to allocate an already allocated query: "+t),e.targetIds[r.targetId]=r,r})})},t.prototype.releaseQuery=function(t){var e=this;return this.persistence.runTransaction("Release query",function(n){return e.queryCache.getQueryData(n,t).next(function(r){return y(null!=r,"Tried to release nonexistent query: "+t),e.localViewReferences.removeReferencesForId(r.targetId),delete e.targetIds[r.targetId],e.garbageCollector.isEager?e.queryCache.removeQueryData(n,r):hn.resolve()}).next(function(){if(k(e.targetIds)){var t=new yr(e.remoteDocuments);return e.releaseHeldBatchResults(n,t).next(function(){t.apply(n)})}return hn.resolve()})})},t.prototype.executeQuery=function(t){var e=this;return this.persistence.runTransaction("Execute query",function(n){return e.localDocuments.getDocumentsMatchingQuery(n,t)})},t.prototype.remoteDocumentKeys=function(t){var e=this;return this.persistence.runTransaction("Remote document keys",function(n){return e.queryCache.getMatchingKeysForTargetId(n,t)})},t.prototype.collectGarbage=function(){var t=this;return this.persistence.runTransaction("Garbage collection",function(e){return t.garbageCollector.collectGarbage(e).next(function(n){var r=[];return n.forEach(function(n){r.push(t.remoteDocuments.removeEntry(e,n))}),hn.waitFor(r)})})},t.prototype.releaseHeldBatchResults=function(t,e){for(var n=[],r=0,i=this.heldBatchResults;r<i.length;r++){var o=i[r];if(!this.isRemoteUpToVersion(o.commitVersion))break;n.push(o)}return 0===n.length?hn.resolve(ge()):(this.heldBatchResults.splice(0,n.length),this.releaseBatchResults(t,n,e))},t.prototype.isRemoteUpToVersion=function(t){var e=this.queryCache.getLastRemoteSnapshotVersion();return t.compareTo(e)<=0||k(this.targetIds)},t.prototype.shouldHoldBatchResult=function(t){return!this.isRemoteUpToVersion(t)||this.heldBatchResults.length>0},t.prototype.releaseBatchResults=function(t,e,n){for(var r=this,i=hn.resolve(),o=function(e){i=i.next(function(){return r.applyWriteToRemoteDocuments(t,e,n)})},a=0,s=e;a<s.length;a++){o(s[a])}return i.next(function(){return r.removeMutationBatches(t,e.map(function(t){return t.batch}))})},t.prototype.removeMutationBatch=function(t,e){return this.removeMutationBatches(t,[e])},t.prototype.removeMutationBatches=function(t,e){for(var n=ge(),r=0,i=e;r<i.length;r++)for(var o=0,a=i[r].mutations;o<a.length;o++){var s=a[o].key;n=n.add(s)}return this.mutationQueue.removeMutationBatches(t,e).next(function(){return n})},t.prototype.applyWriteToRemoteDocuments=function(t,e,n){var r=e.batch,i=r.keys(),o=hn.resolve();return i.forEach(function(i){o=o.next(function(){return n.getEntry(t,i)}).next(function(t){var o=t,a=e.docVersions.get(i);y(null!==a,"ackVersions should contain every doc in the write."),(!o||o.version.compareTo(a)<0)&&((o=r.applyToRemoteDocument(i,o,e))?n.addEntry(o):y(!t,"Mutation batch "+r+" applied to document "+t+" resulted in null"))})}),o},t}(),br=function(){function t(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn,this.lastStreamToken=b(),this.garbageCollector=null,this.batchesByDocumentKey=new le(mn.compareByKey)}return t.prototype.start=function(t){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn),y(this.highestAcknowledgedBatchId<this.nextBatchId,"highestAcknowledgedBatchId must be less than the nextBatchId"),hn.resolve()},t.prototype.checkEmpty=function(t){return hn.resolve(0===this.mutationQueue.length)},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.highestAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;y(r>this.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var i=this.indexOfExistingBatchId(r,"acknowledged"),o=this.mutationQueue[i];return y(r===o.batchId,"Queue ordering failure: expected batch "+r+", got batch "+o.batchId),y(!o.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,hn.resolve()},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.lastStreamToken=e,hn.resolve()},t.prototype.addMutationBatch=function(t,e,n){y(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;(this.nextBatchId++,this.mutationQueue.length>0)&&y(this.mutationQueue[this.mutationQueue.length-1].batchId<r,"Mutation batchIDs must be monotonically increasing order");var i=new xn(r,e,n);this.mutationQueue.push(i);for(var o=0,a=n;o<a.length;o++){var s=a[o];this.batchesByDocumentKey=this.batchesByDocumentKey.add(new mn(s.key,r))}return hn.resolve(i)},t.prototype.lookupMutationBatch=function(t,e){return hn.resolve(this.findMutationBatch(e))},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){for(var n=this.mutationQueue.length,r=Math.max(e,this.highestAcknowledgedBatchId)+1,i=this.indexOfBatchId(r),o=i<0?0:i;o<n;o++){var a=this.mutationQueue[o];if(!a.isTombstone())return hn.resolve(a)}return hn.resolve(null)},t.prototype.getAllMutationBatches=function(t){return hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length))},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this.mutationQueue.length,r=this.indexOfBatchId(e);return r<0?r=0:r>=n?r=n:r++,hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=new mn(e,0),i=new mn(e,Number.POSITIVE_INFINITY),o=[];return this.batchesByDocumentKey.forEachInRange([r,i],function(t){y(e.isEqual(t.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(t.targetOrBatchId);y(null!==r,"Batches in the index must exist in the main table"),o.push(r)}),hn.resolve(o)},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this,r=e.path,i=r.length+1,o=r;ct.isDocumentKey(o)||(o=o.child(""));var a=new mn(new ct(o),0),s=new le(K);this.batchesByDocumentKey.forEachWhile(function(t){var e=t.key.path;return!!r.isPrefixOf(e)&&(e.length===i&&(s=s.add(t.targetOrBatchId)),!0)},a);var u=[];return s.forEach(function(t){var e=n.findMutationBatch(t);null!==e&&u.push(e)}),hn.resolve(u)},t.prototype.removeMutationBatches=function(t,e){var n=e.length;y(n>0,"Should not remove mutations when none exist.");var r=e[0].batchId,i=this.mutationQueue.length,o=this.indexOfExistingBatchId(r,"removed");y(this.mutationQueue[o].batchId===r,"Removed batches must exist in the queue");for(var a=1,s=o+1;a<n&&s<i;){(p=this.mutationQueue[s]).isTombstone()?s++:(y(p.batchId===e[a].batchId,"Removed batches must be contiguous in the queue"),a++,s++)}if(0===o){for(;s<i;s++){if(!(p=this.mutationQueue[s]).isTombstone())break}var u=s-o;this.mutationQueue.splice(o,u)}else for(var c=o;c<s;c++)this.mutationQueue[c]=this.mutationQueue[c].toTombstone();for(var l=this.batchesByDocumentKey,f=0,h=e;f<h.length;f++)for(var p,d=(p=h[f]).batchId,v=0,m=p.mutations;v<m.length;v++){var g=m[v].key;null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(g);var b=new mn(g,d);l=l.delete(b)}return this.batchesByDocumentKey=l,hn.resolve()},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.batchesByDocumentKey.firstAfterOrEqual(n);return hn.resolve(e.isEqual(r&&r.key))},t.prototype.performConsistencyCheck=function(t){return 0===this.mutationQueue.length&&y(this.batchesByDocumentKey.isEmpty(),"Document leak -- detected dangling mutation references when queue is empty."),hn.resolve()},t.prototype.getAllLiveMutationBatchesBeforeIndex=function(t){for(var e=[],n=0;n<t;n++){var r=this.mutationQueue[n];r.isTombstone()||e.push(r)}return e},t.prototype.indexOfExistingBatchId=function(t,e){var n=this.indexOfBatchId(t);return y(n>=0&&n<this.mutationQueue.length,"Batches must exist to be "+e),n},t.prototype.indexOfBatchId=function(t){return 0===this.mutationQueue.length?0:t-this.mutationQueue[0].batchId},t.prototype.findMutationBatch=function(t){var e=this.indexOfBatchId(t);if(e<0||e>=this.mutationQueue.length)return null;var n=this.mutationQueue[e];return y(n.batchId===t,"If found batch must match"),n.isTombstone()?null:n},t}(),_r=function(){function t(){this.queries=new un(function(t){return t.canonicalId()}),this.lastRemoteSnapshotVersion=Qt.MIN,this.highestTargetId=0,this.references=new vn,this.targetCount=0}return t.prototype.start=function(t){return hn.resolve()},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.getHighestTargetId=function(){return this.highestTargetId},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,hn.resolve()},t.prototype.saveQueryData=function(t){this.queries.set(t.query,t);var e=t.targetId;e>this.highestTargetId&&(this.highestTargetId=e)},t.prototype.addQueryData=function(t,e){return y(!this.queries.has(e.query),"Adding a query that already exists"),this.saveQueryData(e),this.targetCount+=1,hn.resolve()},t.prototype.updateQueryData=function(t,e){return y(this.queries.has(e.query),"Updating a non-existent query"),this.saveQueryData(e),hn.resolve()},t.prototype.removeQueryData=function(t,e){return y(this.targetCount>0,"Removing a target from an empty cache"),y(this.queries.has(e.query),"Removing a non-existent target from the cache"),this.queries.delete(e.query),this.references.removeReferencesForId(e.targetId),this.targetCount-=1,hn.resolve()},Object.defineProperty(t.prototype,"count",{get:function(){return this.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this.queries.get(e)||null;return hn.resolve(n)},t.prototype.addMatchingKeys=function(t,e,n){return this.references.addReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeys=function(t,e,n){return this.references.removeReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeysForTargetId=function(t,e){return this.references.removeReferencesForId(e),hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=this.references.referencesForId(e);return hn.resolve(n)},t.prototype.setGarbageCollector=function(t){this.references.setGarbageCollector(t)},t.prototype.containsKey=function(t,e){return this.references.containsKey(t,e)},t}(),wr=function(){function t(){this.docs=he()}return t.prototype.addEntry=function(t,e){return this.docs=this.docs.insert(e.key,e),hn.resolve()},t.prototype.removeEntry=function(t,e){return this.docs=this.docs.remove(e),hn.resolve()},t.prototype.getEntry=function(t,e){return hn.resolve(this.docs.get(e))},t.prototype.getDocumentsMatchingQuery=function(t,e){for(var n=de(),r=new ct(e.path.child("")),i=this.docs.getIteratorFrom(r);i.hasNext();){var o=i.getNext(),a=o.key,s=o.value;if(!e.path.isPrefixOf(a.path))break;s instanceof lt&&e.matches(s)&&(n=n.insert(s.key,s))}return hn.resolve(n)},t}(),Er=function(){function t(){this.mutationQueues={},this.remoteDocumentCache=new wr,this.queryCache=new _r,this.started=!1}return t.prototype.start=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(!this.started,"MemoryPersistence double-started!"),this.started=!0,[2]})})},t.prototype.shutdown=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(this.started,"MemoryPersistence shutdown without start!"),this.started=!1,[2]})})},t.prototype.getMutationQueue=function(t){var e=this.mutationQueues[t.toKey()];return e||(e=new br,this.mutationQueues[t.toKey()]=e),e},t.prototype.getQueryCache=function(){return this.queryCache},t.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},t.prototype.runTransaction=function(t,e){return p("MemoryPersistence","Starting transaction:",t),e(new Tr).toPromise()},t}(),Tr=function(){return function(){}}(),Cr=function(){function t(){this.isEager=!1}return t.prototype.addGarbageSource=function(t){},t.prototype.removeGarbageSource=function(t){},t.prototype.addPotentialGarbageKey=function(t){},t.prototype.collectGarbage=function(t){return hn.resolve(ge())},t}();!function(t){t.All="all",t.ListenStreamIdle="listen_stream_idle",t.ListenStreamConnectionBackoff="listen_stream_connection_backoff",t.WriteStreamIdle="write_stream_idle",t.WriteStreamConnectionBackoff="write_stream_connection_backoff",t.OnlineStateTimeout="online_state_timeout"}(hr||(hr={}));var xr,Sr=function(){function t(t,e,n,r,i){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new Gn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.catch=this.deferred.promise.catch.bind(this.deferred.promise),this.deferred.promise.catch(function(t){})}return t.createAndSchedule=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.timerHandle=setTimeout(function(){return e.handleDelayElapsed()},t)},t.prototype.skipDelay=function(){return this.handleDelayElapsed()},t.prototype.cancel=function(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new w(_.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},t.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueue(function(){return null!==t.timerHandle?(t.clearTimeout(),t.op().then(function(e){return t.deferred.resolve(e)})):Promise.resolve()})},t.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},t}(),kr=function(){function t(){this.tail=Promise.resolve(),this.delayedOperations=[],this.operationInProgress=!1}return t.prototype.enqueue=function(t){var e=this;this.verifyNotFailed();var n=this.tail.then(function(){return e.operationInProgress=!0,t().catch(function(t){e.failure=t,e.operationInProgress=!1;var n=t.stack||t.message||"";throw d("INTERNAL UNHANDLED ERROR: ",n),n.indexOf("Firestore Test Simulated Error")<0&&setTimeout(function(){throw t},0),t}).then(function(t){return e.operationInProgress=!1,t})});return this.tail=n,n},t.prototype.enqueueAfterDelay=function(t,e,n){var r=this;this.verifyNotFailed(),y(!this.containsDelayedOperation(t),"Attempted to schedule multiple operations with timer id "+t+".");var i=Sr.createAndSchedule(this,t,e,n,function(t){return r.removeDelayedOperation(t)});return this.delayedOperations.push(i),i},t.prototype.verifyNotFailed=function(){this.failure&&m("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},t.prototype.verifyOperationInProgress=function(){y(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},t.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},t.prototype.containsDelayedOperation=function(t){return this.delayedOperations.findIndex(function(e){return e.timerId===t})>=0},t.prototype.runDelayedOperationsEarly=function(t){var e=this;return this.drain().then(function(){y(t===hr.All||e.containsDelayedOperation(t),"Attempted to drain to missing operation "+t),e.delayedOperations.sort(function(t,e){return t.targetTimeMs-e.targetTimeMs});for(var n=0,r=e.delayedOperations;n<r.length;n++){var i=r[n];if(i.skipDelay(),t!==hr.All&&i.timerId===t)break}return e.drain()})},t.prototype.removeDelayedOperation=function(t){var e=this.delayedOperations.indexOf(t);y(e>=0,"Delayed operation not found."),this.delayedOperations.splice(e,1)},t}(),Nr=function(){function t(t,e,n,r,i){this.queue=t,this.timerId=e,this.initialDelayMs=n,this.backoffFactor=r,this.maxDelayMs=i,this.timerPromise=null,this.reset()}return t.prototype.reset=function(){this.currentBaseMs=0},t.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},t.prototype.backoffAndRun=function(t){this.cancel();var e=this.currentBaseMs+this.jitterDelayMs();this.currentBaseMs>0&&p("ExponentialBackoff","Backing off for "+e+" ms (base delay: "+this.currentBaseMs+" ms)"),this.timerPromise=this.queue.enqueueAfterDelay(this.timerId,e,t),this.currentBaseMs*=this.backoffFactor,this.currentBaseMs<this.initialDelayMs&&(this.currentBaseMs=this.initialDelayMs),this.currentBaseMs>this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},t.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},t.prototype.jitterDelayMs=function(){return(Math.random()-.5)*this.currentBaseMs},t}();!function(t){t[t.Initial=0]="Initial",t[t.Auth=1]="Auth",t[t.Open=2]="Open",t[t.Error=3]="Error",t[t.Backoff=4]="Backoff",t[t.Stopped=5]="Stopped"}(xr||(xr={}));var Ar=1e3,Ir=6e4,Or=1.5,Pr=function(){function t(t,e,n,r,i){this.queue=t,this.idleTimerId=n,this.connection=r,this.credentialsProvider=i,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new Nr(t,e,Ar,Or,Ir),this.state=xr.Initial}return t.prototype.isStarted=function(){return this.state===xr.Backoff||this.state===xr.Auth||this.state===xr.Open},t.prototype.isOpen=function(){return this.state===xr.Open},t.prototype.start=function(t){this.state!==xr.Error?(y(this.state===xr.Initial,"Already started"),this.listener=t,this.auth()):this.performBackoff(t)},t.prototype.stop=function(){this.isStarted()&&this.close(xr.Stopped)},t.prototype.inhibitBackoff=function(){y(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=xr.Initial,this.backoff.reset()},t.prototype.markIdle=function(){var t=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,6e4,function(){return t.handleIdleCloseTimer()}))},t.prototype.sendRequest=function(t){this.cancelIdleCheck(),this.stream.send(t)},t.prototype.handleIdleCloseTimer=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.isOpen()?[2,this.close(xr.Initial)]:[2]})})},t.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},t.prototype.close=function(t,e){return s.__awaiter(this,void 0,void 0,function(){var n;return s.__generator(this,function(r){return y(t===xr.Error||Lt(e),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),t!==xr.Error?this.backoff.reset():e&&e.code===_.RESOURCE_EXHAUSTED&&(d(e.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=t,n=this.listener,this.listener=null,t!==xr.Stopped?[2,n.onClose(e)]:[2]})})},t.prototype.tearDown=function(){},t.prototype.auth=function(){var t=this;y(this.state===xr.Initial,"Must be in initial state to auth"),this.state=xr.Auth,this.credentialsProvider.getToken(!1).then(function(e){t.startStream(e)},function(e){t.queue.enqueue(function(){return s.__awaiter(t,void 0,void 0,function(){var t;return s.__generator(this,function(n){return this.state!==xr.Stopped?(t=new w(_.UNKNOWN,"Fetching auth token failed: "+e.message),[2,this.handleStreamClose(t)]):[2]})})})})},t.prototype.startStream=function(t){var e=this;if(this.state!==xr.Stopped){y(this.state===xr.Auth,"Trying to start stream in a non-auth state");var n=function(t,n){e.queue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.stream===t?[2,n()]:[2]})})})};if(null!==this.listener){var r=this.startRpc(t);this.stream=r,this.stream.onOpen(function(){n(r,function(){return y(e.state===xr.Auth,"Expected stream to be in state auth, but was "+e.state),e.state=xr.Open,e.listener.onOpen()})}),this.stream.onClose(function(t){n(r,function(){return e.handleStreamClose(t)})}),this.stream.onMessage(function(t){n(r,function(){return e.onMessage(t)})})}}},t.prototype.performBackoff=function(t){var e=this;y(this.state===xr.Error,"Should only perform backoff in an error case"),this.state=xr.Backoff,this.backoff.backoffAndRun(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.state===xr.Stopped?[2]:(this.state=xr.Initial,this.start(t),y(this.isStarted(),"PersistentStream should have started"),[2])})})})},t.prototype.handleStreamClose=function(t){return y(this.isStarted(),"Can't handle server close on non-started stream"),p("PersistentStream","close with error: "+t),this.stream=null,this.close(xr.Error,t)},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.ListenStreamConnectionBackoff,hr.ListenStreamIdle,n,r)||this;return o.serializer=i,o}return s.__extends(e,t),e.prototype.startRpc=function(t){return this.connection.openStream("Listen",t)},e.prototype.onMessage=function(t){this.backoff.reset();var e=this.serializer.fromWatchChange(t),n=this.serializer.versionFromListenResponse(t);return this.listener.onWatchChange(e,n)},e.prototype.watch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.addTarget=this.serializer.toTarget(t);var n=this.serializer.toListenRequestLabels(t);n&&(e.labels=n),this.sendRequest(e)},e.prototype.unwatch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.removeTarget=t,this.sendRequest(e)},e}(Pr),Dr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.WriteStreamConnectionBackoff,hr.WriteStreamIdle,n,r)||this;return o.serializer=i,o.handshakeComplete_=!1,o}return s.__extends(e,t),Object.defineProperty(e.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),e.prototype.start=function(e){this.handshakeComplete_=!1,t.prototype.start.call(this,e)},e.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},e.prototype.startRpc=function(t){return this.connection.openStream("Write",t)},e.prototype.onMessage=function(t){if(y(!!t.streamToken,"Got a write response without a stream token"),this.lastStreamToken=t.streamToken,this.handshakeComplete_){this.backoff.reset();var e=this.serializer.fromWriteResults(t.writeResults),n=this.serializer.fromVersion(t.commitTime);return this.listener.onMutationResult(n,e)}return y(!t.writeResults||0===t.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete()},e.prototype.writeHandshake=function(){y(this.isOpen(),"Writing handshake requires an opened stream"),y(!this.handshakeComplete_,"Handshake already completed");var t={};t.database=this.serializer.encodedDatabaseId,this.sendRequest(t)},e.prototype.writeMutations=function(t){var e=this;y(this.isOpen(),"Writing mutations requires an opened stream"),y(this.handshakeComplete_,"Handshake must be complete before writing mutations"),y(this.lastStreamToken.length>0,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:t.map(function(t){return e.serializer.toMutation(t)})};this.sendRequest(n)},e}(Pr),Mr=function(){function t(t,e,n,r){this.queue=t,this.connection=e,this.credentials=n,this.serializer=r}return t.prototype.newPersistentWriteStream=function(){return new Dr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.newPersistentWatchStream=function(){return new Rr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.commit=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,writes:t.map(function(t){return e.serializer.toMutation(t)})};return this.invokeRPC("Commit",n).then(function(t){return e.serializer.fromWriteResults(t.writeResults)})},t.prototype.lookup=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,documents:t.map(function(t){return e.serializer.toName(t)})};return this.invokeStreamingRPC("BatchGetDocuments",n).then(function(n){var r=he();n.forEach(function(t){var n=e.serializer.fromMaybeDocument(t);r=r.insert(n.key,n)});var i=[];return t.forEach(function(t){var e=r.get(t);y(!!e,"Missing entity in write response for "+t),i.push(e)}),i})},t.prototype.invokeRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeRPC(t,e,r)})},t.prototype.invokeStreamingRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeStreamingRPC(t,e,r)})},t}(),Lr=function(){function t(t){this.datastore=t,this.readVersions=me(),this.mutations=[],this.committed=!1}return t.prototype.recordVersion=function(t){var e=t.version;t instanceof ft&&(e=Qt.forDeletedDoc());var n=this.readVersions.get(t.key);if(null!==n){if(!e.isEqual(n))throw new w(_.ABORTED,"Document version changed between two reads.")}else this.readVersions=this.readVersions.insert(t.key,e)},t.prototype.lookup=function(t){var e=this;return this.committed?Promise.reject("Transaction has already completed."):this.mutations.length>0?Promise.reject("Transactions lookups are invalid after writes."):this.datastore.lookup(t).then(function(t){return t.forEach(function(t){return e.recordVersion(t)}),t})},t.prototype.write=function(t){if(this.committed)throw new w(_.FAILED_PRECONDITION,"Transaction has already completed.");this.mutations=this.mutations.concat(t)},t.prototype.precondition=function(t){var e=this.readVersions.get(t);return e?ee.updateTime(e):ee.NONE},t.prototype.preconditionForUpdate=function(t){var e=this.readVersions.get(t);if(e&&e.isEqual(Qt.forDeletedDoc()))throw new w(_.FAILED_PRECONDITION,"Can't update a document that doesn't exist.");return e?ee.updateTime(e):ee.exists(!0)},t.prototype.set=function(t,e){this.write(e.toMutations(t,this.precondition(t)))},t.prototype.update=function(t,e){this.write(e.toMutations(t,this.preconditionForUpdate(t)))},t.prototype.delete=function(t){this.write([new ae(t,this.precondition(t))]),this.readVersions=this.readVersions.insert(t,Qt.forDeletedDoc())},t.prototype.commit=function(){var t=this,e=this.readVersions;return this.mutations.forEach(function(t){e=e.remove(t.key)}),e.isEmpty()?this.datastore.commit(this.mutations).then(function(){t.committed=!0}):Promise.reject(Error("Every document read in a transaction must also be written."))},t}(),Fr=function(){function t(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state=nn.Unknown,this.watchStreamFailures=0,this.onlineStateTimer=null,this.shouldWarnClientIsOffline=!0}return t.prototype.handleWatchStreamStart=function(){var t=this;0===this.watchStreamFailures&&(this.setAndBroadcast(nn.Unknown),y(null===this.onlineStateTimer,"onlineStateTimer shouldn't be started yet"),this.onlineStateTimer=this.asyncQueue.enqueueAfterDelay(hr.OnlineStateTimeout,1e4,function(){return t.onlineStateTimer=null,y(t.state===nn.Unknown,"Timer should be canceled if we transitioned to a different state."),t.logClientOfflineWarningIfNecessary("Backend didn't respond within 10 seconds."),t.setAndBroadcast(nn.Offline),Promise.resolve()}))},t.prototype.handleWatchStreamFailure=function(t){this.state===nn.Online?(this.setAndBroadcast(nn.Unknown),y(0===this.watchStreamFailures,"watchStreamFailures must be 0"),y(null===this.onlineStateTimer,"onlineStateTimer must be null")):(this.watchStreamFailures++,this.watchStreamFailures>=2&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed 2 times. Most recent error: "+t.toString()),this.setAndBroadcast(nn.Offline)))},t.prototype.set=function(t){this.clearOnlineStateTimer(),this.watchStreamFailures=0,t===nn.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(t)},t.prototype.setAndBroadcast=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},t.prototype.logClientOfflineWarningIfNecessary=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(d(e),this.shouldWarnClientIsOffline=!1):p("OnlineStateTracker",e)},t.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},t}(),Ur=function(){function t(t,e,n,r){this.localStore=t,this.datastore=e,this.pendingWrites=[],this.lastBatchSeen=Cn,this.listenTargets={},this.watchStream=null,this.writeStream=null,this.watchChangeAggregator=null,this.onlineStateTracker=new Fr(n,r)}return t.prototype.start=function(){return this.enableNetwork()},t.prototype.isNetworkEnabled=function(){return y(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},t.prototype.enableNetwork=function(){var t=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(e){return t.writeStream.lastStreamToken=e,t.shouldStartWatchStream()?t.startWatchStream():t.onlineStateTracker.set(nn.Unknown),t.fillWritePipeline()}))},t.prototype.disableNetwork=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Offline),[2]})})},t.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},t.prototype.shutdown=function(){return p("RemoteStore","RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),Promise.resolve()},t.prototype.listen=function(t){y(!T(this.listenTargets,t.targetId),"listen called with duplicate targetId!"),this.listenTargets[t.targetId]=t,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(t)},t.prototype.unlisten=function(t){y(T(this.listenTargets,t),"unlisten called without assigned target ID!"),delete this.listenTargets[t],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(t),k(this.listenTargets)&&this.watchStream.markIdle())},t.prototype.getQueryDataForTarget=function(t){return this.listenTargets[t]||null},t.prototype.getRemoteKeysForTarget=function(t){return this.syncEngine.getRemoteKeysForTarget(t)},t.prototype.sendWatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t.targetId),this.watchStream.watch(t)},t.prototype.sendUnwatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t),this.watchStream.unwatch(t)},t.prototype.startWatchStream=function(){y(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchChangeAggregator=new Ie(this),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},t.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!k(this.listenTargets)},t.prototype.cleanUpWatchStreamState=function(){this.watchChangeAggregator=null},t.prototype.onWatchStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return x(this.listenTargets,function(e,n){t.sendWatchRequest(n)}),[2]})})},t.prototype.onWatchStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return y(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(t&&this.onlineStateTracker.handleWatchStreamFailure(t),this.startWatchStream()):this.onlineStateTracker.set(nn.Unknown),[2]})})},t.prototype.onWatchStreamChange=function(t,e){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(n){switch(n.label){case 0:return this.onlineStateTracker.set(nn.Online),t instanceof Ne&&t.state===Te.Removed&&t.cause?[2,this.handleTargetError(t)]:(t instanceof Se?this.watchChangeAggregator.handleDocumentChange(t):t instanceof ke?this.watchChangeAggregator.handleExistenceFilter(t):(y(t instanceof Ne,"Expected watchChange to be an instance of WatchTargetChange"),this.watchChangeAggregator.handleTargetChange(t)),!e.isEqual(Qt.MIN)&&e.compareTo(this.localStore.getLastRemoteSnapshotVersion())>=0?[4,this.raiseWatchSnapshot(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.raiseWatchSnapshot=function(t){var e=this;y(!t.isEqual(Qt.MIN),"Can't raise event for unknown SnapshotVersion");var n=this.watchChangeAggregator.createRemoteEvent(t);return x(n.targetChanges,function(n,r){if(r.resumeToken.length>0){var i=e.listenTargets[n];i&&(e.listenTargets[n]=i.update({resumeToken:r.resumeToken,snapshotVersion:t}))}}),n.targetMismatches.forEach(function(t){var n=e.listenTargets[t];if(n){n.resumeToken=b(),e.sendUnwatchRequest(t);var r=new Xt(n.query,t,Vt.ExistenceFilterMismatch);e.sendWatchRequest(r)}}),this.syncEngine.applyRemoteEvent(n)},t.prototype.handleTargetError=function(t){var e=this;y(!!t.cause,"Handling target error without a cause");var n=t.cause,r=Promise.resolve();return t.targetIds.forEach(function(t){r=r.then(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return T(this.listenTargets,t)?(delete this.listenTargets[t],this.watchChangeAggregator.removeTarget(t),[2,this.syncEngine.rejectListen(t,n)]):[2]})})})}),r},t.prototype.cleanUpWriteStreamState=function(){this.lastBatchSeen=Cn,p("RemoteStore","Stopping write stream with "+this.pendingWrites.length+" pending writes"),this.pendingWrites=[]},t.prototype.fillWritePipeline=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return this.canWriteMutations()?[2,this.localStore.nextMutationBatch(this.lastBatchSeen).then(function(e){if(null!==e)return t.commit(e),t.fillWritePipeline();0===t.pendingWrites.length&&t.writeStream.markIdle()})]:[2]})})},t.prototype.canWriteMutations=function(){return this.isNetworkEnabled()&&this.pendingWrites.length<10},t.prototype.outstandingWrites=function(){return this.pendingWrites.length},t.prototype.commit=function(t){y(this.canWriteMutations(),"commit called when batches can't be written"),this.lastBatchSeen=t.batchId,this.pendingWrites.push(t),this.shouldStartWriteStream()?this.startWriteStream():this.isNetworkEnabled()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(t.mutations)},t.prototype.shouldStartWriteStream=function(){return this.isNetworkEnabled()&&!this.writeStream.isStarted()&&this.pendingWrites.length>0},t.prototype.startWriteStream=function(){y(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)})},t.prototype.onWriteStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.writeStream.writeHandshake(),[2]})})},t.prototype.onWriteHandshakeComplete=function(){var t=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then(function(){for(var e=0,n=t.pendingWrites;e<n.length;e++){var r=n[e];t.writeStream.writeMutations(r.mutations)}})},t.prototype.onMutationResult=function(t,e){var n=this;y(this.pendingWrites.length>0,"Got result for empty pending writes");var r=this.pendingWrites.shift(),i=Sn.from(r,t,e,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(i).then(function(){return n.fillWritePipeline()})},t.prototype.onWriteStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){var e=this;return s.__generator(this,function(n){return y(this.isNetworkEnabled(),"onWriteStreamClose() should only be called when the network is enabled"),t&&this.pendingWrites.length>0?(y(!!t,"We have pending writes, but the write stream closed without an error"),void 0,[2,(this.writeStream.handshakeComplete?this.handleWriteError(t):this.handleHandshakeError(t)).then(function(){e.shouldStartWriteStream()&&e.startWriteStream()})]):[2]})})},t.prototype.handleHandshakeError=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return ue(t.code)||t.code===_.ABORTED?(p("RemoteStore","RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=b(),[2,this.localStore.setLastStreamToken(b())]):[2]})})},t.prototype.handleWriteError=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n=this;return s.__generator(this,function(r){return ue(t.code)?(e=this.pendingWrites.shift(),this.writeStream.inhibitBackoff(),[2,this.syncEngine.rejectFailedWrite(e.batchId,t).then(function(){return n.fillWritePipeline()})]):[2]})})},t.prototype.createTransaction=function(){return new Lr(this.datastore)},t.prototype.handleUserChange=function(t){if(p("RemoteStore","RemoteStore changing users: uid=",t.uid),this.isNetworkEnabled())return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),this.enableNetwork()},t}(),jr=function(){function t(t,e,n,r){this.platform=t,this.databaseInfo=e,this.credentials=n,this.asyncQueue=r}return t.prototype.start=function(t){var e=this,n=new Gn,r=new Gn,i=!1;return this.credentials.setUserChangeListener(function(o){i?e.asyncQueue.enqueue(function(){return e.handleUserChange(o)}):(i=!0,e.initializePersistence(t,r).then(function(){return e.initializeRest(o)}).then(n.resolve,n.reject))}),this.asyncQueue.enqueue(function(){return n.promise}),r.promise},t.prototype.enableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.enableNetwork()})},t.prototype.initializePersistence=function(t,e){var n=this;return t?this.startIndexedDbPersistence().then(e.resolve).catch(function(t){return e.reject(t),n.canFallback(t)?(console.warn("Error enabling offline storage. Falling back to storage disabled: "+t),n.startMemoryPersistence()):Promise.reject(t)}):(e.resolve(),this.startMemoryPersistence())},t.prototype.canFallback=function(t){return t instanceof w?t.code===_.FAILED_PRECONDITION||t.code===_.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||(22===t.code||20===t.code)},t.prototype.startIndexedDbPersistence=function(){this.garbageCollector=new Cr;var t=vr.buildStoragePrefix(this.databaseInfo),e=new He(this.databaseInfo.databaseId,{useProto3Json:!0});return this.persistence=new vr(t,e),this.persistence.start()},t.prototype.startMemoryPersistence=function(){return this.garbageCollector=new pn,this.persistence=new Er,this.persistence.start()},t.prototype.initializeRest=function(t){var e=this;return this.platform.loadConnection(this.databaseInfo).then(function(n){e.localStore=new gr(e.persistence,t,e.garbageCollector);var r=e.platform.newSerializer(e.databaseInfo.databaseId),i=new Mr(e.asyncQueue,n,e.credentials,r);return e.remoteStore=new Ur(e.localStore,i,e.asyncQueue,function(t){e.syncEngine.applyOnlineStateChange(t),e.eventMgr.applyOnlineStateChange(t)}),e.syncEngine=new Tn(e.localStore,e.remoteStore,t),e.remoteStore.syncEngine=e.syncEngine,e.eventMgr=new ln(e.syncEngine),e.localStore.start()}).then(function(){return e.remoteStore.start()})},t.prototype.handleUserChange=function(t){return this.asyncQueue.verifyOperationInProgress(),p("FirestoreClient","User Changed: "+t.uid),this.syncEngine.handleUserChange(t)},t.prototype.disableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.disableNetwork()})},t.prototype.shutdown=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.credentials.removeUserChangeListener(),e.remoteStore.shutdown()}).then(function(){return e.persistence.shutdown(t&&t.purgePersistenceWithDataLoss)})},t.prototype.listen=function(t,e,n){var r=this,i=new fn(t,e,n);return this.asyncQueue.enqueue(function(){return r.eventMgr.listen(i)}),i},t.prototype.unlisten=function(t){var e=this;this.asyncQueue.enqueue(function(){return e.eventMgr.unlisten(t)})},t.prototype.getDocumentFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.readDocument(t)}).then(function(t){if(t instanceof lt)return t;throw new w(_.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")})},t.prototype.getDocumentsFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.executeQuery(t)}).then(function(e){var n=ge(),r=new wn(t,n),i=r.computeDocChanges(e);return r.applyChanges(i).snapshot})},t.prototype.write=function(t){var e=this,n=new Gn;return this.asyncQueue.enqueue(function(){return e.syncEngine.write(t,n)}),n.promise},t.prototype.databaseId=function(){return this.databaseInfo.databaseId},t.prototype.transaction=function(t){var e=this;return this.asyncQueue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(t){return[2]})})}).then(function(){return e.syncEngine.runTransaction(t)})},t}(),Br=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.scheduleEvent(this.observer.next,t)},t.prototype.error=function(t){this.scheduleEvent(this.observer.error,t)},t.prototype.mute=function(){this.muted=!0},t.prototype.scheduleEvent=function(t,e){var n=this;this.muted||setTimeout(function(){n.muted||t(e)},0)},t}(),qr=function(){function t(t){this.uid=t}return t.prototype.isAuthenticated=function(){return null!=this.uid},t.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t.UNAUTHENTICATED=new t(null),t.GOOGLE_CREDENTIALS=new t("google-credentials-uid"),t.FIRST_PARTY=new t("first-party-uid"),t}(),Vr=function(){return function(t,e){this.user=e,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+t}}}(),Wr=function(){function t(){this.userListener=null}return t.prototype.getToken=function(t){return Promise.resolve(null)},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,t(qr.UNAUTHENTICATED)},t.prototype.removeUserChangeListener=function(){y(null!==this.userListener,"removeUserChangeListener() when no listener registered"),this.userListener=null},t}(),Hr=function(){function t(t){var e=this;this.app=t,this.tokenListener=null,this.userCounter=0,this.userListener=null,this.tokenListener=function(){var t=e.getUser();e.currentUser&&t.isEqual(e.currentUser)||(e.currentUser=t,e.userCounter++,e.userListener&&e.userListener(e.currentUser))},this.userCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return t.prototype.getToken=function(t){var e=this;y(null!=this.tokenListener,"getToken cannot be called after listener removed.");var n=this.userCounter;return this.app.INTERNAL.getToken(t).then(function(t){if(e.userCounter!==n)throw new w(_.ABORTED,"getToken aborted due to uid change.");return t?(y("string"==typeof t.accessToken,"Invalid tokenData returned from getToken():"+t),new Vr(t.accessToken,e.currentUser)):null})},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,this.currentUser&&t(this.currentUser)},t.prototype.removeUserChangeListener=function(){y(null!=this.tokenListener,"removeUserChangeListener() called twice"),y(null!==this.userListener,"removeUserChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.userListener=null},t.prototype.getUser=function(){"function"!=typeof this.app.INTERNAL.getUid&&m("This version of the Firestore SDK requires at least version 3.7.0 of firebase.js.");var t=this.app.INTERNAL.getUid();return y(null===t||"string"==typeof t,"Received invalid UID: "+t),new qr(t)},t}(),zr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,this.type="FirstParty",this.user=qr.FIRST_PARTY,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return Object.defineProperty(t.prototype,"authHeaders",{get:function(){return{Authorization:this.gapi.auth.getAuthHeaderValueForFirstParty([]),"X-Goog-AuthUser":this.sessionIndex}},enumerable:!0,configurable:!0}),t}(),Kr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return t.prototype.getToken=function(t){return Promise.resolve(new zr(this.gapi,this.sessionIndex))},t.prototype.setUserChangeListener=function(t){t(qr.FIRST_PARTY)},t.prototype.removeUserChangeListener=function(){},t}();function Gr(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t,["next","error","complete"])}var Qr,Yr=function(){function t(t){this.methodName=t}return t.delete=function(){return Xr.instance},t.serverTimestamp=function(){return $r.instance},t._arrayUnion=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayUnion",arguments,1),new Jr(t)},t._arrayRemove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayRemove",arguments,1),new Zr(t)},t.prototype.isEqual=function(t){return this===t},t}(),Xr=function(t){function e(){return t.call(this,"FieldValue.delete")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),$r=function(t){function e(){return t.call(this,"FieldValue.serverTimestamp")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),Jr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayUnion")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),Zr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayRemove")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),ti=E(Yr,"Use FieldValue.<field>() instead."),ei=/^__.*__$/,ni=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[];return null!==this.fieldMask?n.push(new ie(t,this.data,this.fieldMask,e)):n.push(new re(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}(),ri=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[new ie(t,this.data,this.fieldMask,e)];return this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}();function ii(t){switch(t){case Qr.Set:case Qr.MergeSet:case Qr.Update:return!0;case Qr.Argument:return!1;default:throw m("Unexpected case for UserDataSource: "+t)}}!function(t){t[t.Set=0]="Set",t[t.Update=1]="Update",t[t.MergeSet=2]="MergeSet",t[t.Argument=3]="Argument"}(Qr||(Qr={}));var oi=function(){function t(t,e,n,r,i,o){this.dataSource=t,this.methodName=e,this.path=n,this.arrayElement=r,void 0===i&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=i||[],this.fieldMask=o||[]}return t.prototype.childContextForField=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(e),r},t.prototype.childContextForFieldPath=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},t.prototype.childContextForArray=function(e){return new t(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},t.prototype.createError=function(t){var e=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path.toString()+")";return new w(_.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+t+e)},t.prototype.contains=function(t){return void 0!==this.fieldMask.find(function(e){return t.isPrefixOf(e)})||void 0!==this.fieldTransforms.find(function(e){return t.isPrefixOf(e.field)})},t.prototype.validatePath=function(){if(null!==this.path)for(var t=0;t<this.path.length;t++)this.validatePathSegment(this.path.get(t))},t.prototype.validatePathSegment=function(t){if(ii(this.dataSource)&&ei.test(t))throw this.createError("Document fields cannot begin and end with __")},t}(),ai=function(){return function(t,e){this.databaseId=t,this.key=e}}(),si=function(){function t(t){this.preConverter=t}return t.prototype.parseSetData=function(t,e){var n=new oi(Qr.Set,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",n,e);var r=this.parseData(e,n);return new ni(r,null,n.fieldTransforms)},t.prototype.parseMergeData=function(t,e,n){var r=new oi(Qr.MergeSet,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i,o,a=this.parseData(e,r);if(n){for(var s=[],u=0,c=n;u<c.length;u++){var l=c[u],f=void 0;if(l instanceof rn?f=l:"string"==typeof l?f=fi(t,l):m("Expected stringOrFieldPath to be a string or a FieldPath"),!r.contains(f))throw new w(_.INVALID_ARGUMENT,"Field '"+f+"' is specified in your field mask but missing from your input data.");s.push(f)}i=new $t(s),o=r.fieldTransforms.filter(function(t){return i.covers(t.field)})}else i=new $t(r.fieldMask),o=r.fieldTransforms;return new ni(a,i,o)},t.prototype.parseUpdateData=function(t,e){var n=this,r=new oi(Qr.Update,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i=[],o=It.EMPTY;S(e,function(e,a){var s=fi(t,e),u=r.childContextForFieldPath(s);if((a=n.runPreConverter(a,u))instanceof Xr)i.push(s);else{var c=n.parseData(a,u);null!=c&&(i.push(s),o=o.set(s,c))}});var a=new $t(i);return new ri(o,a,r.fieldTransforms)},t.prototype.parseUpdateVarargs=function(t,e,n,r){var i=new oi(Qr.Update,t,ut.EMPTY_PATH),o=[li(t,e)],a=[n];if(r.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var s=0;s<r.length;s+=2)o.push(li(t,r[s])),a.push(r[s+1]);var u=[],c=It.EMPTY;for(s=0;s<o.length;++s){var l=o[s],f=i.childContextForFieldPath(l),h=this.runPreConverter(a[s],f);if(h instanceof Xr)u.push(l);else{var p=this.parseData(h,f);null!=p&&(u.push(l),c=c.set(l,p))}}var d=new $t(u);return new ri(c,d,i.fieldTransforms)},t.prototype.parseQueryValue=function(t,e){var n=new oi(Qr.Argument,t,ut.EMPTY_PATH),r=this.parseData(e,n);return y(null!=r,"Parsed data should not be null."),y(0===n.fieldTransforms.length,"Field transforms should have been disallowed."),r},t.prototype.runPreConverter=function(t,e){try{return this.preConverter(t)}catch(t){var n=hi(t);throw e.createError(n)}},t.prototype.parseData=function(t,e){if(ui(t=this.runPreConverter(t,e)))return ci("Unsupported field value:",e,t),this.parseObject(t,e);if(t instanceof Yr)return this.parseSentinelFieldValue(t,e),null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.arrayElement)throw e.createError("Nested arrays are not supported");return this.parseArray(t,e)}return this.parseScalarValue(t,e)},t.prototype.parseObject=function(t,e){var n=this,r=new ht(K);return S(t,function(t,i){var o=n.parseData(i,e.childContextForField(t));null!=o&&(r=r.insert(t,o))}),new It(r)},t.prototype.parseArray=function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=o[i],s=this.parseData(a,e.childContextForArray(r));null==s&&(s=gt.INSTANCE),n.push(s),r++}return new Ot(n)},t.prototype.parseSentinelFieldValue=function(t,e){if(!ii(e.dataSource))throw e.createError(t.methodName+"() can only be used with update() and set()");if(null===e.path)throw e.createError(t.methodName+"() is not currently supported inside arrays");if(t instanceof Xr){if(e.dataSource!==Qr.MergeSet)throw e.dataSource===Qr.Update?(y(e.path.length>0,"FieldValue.delete() at the top level should have already been handled."),e.createError("FieldValue.delete() can only appear at the top level of your update data")):e.createError("FieldValue.delete() cannot be used with set() unless you pass {merge:true}");e.fieldMask.push(e.path)}else if(t instanceof $r)e.fieldTransforms.push(new Jt(e.path,Re.instance));else if(t instanceof Jr){var n=this.parseArrayTransformElements(t.methodName,t._elements),r=new De(n);e.fieldTransforms.push(new Jt(e.path,r))}else if(t instanceof Zr){n=this.parseArrayTransformElements(t.methodName,t._elements);var i=new Me(n);e.fieldTransforms.push(new Jt(e.path,i))}else m("Unknown FieldValue type: "+t)},t.prototype.parseScalarValue=function(t,e){if(null===t)return gt.INSTANCE;if("number"==typeof t)return function(t){return Mt(t)&&t<=Dt&&t>=Rt}(t)?new Et(t):new Tt(t);if("boolean"==typeof t)return bt.of(t);if("string"==typeof t)return new Ct(t);if(t instanceof Date)return new xt(et.fromDate(t));if(t instanceof et)return new xt(new et(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)));if(t instanceof tt)return new At(t);if(t instanceof J)return new kt(t);if(t instanceof ai)return new Nt(t.databaseId,t.key);throw e.createError("Unsupported field value: "+j(t))},t.prototype.parseArrayTransformElements=function(t,e){var n=this;return e.map(function(e,r){var i=new oi(Qr.Argument,t,ut.EMPTY_PATH);return n.parseData(e,i.childContextForArray(r))})},t}();function ui(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof et||t instanceof tt||t instanceof J||t instanceof ai||t instanceof Yr)}function ci(t,e,n){if(!ui(n)||!U(n)){var r=j(n);throw"an object"===r?e.createError(t+" a custom object"):e.createError(t+" "+r)}}function li(t,e){if(e instanceof rn)return e._internalPath;if("string"==typeof e)return fi(t,e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. Field path arguments must be of type string or FieldPath.")}function fi(t,e){try{return function(t){if(t.search(on)>=0)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(rn.bind.apply(rn,[void 0].concat(t.split("."))))}catch(e){throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e)._internalPath}catch(e){var n=hi(e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. "+n)}}function hi(t){return t instanceof Error?t.message:t.toString()}var pi="firestore.googleapis.com",di=!0,vi=!1,mi=function(){function t(t){if(void 0===t.host){if(void 0!==t.ssl)throw new w(_.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=pi,this.ssl=di}else R("settings","string","host",t.host),this.host=t.host,D("settings","boolean","ssl",t.ssl),this.ssl=C(t.ssl,di);q("settings",t,["host","ssl","credentials","timestampsInSnapshots"]),D("settings","object","credentials",t.credentials),this.credentials=t.credentials,D("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),this.timestampsInSnapshots=C(t.timestampsInSnapshots,vi)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.timestampsInSnapshots===t.timestampsInSnapshots&&this.credentials===t.credentials},t}(),yi=function(){return function(){}}(),gi=function(){function t(e){var n=this;this._queue=new kr,this.INTERNAL={delete:function(t){return s.__awaiter(n,void 0,void 0,function(){return s.__generator(this,function(e){return this._firestoreClient?[2,this._firestoreClient.shutdown(t)]:[2]})})}};var r=new yi;if("object"==typeof e.options){var i=e;r.firebaseApp=i,r.databaseId=t.databaseIdFromApp(i),r.persistenceKey=r.firebaseApp.name,r.credentials=new Hr(i)}else{var o=e;if(!o.projectId)throw new w(_.INVALID_ARGUMENT,"Must provide projectId");r.databaseId=new it(o.projectId,o.database),r.persistenceKey="[DEFAULT]",r.credentials=new Wr}r.settings=new mi({}),this._config=r,this._databaseId=r.databaseId}return t.prototype.settings=function(t){if(N("Firestore.settings",arguments,1),O("Firestore.settings","object",1,t),T(t,"persistence"))throw new w(_.INVALID_ARGUMENT,'"persistence" is now specified with a separate call to firestore.enablePersistence().');var e=new mi(t);if(this._firestoreClient&&!this._config.settings.isEqual(e))throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._config.settings=e,void 0!==e.credentials&&(this._config.credentials=function(t){if(!t)return new Wr;switch(t.type){case"gapi":return new Kr(t.client,t.sessionIndex||"0");case"provider":return t.client;default:throw new w(_.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.enableNetwork()},t.prototype.disableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.disableNetwork()},t.prototype.enablePersistence=function(){if(this._firestoreClient)throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");return this.configureClient(!0)},t.prototype.ensureClientConfigured=function(){return this._firestoreClient||this.configureClient(!1),this._firestoreClient},t.prototype.configureClient=function(t){var e=this;y(!!this._config.settings.host,"FirestoreSettings.host cannot be falsey"),this._config.settings.timestampsInSnapshots||d("\nThe behavior for Date objects stored in Firestore is going to change\nAND YOUR APP MAY BREAK.\nTo hide this warning and ensure your app does not break, you need to add the\nfollowing code to your app before calling any other Cloud Firestore methods:\n\n  const firestore = firebase.firestore();\n  const settings = {/* your settings... */ timestampsInSnapshots: true};\n  firestore.settings(settings);\n\nWith this change, timestamps stored in Cloud Firestore will be read back as\nFirebase Timestamp objects instead of as system Date objects. So you will also\nneed to update code expecting a Date to instead expect a Timestamp. For example:\n\n  // Old:\n  const date = snapshot.get('created_at');\n  // New:\n  const timestamp = snapshot.get('created_at');\n  const date = timestamp.toDate();\n\nPlease audit all existing usages of Date when you enable the new behavior. In a\nfuture release, the behavior will change to the new behavior, so if you do not\nfollow these steps, YOUR APP MAY BREAK."),y(!this._firestoreClient,"configureClient() called multiple times");var n=new nt(this._config.databaseId,this._config.persistenceKey,this._config.settings.host,this._config.settings.ssl);return this._dataConverter=new si(function(t){if(t instanceof wi){var n=e._config.databaseId,r=t.firestore._config.databaseId;if(!r.isEqual(n))throw new w(_.INVALID_ARGUMENT,"Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return new ai(e._config.databaseId,t._key)}return t}),this._firestoreClient=new jr(g.getPlatform(),n,this._config.credentials,this._queue),this._firestoreClient.start(t)},t.databaseIdFromApp=function(t){var e=t.options;if(!T(e,"projectId")){if(T(e,"firestoreId"))throw new w(_.INVALID_ARGUMENT,'"firestoreId" is now specified as "projectId" in firebase.initializeApp.');throw new w(_.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.')}if(T(e,"firestoreOptions"))throw new w(_.INVALID_ARGUMENT,'"firestoreOptions" values are now specified with Firestore.settings()');var n=e.projectId;if(!n||"string"!=typeof n)throw new w(_.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new it(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this._config.firebaseApp)throw new w(_.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._config.firebaseApp},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("Firestore.collection",arguments,1),O("Firestore.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection path to collection()");return this.ensureClientConfigured(),new ki(at.fromString(t),this)},t.prototype.doc=function(t){if(N("Firestore.doc",arguments,1),O("Firestore.doc","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty document path to doc()");return this.ensureClientConfigured(),wi.forPath(at.fromString(t),this)},t.prototype.runTransaction=function(t){var e=this;return N("Firestore.runTransaction",arguments,1),O("Firestore.runTransaction","function",1,t),this.ensureClientConfigured().transaction(function(n){return t(new bi(e,n))})},t.prototype.batch=function(){return this.ensureClientConfigured(),new _i(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(f()){case i.DEBUG:return"debug";case i.ERROR:return"error";case i.SILENT:return"silent";default:return m("Unknown log level: "+f())}},enumerable:!0,configurable:!0}),t.setLogLevel=function(t){switch(N("Firestore.setLogLevel",arguments,1),O("Firestore.setLogLevel","string",1,t),t){case"debug":h(i.DEBUG);break;case"error":h(i.ERROR);break;case"silent":h(i.SILENT);break;default:throw new w(_.INVALID_ARGUMENT,"Invalid log level: "+t)}},t.prototype._areTimestampsInSnapshotsEnabled=function(){return this._config.settings.timestampsInSnapshots},t}(),bi=function(){function t(t,e){this._firestore=t,this._transaction=e}return t.prototype.get=function(t){var e=this;N("Transaction.get",arguments,1);var n=Ii("Transaction.get",t,this._firestore);return this._transaction.lookup([n._key]).then(function(t){if(!t||1!==t.length)return m("Mismatch in docs returned from document lookup.");var r=t[0];return new Ti(e._firestore,n._key,r instanceof ft?null:r,!1)})},t.prototype.set=function(t,e,n){I("Transaction.set",arguments,2,3);var r=Ii("Transaction.set",t,this._firestore),i=(n=Ni("Transaction.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("Transaction.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("Transaction.set",e);return this._transaction.set(r._key,i),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof e||e instanceof rn?(A("Transaction.update",arguments,3),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("Transaction.update",e,n,o)):(N("Transaction.update",arguments,2),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("Transaction.update",e)),this._transaction.update(r._key,i),this},t.prototype.delete=function(t){N("Transaction.delete",arguments,1);var e=Ii("Transaction.delete",t,this._firestore);return this._transaction.delete(e._key),this},t}(),_i=function(){function t(t){this._firestore=t,this._mutations=[],this._committed=!1}return t.prototype.set=function(t,e,n){I("WriteBatch.set",arguments,2,3),this.verifyNotCommitted();var r=Ii("WriteBatch.set",t,this._firestore),i=(n=Ni("WriteBatch.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("WriteBatch.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("WriteBatch.set",e);return this._mutations=this._mutations.concat(i.toMutations(r._key,ee.NONE)),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.verifyNotCommitted(),"string"==typeof e||e instanceof rn?(A("WriteBatch.update",arguments,3),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("WriteBatch.update",e,n,o)):(N("WriteBatch.update",arguments,2),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("WriteBatch.update",e)),this._mutations=this._mutations.concat(i.toMutations(r._key,ee.exists(!0))),this},t.prototype.delete=function(t){N("WriteBatch.delete",arguments,1),this.verifyNotCommitted();var e=Ii("WriteBatch.delete",t,this._firestore);return this._mutations=this._mutations.concat(new ae(e._key,ee.NONE)),this},t.prototype.commit=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.verifyNotCommitted(),this._committed=!0,this._mutations.length>0?[2,this._firestore.ensureClientConfigured().write(this._mutations)]:[2]})})},t.prototype.verifyNotCommitted=function(){if(this._committed)throw new w(_.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),wi=function(){function t(t,e){this._key=t,this.firestore=e,this._firestoreClient=this.firestore.ensureClientConfigured()}return t.forPath=function(e,n){if(e.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.canonicalString()+" has "+e.length);return new t(new ct(e),n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new ki(this._key.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("DocumentReference.collection",arguments,1),O("DocumentReference.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=at.fromString(t);return new ki(this._key.path.child(e),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentReference",1,e);return this.firestore===e.firestore&&this._key.isEqual(e._key)},t.prototype.set=function(t,e){I("DocumentReference.set",arguments,1,2);var n=(e=Ni("DocumentReference.set",e)).merge||e.mergeFields?this.firestore._dataConverter.parseMergeData("DocumentReference.set",t,e.mergeFields):this.firestore._dataConverter.parseSetData("DocumentReference.set",t);return this._firestoreClient.write(n.toMutations(this._key,ee.NONE))},t.prototype.update=function(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof rn?(A("DocumentReference.update",arguments,2),n=this.firestore._dataConverter.parseUpdateVarargs("DocumentReference.update",t,e,r)):(N("DocumentReference.update",arguments,1),n=this.firestore._dataConverter.parseUpdateData("DocumentReference.update",t)),this._firestoreClient.write(n.toMutations(this._key,ee.exists(!0)))},t.prototype.delete=function(){return N("DocumentReference.delete",arguments,0),this._firestoreClient.write([new ae(this._key,ee.NONE)])},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("DocumentReference.onSnapshot",arguments,1,4);var n,r={includeMetadataChanges:!1},i=0;"object"!=typeof t[i]||Gr(t[i])||(q("DocumentReference.onSnapshot",r=t[i],["includeMetadataChanges"]),D("DocumentReference.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++);var o={includeMetadataChanges:r.includeMetadataChanges};return Gr(t[i])?n=t[i]:(O("DocumentReference.onSnapshot","function",i,t[i]),P("DocumentReference.onSnapshot","function",i+1,t[i+1]),P("DocumentReference.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(o,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){if(e.next){y(t.docs.size<=1,"Too many documents returned on a document query");var r=t.docs.get(n._key);e.next(new Ti(n.firestore,n._key,r,t.fromCache))}},error:r}),o=this._firestoreClient.listen(Ft.atPath(this._key.path),i,t);return function(){i.mute(),n._firestoreClient.unlisten(o)}},t.prototype.get=function(t){var e=this;return q("DocumentReference.get",t,["source"]),t&&L("DocumentReference.get",0,"source",t.source,["default","server","cache"]),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentFromLocalCache(e._key).then(function(t){n(new Ti(e.firestore,e._key,t,!0))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),!i.exists&&i.metadata.fromCache?e(new w(_.UNAVAILABLE,"Failed to get document because the client is offline.")):i.exists&&i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):t(i)},error:e})},t}(),Ei=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Ti=function(){function t(t,e,n,r){this._firestore=t,this._key=e,this._document=n,this._fromCache=r}return t.prototype.data=function(t){return I("DocumentSnapshot.data",arguments,0,1),t=Ai("DocumentSnapshot.data",t),this._document?this.convertObject(this._document.data,mt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},t.prototype.get=function(t,e){if(I("DocumentSnapshot.get",arguments,1,2),e=Ai("DocumentSnapshot.get",e),this._document){var n=this._document.data.field(li("DocumentSnapshot.get",t));if(void 0!==n)return this.convertValue(n,mt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new wi(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ei(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentSnapshot",1,e);return this._firestore===e._firestore&&this._fromCache===e._fromCache&&this._key.isEqual(e._key)&&(null===this._document?null===e._document:this._document.isEqual(e._document))},t.prototype.convertObject=function(t,e){var n=this,r={};return t.forEach(function(t,i){r[t]=n.convertValue(i,e)}),r},t.prototype.convertValue=function(t,e){if(t instanceof It)return this.convertObject(t,e);if(t instanceof Ot)return this.convertArray(t,e);if(t instanceof Nt){var n=t.value(e),r=this._firestore.ensureClientConfigured().databaseId();return t.databaseId.isEqual(r)||d("Document "+this._key.path+" contains a document reference within a different database ("+t.databaseId.projectId+"/"+t.databaseId.database+") which is not supported. It will be treated as a reference in the current database ("+r.projectId+"/"+r.database+") instead."),new wi(n,this._firestore)}return t.value(e)},t.prototype.convertArray=function(t,e){var n=this;return t.internalValue.map(function(t){return n.convertValue(t,e)})},t}(),Ci=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return s.__extends(e,t),e.prototype.data=function(e){var n=t.prototype.data.call(this,e);return y("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},e}(Ti),xi=function(){function t(t,e){this._query=t,this.firestore=e}return t.prototype.where=function(e,n,r){var i;N("Query.where",arguments,3),O("Query.where","string",2,n),B("Query.where",3,r);var o=li("Query.where",e),a=Ut.fromString(n);if(o.isKeyField()){if(a===Ut.ARRAY_CONTAINS)throw new w(_.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof r){if(-1!==r.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===r)throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var s=this._query.path.child(new at([r]));y(s.length%2==0,"Path should be a document key"),i=new Nt(this.firestore._databaseId,new ct(s))}else{if(!(r instanceof wi))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+j(r)+".");var u=r;i=new Nt(this.firestore._databaseId,u._key)}}else i=this.firestore._dataConverter.parseQueryValue("Query.where",r);var c=function(t,e,n){if(n.isEqual(gt.INSTANCE)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new Bt(t)}if(n.isEqual(Tt.NAN)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new qt(t)}return new jt(t,e,n)}(o,a,i);return this.validateNewFilter(c),new t(this._query.addFilter(c),this.firestore)},t.prototype.orderBy=function(e,n){var r;if(I("Query.orderBy",arguments,1,2),P("Query.orderBy","string",2,n),void 0===n||"asc"===n)r=Wt.ASCENDING;else{if("desc"!==n)throw new w(_.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r=Wt.DESCENDING}if(null!==this._query.startAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var i=li("Query.orderBy",e),o=new zt(i,r);return this.validateNewOrderBy(o),new t(this._query.addOrderBy(o),this.firestore)},t.prototype.limit=function(e){if(N("Query.limit",arguments,1),O("Query.limit","number",1,e),e<=0)throw new w(_.INVALID_ARGUMENT,"Invalid Query. Query limit ("+e+") is invalid. Limit must be positive.");return new t(this._query.withLimit(e),this.firestore)},t.prototype.startAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAt",arguments,1);var i=this.boundFromDocOrFields("Query.startAt",e,n,!0);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.startAfter=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAfter",arguments,1);var i=this.boundFromDocOrFields("Query.startAfter",e,n,!1);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.endBefore=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endBefore",arguments,1);var i=this.boundFromDocOrFields("Query.endBefore",e,n,!0);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.endAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endAt",arguments,1);var i=this.boundFromDocOrFields("Query.endAt",e,n,!1);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","Query",1,e);return this.firestore===e.firestore&&this._query.isEqual(e._query)},t.prototype.boundFromDocOrFields=function(t,e,n,r){if(B(t,1,e),e instanceof Ti){if(n.length>0)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"().");var i=e;if(!i.exists)throw new w(_.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+t+"().");return this.boundFromDocument(t,i._document,r)}var o=[e].concat(n);return this.boundFromFields(t,o,r)},t.prototype.boundFromDocument=function(t,e,n){for(var r=[],i=0,o=this._query.orderBy;i<o.length;i++){var a=o[i];if(a.field.isKeyField())r.push(new Nt(this.firestore._databaseId,e.key));else{var s=e.field(a.field);if(void 0===s){var u=a.field.canonicalString();throw new w(_.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+u+"' (used as the orderBy) does not exist.")}r.push(s)}}return new Ht(r,n)},t.prototype.boundFromFields=function(t,e,n){var r=this._query.explicitOrderBy;if(e.length>r.length)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var i=[],o=0;o<e.length;o++){var a=e[o];if(r[o].field.isKeyField()){if("string"!=typeof a)throw new w(_.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+t+"(), but got a "+typeof a);if(-1!==a.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Invalid query. Document ID '"+a+"' contains a slash in "+t+"()");var s=new ct(this._query.path.child(a));i.push(new Nt(this.firestore._databaseId,s))}else{var u=this.firestore._dataConverter.parseQueryValue(t,a);i.push(u)}}return new Ht(i,n)},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("Query.onSnapshot",arguments,1,4);var n,r={},i=0;return"object"!=typeof t[i]||Gr(t[i])||(q("Query.onSnapshot",r=t[i],["includeMetadataChanges"]),D("Query.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++),Gr(t[i])?n=t[i]:(O("Query.onSnapshot","function",i,t[i]),P("Query.onSnapshot","function",i+1,t[i+1]),P("Query.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(r,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){e.next&&e.next(new Si(n.firestore,n._query,t))},error:r}),o=this.firestore.ensureClientConfigured(),a=o.listen(this._query,i,t);return function(){i.mute(),o.unlisten(a)}},t.prototype.get=function(t){var e=this;return I("Query.get",arguments,0,1),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentsFromLocalCache(e._query).then(function(t){n(new Si(e.firestore,e._query,t))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):t(i)},error:e})},t.prototype.validateNewFilter=function(t){if(t instanceof jt)if(t.isInequality()){var e=this._query.getInequalityFilterField();if(null!==e&&!e.isEqual(t.field))throw new w(_.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+e.toString()+"' and '"+t.field.toString()+"'");var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(t.field,n)}else if(t.op===Ut.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new w(_.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},t.prototype.validateNewOrderBy=function(t){if(null===this._query.getFirstOrderByField()){var e=this._query.getInequalityFilterField();null!==e&&this.validateOrderByAndInequalityMatch(e,t.field)}},t.prototype.validateOrderByAndInequalityMatch=function(t,e){if(!e.isEqual(t))throw new w(_.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+e.toString()+"' instead.")},t}(),Si=function(){function t(t,e,n){this._firestore=t,this._originalQuery=e,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new Ei(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach(function(e){return t.push(e)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;I("QuerySnapshot.forEach",arguments,1,2),O("QuerySnapshot.forEach","function",1,t),this._snapshot.docs.forEach(function(r){t.call(e,n.convertToDocumentImpl(r))})},Object.defineProperty(t.prototype,"query",{get:function(){return new xi(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),t.prototype.docChanges=function(t){q("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),t&&D("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges);var e=t&&t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new w(_.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e,n){if(n.oldDocs.isEmpty()){var r,i=0;return n.docChanges.map(function(e){var o=new Ci(t,e.doc.key,e.doc,n.fromCache);return y(e.type===be.Added,"Invalid event type for first snapshot"),y(!r||n.query.docComparator(r,e.doc)<0,"Got added events in wrong order"),r=e.doc,{type:"added",doc:o,oldIndex:-1,newIndex:i++}})}var o=n.oldDocs;return n.docChanges.filter(function(t){return e||t.type!==be.Metadata}).map(function(e){var r=new Ci(t,e.doc.key,e.doc,n.fromCache),i=-1,a=-1;return e.type!==be.Added&&(y((i=o.indexOf(e.doc.key))>=0,"Index for document not found"),o=o.delete(e.doc.key)),e.type!==be.Removed&&(o=o.add(e.doc),a=o.indexOf(e.doc.key)),{type:function(t){switch(t){case be.Added:return"added";case be.Modified:case be.Metadata:return"modified";case be.Removed:return"removed";default:return m("Unknown change type: "+t)}}(e.type),doc:r,oldIndex:i,newIndex:a}})}(this._firestore,e,this._snapshot),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","QuerySnapshot",1,e);return this._firestore===e._firestore&&this._originalQuery.isEqual(e._originalQuery)&&this._snapshot.isEqual(e._snapshot)},t.prototype.convertToDocumentImpl=function(t){return new Ci(this._firestore,t.key,t,this.metadata.fromCache)},t}();["length","forEach","map"].concat("undefined"!=typeof Symbol?[Symbol.iterator]:[]).forEach(function(t){try{Object.defineProperty(Si.prototype.docChanges,t,{get:function(){return function(){throw new w(_.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a method, so usages like "querySnapshot.docChanges" should become "querySnapshot.docChanges()"')}()}})}catch(t){}});var ki=function(t){function e(e,n){var r=t.call(this,Ft.atPath(e),n)||this;if(e.length%2!=1)throw new w(_.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.canonicalString()+" has "+e.length);return r}return s.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._query.path.popLast();return t.isEmpty()?null:new wi(new ct(t),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.doc=function(t){if(I("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=z.newId()),O("CollectionReference.doc","string",1,t),""===t)throw new w(_.INVALID_ARGUMENT,"Document path must be a non-empty string");var e=at.fromString(t);return wi.forPath(this._query.path.child(e),this.firestore)},e.prototype.add=function(t){N("CollectionReference.add",arguments,1),O("CollectionReference.add","object",1,t);var e=this.doc();return e.set(t).then(function(){return e})},e}(xi);function Ni(t,e){if(void 0===e)return{merge:!1};if(q(t,e,["merge","mergeFields"]),D(t,"boolean","merge",e.merge),M(t,"mergeFields","a string or a FieldPath",e.mergeFields,function(t){return"string"==typeof t||t instanceof rn}),void 0!==e.mergeFields&&void 0!==e.merge)throw new w(_.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Ai(t,e){return void 0===e?{}:(q(t,e,["serverTimestamps"]),L(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function Ii(t,e,n){if(e instanceof wi){if(e.firestore!==n)throw new w(_.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw V(t,"DocumentReference",1,e)}var Oi=E(gi,"Use firebase.firestore() instead."),Pi=E(bi,"Use firebase.firestore().runTransaction() instead."),Ri=E(_i,"Use firebase.firestore().batch() instead."),Di=E(wi,"Use firebase.firestore().doc() instead."),Mi=E(Ti),Li=E(Ci),Fi=E(xi),Ui=E(Si),ji=E(ki,"Use firebase.firestore().collection() instead."),Bi={Firestore:Oi,GeoPoint:tt,Timestamp:et,Blob:Z,Transaction:Pi,WriteBatch:Ri,DocumentReference:Di,DocumentSnapshot:Mi,Query:Fi,QueryDocumentSnapshot:Li,QuerySnapshot:Ui,CollectionReference:ji,FieldPath:rn,FieldValue:ti,setLogLevel:gi.setLogLevel};function qi(t){t.INTERNAL.registerService("firestore",function(t){return new gi(t)},function(t){y(t&&"object"==typeof t,"shallowCopy() expects object parameter.");var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(Bi))}function Vi(t){qi(t)}Vi(o),e.registerFirestore=Vi}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
+
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a=n(198),s=n(320),u=n(319),c=o.SDK_VERSION,l=new a.Logger("@firebase/firestore");function f(){return l.logLevel===a.LogLevel.DEBUG?i.DEBUG:l.logLevel===a.LogLevel.SILENT?i.SILENT:i.ERROR}function h(t){switch(t){case i.DEBUG:l.logLevel=a.LogLevel.DEBUG;break;case i.ERROR:l.logLevel=a.LogLevel.ERROR;break;case i.SILENT:l.logLevel=a.LogLevel.SILENT;break;default:l.error("Firestore ("+c+"): Invalid value passed to `setLogLevel`")}}function p(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(l.logLevel<=a.LogLevel.DEBUG){var i=n.map(v);l.debug.apply(l,["Firestore ("+c+") ["+t+"]: "+e].concat(i))}}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=a.LogLevel.ERROR){var r=e.map(v);l.error.apply(l,["Firestore ("+c+"): "+t].concat(r))}}function v(t){if("string"==typeof t)return t;var e=g.getPlatform();try{return e.formatJSON(t)}catch(e){return t}}function m(t){var e="FIRESTORE ("+c+") INTERNAL ASSERTION FAILED: "+t;throw d(e),new Error(e)}function y(t,e){t||m(e)}!function(t){t[t.DEBUG=0]="DEBUG",t[t.ERROR=1]="ERROR",t[t.SILENT=2]="SILENT"}(i||(i={}));var g=function(){function t(){}return t.setPlatform=function(e){t.platform&&m("Platform already defined"),t.platform=e},t.getPlatform=function(){return t.platform||m("Platform not set"),t.platform},t}();function b(){return g.getPlatform().emptyByteString}var _={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},w=function(t){function e(e,n){var r=t.call(this,n)||this;return r.code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return s.__extends(e,t),e}(Error);function E(t,e){function n(){var t="This constructor is private.";throw e&&(t+=" ",t+=e),new w(_.INVALID_ARGUMENT,t)}for(var r in n.prototype=t.prototype,t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e){return void 0!==t?t:e}function x(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Number(n);isNaN(r)||e(r,t[n])}}function S(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function k(t){for(var e in y(null!=t&&"object"==typeof t,"isEmpty() expects object parameter."),t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function N(t,e,n){if(e.length!==n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function A(t,e,n){if(e.length<n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires at least "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function I(t,e,n,r){if(e.length<n||e.length>r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+H(e.length,"argument")+".")}function O(t,e,n,r){F(t,e,W(n)+" argument",r)}function P(t,e,n,r){void 0!==r&&O(t,e,n,r)}function R(t,e,n,r){F(t,e,n+" option",r)}function D(t,e,n,r){void 0!==r&&R(t,e,n,r)}function M(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){if(!(r instanceof Array))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+j(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be "+n+", but the value at index "+o+" was: "+j(r[o]))}(t,e,n,r,i)}function L(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){for(var o=[],a=0,s=i;a<s.length;a++){var u=s[a];if(u===r)return;o.push(j(u))}var c=j(r);throw new w(_.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function F(t,e,n,r){if(typeof r!==e||"object"===e&&!U(r)){var i=j(r);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function U(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function j(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":m("Unknown wrong type: "+typeof t)}function B(t,e,n){if(void 0===n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+W(e)+" argument, but it was undefined.")}function q(t,e,n){S(e,function(e,r){if(n.indexOf(e)<0)throw new w(_.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))})}function V(t,e,n,r){var i=j(r);return new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+W(n)+" argument to be a "+e+", but it was: "+i)}function W(t){switch(t){case 1:return"first";case 2:return"second";case 3:return"third";default:return t+"th"}}function H(t,e){return t+" "+e+(1===t?"":"s")}var z=function(){function t(){}return t.newId=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return y(20===e.length,"Invalid auto ID: "+e),e},t}();function K(t,e){return t<e?-1:t>e?1:0}function G(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].isEqual(e[n]))return!1;return!0}function Q(){if("undefined"==typeof Uint8Array)throw new w(_.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function Y(){if(!g.getPlatform().base64Available)throw new w(_.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var X,$,J=function(){function t(t){Y(),this._binaryString=t}return t.fromBase64String=function(e){N("Blob.fromBase64String",arguments,1),O("Blob.fromBase64String","string",1,e),Y();try{return new t(g.getPlatform().atob(e))}catch(t){throw new w(_.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},t.fromUint8Array=function(e){if(N("Blob.fromUint8Array",arguments,1),Q(),!(e instanceof Uint8Array))throw V("Blob.fromUint8Array","Uint8Array",1,e);return new t(Array.prototype.map.call(e,function(t){return String.fromCharCode(t)}).join(""))},t.prototype.toBase64=function(){return N("Blob.toBase64",arguments,0),Y(),g.getPlatform().btoa(this._binaryString)},t.prototype.toUint8Array=function(){N("Blob.toUint8Array",arguments,0),Q();for(var t=new Uint8Array(this._binaryString.length),e=0;e<this._binaryString.length;e++)t[e]=this._binaryString.charCodeAt(e);return t},t.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this._binaryString===t._binaryString},t.prototype._compareTo=function(t){return K(this._binaryString,t._binaryString)},t}(),Z=E(J,"Use Blob.fromUint8Array() or Blob.fromBase64String() instead."),tt=function(){function t(t,e){if(N("GeoPoint",arguments,2),O("GeoPoint","number",1,t),O("GeoPoint","number",2,e),!isFinite(t)||t<-90||t>90)throw new w(_.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new w(_.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this._long},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},t.prototype._compareTo=function(t){return K(this._lat,t._lat)||K(this._long,t._long)},t}(),et=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype._compareTo=function(t){return this.seconds===t.seconds?K(this.nanoseconds,t.nanoseconds):K(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t}(),nt=function(){return function(t,e,n,r){this.databaseId=t,this.persistenceKey=e,this.host=n,this.ssl=r}}(),rt="(default)",it=function(){function t(t,e){this.projectId=t,this.database=e||rt}return Object.defineProperty(t.prototype,"isDefaultDatabase",{get:function(){return this.database===rt},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.compareTo=function(t){return K(this.projectId,t.projectId)||K(this.database,t.database)},t}(),ot=function(){function t(t,e,n){this.init(t,e,n)}return t.prototype.init=function(t,e,n){void 0===e?e=0:e>t.length&&m("offset "+e+" out of range "+t.length),void 0===n?n=t.length-e:n>t.length-e&&m("length "+n+" out of range "+(t.length-e)),this.segments=t,this.offset=e,this.len=n},t.prototype.construct=function(t,e,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(t,e,n),r},Object.defineProperty(t.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.comparator(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(function(t){n.push(t)}):"string"==typeof e?n.push(e):m("Unknown parameter type for Path.child(): "+e),this.construct(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.popFirst=function(t){return t=void 0===t?1:t,y(this.length>=t,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+t,this.length-t)},t.prototype.popLast=function(){return y(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},t.prototype.firstSegment=function(){return y(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},t.prototype.lastSegment=function(){return y(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},t.prototype.get=function(t){return y(t<this.length,"Index out of range"),this.segments[this.offset+t]},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.isPrefixOf=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},t.comparator=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.canonicalString=function(){return this.toArray().join("/")},e.prototype.toString=function(){return this.canonicalString()},e.fromString=function(t){if(t.indexOf("//")>=0)throw new w(_.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter(function(t){return t.length>0}))},e.EMPTY_PATH=new e([]),e}(ot),st=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.isValidIdentifier=function(t){return st.test(t)},e.prototype.canonicalString=function(){return this.toArray().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t}).join(".")},e.prototype.toString=function(){return this.canonicalString()},e.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},e.keyField=function(){return new e(["__name__"])},e.fromServerFormat=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new w(_.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new w(_.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new w(_.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.EMPTY_PATH=new e([]),e}(ot),ct=function(){function t(e){this.path=e,y(t.isDocumentKey(e),"Invalid DocumentKey with an odd number of segments: "+e.toArray().join("/"))}return t.prototype.isEqual=function(t){return null!==t&&0===at.comparator(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.comparator=function(t,e){return at.comparator(t.path,e.path)},t.isDocumentKey=function(t){return t.length%2==0},t.fromSegments=function(e){return new t(new at(e.slice()))},t.fromPathString=function(e){return new t(at.fromString(e))},t.EMPTY=new t(new at([])),t}(),lt=function(){function t(t,e,n,r){this.key=t,this.version=e,this.data=n,this.hasLocalMutations=r.hasLocalMutations}return t.prototype.field=function(t){return this.data.field(t)},t.prototype.fieldValue=function(t){var e=this.field(t);return e?e.value():void 0},t.prototype.value=function(){return this.data.value()},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.data.isEqual(e.data)&&this.hasLocalMutations===e.hasLocalMutations},t.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.data.toString()+", {hasLocalMutations: "+this.hasLocalMutations+"})"},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t.compareByField=function(t,e,n){var r=e.field(t),i=n.field(t);return void 0!==r&&void 0!==i?r.compareTo(i):m("Trying to compare documents on fields that don't exist")},t}(),ft=function(){function t(t,e){this.key=t,this.version=e}return t.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},t.prototype.isEqual=function(t){return t&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t}(),ht=function(){function t(t,e){this.comparator=t,this.root=e||dt.EMPTY}return t.prototype.insert=function(e,n){return new t(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator,this.root.remove(e,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.isEmpty();){var n=this.comparator(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.isEmpty();){var r=this.comparator(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),t.prototype.minKey=function(){return this.root.minKey()},t.prototype.maxKey=function(){return this.root.maxKey()},t.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},t.prototype.forEach=function(t){this.inorderTraversal(function(e,n){return t(e,n),!1})},t.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},t.prototype.getIterator=function(){return new pt(this.root,null,this.comparator,!1)},t.prototype.getIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!1)},t.prototype.getReverseIterator=function(){return new pt(this.root,null,this.comparator,!0)},t.prototype.getReverseIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!0)},t}(),pt=function(){function t(t,e,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!t.isEmpty();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.isReverse?t.left:t.right;else{if(0===i){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return t.prototype.getNext=function(){y(this.nodeStack.length>0,"getNext() called on iterator when hasNext() is false.");var t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e},t.prototype.hasNext=function(){return this.nodeStack.length>0},t.prototype.peek=function(){if(0===this.nodeStack.length)return null;var t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}},t}(),dt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},t.prototype.minKey=function(){return this.min().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp()},t.prototype.removeMin=function(){if(this.left.isEmpty())return t.EMPTY;var e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()},t.prototype.isRed=function(){return this.color},t.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},t.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight())).rotateLeft()).colorFlip()),t},t.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=(t=t.rotateRight()).colorFlip()),t},t.prototype.rotateLeft=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},t.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw m("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw m("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check();if(t!==this.right.check())throw m("Black depths differ");return t+(this.isRed()?0:1)},t.EMPTY=null,t.RED=!0,t.BLACK=!1,t}(),vt=function(){function t(){this.size=0}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new dt(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.isRed=function(){return!1},t.prototype.checkMaxDepth=function(){return!0},t.prototype.check=function(){return 0},t}();dt.EMPTY=new vt,function(t){t[t.NullValue=0]="NullValue",t[t.BooleanValue=1]="BooleanValue",t[t.NumberValue=2]="NumberValue",t[t.TimestampValue=3]="TimestampValue",t[t.StringValue=4]="StringValue",t[t.BlobValue=5]="BlobValue",t[t.RefValue=6]="RefValue",t[t.GeoPointValue=7]="GeoPointValue",t[t.ArrayValue=8]="ArrayValue",t[t.ObjectValue=9]="ObjectValue"}(X||(X={})),function(t){t[t.Default=0]="Default",t[t.Estimate=1]="Estimate",t[t.Previous=2]="Previous"}($||($={}));var mt=function(){function t(t,e){this.serverTimestampBehavior=t,this.timestampsInSnapshots=e}return t.fromSnapshotOptions=function(e,n){switch(e.serverTimestamps){case"estimate":return new t($.Estimate,n);case"previous":return new t($.Previous,n);case"none":case void 0:return new t($.Default,n);default:return m("fromSnapshotOptions() called with invalid options.")}},t}(),yt=function(){function t(){}return t.prototype.toString=function(){var t=this.value();return null===t?"null":t.toString()},t.prototype.defaultCompareTo=function(t){return y(this.typeOrder!==t.typeOrder,"Default compareTo should not be used for values of same type."),K(this.typeOrder,t.typeOrder)},t}(),gt=function(t){function e(){var e=t.call(this)||this;return e.typeOrder=X.NullValue,e.internalValue=null,e}return s.__extends(e,t),e.prototype.value=function(t){return null},e.prototype.isEqual=function(t){return t instanceof e},e.prototype.compareTo=function(t){return t instanceof e?0:this.defaultCompareTo(t)},e.INSTANCE=new e,e}(yt),bt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BooleanValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this,t):this.defaultCompareTo(t)},e.of=function(t){return t?e.TRUE:e.FALSE},e.TRUE=new e(!0),e.FALSE=new e(!1),e}(yt),_t=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.NumberValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.compareTo=function(t){return t instanceof e?(n=this.internalValue,r=t.internalValue,n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1):this.defaultCompareTo(t);var n,r},e}(yt);function wt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var Et=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e}(_t),Tt=function(t){function e(e){var n=t.call(this,e)||this;return n.internalValue=e,n}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e.NAN=new e(NaN),e.POSITIVE_INFINITY=new e(1/0),e.NEGATIVE_INFINITY=new e(-1/0),e}(_t),Ct=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.StringValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this.internalValue,t.internalValue):this.defaultCompareTo(t)},e}(yt),xt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.TimestampValue,n}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):t instanceof St?-1:this.defaultCompareTo(t)},e}(yt),St=function(t){function e(e,n){var r=t.call(this)||this;return r.localWriteTime=e,r.previousValue=n,r.typeOrder=X.TimestampValue,r}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.serverTimestampBehavior===$.Estimate?new xt(this.localWriteTime).value(t):t&&t.serverTimestampBehavior===$.Previous&&this.previousValue?this.previousValue.value(t):null},e.prototype.isEqual=function(t){return t instanceof e&&this.localWriteTime.isEqual(t.localWriteTime)},e.prototype.compareTo=function(t){return t instanceof e?this.localWriteTime._compareTo(t.localWriteTime):t instanceof xt?1:this.defaultCompareTo(t)},e.prototype.toString=function(){return"<ServerTimestamp localTime="+this.localWriteTime.toString()+">"},e}(yt),kt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BlobValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),Nt=function(t){function e(e,n){var r=t.call(this)||this;return r.databaseId=e,r.key=n,r.typeOrder=X.RefValue,r}return s.__extends(e,t),e.prototype.value=function(t){return this.key},e.prototype.isEqual=function(t){return t instanceof e&&(this.key.isEqual(t.key)&&this.databaseId.isEqual(t.databaseId))},e.prototype.compareTo=function(t){if(t instanceof e){var n=this.databaseId.compareTo(t.databaseId);return 0!==n?n:ct.comparator(this.key,t.key)}return this.defaultCompareTo(t)},e}(yt),At=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.GeoPointValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),It=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ObjectValue,n}return s.__extends(e,t),e.prototype.value=function(t){var e={};return this.internalValue.inorderTraversal(function(n,r){e[n]=r.value(t)}),e},e.prototype.forEach=function(t){this.internalValue.inorderTraversal(t)},e.prototype.isEqual=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext();if(i.key!==o.key||!i.value.isEqual(o.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext(),a=K(i.key,o.key)||i.value.compareTo(o.value);if(a)return a}return K(n.hasNext(),r.hasNext())}return this.defaultCompareTo(t)},e.prototype.set=function(t,n){if(y(!t.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===t.length)return this.setChild(t.firstSegment(),n);var r=this.child(t.firstSegment());r instanceof e||(r=e.EMPTY);var i=r.set(t.popFirst(),n);return this.setChild(t.firstSegment(),i)},e.prototype.delete=function(t){if(y(!t.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===t.length)return new e(this.internalValue.remove(t.firstSegment()));var n=this.child(t.firstSegment());if(n instanceof e){var r=n.delete(t.popFirst());return new e(this.internalValue.insert(t.firstSegment(),r))}return this},e.prototype.contains=function(t){return void 0!==this.field(t)},e.prototype.field=function(t){y(!t.isEmpty(),"Can't get field of empty path");var n=this;return t.forEach(function(t){n=n instanceof e&&n.internalValue.get(t)||void 0}),n},e.prototype.toString=function(){return JSON.stringify(this.value())},e.prototype.child=function(t){return this.internalValue.get(t)||void 0},e.prototype.setChild=function(t,n){return new e(this.internalValue.insert(t,n))},e.EMPTY=new e(new ht(K)),e}(yt),Ot=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ArrayValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue.map(function(e){return e.value(t)})},e.prototype.forEach=function(t){this.internalValue.forEach(t)},e.prototype.isEqual=function(t){if(t instanceof e){if(this.internalValue.length!==t.internalValue.length)return!1;for(var n=0;n<this.internalValue.length;n++)if(!this.internalValue[n].isEqual(t.internalValue[n]))return!1;return!0}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=Math.min(this.internalValue.length,t.internalValue.length),r=0;r<n;r++){var i=this.internalValue[r].compareTo(t.internalValue[r]);if(i)return i}return K(this.internalValue.length,t.internalValue.length)}return this.defaultCompareTo(t)},e.prototype.toString=function(){return JSON.stringify(this.value())},e}(yt),Pt=Number,Rt=Pt.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),Dt=Pt.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Mt=Pt.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Lt(t){return null===t||void 0===t}var Ft=function(){function t(t,e,n,r,i,o){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=null),this.path=t,this.explicitOrderBy=e,this.filters=n,this.limit=r,this.startAt=i,this.endAt=o,this.memoizedCanonicalId=null,this.memoizedOrderBy=null,this.startAt&&this.assertValidBound(this.startAt),this.endAt&&this.assertValidBound(this.endAt)}return t.atPath=function(e){return new t(e)},Object.defineProperty(t.prototype,"orderBy",{get:function(){if(null===this.memoizedOrderBy){var t=this.getInequalityFilterField(),e=this.getFirstOrderByField();if(null!==t&&null===e)t.isKeyField()?this.memoizedOrderBy=[Kt]:this.memoizedOrderBy=[new zt(t),Kt];else{y(null===t||null!==e&&t.isEqual(e),"First orderBy should match inequality field."),this.memoizedOrderBy=[];for(var n=!1,r=0,i=this.explicitOrderBy;r<i.length;r++){var o=i[r];this.memoizedOrderBy.push(o),o.field.isKeyField()&&(n=!0)}if(!n){var a=this.explicitOrderBy.length>0?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:Wt.ASCENDING;this.memoizedOrderBy.push(a===Wt.ASCENDING?Kt:Gt)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),t.prototype.addFilter=function(e){y(null==this.getInequalityFilterField()||!(e instanceof jt)||!e.isInequality()||e.field.isEqual(this.getInequalityFilterField()),"Query must only have one inequality field."),y(!ct.isDocumentKey(this.path),"No filtering allowed for document query");var n=this.filters.concat([e]);return new t(this.path,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},t.prototype.addOrderBy=function(e){y(!ct.isDocumentKey(this.path),"No ordering allowed for document query"),y(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([e]);return new t(this.path,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},t.prototype.withLimit=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),e,this.startAt,this.endAt)},t.prototype.withStartAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,e,this.endAt)},t.prototype.withEndAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,e)},t.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var t=this.path.canonicalString();t+="|f:";for(var e=0,n=this.filters;e<n.length;e++){t+=n[e].canonicalId(),t+=","}t+="|ob:";for(var r=0,i=this.orderBy;r<i.length;r++){t+=i[r].canonicalId(),t+=","}Lt(this.limit)||(t+="|l:",t+=this.limit),this.startAt&&(t+="|lb:",t+=this.startAt.canonicalId()),this.endAt&&(t+="|ub:",t+=this.endAt.canonicalId()),this.memoizedCanonicalId=t}return this.memoizedCanonicalId},t.prototype.toString=function(){var t="Query("+this.path.canonicalString();return this.filters.length>0&&(t+=", filters: ["+this.filters.join(", ")+"]"),Lt(this.limit)||(t+=", limit: "+this.limit),this.explicitOrderBy.length>0&&(t+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(t+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(t+=", endAt: "+this.endAt.canonicalId()),t+")"},t.prototype.isEqual=function(t){if(this.limit!==t.limit)return!1;if(this.orderBy.length!==t.orderBy.length)return!1;for(var e=0;e<this.orderBy.length;e++)if(!this.orderBy[e].isEqual(t.orderBy[e]))return!1;if(this.filters.length!==t.filters.length)return!1;for(e=0;e<this.filters.length;e++)if(!this.filters[e].isEqual(t.filters[e]))return!1;return!!this.path.isEqual(t.path)&&(!(null!==this.startAt?!this.startAt.isEqual(t.startAt):null!==t.startAt)&&(null!==this.endAt?this.endAt.isEqual(t.endAt):null===t.endAt))},t.prototype.docComparator=function(t,e){for(var n=!1,r=0,i=this.orderBy;r<i.length;r++){var o=i[r],a=o.compare(t,e);if(0!==a)return a;n=n||o.field.isKeyField()}return y(n,"orderBy used that doesn't compare on key field"),0},t.prototype.matches=function(t){return this.matchesAncestor(t)&&this.matchesOrderBy(t)&&this.matchesFilters(t)&&this.matchesBounds(t)},t.prototype.hasLimit=function(){return!Lt(this.limit)},t.prototype.getFirstOrderByField=function(){return this.explicitOrderBy.length>0?this.explicitOrderBy[0].field:null},t.prototype.getInequalityFilterField=function(){for(var t=0,e=this.filters;t<e.length;t++){var n=e[t];if(n instanceof jt&&n.isInequality())return n.field}return null},t.prototype.hasArrayContainsFilter=function(){return void 0!==this.filters.find(function(t){return t instanceof jt&&t.op===Ut.ARRAY_CONTAINS})},t.prototype.isDocumentQuery=function(){return ct.isDocumentKey(this.path)&&0===this.filters.length},t.prototype.matchesAncestor=function(t){var e=t.key.path;return ct.isDocumentKey(this.path)?this.path.isEqual(e):this.path.isPrefixOf(e)&&this.path.length===e.length-1},t.prototype.matchesOrderBy=function(t){for(var e=0,n=this.explicitOrderBy;e<n.length;e++){var r=n[e];if(!r.field.isKeyField()&&void 0===t.field(r.field))return!1}return!0},t.prototype.matchesFilters=function(t){for(var e=0,n=this.filters;e<n.length;e++){if(!n[e].matches(t))return!1}return!0},t.prototype.matchesBounds=function(t){return!(this.startAt&&!this.startAt.sortsBeforeDocument(this.orderBy,t))&&(!this.endAt||!this.endAt.sortsBeforeDocument(this.orderBy,t))},t.prototype.assertValidBound=function(t){y(t.position.length<=this.orderBy.length,"Bound is longer than orderBy")},t}(),Ut=function(){function t(t){this.name=t}return t.fromString=function(e){switch(e){case"<":return t.LESS_THAN;case"<=":return t.LESS_THAN_OR_EQUAL;case"==":return t.EQUAL;case">=":return t.GREATER_THAN_OR_EQUAL;case">":return t.GREATER_THAN;case"array-contains":return t.ARRAY_CONTAINS;default:return m("Unknown relation: "+e)}},t.prototype.toString=function(){return this.name},t.prototype.isEqual=function(t){return this.name===t.name},t.LESS_THAN=new t("<"),t.LESS_THAN_OR_EQUAL=new t("<="),t.EQUAL=new t("=="),t.GREATER_THAN=new t(">"),t.GREATER_THAN_OR_EQUAL=new t(">="),t.ARRAY_CONTAINS=new t("array-contains"),t}(),jt=function(){function t(t,e,n){this.field=t,this.op=e,this.value=n}return t.prototype.matches=function(t){if(this.field.isKeyField()){y(this.value instanceof Nt,"Comparing on key, but filter value not a RefValue"),y(this.op!==Ut.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var e=this.value,n=ct.comparator(t.key,e.key);return this.matchesComparison(n)}var r=t.field(this.field);return void 0!==r&&this.matchesValue(r)},t.prototype.matchesValue=function(t){var e=this;return this.op===Ut.ARRAY_CONTAINS?t instanceof Ot&&void 0!==t.internalValue.find(function(t){return t.isEqual(e.value)}):this.value.typeOrder===t.typeOrder&&this.matchesComparison(t.compareTo(this.value))},t.prototype.matchesComparison=function(t){switch(this.op){case Ut.LESS_THAN:return t<0;case Ut.LESS_THAN_OR_EQUAL:return t<=0;case Ut.EQUAL:return 0===t;case Ut.GREATER_THAN:return t>0;case Ut.GREATER_THAN_OR_EQUAL:return t>=0;default:return m("Unknown relation op"+this.op)}},t.prototype.isInequality=function(){return this.op!==Ut.EQUAL&&this.op!==Ut.ARRAY_CONTAINS},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.op.toString()+this.value.toString()},t.prototype.isEqual=function(e){return e instanceof t&&(this.op.isEqual(e.op)&&this.field.isEqual(e.field)&&this.value.isEqual(e.value))},t.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},t}(),Bt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field);return void 0!==e&&null===e.value()},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS null"},t.prototype.toString=function(){return this.field.canonicalString()+" IS null"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}(),qt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field).value();return"number"==typeof e&&isNaN(e)},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.toString=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}();var Vt,Wt=function(){function t(t){this.name=t}return t.prototype.toString=function(){return this.name},t.ASCENDING=new t("asc"),t.DESCENDING=new t("desc"),t}(),Ht=function(){function t(t,e){this.position=t,this.before=e}return t.prototype.canonicalId=function(){for(var t=this.before?"b:":"a:",e=0,n=this.position;e<n.length;e++){t+=n[e].toString()}return t},t.prototype.sortsBeforeDocument=function(t,e){y(this.position.length<=t.length,"Bound has more components than query's orderBy");for(var n=0,r=0;r<this.position.length;r++){var i=t[r],o=this.position[r];if(i.field.isKeyField())y(o instanceof Nt,"Bound has a non-key value where the key path is being used."),n=ct.comparator(o.key,e.key);else{var a=e.field(i.field);y(void 0!==a,"Field should exist since document matched the orderBy already."),n=o.compareTo(a)}if(i.dir===Wt.DESCENDING&&(n*=-1),0!==n)break}return this.before?n<=0:n<0},t.prototype.isEqual=function(t){if(null===t)return!1;if(this.before!==t.before||this.position.length!==t.position.length)return!1;for(var e=0;e<this.position.length;e++){var n=this.position[e],r=t.position[e];return n.isEqual(r)}return!0},t}(),zt=function(){function t(t,e){this.field=t,void 0===e&&(e=Wt.ASCENDING),this.dir=e,this.isKeyOrderBy=t.isKeyField()}return t.prototype.compare=function(t,e){var n=this.isKeyOrderBy?lt.compareByKey(t,e):lt.compareByField(this.field,t,e);switch(this.dir){case Wt.ASCENDING:return n;case Wt.DESCENDING:return-1*n;default:return m("Unknown direction: "+this.dir)}},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.dir.toString()},t.prototype.toString=function(){return this.field.canonicalString()+" ("+this.dir+")"},t.prototype.isEqual=function(t){return this.dir===t.dir&&this.field.isEqual(t.field)},t}(),Kt=new zt(ut.keyField(),Wt.ASCENDING),Gt=new zt(ut.keyField(),Wt.DESCENDING),Qt=function(){function t(t){this.timestamp=t}return t.fromMicroseconds=function(e){var n=Math.floor(e/1e6);return new t(new et(n,e%1e6*1e3))},t.fromTimestamp=function(e){return new t(e)},t.forDeletedDoc=function(){return t.MIN},t.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.toTimestamp=function(){return this.timestamp},t.MIN=new t(new et(0,0)),t}();!function(t){t[t.Listen=0]="Listen",t[t.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",t[t.LimboResolution=2]="LimboResolution"}(Vt||(Vt={}));var Yt,Xt=function(){function t(t,e,n,r,i){void 0===r&&(r=Qt.MIN),void 0===i&&(i=b()),this.query=t,this.targetId=e,this.purpose=n,this.snapshotVersion=r,this.resumeToken=i}return t.prototype.update=function(e){return new t(this.query,this.targetId,this.purpose,e.snapshotVersion,e.resumeToken)},t.prototype.isEqual=function(t){return this.targetId===t.targetId&&this.purpose===t.purpose&&this.snapshotVersion.isEqual(t.snapshotVersion)&&this.resumeToken===t.resumeToken&&this.query.isEqual(t.query)},t}(),$t=function(){function t(t){this.fields=t}return t.prototype.covers=function(t){for(var e=0,n=this.fields;e<n.length;e++){if(n[e].isPrefixOf(t))return!0}return!1},t.prototype.isEqual=function(t){return G(this.fields,t.fields)},t}(),Jt=function(){function t(t,e){this.field=t,this.transform=e}return t.prototype.isEqual=function(t){return this.field.isEqual(t.field)&&this.transform.isEqual(t.transform)},t}(),Zt=function(){return function(t,e){this.version=t,this.transformResults=e}}();!function(t){t[t.Set=0]="Set",t[t.Patch=1]="Patch",t[t.Transform=2]="Transform",t[t.Delete=3]="Delete"}(Yt||(Yt={}));var te,ee=function(){function t(t,e){this.updateTime=t,this.exists=e,y(void 0===t||void 0===e,'Precondition can specify "exists" or "updateTime" but not both')}return t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),t.prototype.isValidFor=function(t){return void 0!==this.updateTime?t instanceof lt&&t.version.isEqual(this.updateTime):void 0!==this.exists?this.exists?t instanceof lt:null===t||t instanceof ft:(y(this.isNone,"Precondition should be empty"),!0)},t.prototype.isEqual=function(t){return e=this.updateTime,n=t.updateTime,(null!==e&&void 0!==e?!(!n||!e.isEqual(n)):e===n)&&this.exists===t.exists;var e,n},t.NONE=new t,t}(),ne=function(){function t(){}return t.prototype.verifyKeyMatches=function(t){null!=t&&y(t.key.isEqual(this.key),"Can only apply a mutation to a document with the same key")},t.getPostMutationVersion=function(t){return t instanceof lt?t.version:Qt.MIN},t}(),re=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.value=n,i.precondition=r,i.type=Yt.Set,i}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by SetMutation.");var n=ne.getPostMutationVersion(t);return new lt(this.key,n,this.value,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t);return new lt(this.key,r,this.value,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.value.isEqual(t.value)&&this.precondition.isEqual(t.precondition)},e}(ne),ie=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.key=e,o.data=n,o.fieldMask=r,o.precondition=i,o.type=Yt.Patch,o}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(t))return t;var n=ne.getPostMutationVersion(t),r=this.patchDocument(t);return new lt(this.key,n,r,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t),i=this.patchDocument(t);return new lt(this.key,r,i,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.fieldMask.isEqual(t.fieldMask)&&this.precondition.isEqual(t.precondition)},e.prototype.patchDocument=function(t){var e;return e=t instanceof lt?t.data:It.EMPTY,this.patchObject(e)},e.prototype.patchObject=function(t){for(var e=0,n=this.fieldMask.fields;e<n.length;e++){var r=n[e],i=this.data.field(r);t=void 0!==i?t.set(r,i):t.delete(r)}return t},e}(ne),oe=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.fieldTransforms=n,r.type=Yt.Transform,r.precondition=ee.exists(!0),r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null!=e.transformResults,"Transform results missing for TransformMutation."),!this.precondition.isValidFor(t))return t;var n=this.requireDocument(t),r=this.serverTransformResults(t,e.transformResults),i=this.transformObject(n.data,r);return new lt(this.key,n.version,i,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=this.requireDocument(t),i=this.localTransformResults(n,e),o=this.transformObject(r.data,i);return new lt(this.key,r.version,o,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&G(this.fieldTransforms,t.fieldTransforms)&&this.precondition.isEqual(t.precondition)},e.prototype.requireDocument=function(t){y(t instanceof lt,"Unknown MaybeDocument type "+t);var e=t;return y(e.key.isEqual(this.key),"Can only transform a document with the same key"),e},e.prototype.serverTransformResults=function(t,e){var n=[];y(this.fieldTransforms.length===e.length,"server transform result count ("+e.length+") should match field transform count ("+this.fieldTransforms.length+")");for(var r=0;r<e.length;r++){var i=this.fieldTransforms[r],o=i.transform,a=null;t instanceof lt&&(a=t.field(i.field)||null),n.push(o.applyToRemoteDocument(a,e[r]))}return n},e.prototype.localTransformResults=function(t,e){for(var n=[],r=0,i=this.fieldTransforms;r<i.length;r++){var o=i[r],a=o.transform,s=null;e instanceof lt&&(s=e.field(o.field)||null),n.push(a.applyToLocalView(s,t))}return n},e.prototype.transformObject=function(t,e){y(e.length===this.fieldTransforms.length,"TransformResults length mismatch.");for(var n=0;n<this.fieldTransforms.length;n++){var r=this.fieldTransforms[n].field;t=t.set(r,e[n])}return t},e}(ne),ae=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.precondition=n,r.type=Yt.Delete,r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){return this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by DeleteMutation."),new ft(this.key,Qt.MIN)},e.prototype.applyToLocalView=function(t,e,n){return this.verifyKeyMatches(t),this.precondition.isValidFor(t)?(t&&y(t.key.isEqual(this.key),"Can only apply mutation to document with same key"),new ft(this.key,Qt.forDeletedDoc())):t},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.precondition.isEqual(t.precondition)},e}(ne),se=function(){function t(t){this.count=t}return t.prototype.isEqual=function(t){return t&&t.count===this.count},t}();function ue(t){switch(t){case _.OK:return m("Treated status OK as error");case _.CANCELLED:case _.UNKNOWN:case _.DEADLINE_EXCEEDED:case _.RESOURCE_EXHAUSTED:case _.INTERNAL:case _.UNAVAILABLE:case _.UNAUTHENTICATED:return!1;case _.INVALID_ARGUMENT:case _.NOT_FOUND:case _.ALREADY_EXISTS:case _.PERMISSION_DENIED:case _.FAILED_PRECONDITION:case _.ABORTED:case _.OUT_OF_RANGE:case _.UNIMPLEMENTED:case _.DATA_LOSS:return!0;default:return m("Unknown status code: "+t)}}function ce(t){if(void 0===t)return d("GRPC error has no .code"),_.UNKNOWN;switch(t){case te.OK:return _.OK;case te.CANCELLED:return _.CANCELLED;case te.UNKNOWN:return _.UNKNOWN;case te.DEADLINE_EXCEEDED:return _.DEADLINE_EXCEEDED;case te.RESOURCE_EXHAUSTED:return _.RESOURCE_EXHAUSTED;case te.INTERNAL:return _.INTERNAL;case te.UNAVAILABLE:return _.UNAVAILABLE;case te.UNAUTHENTICATED:return _.UNAUTHENTICATED;case te.INVALID_ARGUMENT:return _.INVALID_ARGUMENT;case te.NOT_FOUND:return _.NOT_FOUND;case te.ALREADY_EXISTS:return _.ALREADY_EXISTS;case te.PERMISSION_DENIED:return _.PERMISSION_DENIED;case te.FAILED_PRECONDITION:return _.FAILED_PRECONDITION;case te.ABORTED:return _.ABORTED;case te.OUT_OF_RANGE:return _.OUT_OF_RANGE;case te.UNIMPLEMENTED:return _.UNIMPLEMENTED;case te.DATA_LOSS:return _.DATA_LOSS;default:return m("Unknown status code: "+t)}}!function(t){t[t.OK=0]="OK",t[t.CANCELLED=1]="CANCELLED",t[t.UNKNOWN=2]="UNKNOWN",t[t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",t[t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",t[t.NOT_FOUND=5]="NOT_FOUND",t[t.ALREADY_EXISTS=6]="ALREADY_EXISTS",t[t.PERMISSION_DENIED=7]="PERMISSION_DENIED",t[t.UNAUTHENTICATED=16]="UNAUTHENTICATED",t[t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",t[t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",t[t.ABORTED=10]="ABORTED",t[t.OUT_OF_RANGE=11]="OUT_OF_RANGE",t[t.UNIMPLEMENTED=12]="UNIMPLEMENTED",t[t.INTERNAL=13]="INTERNAL",t[t.UNAVAILABLE=14]="UNAVAILABLE",t[t.DATA_LOSS=15]="DATA_LOSS"}(te||(te={}));var le=function(){function t(t){this.comparator=t,this.data=new ht(this.comparator)}return t.fromMapKeys=function(e){var n=new t(e.comparator);return e.forEach(function(t){n=n.add(t)}),n},t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.minKey()},t.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!0,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.forEachInRange=function(t,e){for(var n=this.data.getIteratorFrom(t[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}},t.prototype.forEachWhile=function(t,e){var n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();){if(!t(n.getNext().key))return}},t.prototype.firstAfterOrEqual=function(t){var e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null},t.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.isEmpty=function(){return this.data.isEmpty()},t.prototype.unionWith=function(t){var e=this;return t.forEach(function(t){e=e.add(t)}),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.getIterator(),r=e.data.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(0!==this.comparator(i,o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){return t.push(e)}),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.comparator);return n.data=e,n},t}(),fe=new ht(ct.comparator);function he(){return fe}var pe=new ht(ct.comparator);function de(){return pe}var ve=new ht(ct.comparator);function me(){return ve}var ye=new le(ct.comparator);function ge(){return ye}var be,_e,we=function(){return function(t,e,n,r,i){this.snapshotVersion=t,this.targetChanges=e,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}}(),Ee=function(){return function(t,e,n,r,i){this.resumeToken=t,this.current=e,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}}();!function(t){t[t.Added=0]="Added",t[t.Removed=1]="Removed",t[t.Modified=2]="Modified",t[t.Metadata=3]="Metadata"}(be||(be={})),function(t){t[t.Local=0]="Local",t[t.Synced=1]="Synced"}(_e||(_e={}));var Te,Ce=function(){function t(){this.changeMap=new ht(ct.comparator)}return t.prototype.track=function(t){var e=t.doc.key,n=this.changeMap.get(e);n?t.type!==be.Added&&n.type===be.Metadata?this.changeMap=this.changeMap.insert(e,t):t.type===be.Metadata&&n.type!==be.Removed?this.changeMap=this.changeMap.insert(e,{type:n.type,doc:t.doc}):t.type===be.Modified&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):t.type===be.Modified&&n.type===be.Added?this.changeMap=this.changeMap.insert(e,{type:be.Added,doc:t.doc}):t.type===be.Removed&&n.type===be.Added?this.changeMap=this.changeMap.remove(e):t.type===be.Removed&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Removed,doc:n.doc}):t.type===be.Added&&n.type===be.Removed?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):m("unsupported combination of changes: "+JSON.stringify(t)+" after "+JSON.stringify(n)):this.changeMap=this.changeMap.insert(e,t)},t.prototype.getChanges=function(){var t=[];return this.changeMap.inorderTraversal(function(e,n){t.push(n)}),t},t}(),xe=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.fromCache=i,this.hasPendingWrites=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}return t.prototype.isEqual=function(t){if(this.fromCache!==t.fromCache||this.hasPendingWrites!==t.hasPendingWrites||this.syncStateChanged!==t.syncStateChanged||!this.query.isEqual(t.query)||!this.docs.isEqual(t.docs)||!this.oldDocs.isEqual(t.oldDocs))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),Se=function(){return function(t,e,n,r){this.updatedTargetIds=t,this.removedTargetIds=e,this.key=n,this.newDoc=r}}(),ke=function(){return function(t,e){this.targetId=t,this.existenceFilter=e}}();!function(t){t[t.NoChange=0]="NoChange",t[t.Added=1]="Added",t[t.Removed=2]="Removed",t[t.Current=3]="Current",t[t.Reset=4]="Reset"}(Te||(Te={}));var Ne=function(){return function(t,e,n,r){void 0===n&&(n=b()),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r}}(),Ae=function(){function t(){this.pendingResponses=0,this.documentChanges=Pe(),this._resumeToken=b(),this._current=!1,this._hasPendingChanges=!0}return Object.defineProperty(t.prototype,"current",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this._resumeToken},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPending",{get:function(){return 0!==this.pendingResponses},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingChanges",{get:function(){return this._hasPendingChanges},enumerable:!0,configurable:!0}),t.prototype.updateResumeToken=function(t){t.length>0&&(this._hasPendingChanges=!0,this._resumeToken=t)},t.prototype.toTargetChange=function(){var t=ge(),e=ge(),n=ge();return this.documentChanges.forEach(function(r,i){switch(i){case be.Added:t=t.add(r);break;case be.Modified:e=e.add(r);break;case be.Removed:n=n.add(r);break;default:m("Encountered invalid change type: "+i)}}),new Ee(this._resumeToken,this._current,t,e,n)},t.prototype.clearPendingChanges=function(){this._hasPendingChanges=!1,this.documentChanges=Pe()},t.prototype.addDocumentChange=function(t,e){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.insert(t,e)},t.prototype.removeDocumentChange=function(t){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.remove(t)},t.prototype.recordPendingTargetRequest=function(){this.pendingResponses+=1},t.prototype.recordTargetResponse=function(){this.pendingResponses-=1},t.prototype.markCurrent=function(){this._hasPendingChanges=!0,this._current=!0},t}(),Ie=function(){function t(t){this.metadataProvider=t,this.targetStates={},this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K)}return t.prototype.handleDocumentChange=function(t){for(var e=0,n=t.updatedTargetIds;e<n.length;e++){var r=n[e];t.newDoc instanceof lt?this.addDocumentToTarget(r,t.newDoc):t.newDoc instanceof ft&&this.removeDocumentFromTarget(r,t.key,t.newDoc)}for(var i=0,o=t.removedTargetIds;i<o.length;i++){r=o[i];this.removeDocumentFromTarget(r,t.key,t.newDoc)}},t.prototype.handleTargetChange=function(t){var e=this;t.targetIds.forEach(function(n){var r=e.ensureTargetState(n);switch(t.state){case Te.NoChange:e.isActiveTarget(n)&&r.updateResumeToken(t.resumeToken);break;case Te.Added:r.recordTargetResponse(),r.isPending||r.clearPendingChanges(),r.updateResumeToken(t.resumeToken);break;case Te.Removed:r.recordTargetResponse(),r.isPending||e.removeTarget(n),y(!t.cause,"WatchChangeAggregator does not handle errored targets");break;case Te.Current:e.isActiveTarget(n)&&(r.markCurrent(),r.updateResumeToken(t.resumeToken));break;case Te.Reset:e.isActiveTarget(n)&&(e.resetTarget(n),r.updateResumeToken(t.resumeToken));break;default:m("Unknown target watch change state: "+t.state)}})},t.prototype.handleExistenceFilter=function(t){var e=t.targetId,n=t.existenceFilter.count,r=this.queryDataForActiveTarget(e);if(r){var i=r.query;if(i.isDocumentQuery())if(0===n){var o=new ct(i.path);this.removeDocumentFromTarget(e,o,new ft(o,Qt.forDeletedDoc()))}else y(1===n,"Single document existence filter with count: "+n);else this.getCurrentDocumentCountForTarget(e)!==n&&(this.resetTarget(e),this.pendingTargetResets=this.pendingTargetResets.add(e))}},t.prototype.createRemoteEvent=function(t){var e=this,n={};x(this.targetStates,function(r,i){var o=e.queryDataForActiveTarget(r);if(o){if(i.current&&o.query.isDocumentQuery()){var a=new ct(o.query.path);null!==e.pendingDocumentUpdates.get(a)||e.targetContainsDocument(r,a)||e.removeDocumentFromTarget(r,a,new ft(a,t))}i.hasPendingChanges&&(n[r]=i.toTargetChange(),i.clearPendingChanges())}});var r=ge();this.pendingDocumentTargetMapping.forEach(function(t,n){var i=!0;n.forEachWhile(function(t){var n=e.queryDataForActiveTarget(t);return!n||n.purpose===Vt.LimboResolution||(i=!1,!1)}),i&&(r=r.add(t))});var i=new we(t,n,this.pendingTargetResets,this.pendingDocumentUpdates,r);return this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K),i},t.prototype.addDocumentToTarget=function(t,e){if(this.isActiveTarget(t)){var n=this.targetContainsDocument(t,e.key)?be.Modified:be.Added;this.ensureTargetState(t).addDocumentChange(e.key,n),this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e.key,e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e.key,this.ensureDocumentTargetMapping(e.key).add(t))}},t.prototype.removeDocumentFromTarget=function(t,e,n){if(this.isActiveTarget(t)){var r=this.ensureTargetState(t);this.targetContainsDocument(t,e)?r.addDocumentChange(e,be.Removed):r.removeDocumentChange(e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e,this.ensureDocumentTargetMapping(e).delete(t)),n&&(this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e,n))}},t.prototype.removeTarget=function(t){delete this.targetStates[t]},t.prototype.getCurrentDocumentCountForTarget=function(t){var e=this.ensureTargetState(t).toTargetChange();return this.metadataProvider.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size},t.prototype.recordPendingTargetRequest=function(t){this.ensureTargetState(t).recordPendingTargetRequest()},t.prototype.ensureTargetState=function(t){return this.targetStates[t]||(this.targetStates[t]=new Ae),this.targetStates[t]},t.prototype.ensureDocumentTargetMapping=function(t){var e=this.pendingDocumentTargetMapping.get(t);return e||(e=new le(K),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(t,e)),e},t.prototype.isActiveTarget=function(t){return null!==this.queryDataForActiveTarget(t)},t.prototype.queryDataForActiveTarget=function(t){var e=this.targetStates[t];return e&&e.isPending?null:this.metadataProvider.getQueryDataForTarget(t)},t.prototype.resetTarget=function(t){var e=this;y(!this.targetStates[t].isPending,"Should only reset active targets"),this.targetStates[t]=new Ae,this.metadataProvider.getRemoteKeysForTarget(t).forEach(function(n){e.removeDocumentFromTarget(t,n)})},t.prototype.targetContainsDocument=function(t,e){return this.metadataProvider.getRemoteKeysForTarget(t).has(e)},t}();function Oe(){return new ht(ct.comparator)}function Pe(){return new ht(ct.comparator)}var Re=function(){function t(){}return t.prototype.applyToLocalView=function(t,e){return new St(e,t)},t.prototype.applyToRemoteDocument=function(t,e){return e},t.prototype.isEqual=function(e){return e instanceof t},t.instance=new t,t}(),De=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e.find(function(e){return e.isEqual(t)})||e.push(t)},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}(),Me=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e=e.filter(function(e){return!e.isEqual(t)})},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}();function Le(t){return t instanceof Ot?t.internalValue.slice():[]}var Fe,Ue,je=((Fe={})[Wt.ASCENDING.name]="ASCENDING",Fe[Wt.DESCENDING.name]="DESCENDING",Fe),Be=((Ue={})[Ut.LESS_THAN.name]="LESS_THAN",Ue[Ut.LESS_THAN_OR_EQUAL.name]="LESS_THAN_OR_EQUAL",Ue[Ut.GREATER_THAN.name]="GREATER_THAN",Ue[Ut.GREATER_THAN_OR_EQUAL.name]="GREATER_THAN_OR_EQUAL",Ue[Ut.EQUAL.name]="EQUAL",Ue[Ut.ARRAY_CONTAINS.name]="ARRAY_CONTAINS",Ue),qe=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ve(t,e){y(!Lt(t),e+" is missing")}function We(t){return"number"==typeof t?t:"string"==typeof t?Number(t):m("can't parse "+t)}var He=function(){function t(t,e){this.databaseId=t,this.options=e}return t.prototype.emptyByteString=function(){return this.options.useProto3Json?"":new Uint8Array(0)},t.prototype.unsafeCastProtoByteString=function(t){return t},t.prototype.fromRpcStatus=function(t){var e=void 0===t.code?_.UNKNOWN:ce(t.code);return new w(e,t.message||"")},t.prototype.toInt32Value=function(t){return Lt(t)?void 0:{value:t}},t.prototype.fromInt32Value=function(t){var e;return Lt(e="object"==typeof t?t.value:t)?null:e},t.prototype.toTimestamp=function(t){return{seconds:t.seconds,nanos:t.nanoseconds}},t.prototype.fromTimestamp=function(t){if("string"==typeof t)return this.fromIso8601String(t);y(!!t,"Cannot deserialize null or undefined timestamp.");var e=We(t.seconds||"0"),n=t.nanos||0;return new et(e,n)},t.prototype.fromIso8601String=function(t){var e=0,n=qe.exec(t);if(y(!!n,"invalid timestamp: "+t),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t),o=Math.floor(i.getTime()/1e3);return new et(o,e)},t.prototype.toBytes=function(t){return this.options.useProto3Json?t.toBase64():this.unsafeCastProtoByteString(t.toUint8Array())},t.prototype.fromBlob=function(t){return"string"==typeof t?(y(this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),J.fromBase64String(t)):(y(!this.options.useProto3Json,"Expected bytes to be passed in as string, but got something else instead."),J.fromUint8Array(t))},t.prototype.toVersion=function(t){return this.toTimestamp(t.toTimestamp())},t.prototype.fromVersion=function(t){return y(!!t,"Trying to deserialize version that isn't set"),Qt.fromTimestamp(this.fromTimestamp(t))},t.prototype.toResourceName=function(t,e){return this.fullyQualifiedPrefixPath(t).child("documents").child(e).canonicalString()},t.prototype.fromResourceName=function(t){var e=at.fromString(t);return y(this.isValidResourceName(e),"Tried to deserialize invalid key "+e.toString()),e},t.prototype.toName=function(t){return this.toResourceName(this.databaseId,t.path)},t.prototype.fromName=function(t){var e=this.fromResourceName(t);return y(e.get(1)===this.databaseId.projectId,"Tried to deserialize key from different project: "+e.get(1)+" vs "+this.databaseId.projectId),y(!e.get(3)&&!this.databaseId.database||e.get(3)===this.databaseId.database,"Tried to deserialize key from different database: "+e.get(3)+" vs "+this.databaseId.database),new ct(this.extractLocalPathFromResourceName(e))},t.prototype.toQueryPath=function(t){return 0===t.length?this.encodedDatabaseId:this.toResourceName(this.databaseId,t)},t.prototype.fromQueryPath=function(t){var e=this.fromResourceName(t);return 4===e.length?at.EMPTY_PATH:this.extractLocalPathFromResourceName(e)},Object.defineProperty(t.prototype,"encodedDatabaseId",{get:function(){return new at(["projects",this.databaseId.projectId,"databases",this.databaseId.database]).canonicalString()},enumerable:!0,configurable:!0}),t.prototype.fullyQualifiedPrefixPath=function(t){return new at(["projects",t.projectId,"databases",t.database])},t.prototype.extractLocalPathFromResourceName=function(t){return y(t.length>4&&"documents"===t.get(4),"tried to deserialize invalid key "+t.toString()),t.popFirst(5)},t.prototype.isValidResourceName=function(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)},t.prototype.toValue=function(t){if(t instanceof gt)return{nullValue:"NULL_VALUE"};if(t instanceof bt)return{booleanValue:t.value()};if(t instanceof Et)return{integerValue:""+t.value()};if(t instanceof Tt){var e=t.value();if(this.options.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:t.value()}}return t instanceof Ct?{stringValue:t.value()}:t instanceof It?{mapValue:this.toMapValue(t)}:t instanceof Ot?{arrayValue:this.toArrayValue(t)}:t instanceof xt?{timestampValue:this.toTimestamp(t.internalValue)}:t instanceof At?{geoPointValue:{latitude:t.value().latitude,longitude:t.value().longitude}}:t instanceof kt?{bytesValue:this.toBytes(t.value())}:t instanceof Nt?{referenceValue:this.toResourceName(t.databaseId,t.key.path)}:m("Unknown FieldValue "+JSON.stringify(t))},t.prototype.fromValue=function(t){var e=this,n=t.value_type;if(ze(t,n,"nullValue"))return gt.INSTANCE;if(ze(t,n,"booleanValue"))return bt.of(t.booleanValue);if(ze(t,n,"integerValue"))return new Et(We(t.integerValue));if(ze(t,n,"doubleValue")){if(this.options.useProto3Json){if("NaN"===t.doubleValue)return Tt.NAN;if("Infinity"===t.doubleValue)return Tt.POSITIVE_INFINITY;if("-Infinity"===t.doubleValue)return Tt.NEGATIVE_INFINITY}return new Tt(t.doubleValue)}if(ze(t,n,"stringValue"))return new Ct(t.stringValue);if(ze(t,n,"mapValue"))return this.fromFields(t.mapValue.fields||{});if(ze(t,n,"arrayValue")){Ve(t.arrayValue,"arrayValue");var r=t.arrayValue.values||[];return new Ot(r.map(function(t){return e.fromValue(t)}))}if(ze(t,n,"timestampValue"))return Ve(t.timestampValue,"timestampValue"),new xt(this.fromTimestamp(t.timestampValue));if(ze(t,n,"geoPointValue")){Ve(t.geoPointValue,"geoPointValue");var i=t.geoPointValue.latitude||0,o=t.geoPointValue.longitude||0;return new At(new tt(i,o))}if(ze(t,n,"bytesValue")){Ve(t.bytesValue,"bytesValue");var a=this.fromBlob(t.bytesValue);return new kt(a)}if(ze(t,n,"referenceValue")){Ve(t.referenceValue,"referenceValue");var s=this.fromResourceName(t.referenceValue),u=new it(s.get(1),s.get(3)),c=new ct(this.extractLocalPathFromResourceName(s));return new Nt(u,c)}return m("Unknown Value proto "+JSON.stringify(t))},t.prototype.toMutationDocument=function(t,e){return{name:this.toName(t),fields:this.toFields(e)}},t.prototype.toDocument=function(t){return y(!t.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(t.key),fields:this.toFields(t.data),updateTime:this.toTimestamp(t.version.toTimestamp())}},t.prototype.fromDocument=function(t){return new lt(this.fromName(t.name),this.fromVersion(t.updateTime),this.fromFields(t.fields||{}),{hasLocalMutations:!1})},t.prototype.toFields=function(t){var e=this,n={};return t.forEach(function(t,r){n[t]=e.toValue(r)}),n},t.prototype.fromFields=function(t){var e=this,n=t,r=It.EMPTY;return S(n,function(t,n){r=r.set(new ut([t]),e.fromValue(n))}),r},t.prototype.toMapValue=function(t){return{fields:this.toFields(t)}},t.prototype.toArrayValue=function(t){var e=this,n=[];return t.forEach(function(t){n.push(e.toValue(t))}),{values:n}},t.prototype.fromFound=function(t){y(!!t.found,"Tried to deserialize a found document from a missing document."),Ve(t.found.name,"doc.found.name"),Ve(t.found.updateTime,"doc.found.updateTime");var e=this.fromName(t.found.name),n=this.fromVersion(t.found.updateTime),r=this.fromFields(t.found.fields||{});return new lt(e,n,r,{hasLocalMutations:!1})},t.prototype.fromMissing=function(t){y(!!t.missing,"Tried to deserialize a missing document from a found document."),y(!!t.readTime,"Tried to deserialize a missing document without a read time.");var e=this.fromName(t.missing),n=this.fromVersion(t.readTime);return new ft(e,n)},t.prototype.fromMaybeDocument=function(t){var e=t.result;return ze(t,e,"found")?this.fromFound(t):ze(t,e,"missing")?this.fromMissing(t):m("invalid batch get response: "+JSON.stringify(t))},t.prototype.toWatchTargetChangeState=function(t){switch(t){case Te.Added:return"ADD";case Te.Current:return"CURRENT";case Te.NoChange:return"NO_CHANGE";case Te.Removed:return"REMOVE";case Te.Reset:return"RESET";default:return m("Unknown WatchTargetChangeState: "+t)}},t.prototype.toTestWatchChange=function(t){if(t instanceof ke)return{filter:{count:t.existenceFilter.count,targetId:t.targetId}};if(t instanceof Se){if(t.newDoc instanceof lt){var e=t.newDoc;return{documentChange:{document:{name:this.toName(e.key),fields:this.toFields(e.data),updateTime:this.toVersion(e.version)},targetIds:t.updatedTargetIds,removedTargetIds:t.removedTargetIds}}}if(t.newDoc instanceof ft){e=t.newDoc;return{documentDelete:{document:this.toName(e.key),readTime:this.toVersion(e.version),removedTargetIds:t.removedTargetIds}}}if(null===t.newDoc)return{documentRemove:{document:this.toName(t.key),removedTargetIds:t.removedTargetIds}}}if(t instanceof Ne){var n=void 0;return t.cause&&(n={code:function(t){if(void 0===t)return te.OK;switch(t){case _.OK:return te.OK;case _.CANCELLED:return te.CANCELLED;case _.UNKNOWN:return te.UNKNOWN;case _.DEADLINE_EXCEEDED:return te.DEADLINE_EXCEEDED;case _.RESOURCE_EXHAUSTED:return te.RESOURCE_EXHAUSTED;case _.INTERNAL:return te.INTERNAL;case _.UNAVAILABLE:return te.UNAVAILABLE;case _.UNAUTHENTICATED:return te.UNAUTHENTICATED;case _.INVALID_ARGUMENT:return te.INVALID_ARGUMENT;case _.NOT_FOUND:return te.NOT_FOUND;case _.ALREADY_EXISTS:return te.ALREADY_EXISTS;case _.PERMISSION_DENIED:return te.PERMISSION_DENIED;case _.FAILED_PRECONDITION:return te.FAILED_PRECONDITION;case _.ABORTED:return te.ABORTED;case _.OUT_OF_RANGE:return te.OUT_OF_RANGE;case _.UNIMPLEMENTED:return te.UNIMPLEMENTED;case _.DATA_LOSS:return te.DATA_LOSS;default:return m("Unknown status code: "+t)}}(t.cause.code),message:t.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(t.state),targetIds:t.targetIds,resumeToken:this.unsafeCastProtoByteString(t.resumeToken),cause:n}}}return m("Unrecognized watch change: "+JSON.stringify(t))},t.prototype.fromWatchChange=function(t){var e,n=t.response_type;if(ze(t,n,"targetChange")){Ve(t.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=t.targetChange.resumeToken||this.emptyByteString(),a=t.targetChange.cause,s=a&&this.fromRpcStatus(a);e=new Ne(r,i,o,s||null)}else if(ze(t,n,"documentChange")){Ve(t.documentChange,"documentChange"),Ve(t.documentChange.document,"documentChange.name"),Ve(t.documentChange.document.name,"documentChange.document.name"),Ve(t.documentChange.document.updateTime,"documentChange.document.updateTime");var u=t.documentChange,c=this.fromName(u.document.name),l=this.fromVersion(u.document.updateTime),f=this.fromFields(u.document.fields||{}),h=new lt(c,l,f,{hasLocalMutations:!1}),p=u.targetIds||[],d=u.removedTargetIds||[];e=new Se(p,d,h.key,h)}else if(ze(t,n,"documentDelete")){Ve(t.documentDelete,"documentDelete"),Ve(t.documentDelete.document,"documentDelete.document");var v=t.documentDelete;c=this.fromName(v.document),l=v.readTime?this.fromVersion(v.readTime):Qt.forDeletedDoc(),h=new ft(c,l),d=v.removedTargetIds||[];e=new Se([],d,h.key,h)}else if(ze(t,n,"documentRemove")){Ve(t.documentRemove,"documentRemove"),Ve(t.documentRemove.document,"documentRemove");var y=t.documentRemove;c=this.fromName(y.document),d=y.removedTargetIds||[];e=new Se([],d,c,null)}else{if(!ze(t,n,"filter"))return m("Unknown change type "+JSON.stringify(t));Ve(t.filter,"filter"),Ve(t.filter.targetId,"filter.targetId");var g=t.filter,b=g.count||0,_=new se(b),w=g.targetId;e=new ke(w,_)}return e},t.prototype.fromWatchTargetChangeState=function(t){return"NO_CHANGE"===t?Te.NoChange:"ADD"===t?Te.Added:"REMOVE"===t?Te.Removed:"CURRENT"===t?Te.Current:"RESET"===t?Te.Reset:m("Got unexpected TargetChange.state: "+t)},t.prototype.versionFromListenResponse=function(t){if(!ze(t,t.response_type,"targetChange"))return Qt.MIN;var e=t.targetChange;return e.targetIds&&e.targetIds.length?Qt.MIN:e.readTime?this.fromVersion(e.readTime):Qt.MIN},t.prototype.toMutation=function(t){var e,n=this;if(t instanceof re)e={update:this.toMutationDocument(t.key,t.value)};else if(t instanceof ae)e={delete:this.toName(t.key)};else if(t instanceof ie)e={update:this.toMutationDocument(t.key,t.data),updateMask:this.toDocumentMask(t.fieldMask)};else{if(!(t instanceof oe))return m("Unknown mutation type "+t.type);e={transform:{document:this.toName(t.key),fieldTransforms:t.fieldTransforms.map(function(t){return n.toFieldTransform(t)})}}}return t.precondition.isNone||(e.currentDocument=this.toPrecondition(t.precondition)),e},t.prototype.fromMutation=function(t){var e=this,n=t.currentDocument?this.fromPrecondition(t.currentDocument):ee.NONE;if(t.update){Ve(t.update.name,"name");var r=this.fromName(t.update.name),i=this.fromFields(t.update.fields||{});if(t.updateMask){var o=this.fromDocumentMask(t.updateMask);return new ie(r,i,o,n)}return new re(r,i,n)}if(t.delete){r=this.fromName(t.delete);return new ae(r,n)}if(t.transform){r=this.fromName(t.transform.document);var a=t.transform.fieldTransforms.map(function(t){return e.fromFieldTransform(t)});return y(!0===n.exists,'Transforms only support precondition "exists == true"'),new oe(r,a)}return m("unknown mutation proto: "+JSON.stringify(t))},t.prototype.toPrecondition=function(t){return y(!t.isNone,"Can't serialize an empty precondition"),void 0!==t.updateTime?{updateTime:this.toVersion(t.updateTime)}:void 0!==t.exists?{exists:t.exists}:m("Unknown precondition")},t.prototype.fromPrecondition=function(t){return void 0!==t.updateTime?ee.updateTime(this.fromVersion(t.updateTime)):void 0!==t.exists?ee.exists(t.exists):ee.NONE},t.prototype.fromWriteResult=function(t){var e=this,n=t.updateTime?this.fromVersion(t.updateTime):null,r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults.map(function(t){return e.fromValue(t)})),new Zt(n,r)},t.prototype.fromWriteResults=function(t){var e=this;return(t||[]).map(function(t){return e.fromWriteResult(t)})},t.prototype.toFieldTransform=function(t){var e=this,n=t.transform;return n instanceof Re?{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"}:n instanceof De?{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements.map(function(t){return e.toValue(t)})}}:n instanceof Me?{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements.map(function(t){return e.toValue(t)})}}:void m("Unknown transform: "+t.transform)},t.prototype.fromFieldTransform=function(t){var e=this,n=t.transform_type,r=null;if(ze(t,n,"setToServerValue"))y("REQUEST_TIME"===t.setToServerValue,"Unknown server value transform proto: "+JSON.stringify(t)),r=Re.instance;else if(ze(t,n,"appendMissingElements")){var i=t.appendMissingElements.values||[];r=new De(i.map(function(t){return e.fromValue(t)}))}else if(ze(t,n,"removeAllFromArray")){i=t.removeAllFromArray.values||[];r=new Me(i.map(function(t){return e.fromValue(t)}))}else m("Unknown transform proto: "+JSON.stringify(t));var o=ut.fromServerFormat(t.fieldPath);return new Jt(o,r)},t.prototype.toDocumentsTarget=function(t){return{documents:[this.toQueryPath(t.path)]}},t.prototype.fromDocumentsTarget=function(t){var e=t.documents.length;y(1===e,"DocumentsTarget contained other than 1 document: "+e);var n=t.documents[0];return Ft.atPath(this.fromQueryPath(n))},t.prototype.toQueryTarget=function(t){var e={structuredQuery:{}};if(t.path.isEmpty())e.parent=this.toQueryPath(at.EMPTY_PATH);else{var n=t.path;y(n.length%2!=0,"Document queries with filters are not supported."),e.parent=this.toQueryPath(n.popLast()),e.structuredQuery.from=[{collectionId:n.lastSegment()}]}var r=this.toFilter(t.filters);r&&(e.structuredQuery.where=r);var i=this.toOrder(t.orderBy);i&&(e.structuredQuery.orderBy=i);var o=this.toInt32Value(t.limit);return void 0!==o&&(e.structuredQuery.limit=o),t.startAt&&(e.structuredQuery.startAt=this.toCursor(t.startAt)),t.endAt&&(e.structuredQuery.endAt=this.toCursor(t.endAt)),e},t.prototype.fromQueryTarget=function(t){var e=this.fromQueryPath(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0;if(r>0){y(1===r,"StructuredQuery.from with more than one collection is not supported.");var i=n.from[0];e=e.child(i.collectionId)}var o=[];n.where&&(o=this.fromFilter(n.where));var a=[];n.orderBy&&(a=this.fromOrder(n.orderBy));var s=null;n.limit&&(s=this.fromInt32Value(n.limit));var u=null;n.startAt&&(u=this.fromCursor(n.startAt));var c=null;return n.endAt&&(c=this.fromCursor(n.endAt)),new Ft(e,a,o,s,u,c)},t.prototype.toListenRequestLabels=function(t){var e=this.toLabel(t.purpose);return null==e?null:{"goog-listen-tags":e}},t.prototype.toLabel=function(t){switch(t){case Vt.Listen:return null;case Vt.ExistenceFilterMismatch:return"existence-filter-mismatch";case Vt.LimboResolution:return"limbo-document";default:return m("Unrecognized query purpose: "+t)}},t.prototype.toTarget=function(t){var e,n=t.query;return(e=n.isDocumentQuery()?{documents:this.toDocumentsTarget(n)}:{query:this.toQueryTarget(n)}).targetId=t.targetId,t.resumeToken.length>0&&(e.resumeToken=this.unsafeCastProtoByteString(t.resumeToken)),e},t.prototype.toFilter=function(t){var e=this;if(0!==t.length){var n=t.map(function(t){return t instanceof jt?e.toRelationFilter(t):e.toUnaryFilter(t)});return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},t.prototype.fromFilter=function(t){var e=this;return t?void 0!==t.unaryFilter?[this.fromUnaryFilter(t)]:void 0!==t.fieldFilter?[this.fromRelationFilter(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map(function(t){return e.fromFilter(t)}).reduce(function(t,e){return t.concat(e)}):m("Unknown filter: "+JSON.stringify(t)):[]},t.prototype.toOrder=function(t){var e=this;if(0!==t.length)return t.map(function(t){return e.toPropertyOrder(t)})},t.prototype.fromOrder=function(t){var e=this;return t.map(function(t){return e.fromPropertyOrder(t)})},t.prototype.toCursor=function(t){var e=this;return{before:t.before,values:t.position.map(function(t){return e.toValue(t)})}},t.prototype.fromCursor=function(t){var e=this,n=!!t.before,r=t.values.map(function(t){return e.fromValue(t)});return new Ht(r,n)},t.prototype.toDirection=function(t){return je[t.name]},t.prototype.fromDirection=function(t){switch(t){case"ASCENDING":return Wt.ASCENDING;case"DESCENDING":return Wt.DESCENDING;default:return}},t.prototype.toOperatorName=function(t){return Be[t.name]},t.prototype.fromOperatorName=function(t){switch(t){case"EQUAL":return Ut.EQUAL;case"GREATER_THAN":return Ut.GREATER_THAN;case"GREATER_THAN_OR_EQUAL":return Ut.GREATER_THAN_OR_EQUAL;case"LESS_THAN":return Ut.LESS_THAN;case"LESS_THAN_OR_EQUAL":return Ut.LESS_THAN_OR_EQUAL;case"ARRAY_CONTAINS":return Ut.ARRAY_CONTAINS;case"OPERATOR_UNSPECIFIED":return m("Unspecified relation");default:return m("Unknown relation")}},t.prototype.toFieldPathReference=function(t){return{fieldPath:t.canonicalString()}},t.prototype.fromFieldPathReference=function(t){return ut.fromServerFormat(t.fieldPath)},t.prototype.toPropertyOrder=function(t){return{field:this.toFieldPathReference(t.field),direction:this.toDirection(t.dir)}},t.prototype.fromPropertyOrder=function(t){return new zt(this.fromFieldPathReference(t.field),this.fromDirection(t.direction))},t.prototype.toRelationFilter=function(t){return t instanceof jt?{fieldFilter:{field:this.toFieldPathReference(t.field),op:this.toOperatorName(t.op),value:this.toValue(t.value)}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromRelationFilter=function(t){return new jt(this.fromFieldPathReference(t.fieldFilter.field),this.fromOperatorName(t.fieldFilter.op),this.fromValue(t.fieldFilter.value))},t.prototype.toUnaryFilter=function(t){return t instanceof qt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NAN"}}:t instanceof Bt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NULL"}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromUnaryFilter=function(t){switch(t.unaryFilter.op){case"IS_NAN":var e=this.fromFieldPathReference(t.unaryFilter.field);return new qt(e);case"IS_NULL":var n=this.fromFieldPathReference(t.unaryFilter.field);return new Bt(n);case"OPERATOR_UNSPECIFIED":return m("Unspecified filter");default:return m("Unknown filter")}},t.prototype.toDocumentMask=function(t){return{fieldPaths:t.fields.map(function(t){return t.canonicalString()})}},t.prototype.fromDocumentMask=function(t){var e=(t.fieldPaths||[]).map(function(t){return ut.fromServerFormat(t)});return new $t(e)},t}();function ze(t,e,n){return e===n||!e&&n in t}var Ke="FirebaseError",Ge=Error.captureStackTrace,Qe=function(){return function(t,e){if(this.code=t,this.message=e,Ge)Ge(this,Ye.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=Ke,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();Qe.prototype=Object.create(Error.prototype),Qe.prototype.constructor=Qe,Qe.prototype.name=Ke;var Ye=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new Qe(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}(),Xe=(function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}s.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t}}(function(){return function(){this.blockSize=-1}}()),function(){function t(t){this.sendFn=t.sendFn,this.closeFn=t.closeFn}return t.prototype.onOpen=function(t){y(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=t},t.prototype.onClose=function(t){y(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=t},t.prototype.onMessage=function(t){y(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=t},t.prototype.close=function(){this.closeFn()},t.prototype.send=function(t){this.sendFn(t)},t.prototype.callOnOpen=function(){y(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},t.prototype.callOnClose=function(t){y(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(t)},t.prototype.callOnMessage=function(t){y(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(t)},t}()),$e="Connection",Je={BatchGetDocuments:"batchGet",Commit:"commit"},Ze="gl-js/ fire/"+c,tn=function(){function t(t){this.databaseId=t.databaseId,this.pool=new u.XhrIoPool;var e=t.ssl?"https":"http";this.baseUrl=e+"://"+t.host}return t.prototype.modifyHeadersForRequest=function(t,e){if(e)for(var n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n]);t["X-Goog-Api-Client"]=Ze},t.prototype.invokeRPC=function(t,e,n){var r=this,i=this.makeUrl(t);return new Promise(function(o,a){r.pool.getObject(function(s){s.listenOnce(u.EventType.COMPLETE,function(){try{switch(s.getLastErrorCode()){case u.ErrorCode.NO_ERROR:var e=s.getResponseJson();p($e,"XHR received:",JSON.stringify(e)),o(e);break;case u.ErrorCode.TIMEOUT:p($e,'RPC "'+t+'" timed out'),a(new w(_.DEADLINE_EXCEEDED,"Request time out"));break;case u.ErrorCode.HTTP_ERROR:var n=s.getStatus();p($e,'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0?a(new w(function(t){switch(t){case 200:return _.OK;case 400:return _.INVALID_ARGUMENT;case 401:return _.UNAUTHENTICATED;case 403:return _.PERMISSION_DENIED;case 404:return _.NOT_FOUND;case 409:return _.ABORTED;case 416:return _.OUT_OF_RANGE;case 429:return _.RESOURCE_EXHAUSTED;case 499:return _.CANCELLED;case 500:return _.UNKNOWN;case 501:return _.UNIMPLEMENTED;case 503:return _.UNAVAILABLE;case 504:return _.DEADLINE_EXCEEDED;default:return t>=200&&t<300?_.OK:t>=400&&t<500?_.FAILED_PRECONDITION:t>=500&&t<600?_.INTERNAL:_.UNKNOWN}}(n),"Server responded with status "+s.getStatusText())):(p($e,'RPC "'+t+'" failed'),a(new w(_.UNAVAILABLE,"Connection failed.")));break;default:m('RPC "'+t+'" failed with unanticipated webchannel error '+s.getLastErrorCode()+": "+s.getLastError()+", giving up.")}}finally{p($e,'RPC "'+t+'" completed.'),r.pool.releaseObject(s)}});var c=JSON.stringify(e);p($e,"XHR sending: ",i+" "+c);var l={"Content-Type":"text/plain"};r.modifyHeadersForRequest(l,n),s.send(i,"POST",c,l,15)})})},t.prototype.invokeStreamingRPC=function(t,e,n){return this.invokeRPC(t,e,n)},t.prototype.openStream=function(t,e){var n=[this.baseUrl,"/","google.firestore.v1beta1.Firestore","/",t,"/channel"],r=u.createWebChannelTransport(),i={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0};this.modifyHeadersForRequest(i.initMessageHeaders,e),"object"==typeof navigator&&"ReactNative"===navigator.product||(i.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");p($e,"Creating WebChannel: "+o+" "+i);var a=r.createWebChannel(o,i),s=!1,c=!1,l=new Xe({sendFn:function(t){c?p($e,"Not sending because WebChannel is closed:",t):(s||(p($e,"Opening WebChannel transport."),a.open(),s=!0),p($e,"WebChannel sending:",t),a.send(t))},closeFn:function(){return a.close()}}),f=function(t,e){a.listen(t,function(t){try{e(t)}catch(t){setTimeout(function(){throw t},0)}})};return f(u.WebChannel.EventType.OPEN,function(){c||p($e,"WebChannel transport opened.")}),f(u.WebChannel.EventType.CLOSE,function(){c||(c=!0,p($e,"WebChannel transport closed"),l.callOnClose())}),f(u.WebChannel.EventType.ERROR,function(t){c||(c=!0,p($e,"WebChannel transport errored:",t),l.callOnClose(new w(_.UNAVAILABLE,"The operation could not be completed")))}),f(u.WebChannel.EventType.MESSAGE,function(t){if(!c){var e=t.data[0];y(!!e,"Got a webchannel message without data.");var n=e.error||e[0]&&e[0].error;if(n){p($e,"WebChannel received error:",n);var r=n.status,i=function(t){var e=te[t];if(void 0!==e)return ce(e)}(r),o=n.message;void 0===i&&(i=_.INTERNAL,o="Unknown error status: "+r+" with message "+n.message),c=!0,l.callOnClose(new w(i,o)),a.close()}else p($e,"WebChannel received:",e),l.callOnMessage(e)}}),setTimeout(function(){l.callOnOpen()},0),l},t.prototype.makeUrl=function(t){var e=Je[t];y(void 0!==e,"Unknown REST mapping for: "+t);var n=[this.baseUrl,"/","v1beta1"];return n.push("/projects/"),n.push(this.databaseId.projectId),n.push("/databases/"),n.push(this.databaseId.database),n.push("/documents"),n.push(":"),n.push(e),n.join("")},t}(),en=function(){function t(){this.emptyByteString="",this.base64Available="undefined"!=typeof atob}return t.prototype.loadConnection=function(t){return Promise.resolve(new tn(t))},t.prototype.newSerializer=function(t){return new He(t,{useProto3Json:!0})},t.prototype.formatJSON=function(t){return JSON.stringify(t)},t.prototype.atob=function(t){return atob(t)},t.prototype.btoa=function(t){return btoa(t)},t}();g.setPlatform(new en);var nn,rn=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];!function(t,e,n,r){if(!(e instanceof Array)||e.length<r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" argument to be an array with at least "+H(r,"element")+".")}("FieldPath",t,"fieldNames",1);for(var n=0;n<t.length;++n)if(O("FieldPath","string",n,t[n]),0===t[n].length)throw new w(_.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ut(t)}return t.documentId=function(){return t._DOCUMENT_ID},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","FieldPath",1,e);return this._internalPath.isEqual(e._internalPath)},t._DOCUMENT_ID=new t(ut.keyField().canonicalString()),t}(),on=new RegExp("[~\\*/\\[\\]]");!function(t){t[t.Unknown=0]="Unknown",t[t.Online=1]="Online",t[t.Offline=2]="Offline"}(nn||(nn={}));var an,sn=function(){function t(t){this.comparator=t?function(e,n){return t(e,n)||ct.comparator(e.key,n.key)}:function(t,e){return ct.comparator(t.key,e.key)},this.keyedMap=de(),this.sortedSet=new ht(this.comparator)}return t.emptySet=function(e){return new t(e.comparator)},t.prototype.has=function(t){return null!=this.keyedMap.get(t)},t.prototype.get=function(t){return this.keyedMap.get(t)},t.prototype.first=function(){return this.sortedSet.minKey()},t.prototype.last=function(){return this.sortedSet.maxKey()},t.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},t.prototype.indexOf=function(t){var e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.sortedSet.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n  "+t.join("  \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r},t}(),un=function(){function t(t){this.mapKeyFn=t,this.inner={}}return t.prototype.get=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(a.isEqual(t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.mapKeyFn(t),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(r[i][0].isEqual(t))return void(r[i]=[t,e]);r.push([t,e])}else this.inner[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(n[r][0].isEqual(t))return 1===n.length?delete this.inner[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){S(this.inner,function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}})},t.prototype.isEmpty=function(){return k(this.inner)},t}(),cn=function(){return function(){this.listeners=[]}}(),ln=function(){function t(t){this.syncEngine=t,this.queries=new un(function(t){return t.canonicalId()}),this.onlineState=nn.Unknown,this.syncEngine.subscribe(this.onChange.bind(this),this.onError.bind(this))}return t.prototype.listen=function(t){var e=t.query,n=!1,r=this.queries.get(e);return r||(n=!0,r=new cn,this.queries.set(e,r)),r.listeners.push(t),t.applyOnlineStateChange(this.onlineState),r.viewSnap&&t.onViewSnapshot(r.viewSnap),n?this.syncEngine.listen(e).then(function(t){return r.targetId=t,t}):Promise.resolve(r.targetId)},t.prototype.unlisten=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n,r,i;return s.__generator(this,function(o){return e=t.query,n=!1,(r=this.queries.get(e))&&(i=r.listeners.indexOf(t))>=0&&(r.listeners.splice(i,1),n=0===r.listeners.length),n?(this.queries.delete(e),[2,this.syncEngine.unlisten(e)]):[2]})})},t.prototype.onChange=function(t){for(var e=0,n=t;e<n.length;e++){var r=n[e],i=r.query,o=this.queries.get(i);if(o){for(var a=0,s=o.listeners;a<s.length;a++){s[a].onViewSnapshot(r)}o.viewSnap=r}}},t.prototype.onError=function(t,e){var n=this.queries.get(t);if(n)for(var r=0,i=n.listeners;r<i.length;r++){i[r].onError(e)}this.queries.delete(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.queries.forEach(function(e,n){for(var r=0,i=n.listeners;r<i.length;r++){i[r].applyOnlineStateChange(t)}})},t}(),fn=function(){function t(t,e,n){this.query=t,this.queryObserver=e,this.raisedInitialEvent=!1,this.onlineState=nn.Unknown,this.options=n||{}}return t.prototype.onViewSnapshot=function(t){if(y(t.docChanges.length>0||t.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];i.type!==be.Metadata&&e.push(i)}t=new xe(t.query,t.docs,t.oldDocs,e,t.fromCache,t.hasPendingWrites,t.syncStateChanged,!0)}this.raisedInitialEvent?this.shouldRaiseEvent(t)&&this.queryObserver.next(t):this.shouldRaiseInitialEvent(t,this.onlineState)&&this.raiseInitialEvent(t),this.snap=t},t.prototype.onError=function(t){this.queryObserver.error(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.snap&&!this.raisedInitialEvent&&this.shouldRaiseInitialEvent(this.snap,t)&&this.raiseInitialEvent(this.snap)},t.prototype.shouldRaiseInitialEvent=function(t,e){if(y(!this.raisedInitialEvent,"Determining whether to raise first event but already had first event"),!t.fromCache)return!0;var n=e!==nn.Offline;return this.options.waitForSyncWhenOnline&&n?(y(t.fromCache,"Waiting for sync, but snapshot is not from cache"),!1):!t.docs.isEmpty()||e===nn.Offline},t.prototype.shouldRaiseEvent=function(t){if(t.docChanges.length>0)return!0;var e=this.snap&&this.snap.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.raiseInitialEvent=function(e){y(!this.raisedInitialEvent,"Trying to raise initial events for second time"),e=new xe(e.query,e.docs,sn.emptySet(e.docs),t.getInitialViewChanges(e),e.fromCache,e.hasPendingWrites,!0,!1),this.raisedInitialEvent=!0,this.queryObserver.next(e)},t.getInitialViewChanges=function(t){var e=[];return t.docs.forEach(function(t){e.push({type:be.Added,doc:t})}),e},t}(),hn=function(){function t(t){var e=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(function(t){e.isDone=!0,e.result=t,e.nextCallback&&e.nextCallback(t)},function(t){e.isDone=!0,e.error=t,e.catchCallback&&e.catchCallback(t)})}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&m("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t(function(t,i){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,i)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,i)}})},t.prototype.toPromise=function(){var t=this;return new Promise(function(e,n){t.next(e,n)})},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t,n){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.waitFor=function(e){var n=e.length;if(0===n)return t.resolve();var r=0;return new t(function(t,i){for(var o=0,a=e;o<a.length;o++){a[o].next(function(){++r===n&&t()},function(t){return i(t)})}})},t.map=function(e){for(var n=[],r=[],i=function(t){r[t]=e[t].next(function(e){n[t]=e})},o=0;o<e.length;++o)i(o);return t.waitFor(r).next(function(){return n})},t}(),pn=function(){function t(){this.isEager=!0,this.sources=[],this.potentialGarbage=ge()}return t.prototype.addGarbageSource=function(t){this.sources.push(t),t.setGarbageCollector(this)},t.prototype.removeGarbageSource=function(t){this.sources.splice(this.sources.indexOf(t),1),t.setGarbageCollector(null)},t.prototype.addPotentialGarbageKey=function(t){this.potentialGarbage=this.potentialGarbage.add(t)},t.prototype.collectGarbage=function(t){var e=this,n=[],r=ge();return this.potentialGarbage.forEach(function(i){var o=e.documentHasAnyReferences(t,i);n.push(o.next(function(t){return t||(r=r.add(i)),hn.resolve()}))}),this.potentialGarbage=ge(),hn.waitFor(n).next(function(){return r})},t.prototype.documentHasAnyReferences=function(t,e){var n=hn.resolve(!1);return this.sources.map(function(n){return function(){return n.containsKey(t,e)}}).reduce(function(t,e){return t.next(function(t){return t?hn.resolve(!0):e()})},n)},t}(),dn=function(){function t(t,e,n){this.query=t,this.addedKeys=e,this.removedKeys=n}return t.fromSnapshot=function(e){for(var n=ge(),r=ge(),i=0,o=e.docChanges;i<o.length;i++){var a=o[i];switch(a.type){case be.Added:n=n.add(a.doc.key);break;case be.Removed:r=r.add(a.doc.key)}}return new t(e.query,n,r)},t}(),vn=function(){function t(){this.refsByKey=new le(mn.compareByKey),this.refsByTarget=new le(mn.compareByTargetId),this.garbageCollector=null}return t.prototype.isEmpty=function(){return this.refsByKey.isEmpty()},t.prototype.addReference=function(t,e){var n=new mn(t,e);this.refsByKey=this.refsByKey.add(n),this.refsByTarget=this.refsByTarget.add(n)},t.prototype.addReferences=function(t,e){var n=this;t.forEach(function(t){return n.addReference(t,e)})},t.prototype.removeReference=function(t,e){this.removeRef(new mn(t,e))},t.prototype.removeReferences=function(t,e){var n=this;t.forEach(function(t){return n.removeReference(t,e)})},t.prototype.removeReferencesForId=function(t){var e=this,n=ct.EMPTY,r=new mn(n,t),i=new mn(n,t+1);this.refsByTarget.forEachInRange([r,i],function(t){e.removeRef(t)})},t.prototype.removeAllReferences=function(){var t=this;this.refsByKey.forEach(function(e){return t.removeRef(e)})},t.prototype.removeRef=function(t){this.refsByKey=this.refsByKey.delete(t),this.refsByTarget=this.refsByTarget.delete(t),null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(t.key)},t.prototype.referencesForId=function(t){var e=ct.EMPTY,n=new mn(e,t),r=new mn(e,t+1),i=ge();return this.refsByTarget.forEachInRange([n,r],function(t){i=i.add(t.key)}),i},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.refsByKey.firstAfterOrEqual(n);return hn.resolve(null!==r&&e.isEqual(r.key))},t}(),mn=function(){function t(t,e){this.key=t,this.targetOrBatchId=e}return t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)||K(t.targetOrBatchId,e.targetOrBatchId)},t.compareByTargetId=function(t,e){return K(t.targetOrBatchId,e.targetOrBatchId)||ct.comparator(t.key,e.key)},t}(),yn=1;!function(t){t[t.LocalStore=0]="LocalStore",t[t.SyncEngine=1]="SyncEngine"}(an||(an={}));var gn=function(){function t(t,e){void 0===e&&(e=0),this.generatorId=t;var n=e>>yn<<yn,r=e-n;this.previousId=r>=t?n|this.generatorId:(n|this.generatorId)-(1<<yn)}return t.prototype.next=function(){return this.previousId+=1<<yn,this.previousId},t.forLocalStore=function(e){return void 0===e&&(e=0),new t(an.LocalStore,e)},t.forSyncEngine=function(){return new t(an.SyncEngine)},t}(),bn=function(){return function(t){this.key=t}}(),_n=function(){return function(t){this.key=t}}(),wn=function(){function t(t,e){this.query=t,this._syncedDocuments=e,this.syncState=null,this.current=!1,this.limboDocuments=ge(),this.mutatedKeys=ge(),this.documentSet=new sn(t.docComparator.bind(t))}return Object.defineProperty(t.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),t.prototype.computeDocChanges=function(t,e){var n=this,r=e?e.changeSet:new Ce,i=e?e.documentSet:this.documentSet,o=e?e.mutatedKeys:this.mutatedKeys,a=i,s=!1,u=this.query.hasLimit()&&i.size===this.query.limit?i.last():null;if(t.inorderTraversal(function(t,e){var c=i.get(t),l=e instanceof lt?e:null;if(l&&(y(t.isEqual(l.key),"Mismatching keys found in document changes: "+t+" != "+l.key),l=n.query.matches(l)?l:null),l?(a=a.add(l),o=l.hasLocalMutations?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)),c&&l){var f=c.data.isEqual(l.data);f&&c.hasLocalMutations===l.hasLocalMutations||(f?r.track({type:be.Metadata,doc:l}):r.track({type:be.Modified,doc:l}),u&&n.query.docComparator(l,u)>0&&(s=!0))}else!c&&l?r.track({type:be.Added,doc:l}):c&&!l&&(r.track({type:be.Removed,doc:c}),u&&(s=!0))}),this.query.hasLimit())for(;a.size>this.query.limit;){var c=a.last();a=a.delete(c.key),r.track({type:be.Removed,doc:c})}return y(!s||!e,"View was refilled using docs that themselves needed refilling."),{documentSet:a,changeSet:r,needsRefill:s,mutatedKeys:o}},t.prototype.applyChanges=function(t,e){var n=this;y(!t.needsRefill,"Cannot apply changes that need a refill");var r=this.documentSet;this.documentSet=t.documentSet,this.mutatedKeys=t.mutatedKeys;var i=t.changeSet.getChanges();i.sort(function(t,e){return function(t,e){var n=function(t){switch(t){case be.Added:return 1;case be.Modified:case be.Metadata:return 2;case be.Removed:return 0;default:return m("Unknown ChangeType: "+t)}};return n(t)-n(e)}(t.type,e.type)||n.query.docComparator(t.doc,e.doc)}),this.applyTargetChange(e);var o=this.updateLimboDocuments(),a=0===this.limboDocuments.size&&this.current?_e.Synced:_e.Local,s=a!==this.syncState;return this.syncState=a,0!==i.length||s?{snapshot:new xe(this.query,t.documentSet,r,i,a===_e.Local,!t.mutatedKeys.isEmpty(),s,!1),limboChanges:o}:{limboChanges:o}},t.prototype.applyOnlineStateChange=function(t){return this.current&&t===nn.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new Ce,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},t.prototype.shouldBeInLimbo=function(t){return!this._syncedDocuments.has(t)&&(!!this.documentSet.has(t)&&!this.documentSet.get(t).hasLocalMutations)},t.prototype.applyTargetChange=function(t){var e=this;t&&(t.addedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.add(t)}),t.modifiedDocuments.forEach(function(t){return y(e._syncedDocuments.has(t),"Modified document "+t+" not found in view.")}),t.removedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.delete(t)}),this.current=t.current)},t.prototype.updateLimboDocuments=function(){var t=this;if(!this.current)return[];var e=this.limboDocuments;this.limboDocuments=ge(),this.documentSet.forEach(function(e){t.shouldBeInLimbo(e.key)&&(t.limboDocuments=t.limboDocuments.add(e.key))});var n=[];return e.forEach(function(e){t.limboDocuments.has(e)||n.push(new _n(e))}),this.limboDocuments.forEach(function(t){e.has(t)||n.push(new bn(t))}),n},t}();var En=function(){return function(t,e,n,r){this.query=t,this.targetId=e,this.resumeToken=n,this.view=r}}(),Tn=function(){function t(t,e,n){this.localStore=t,this.remoteStore=e,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new un(function(t){return t.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new ht(ct.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new vn,this.limboCollector=new pn,this.mutationUserCallbacks={},this.targetIdGenerator=gn.forSyncEngine()}return t.prototype.subscribe=function(t,e){y(null!==t&&null!==e,"View and error handlers cannot be null"),y(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=t,this.errorHandler=e,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},t.prototype.listen=function(t){var e=this;return this.assertSubscribed("listen()"),y(!this.queryViewsByQuery.has(t),"We already listen to the query: "+t),this.localStore.allocateQuery(t).then(function(n){return e.localStore.executeQuery(t).then(function(r){return e.localStore.remoteDocumentKeys(n.targetId).then(function(i){var o=new wn(t,i),a=o.computeDocChanges(r),s=o.applyChanges(a);y(0===s.limboChanges.length,"View returned limbo docs before target ack from the server."),y(!!s.snapshot,"applyChanges for new view should always return a snapshot");var u=new En(t,n.targetId,n.resumeToken,o);e.queryViewsByQuery.set(t,u),e.queryViewsByTarget[n.targetId]=u,e.viewHandler([s.snapshot]),e.remoteStore.listen(n)})}).then(function(){return n.targetId})})},t.prototype.unlisten=function(t){var e=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(t);return y(!!n,"Trying to unlisten on query not found:"+t),this.localStore.releaseQuery(t).then(function(){return e.remoteStore.unlisten(n.targetId),e.removeAndCleanupQuery(n).then(function(){return e.localStore.collectGarbage()})})},t.prototype.write=function(t,e){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(t).then(function(t){return n.addMutationCallback(t.batchId,e),n.emitNewSnapsAndNotifyLocalStore(t.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},t.prototype.wrapUpdateFunctionError=function(t){return t},t.prototype.runTransaction=function(t,e){var n=this;void 0===e&&(e=5),y(e>=0,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var e=t(r);return!Lt(e)&&e.catch&&e.then?e.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(i){return r.commit().then(function(){return i}).catch(function(r){return 0===e?Promise.reject(r):n.runTransaction(t,e-1)})})},t.prototype.applyRemoteEvent=function(t){var e=this;return this.assertSubscribed("applyRemoteEvent()"),this.localStore.applyRemoteEvent(t).then(function(n){return e.emitNewSnapsAndNotifyLocalStore(n,t)})},t.prototype.applyOnlineStateChange=function(t){var e=[];this.queryViewsByQuery.forEach(function(n,r){var i=r.view.applyOnlineStateChange(t);y(0===i.limboChanges.length,"OnlineState should not affect limbo documents."),i.snapshot&&e.push(i.snapshot)}),this.viewHandler(e)},t.prototype.rejectListen=function(t,e){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[t];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[t];var i=new ht(ct.comparator);i=i.insert(r,new ft(r,Qt.forDeletedDoc()));var o=ge().add(r),a=new we(Qt.MIN,{},new le(K),i,o);return this.applyRemoteEvent(a)}var s=this.queryViewsByTarget[t];return y(!!s,"Unknown targetId: "+t),this.localStore.releaseQuery(s.query).then(function(){return n.removeAndCleanupQuery(s).then(function(){n.errorHandler(s.query,e)})})},t.prototype.applySuccessfulWrite=function(t){var e=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(t.batch.batchId,null),this.localStore.acknowledgeBatch(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.rejectFailedWrite=function(t,e){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(t,e),this.localStore.rejectBatch(t).then(function(t){return n.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.addMutationCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new ht(K)),n=n.insert(t,e),this.mutationUserCallbacks[this.currentUser.toKey()]=n},t.prototype.processUserCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(t);r&&(y(t===n.minKey(),"Mutation callbacks processed out-of-order?"),e?r.reject(e):r.resolve(),n=n.remove(t)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},t.prototype.removeAndCleanupQuery=function(t){return this.queryViewsByQuery.delete(t.query),delete this.queryViewsByTarget[t.targetId],this.limboDocumentRefs.removeReferencesForId(t.targetId),this.gcLimboDocuments()},t.prototype.updateTrackedLimbos=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i instanceof bn?(this.limboDocumentRefs.addReference(i.key,t),this.trackLimboChange(i)):i instanceof _n?(p("SyncEngine","Document no longer in limbo: "+i.key),this.limboDocumentRefs.removeReference(i.key,t)):m("Unknown limbo change: "+JSON.stringify(i))}return this.gcLimboDocuments()},t.prototype.trackLimboChange=function(t){var e=t.key;if(!this.limboTargetsByKey.get(e)){p("SyncEngine","New document in limbo: "+e);var n=this.targetIdGenerator.next(),r=Ft.atPath(e.path);this.limboKeysByTarget[n]=e,this.remoteStore.listen(new Xt(r,n,Vt.LimboResolution)),this.limboTargetsByKey=this.limboTargetsByKey.insert(e,n)}},t.prototype.gcLimboDocuments=function(){var t=this;return this.limboCollector.collectGarbage(null).next(function(e){e.forEach(function(e){var n=t.limboTargetsByKey.get(e);null!==n&&(t.remoteStore.unlisten(n),t.limboTargetsByKey=t.limboTargetsByKey.remove(e),delete t.limboKeysByTarget[n])})}).toPromise()},t.prototype.currentLimboDocs=function(){return this.limboTargetsByKey},t.prototype.emitNewSnapsAndNotifyLocalStore=function(t,e){var n=this,r=[],i=[],o=[];return this.queryViewsByQuery.forEach(function(a,s){o.push(Promise.resolve().then(function(){var e=s.view.computeDocChanges(t);return e.needsRefill?n.localStore.executeQuery(s.query).then(function(t){return s.view.computeDocChanges(t,e)}):e}).then(function(t){var o=e&&e.targetChanges[s.targetId],a=s.view.applyChanges(t,o);return n.updateTrackedLimbos(s.targetId,a.limboChanges).then(function(){if(a.snapshot){r.push(a.snapshot);var t=dn.fromSnapshot(a.snapshot);i.push(t)}})}))}),Promise.all(o).then(function(){return n.viewHandler(r),n.localStore.notifyLocalViewChanges(i)}).then(function(){return n.localStore.collectGarbage()})},t.prototype.assertSubscribed=function(t){y(null!==this.viewHandler&&null!==this.errorHandler,"Trying to call "+t+" before calling subscribe().")},t.prototype.handleUserChange=function(t){var e=this;return this.currentUser=t,this.localStore.handleUserChange(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)}).then(function(){return e.remoteStore.handleUserChange(t)})},t.prototype.getRemoteKeysForTarget=function(t){return this.queryViewsByTarget[t]?this.queryViewsByTarget[t].view.syncedDocuments:ge()},t}(),Cn=-1,xn=function(){function t(t,e,n){this.batchId=t,this.localWriteTime=e,this.mutations=n}return t.prototype.applyToRemoteDocument=function(t,e,n){e&&y(e.key.isEqual(t),"applyToRemoteDocument: key "+t+" should match maybeDoc key\n        "+e.key);var r=n.mutationResults;y(r.length===this.mutations.length,"Mismatch between mutations length\n      ("+this.mutations.length+") and mutation results length\n      ("+r.length+").");for(var i=0;i<this.mutations.length;i++){var o=this.mutations[i];if(o.key.isEqual(t)){var a=r[i];e=o.applyToRemoteDocument(e,a)}}return e},t.prototype.applyToLocalView=function(t,e){e&&y(e.key.isEqual(t),"applyToLocalDocument: key "+t+" should match maybeDoc key\n        "+e.key);for(var n=e,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(t)&&(e=i.applyToLocalView(e,n,this.localWriteTime))}return e},t.prototype.keys=function(){for(var t=ge(),e=0,n=this.mutations;e<n.length;e++){var r=n[e];t=t.add(r.key)}return t},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&G(this.mutations,t.mutations)},t.prototype.isTombstone=function(){return 0===this.mutations.length},t.prototype.toTombstone=function(){return new t(this.batchId,this.localWriteTime,[])},t}(),Sn=function(){function t(t,e,n,r,i){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.streamToken=r,this.docVersions=i}return t.from=function(e,n,r,i){y(e.mutations.length===r.length,"Mutations sent "+e.mutations.length+" must equal results received "+r.length);for(var o=me(),a=e.mutations,s=0;s<a.length;s++){var u=r[s].version;null===u&&(u=n),o=o.insert(a[s].key,u)}return new t(e,n,r,i,o)},t}(),kn="�",Nn="�",An="�",In="�";function On(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=Rn(e)),e=Pn(t.get(n),e);return Rn(e)}function Pn(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+=kn+An;break;case kn:n+=kn+In;break;default:n+=o}}return n}function Rn(t){return t+kn+Nn}function Dn(t){var e=t.length;if(y(e>=2,"Invalid path "+t),2===e)return y(t.charAt(0)===kn&&t.charAt(1)===Nn,"Non-empty path "+t+" had length 2"),at.EMPTY_PATH;for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf(kn,o);switch((a<0||a>n)&&m('Invalid encoded resource path: "'+t+'"'),t.charAt(a+1)){case Nn:var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case An:i+=t.substring(o,a),i+="\0";break;case In:i+=t.substring(o,a+1);break;default:m('Invalid encoded resource path: "'+t+'"')}o=a+2}return new at(r)}function Mn(t,e,n,r){y(n<r&&n>=0&&r<=2,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),n<1&&r>=1&&(function(t){t.createObjectStore(Fn.store)}(t),function(t){t.createObjectStore(Un.store,{keyPath:Un.keyPath}),t.createObjectStore(jn.store,{keyPath:jn.keyPath}),t.createObjectStore(Bn.store)}(t),function(t){t.createObjectStore(Hn.store,{keyPath:Hn.keyPath}).createIndex(Hn.documentTargetsIndex,Hn.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Wn.store,{keyPath:Wn.keyPath}).createIndex(Wn.queryTargetsIndexName,Wn.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(zn.store)}(t),function(t){t.createObjectStore(Vn.store)}(t));var i=hn.resolve();return n<2&&r>=2&&(i=function(t){var e=t.store(zn.store);return e.get(zn.key).next(function(t){return null!=t?hn.resolve(t):(t=new zn(0,0,Qt.MIN.toTimestamp(),0),e.put(zn.key,t).next(function(){return t}))})}(e).next(function(t){return function(t,e){var n=t.store(zn.store);return t.store(Wn.store).count().next(function(t){return e.targetCount=t,n.put(zn.key,e)})}(e,t)})),i}var Ln=function(){return function(t,e){this.seconds=t,this.nanoseconds=e}}(),Fn=function(){function t(t,e){this.ownerId=t,this.leaseTimestampMs=e}return t.store="owner",t}();var Un=function(){function t(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n}return t.store="mutationQueues",t.keyPath="userId",t}(),jn=function(){function t(t,e,n,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.mutations=r}return t.store="mutations",t.keyPath=["userId","batchId"],t}();var Bn=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,On(e)]},t.key=function(t,e,n){return[t,On(e),n]},t.store="documentMutations",t.PLACEHOLDER=new t,t}();var qn=function(){return function(t,e){this.path=t,this.readTime=e}}(),Vn=function(){function t(t,e){this.noDocument=t,this.document=e}return t.store="remoteDocuments",t}(),Wn=function(){function t(t,e,n,r,i,o){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.query=o}return t.store="targets",t.keyPath="targetId",t.queryTargetsIndexName="queryTargetsIndex",t.queryTargetsKeyPath=["canonicalId","targetId"],t}(),Hn=function(){function t(t,e){this.targetId=t,this.path=e}return t.store="targetDocuments",t.keyPath=["targetId","path"],t.documentTargetsIndex="documentTargetsIndex",t.documentTargetsKeyPath=["path","targetId"],t}(),zn=function(){function t(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r}return t.key="targetGlobalKey",t.store="targetGlobal",t}();var Kn=[Un.store,jn.store,Bn.store,Vn.store,Wn.store,Fn.store,zn.store,Hn.store],Gn=function(){return function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}}(),Qn=function(){function e(t){this.db=t}return e.openOrCreate=function(t,n,r){return y(e.isAvailable(),"IndexedDB not supported in current environment."),p("SimpleDb","Opening database:",t),new hn(function(i,o){var a=window.indexedDB.open(t,n);a.onsuccess=function(t){var n=t.target.result;i(new e(n))},a.onerror=function(t){o(t.target.error)},a.onupgradeneeded=function(e){p("SimpleDb",'Database "'+t+'" requires upgrade from version:',e.oldVersion);var n=e.target.result,i=new Xn(a.transaction);r(n,i,e.oldVersion,2).next(function(){p("SimpleDb","Database upgrade to version 2 complete")})}}).toPromise()},e.delete=function(t){return p("SimpleDb","Removing database:",t),Jn(window.indexedDB.deleteDatabase(t)).toPromise()},e.isAvailable=function(){if("undefined"==typeof window||null==window.indexedDB)return!1;if(void 0===window.navigator)return"YES"===t.env.USE_MOCK_PERSISTENCE;var e=window.navigator.userAgent;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0)},e.getStore=function(t,e){return t instanceof Xn?t.store(e):m("Invalid transaction object provided!")},e.prototype.runTransaction=function(t,e,n){var r=Xn.open(this.db,t,e),i=n(r).catch(function(t){r.abort(t)}).toPromise();return r.completionPromise.then(function(){return i})},e.prototype.close=function(){this.db.close()},e}(),Yn=function(){function t(t){this.dbCursor=t,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(t.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.dbCursor=t},enumerable:!0,configurable:!0}),t.prototype.done=function(){this.shouldStop=!0},t.prototype.skip=function(t){this.nextKey=t},t.prototype.delete=function(){return Jn(this.dbCursor.delete())},t}(),Xn=function(){function t(t){var e=this;this.transaction=t,this.aborted=!1,this.completionDeferred=new Gn,this.transaction.oncomplete=function(){e.completionDeferred.resolve()},this.transaction.onabort=function(){t.error?e.completionDeferred.reject(t.error):e.completionDeferred.resolve()},this.transaction.onerror=function(t){e.completionDeferred.reject(t.target.error)}}return t.open=function(e,n,r){return new t(e.transaction(r,n))},Object.defineProperty(t.prototype,"completionPromise",{get:function(){return this.completionDeferred.promise},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){t&&this.completionDeferred.reject(t),this.aborted||(p("SimpleDb","Aborting transaction: %s",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return y(!!e,"Object store not part of transaction: "+t),new $n(e)},t}(),$n=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(p("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(p("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),Jn(n)},t.prototype.get=function(t){var e=this;return Jn(this.store.get(t)).next(function(n){return void 0===n&&(n=null),p("SimpleDb","GET",e.store.name,t,n),n})},t.prototype.delete=function(t){return p("SimpleDb","DELETE",this.store.name,t),Jn(this.store.delete(t))},t.prototype.count=function(){return p("SimpleDb","COUNT",this.store.name),Jn(this.store.count())},t.prototype.loadAll=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.iterateCursor(n,function(t,e){r.push(e)}).next(function(){return r})},t.prototype.deleteAll=function(t,e){p("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(t,e,n){return n.delete()})},t.prototype.iterate=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.iterateCursor(r,e)},t.prototype.iterateCursor=function(t,e){var n=[];return new hn(function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new Yn(i),a=e(i.primaryKey,i.value,o);a instanceof hn&&n.push(a),o.isDone?r():null===o.skipToKey?i.continue():i.continue(o.skipToKey)}else r()}}).next(function(){return hn.waitFor(n)})},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:(y(void 0===e,"3rd argument must not be defined if 2nd is a range."),e=t)),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.keysOnly?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function Jn(t){return new hn(function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){n(t.target.error)}})}var Zn=function(){function t(t,e){this.userId=t,this.serializer=e,this.garbageCollector=null}return t.forUser=function(e,n){return y(""!==e.uid,"UserID must not be an empty string."),new t(e.isAuthenticated()?e.uid:"",n)},t.prototype.start=function(e){var n=this;return t.loadNextBatchIdFromDb(e).next(function(t){return n.nextBatchId=t,rr(e).get(n.userId)}).next(function(t){return t||(t=new Un(n.userId,Cn,"")),n.metadata=t,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(e).next(function(t){return y(t,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Cn,rr(e).put(n.metadata)}):hn.resolve()})},t.loadNextBatchIdFromDb=function(t){var e=Cn;return er(t).iterate({reverse:!0},function(t,n,r){var i,o,a=t[0];if(t[1]>e&&(e=n.batchId),""===a)r.done();else{var s=(o=(i=a).length-1,0===i.length?"":"\0"===i.charAt(o)?i.substring(0,o):i.substring(0,o)+String.fromCharCode(i.charCodeAt(o)-1));r.skip([s])}}).next(function(){return e+1})},t.prototype.checkEmpty=function(t){var e=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).iterate({range:n},function(t,n,r){e=!1,r.done()}).next(function(){return e})},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.metadata.lastAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;return y(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=tr(n),rr(t).put(this.metadata)},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.metadata.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.metadata.lastStreamToken=tr(e),rr(t).put(this.metadata)},t.prototype.addMutationBatch=function(t,e,n){var r=this,i=this.nextBatchId;this.nextBatchId++;var o=new xn(i,e,n),a=this.serializer.toDbMutationBatch(this.userId,o);return er(t).put(a).next(function(){for(var e=[],o=0,a=n;o<a.length;o++){var s=a[o],u=Bn.key(r.userId,s.key.path,i);e.push(nr(t).put(u,Bn.PLACEHOLDER))}return hn.waitFor(e)}).next(function(){return o})},t.prototype.lookupMutationBatch=function(t,e){var n=this;return er(t).get(this.keyForBatchId(e)).next(function(t){return t?n.serializer.fromDbMutationBatch(t):null})},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){var n=this,r=Math.max(e,this.metadata.lastAcknowledgedBatchId)+1,i=IDBKeyRange.lowerBound(this.keyForBatchId(r)),o=null;return er(t).iterate({range:i},function(t,e,i){e.userId===n.userId&&(y(e.batchId>=r,"Should have found mutation after "+r),o=n.serializer.fromDbMutationBatch(e)),i.done()}).next(function(){return o})},t.prototype.getAllMutationBatches=function(t){var e=this,n=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).loadAll(n).next(function(t){return t.map(function(t){return e.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(e));return er(t).loadAll(r).next(function(t){return t.map(function(t){return n.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return nr(t).iterate({range:i},function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Dn(u);if(s===n.userId&&e.path.isEqual(l)){var f=n.keyForBatchId(c);return er(t).get(f).next(function(t){null===t&&m("Dangling document-mutation reference found: "+r+" which points to "+f),o.push(n.serializer.fromDbMutationBatch(t))})}a.done()}).next(function(){return o})},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this;y(!e.isDocumentQuery(),"Document queries shouldn't go down this path");var r=e.path,i=r.length+1,o=Bn.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new le(K);return nr(t).iterate({range:a},function(t,e,o){var a=t[0],u=t[1],c=t[2],l=Dn(u);a===n.userId&&r.isPrefixOf(l)?l.length===i&&(s=s.add(c)):o.done()}).next(function(){var e=[],r=[];return s.forEach(function(i){var o=n.keyForBatchId(i);r.push(er(t).get(o).next(function(t){null===t&&m("Dangling document-mutation reference found, which points to "+o),e.push(n.serializer.fromDbMutationBatch(t))}))}),hn.waitFor(r).next(function(){return e})})},t.prototype.removeMutationBatches=function(t,e){for(var n=er(t),r=nr(t),i=[],o=function(t){var e=IDBKeyRange.only(a.keyForBatchId(t.batchId)),o=0,s=n.iterate({range:e},function(t,e,n){return o++,n.delete()});i.push(s.next(function(){y(1===o,"Dangling document-mutation reference found: Missing batch "+t.batchId)}));for(var u=0,c=t.mutations;u<c.length;u++){var l=c[u],f=Bn.key(a.userId,l.key.path,t.batchId);i.push(r.delete(f)),null!==a.garbageCollector&&a.garbageCollector.addPotentialGarbageKey(l.key)}},a=this,s=0,u=e;s<u.length;s++){o(u[s])}return hn.waitFor(i)},t.prototype.performConsistencyCheck=function(t){var e=this;return this.checkEmpty(t).next(function(n){if(!n)return hn.resolve();var r=IDBKeyRange.lowerBound(Bn.prefixForUser(e.userId)),i=[];return nr(t).iterate({range:r},function(t,n,r){if(t[0]===e.userId){var o=Dn(t[1]);i.push(o)}else r.done()}).next(function(){y(0===i.length,"Document leak -- detected dangling mutation references when queue is empty. Dangling keys: "+i.map(function(t){return t.canonicalString()}))})})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return nr(t).iterate({range:o,keysOnly:!0},function(t,e,r){var o=t[0],s=t[1];t[2];o===n.userId&&s===i&&(a=!0),r.done()}).next(function(){return a})},t.prototype.keyForBatchId=function(t){return[this.userId,t]},t}();function tr(e){return e instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function er(t){return Qn.getStore(t,jn.store)}function nr(t){return Qn.getStore(t,Bn.store)}function rr(t){return Qn.getStore(t,Un.store)}var ir=function(){function t(t){this.serializer=t,this.lastRemoteSnapshotVersion=Qt.MIN,this.metadata=null,this.garbageCollector=null}return t.prototype.start=function(t){var e=this;return ar(t).get(zn.key).next(function(t){y(null!==t,"Missing metadata row that should be added by schema migration."),e.metadata=t;var n=t.lastRemoteSnapshotVersion;return e.lastRemoteSnapshotVersion=Qt.fromTimestamp(new et(n.seconds,n.nanoseconds)),hn.resolve()})},t.prototype.getHighestTargetId=function(){return this.metadata.highestTargetId},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,this.metadata.lastRemoteSnapshotVersion=e.toTimestamp(),ar(t).put(zn.key,this.metadata)},t.prototype.addQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.metadata.targetCount+=1,n.updateMetadataFromQueryData(e),n.saveMetadata(t)})},t.prototype.updateQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.updateMetadataFromQueryData(e)?n.saveMetadata(t):hn.resolve()})},t.prototype.removeQueryData=function(t,e){var n=this;return y(this.metadata.targetCount>0,"Removing from an empty query cache"),this.removeMatchingKeysForTargetId(t,e.targetId).next(function(){return or(t).delete(e.targetId)}).next(function(){return n.metadata.targetCount-=1,n.saveMetadata(t)})},t.prototype.saveMetadata=function(t){return ar(t).put(zn.key,this.metadata)},t.prototype.saveQueryData=function(t,e){return or(t).put(this.serializer.toDbTarget(e))},t.prototype.updateMetadataFromQueryData=function(t){var e=!1;return t.targetId>this.metadata.highestTargetId&&(this.metadata.highestTargetId=t.targetId,e=!0),e},Object.defineProperty(t.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this,r=e.canonicalId(),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),o=null;return or(t).iterate({range:i,index:Wn.queryTargetsIndexName},function(t,r,i){var a=n.serializer.fromDbTarget(r);e.isEqual(a.query)&&(o=a,i.done())}).next(function(){return o})},t.prototype.addMatchingKeys=function(t,e,n){var r=[],i=sr(t);return e.forEach(function(t){var e=On(t.path);r.push(i.put(new Hn(n,e)))}),hn.waitFor(r)},t.prototype.removeMatchingKeys=function(t,e,n){var r=this,i=[],o=sr(t);return e.forEach(function(t){var e=On(t.path);i.push(o.delete([n,e])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(t)}),hn.waitFor(i)},t.prototype.removeMatchingKeysForTargetId=function(t,e){var n=sr(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return this.notifyGCForRemovedKeys(t,r).next(function(){return n.delete(r)})},t.prototype.notifyGCForRemovedKeys=function(t,e){var n=this,r=sr(t);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:e,keysOnly:!0},function(t,e,r){var i=Dn(t[1]),o=new ct(i);y(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=sr(t),i=ge();return r.iterate({range:n,keysOnly:!0},function(t,e,n){var r=Dn(t[1]),o=new ct(r);i=i.add(o)}).next(function(){return i})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){y(null!==t,"Persistence Transaction cannot be null for query cache containsKey");var n,r=On(e.path),i=IDBKeyRange.bound([r],[(n=r,n+"\0")],!1,!0),o=0;return sr(t).iterate({index:Hn.documentTargetsIndex,keysOnly:!0,range:i},function(t,e,n){o++,n.done()}).next(function(){return o>0})},t}();function or(t){return Qn.getStore(t,Wn.store)}function ar(t){return Qn.getStore(t,zn.store)}function sr(t){return Qn.getStore(t,Hn.store)}var ur=function(){function t(t){this.serializer=t}return t.prototype.addEntry=function(t,e){return cr(t).put(lr(e.key),this.serializer.toDbRemoteDocument(e))},t.prototype.removeEntry=function(t,e){return cr(t).delete(lr(e))},t.prototype.getEntry=function(t,e){var n=this;return cr(t).get(lr(e)).next(function(t){return t?n.serializer.fromDbRemoteDocument(t):null})},t.prototype.getDocumentsMatchingQuery=function(t,e){var n=this,r=de(),i=e.path.toArray(),o=IDBKeyRange.lowerBound(i);return cr(t).iterate({range:o},function(t,i,o){var a=n.serializer.fromDbRemoteDocument(i);e.path.isPrefixOf(a.key.path)?a instanceof lt&&e.matches(a)&&(r=r.insert(a.key,a)):o.done()}).next(function(){return r})},t}();function cr(t){return Qn.getStore(t,Vn.store)}function lr(t){return t.path.toArray()}var fr=function(){function e(t){this.remoteSerializer=t}return e.prototype.fromDbRemoteDocument=function(t){if(t.document)return this.remoteSerializer.fromDocument(t.document);if(t.noDocument){var e=ct.fromSegments(t.noDocument.path),n=t.noDocument.readTime,r=new et(n.seconds,n.nanoseconds);return new ft(e,Qt.fromTimestamp(r))}return m("Unexpected DbRemoteDocument")},e.prototype.toDbRemoteDocument=function(t){if(t instanceof lt){var e=this.remoteSerializer.toDocument(t);return new Vn(null,e)}var n=t.key.path.toArray(),r=t.version.toTimestamp(),i=new Ln(r.seconds,r.nanoseconds);return new Vn(new qn(n,i),null)},e.prototype.toDbMutationBatch=function(t,e){var n=this,r=e.mutations.map(function(t){return n.remoteSerializer.toMutation(t)});return new jn(t,e.batchId,e.localWriteTime.toMillis(),r)},e.prototype.fromDbMutationBatch=function(t){var e=this,n=t.mutations.map(function(t){return e.remoteSerializer.fromMutation(t)}),r=et.fromMillis(t.localWriteTimeMs);return new xn(t.batchId,r,n)},e.prototype.fromDbTarget=function(t){var e,n=new et(t.readTime.seconds,t.readTime.nanoseconds),r=Qt.fromTimestamp(n);return e=void 0!==t.query.documents?this.remoteSerializer.fromDocumentsTarget(t.query):this.remoteSerializer.fromQueryTarget(t.query),new Xt(e,t.targetId,Vt.Listen,r,t.resumeToken)},e.prototype.toDbTarget=function(e){y(Vt.Listen===e.purpose,"Only queries with purpose "+Vt.Listen+" may be stored, got "+e.purpose);var n,r,i=e.snapshotVersion.toTimestamp(),o=new Ln(i.seconds,i.nanoseconds);return n=e.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(e.query):this.remoteSerializer.toQueryTarget(e.query),e.resumeToken instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),r=e.resumeToken.toString()):r=e.resumeToken,new Wn(e.targetId,e.query.canonicalId(),o,r,0,n)},e}();var hr,pr="IndexedDbPersistence",dr="There is another tab open with offline persistence enabled. Only one such tab is allowed at a time. The other tab must be closed or persistence must be disabled.",vr=function(){function t(e,n){this.ownerId=this.generateOwnerId(),this.dbName=e+t.MAIN_DATABASE,this.serializer=new fr(n),this.localStoragePrefix=e}return t.prototype.start=function(){var e=this;return t.isAvailable()?(y(!this.started,"IndexedDbPersistence double-started!"),this.started=!0,Qn.openOrCreate(this.dbName,2,Mn).then(function(t){e.simpleDb=t}).then(function(){return e.tryAcquireOwnerLease()}).then(function(){e.scheduleOwnerLeaseRefreshes(),e.attachWindowUnloadHook()})):(this.persistenceError=new w(_.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled."),Promise.reject(this.persistenceError))},t.prototype.shutdown=function(t){var e=this;return y(this.started,"IndexedDbPersistence shutdown without start!"),this.started=!1,this.detachWindowUnloadHook(),this.stopOwnerLeaseRefreshes(),this.releaseOwnerLease().then(function(){if(e.simpleDb.close(),t)return Qn.delete(e.dbName)})},t.prototype.getMutationQueue=function(t){return Zn.forUser(t,this.serializer)},t.prototype.getQueryCache=function(){return new ir(this.serializer)},t.prototype.getRemoteDocumentCache=function(){return new ur(this.serializer)},t.prototype.runTransaction=function(t,e){var n=this;return this.persistenceError?Promise.reject(this.persistenceError):(p(pr,"Starting transaction:",t),this.simpleDb.runTransaction("readwrite",Kn,function(t){return n.ensureOwnerLease(t).next(function(){return e(t)})}))},t.isAvailable=function(){return Qn.isAvailable()},t.buildStoragePrefix=function(t){var e=t.databaseId.projectId;return t.databaseId.isDefaultDatabase||(e+="."+t.databaseId.database),"firestore/"+t.persistenceKey+"/"+e+"/"},t.prototype.tryAcquireOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){if(t.validOwner(e))return p(pr,"Valid owner already. Failing. Current owner:",e),t.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(t.persistenceError);var r=new Fn(t.ownerId,Date.now());return p(pr,"No valid owner. Acquiring owner lease. Current owner:",e,"New owner:",r),n.put("owner",r)})})},t.prototype.releaseOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){return null!==e&&e.ownerId===t.ownerId?(p(pr,"Releasing owner lease."),n.delete("owner")):hn.resolve()})})},t.prototype.ensureOwnerLease=function(t){var e=this;return t.store(Fn.store).get("owner").next(function(t){return null===t||t.ownerId!==e.ownerId?(e.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(e.persistenceError)):hn.resolve()})},t.prototype.validOwner=function(t){var e=Date.now(),n=e-5e3,r=e;return null!==t&&(!(t.leaseTimestampMs<n)&&(t.leaseTimestampMs>r?(d("Persistence owner-lease is in the future. Discarding.",t),!1):t.ownerId!==this.getZombiedOwnerId()))},t.prototype.scheduleOwnerLeaseRefreshes=function(){var t=this;this.ownerLeaseRefreshHandle=setInterval(function(){t.runTransaction("Refresh owner timestamp",function(e){return e.store(Fn.store).put("owner",new Fn(t.ownerId,Date.now()))}).catch(function(e){d(e),t.stopOwnerLeaseRefreshes()})},4e3)},t.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},t.prototype.attachWindowUnloadHook=function(){var t=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){t.setZombiedOwnerId(t.ownerId),t.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},t.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(y("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},t.prototype.getZombiedOwnerId=function(){try{var t=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return p(pr,"Zombied ownerID from LocalStorage:",t),t}catch(t){return d("Failed to get zombie owner id.",t),null}},t.prototype.setZombiedOwnerId=function(t){try{null===t?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),t)}catch(t){d("Failed to set zombie owner id.",t)}},t.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},t.prototype.generateOwnerId=function(){return z.newId()},t.MAIN_DATABASE="main",t}(),mr=function(){function t(t,e){this.remoteDocumentCache=t,this.mutationQueue=e}return t.prototype.getDocument=function(t,e){var n=this;return this.remoteDocumentCache.getEntry(t,e).next(function(r){return n.computeLocalDocument(t,e,r)})},t.prototype.getDocuments=function(t,e){var n=this,r=[],i=he();return e.forEach(function(e){r.push(n.getDocument(t,e).next(function(t){t||(t=new ft(e,Qt.forDeletedDoc())),i=i.insert(e,t)}))}),hn.waitFor(r).next(function(){return i})},t.prototype.getDocumentsMatchingQuery=function(t,e){return ct.isDocumentKey(e.path)?this.getDocumentsMatchingDocumentQuery(t,e.path):this.getDocumentsMatchingCollectionQuery(t,e)},t.prototype.getDocumentsMatchingDocumentQuery=function(t,e){return this.getDocument(t,new ct(e)).next(function(t){var e=de();return t instanceof lt&&(e=e.insert(t.key,t)),e})},t.prototype.getDocumentsMatchingCollectionQuery=function(t,e){var n,r=this;return this.remoteDocumentCache.getDocumentsMatchingQuery(t,e).next(function(e){return r.computeLocalDocuments(t,e)}).next(function(i){return n=i,r.mutationQueue.getAllMutationBatchesAffectingQuery(t,e)}).next(function(e){for(var i=ge(),o=0,a=e;o<a.length;o++)for(var s=0,u=a[o].mutations;s<u.length;s++){var c=u[s];n.get(c.key)||(i=i.add(c.key))}var l=[];return i.forEach(function(e){l.push(r.getDocument(t,e).next(function(t){t instanceof lt&&(n=n.insert(t.key,t))}))}),hn.waitFor(l)}).next(function(){return n.forEach(function(t,r){e.matches(r)||(n=n.remove(t))}),n})},t.prototype.computeLocalDocument=function(t,e,n){return this.mutationQueue.getAllMutationBatchesAffectingDocumentKey(t,e).next(function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];n=o.applyToLocalView(e,n)}return n})},t.prototype.computeLocalDocuments=function(t,e){var n=this,r=[];return e.forEach(function(i,o){r.push(n.computeLocalDocument(t,i,o).next(function(t){t instanceof lt?e=e.insert(t.key,t):t instanceof ft?e=e.remove(t.key):m("Unknown MaybeDocument: "+t)}))}),hn.waitFor(r).next(function(){return e})},t}(),yr=function(){function t(t){this.remoteDocumentCache=t,this.changes=he()}return t.prototype.addEntry=function(t){var e=this.assertChanges();this.changes=e.insert(t.key,t)},t.prototype.getEntry=function(t,e){var n=this.assertChanges().get(e);return n?hn.resolve(n):this.remoteDocumentCache.getEntry(t,e)},t.prototype.apply=function(t){var e=this,n=[];return this.assertChanges().forEach(function(r,i){n.push(e.remoteDocumentCache.addEntry(t,i))}),this.changes=null,hn.waitFor(n)},t.prototype.assertChanges=function(){return y(null!==this.changes,"Changes have already been applied."),this.changes},t}(),gr=function(){function t(t,e,n){this.persistence=t,this.garbageCollector=n,this.localViewReferences=new vn,this.targetIds={},this.targetIdGenerator=gn.forLocalStore(),this.heldBatchResults=[],this.mutationQueue=t.getMutationQueue(e),this.remoteDocuments=t.getRemoteDocumentCache(),this.queryCache=t.getQueryCache(),this.localDocuments=new mr(this.remoteDocuments,this.mutationQueue),this.garbageCollector.addGarbageSource(this.localViewReferences),this.garbageCollector.addGarbageSource(this.queryCache),this.garbageCollector.addGarbageSource(this.mutationQueue)}return t.prototype.start=function(){var t=this;return this.persistence.runTransaction("Start LocalStore",function(e){return t.startMutationQueue(e).next(function(){return t.startQueryCache(e)})})},t.prototype.handleUserChange=function(t){var e=this;return this.persistence.runTransaction("Handle user change",function(n){var r;return e.mutationQueue.getAllMutationBatches(n).next(function(i){return r=i,e.garbageCollector.removeGarbageSource(e.mutationQueue),e.mutationQueue=e.persistence.getMutationQueue(t),e.garbageCollector.addGarbageSource(e.mutationQueue),e.startMutationQueue(n)}).next(function(){return e.localDocuments=new mr(e.remoteDocuments,e.mutationQueue),e.mutationQueue.getAllMutationBatches(n)}).next(function(t){for(var i=ge(),o=0,a=[r,t];o<a.length;o++)for(var s=0,u=a[o];s<u.length;s++)for(var c=0,l=u[s].mutations;c<l.length;c++){var f=l[c];i=i.add(f.key)}return e.localDocuments.getDocuments(n,i)})})},t.prototype.startQueryCache=function(t){var e=this;return this.queryCache.start(t).next(function(){var t=e.queryCache.getHighestTargetId();e.targetIdGenerator=gn.forLocalStore(t)})},t.prototype.startMutationQueue=function(t){var e=this;return this.mutationQueue.start(t).next(function(){return e.heldBatchResults=[],e.mutationQueue.getHighestAcknowledgedBatchId(t)}).next(function(n){return n!==Cn?e.mutationQueue.getAllMutationBatchesThroughBatchId(t,n):hn.resolve([])}).next(function(n){return n.length>0?e.mutationQueue.removeMutationBatches(t,n):hn.resolve()})},t.prototype.localWrite=function(t){var e=this;return this.persistence.runTransaction("Locally write mutations",function(n){var r,i=et.now();return e.mutationQueue.addMutationBatch(n,i,t).next(function(t){var i=(r=t).keys();return e.localDocuments.getDocuments(n,i)}).next(function(t){return{batchId:r.batchId,changes:t}})})},t.prototype.acknowledgeBatch=function(t){var e=this;return this.persistence.runTransaction("Acknowledge batch",function(n){var r;return e.mutationQueue.acknowledgeBatch(n,t.batch,t.streamToken).next(function(){if(e.shouldHoldBatchResult(t.commitVersion))return e.heldBatchResults.push(t),r=ge(),hn.resolve();var i=new yr(e.remoteDocuments);return e.releaseBatchResults(n,[t],i).next(function(t){return r=t,i.apply(n)})}).next(function(){return e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,r)})})},t.prototype.rejectBatch=function(t){var e=this;return this.persistence.runTransaction("Reject batch",function(n){var r,i;return e.mutationQueue.lookupMutationBatch(n,t).next(function(i){return y(null!=i,"Attempt to reject nonexistent batch!"),r=i,e.mutationQueue.getHighestAcknowledgedBatchId(n).next(function(e){return y(t>e,"Acknowledged batches can't be rejected."),r})}).next(function(){return e.removeMutationBatch(n,r)}).next(function(t){return i=t,e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,i)})})},t.prototype.getLastStreamToken=function(){var t=this;return this.persistence.runTransaction("Get last stream token",function(e){return t.mutationQueue.getLastStreamToken(e)})},t.prototype.setLastStreamToken=function(t){var e=this;return this.persistence.runTransaction("Set last stream token",function(n){return e.mutationQueue.setLastStreamToken(n,t)})},t.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},t.prototype.applyRemoteEvent=function(t){var e=this,n=new yr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var i=[];x(t.targetChanges,function(n,o){var a=e.targetIds[n];if(a){i.push(e.queryCache.removeMatchingKeys(r,o.removedDocuments,n).next(function(){return e.queryCache.addMatchingKeys(r,o.addedDocuments,n)}));var s=o.resumeToken;s.length>0&&(a=a.update({resumeToken:s,snapshotVersion:t.snapshotVersion}),e.targetIds[n]=a,i.push(e.queryCache.updateQueryData(r,a)))}});var o=ge();t.documentUpdates.forEach(function(t,a){o=o.add(t),i.push(n.getEntry(r,t).next(function(r){null==r||a.version.isEqual(Qt.MIN)||a.version.compareTo(r.version)>=0?n.addEntry(a):p("LocalStore","Ignoring outdated watch update for ",t,". Current version:",r.version," Watch version:",a.version),e.garbageCollector.addPotentialGarbageKey(t)}))});var a,s=e.queryCache.getLastRemoteSnapshotVersion(),u=t.snapshotVersion;return u.isEqual(Qt.MIN)||(y(u.compareTo(s)>=0,"Watch stream reverted to previous snapshot?? "+u+" < "+s),i.push(e.queryCache.setLastRemoteSnapshotVersion(r,u))),hn.waitFor(i).next(function(){return e.releaseHeldBatchResults(r,n)}).next(function(t){return a=t,n.apply(r)}).next(function(){return e.localDocuments.getDocuments(r,o.unionWith(a))})})},t.prototype.notifyLocalViewChanges=function(t){var e=this;return this.persistence.runTransaction("Notify local view changes",function(n){for(var r=[],i=function(t){r.push(e.queryCache.getQueryData(n,t.query).next(function(n){y(null!==n,"Local view changes contain unallocated query.");var r=n.targetId;e.localViewReferences.addReferences(t.addedKeys,r),e.localViewReferences.removeReferences(t.removedKeys,r)}))},o=0,a=t;o<a.length;o++){i(a[o])}return hn.waitFor(r)})},t.prototype.nextMutationBatch=function(t){var e=this;return this.persistence.runTransaction("Get next mutation batch",function(n){return void 0===t&&(t=Cn),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)})},t.prototype.readDocument=function(t){var e=this;return this.persistence.runTransaction("read document",function(n){return e.localDocuments.getDocument(n,t)})},t.prototype.allocateQuery=function(t){var e=this;return this.persistence.runTransaction("Allocate query",function(n){var r;return e.queryCache.getQueryData(n,t).next(function(i){if(i)return r=i,hn.resolve();var o=e.targetIdGenerator.next();return r=new Xt(t,o,Vt.Listen),e.queryCache.addQueryData(n,r)}).next(function(){return y(!e.targetIds[r.targetId],"Tried to allocate an already allocated query: "+t),e.targetIds[r.targetId]=r,r})})},t.prototype.releaseQuery=function(t){var e=this;return this.persistence.runTransaction("Release query",function(n){return e.queryCache.getQueryData(n,t).next(function(r){return y(null!=r,"Tried to release nonexistent query: "+t),e.localViewReferences.removeReferencesForId(r.targetId),delete e.targetIds[r.targetId],e.garbageCollector.isEager?e.queryCache.removeQueryData(n,r):hn.resolve()}).next(function(){if(k(e.targetIds)){var t=new yr(e.remoteDocuments);return e.releaseHeldBatchResults(n,t).next(function(){t.apply(n)})}return hn.resolve()})})},t.prototype.executeQuery=function(t){var e=this;return this.persistence.runTransaction("Execute query",function(n){return e.localDocuments.getDocumentsMatchingQuery(n,t)})},t.prototype.remoteDocumentKeys=function(t){var e=this;return this.persistence.runTransaction("Remote document keys",function(n){return e.queryCache.getMatchingKeysForTargetId(n,t)})},t.prototype.collectGarbage=function(){var t=this;return this.persistence.runTransaction("Garbage collection",function(e){return t.garbageCollector.collectGarbage(e).next(function(n){var r=[];return n.forEach(function(n){r.push(t.remoteDocuments.removeEntry(e,n))}),hn.waitFor(r)})})},t.prototype.releaseHeldBatchResults=function(t,e){for(var n=[],r=0,i=this.heldBatchResults;r<i.length;r++){var o=i[r];if(!this.isRemoteUpToVersion(o.commitVersion))break;n.push(o)}return 0===n.length?hn.resolve(ge()):(this.heldBatchResults.splice(0,n.length),this.releaseBatchResults(t,n,e))},t.prototype.isRemoteUpToVersion=function(t){var e=this.queryCache.getLastRemoteSnapshotVersion();return t.compareTo(e)<=0||k(this.targetIds)},t.prototype.shouldHoldBatchResult=function(t){return!this.isRemoteUpToVersion(t)||this.heldBatchResults.length>0},t.prototype.releaseBatchResults=function(t,e,n){for(var r=this,i=hn.resolve(),o=function(e){i=i.next(function(){return r.applyWriteToRemoteDocuments(t,e,n)})},a=0,s=e;a<s.length;a++){o(s[a])}return i.next(function(){return r.removeMutationBatches(t,e.map(function(t){return t.batch}))})},t.prototype.removeMutationBatch=function(t,e){return this.removeMutationBatches(t,[e])},t.prototype.removeMutationBatches=function(t,e){for(var n=ge(),r=0,i=e;r<i.length;r++)for(var o=0,a=i[r].mutations;o<a.length;o++){var s=a[o].key;n=n.add(s)}return this.mutationQueue.removeMutationBatches(t,e).next(function(){return n})},t.prototype.applyWriteToRemoteDocuments=function(t,e,n){var r=e.batch,i=r.keys(),o=hn.resolve();return i.forEach(function(i){o=o.next(function(){return n.getEntry(t,i)}).next(function(t){var o=t,a=e.docVersions.get(i);y(null!==a,"ackVersions should contain every doc in the write."),(!o||o.version.compareTo(a)<0)&&((o=r.applyToRemoteDocument(i,o,e))?n.addEntry(o):y(!t,"Mutation batch "+r+" applied to document "+t+" resulted in null"))})}),o},t}(),br=function(){function t(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn,this.lastStreamToken=b(),this.garbageCollector=null,this.batchesByDocumentKey=new le(mn.compareByKey)}return t.prototype.start=function(t){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn),y(this.highestAcknowledgedBatchId<this.nextBatchId,"highestAcknowledgedBatchId must be less than the nextBatchId"),hn.resolve()},t.prototype.checkEmpty=function(t){return hn.resolve(0===this.mutationQueue.length)},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.highestAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;y(r>this.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var i=this.indexOfExistingBatchId(r,"acknowledged"),o=this.mutationQueue[i];return y(r===o.batchId,"Queue ordering failure: expected batch "+r+", got batch "+o.batchId),y(!o.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,hn.resolve()},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.lastStreamToken=e,hn.resolve()},t.prototype.addMutationBatch=function(t,e,n){y(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;(this.nextBatchId++,this.mutationQueue.length>0)&&y(this.mutationQueue[this.mutationQueue.length-1].batchId<r,"Mutation batchIDs must be monotonically increasing order");var i=new xn(r,e,n);this.mutationQueue.push(i);for(var o=0,a=n;o<a.length;o++){var s=a[o];this.batchesByDocumentKey=this.batchesByDocumentKey.add(new mn(s.key,r))}return hn.resolve(i)},t.prototype.lookupMutationBatch=function(t,e){return hn.resolve(this.findMutationBatch(e))},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){for(var n=this.mutationQueue.length,r=Math.max(e,this.highestAcknowledgedBatchId)+1,i=this.indexOfBatchId(r),o=i<0?0:i;o<n;o++){var a=this.mutationQueue[o];if(!a.isTombstone())return hn.resolve(a)}return hn.resolve(null)},t.prototype.getAllMutationBatches=function(t){return hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length))},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this.mutationQueue.length,r=this.indexOfBatchId(e);return r<0?r=0:r>=n?r=n:r++,hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=new mn(e,0),i=new mn(e,Number.POSITIVE_INFINITY),o=[];return this.batchesByDocumentKey.forEachInRange([r,i],function(t){y(e.isEqual(t.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(t.targetOrBatchId);y(null!==r,"Batches in the index must exist in the main table"),o.push(r)}),hn.resolve(o)},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this,r=e.path,i=r.length+1,o=r;ct.isDocumentKey(o)||(o=o.child(""));var a=new mn(new ct(o),0),s=new le(K);this.batchesByDocumentKey.forEachWhile(function(t){var e=t.key.path;return!!r.isPrefixOf(e)&&(e.length===i&&(s=s.add(t.targetOrBatchId)),!0)},a);var u=[];return s.forEach(function(t){var e=n.findMutationBatch(t);null!==e&&u.push(e)}),hn.resolve(u)},t.prototype.removeMutationBatches=function(t,e){var n=e.length;y(n>0,"Should not remove mutations when none exist.");var r=e[0].batchId,i=this.mutationQueue.length,o=this.indexOfExistingBatchId(r,"removed");y(this.mutationQueue[o].batchId===r,"Removed batches must exist in the queue");for(var a=1,s=o+1;a<n&&s<i;){(p=this.mutationQueue[s]).isTombstone()?s++:(y(p.batchId===e[a].batchId,"Removed batches must be contiguous in the queue"),a++,s++)}if(0===o){for(;s<i;s++){if(!(p=this.mutationQueue[s]).isTombstone())break}var u=s-o;this.mutationQueue.splice(o,u)}else for(var c=o;c<s;c++)this.mutationQueue[c]=this.mutationQueue[c].toTombstone();for(var l=this.batchesByDocumentKey,f=0,h=e;f<h.length;f++)for(var p,d=(p=h[f]).batchId,v=0,m=p.mutations;v<m.length;v++){var g=m[v].key;null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(g);var b=new mn(g,d);l=l.delete(b)}return this.batchesByDocumentKey=l,hn.resolve()},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.batchesByDocumentKey.firstAfterOrEqual(n);return hn.resolve(e.isEqual(r&&r.key))},t.prototype.performConsistencyCheck=function(t){return 0===this.mutationQueue.length&&y(this.batchesByDocumentKey.isEmpty(),"Document leak -- detected dangling mutation references when queue is empty."),hn.resolve()},t.prototype.getAllLiveMutationBatchesBeforeIndex=function(t){for(var e=[],n=0;n<t;n++){var r=this.mutationQueue[n];r.isTombstone()||e.push(r)}return e},t.prototype.indexOfExistingBatchId=function(t,e){var n=this.indexOfBatchId(t);return y(n>=0&&n<this.mutationQueue.length,"Batches must exist to be "+e),n},t.prototype.indexOfBatchId=function(t){return 0===this.mutationQueue.length?0:t-this.mutationQueue[0].batchId},t.prototype.findMutationBatch=function(t){var e=this.indexOfBatchId(t);if(e<0||e>=this.mutationQueue.length)return null;var n=this.mutationQueue[e];return y(n.batchId===t,"If found batch must match"),n.isTombstone()?null:n},t}(),_r=function(){function t(){this.queries=new un(function(t){return t.canonicalId()}),this.lastRemoteSnapshotVersion=Qt.MIN,this.highestTargetId=0,this.references=new vn,this.targetCount=0}return t.prototype.start=function(t){return hn.resolve()},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.getHighestTargetId=function(){return this.highestTargetId},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,hn.resolve()},t.prototype.saveQueryData=function(t){this.queries.set(t.query,t);var e=t.targetId;e>this.highestTargetId&&(this.highestTargetId=e)},t.prototype.addQueryData=function(t,e){return y(!this.queries.has(e.query),"Adding a query that already exists"),this.saveQueryData(e),this.targetCount+=1,hn.resolve()},t.prototype.updateQueryData=function(t,e){return y(this.queries.has(e.query),"Updating a non-existent query"),this.saveQueryData(e),hn.resolve()},t.prototype.removeQueryData=function(t,e){return y(this.targetCount>0,"Removing a target from an empty cache"),y(this.queries.has(e.query),"Removing a non-existent target from the cache"),this.queries.delete(e.query),this.references.removeReferencesForId(e.targetId),this.targetCount-=1,hn.resolve()},Object.defineProperty(t.prototype,"count",{get:function(){return this.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this.queries.get(e)||null;return hn.resolve(n)},t.prototype.addMatchingKeys=function(t,e,n){return this.references.addReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeys=function(t,e,n){return this.references.removeReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeysForTargetId=function(t,e){return this.references.removeReferencesForId(e),hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=this.references.referencesForId(e);return hn.resolve(n)},t.prototype.setGarbageCollector=function(t){this.references.setGarbageCollector(t)},t.prototype.containsKey=function(t,e){return this.references.containsKey(t,e)},t}(),wr=function(){function t(){this.docs=he()}return t.prototype.addEntry=function(t,e){return this.docs=this.docs.insert(e.key,e),hn.resolve()},t.prototype.removeEntry=function(t,e){return this.docs=this.docs.remove(e),hn.resolve()},t.prototype.getEntry=function(t,e){return hn.resolve(this.docs.get(e))},t.prototype.getDocumentsMatchingQuery=function(t,e){for(var n=de(),r=new ct(e.path.child("")),i=this.docs.getIteratorFrom(r);i.hasNext();){var o=i.getNext(),a=o.key,s=o.value;if(!e.path.isPrefixOf(a.path))break;s instanceof lt&&e.matches(s)&&(n=n.insert(s.key,s))}return hn.resolve(n)},t}(),Er=function(){function t(){this.mutationQueues={},this.remoteDocumentCache=new wr,this.queryCache=new _r,this.started=!1}return t.prototype.start=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(!this.started,"MemoryPersistence double-started!"),this.started=!0,[2]})})},t.prototype.shutdown=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(this.started,"MemoryPersistence shutdown without start!"),this.started=!1,[2]})})},t.prototype.getMutationQueue=function(t){var e=this.mutationQueues[t.toKey()];return e||(e=new br,this.mutationQueues[t.toKey()]=e),e},t.prototype.getQueryCache=function(){return this.queryCache},t.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},t.prototype.runTransaction=function(t,e){return p("MemoryPersistence","Starting transaction:",t),e(new Tr).toPromise()},t}(),Tr=function(){return function(){}}(),Cr=function(){function t(){this.isEager=!1}return t.prototype.addGarbageSource=function(t){},t.prototype.removeGarbageSource=function(t){},t.prototype.addPotentialGarbageKey=function(t){},t.prototype.collectGarbage=function(t){return hn.resolve(ge())},t}();!function(t){t.All="all",t.ListenStreamIdle="listen_stream_idle",t.ListenStreamConnectionBackoff="listen_stream_connection_backoff",t.WriteStreamIdle="write_stream_idle",t.WriteStreamConnectionBackoff="write_stream_connection_backoff",t.OnlineStateTimeout="online_state_timeout"}(hr||(hr={}));var xr,Sr=function(){function t(t,e,n,r,i){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new Gn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.catch=this.deferred.promise.catch.bind(this.deferred.promise),this.deferred.promise.catch(function(t){})}return t.createAndSchedule=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.timerHandle=setTimeout(function(){return e.handleDelayElapsed()},t)},t.prototype.skipDelay=function(){return this.handleDelayElapsed()},t.prototype.cancel=function(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new w(_.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},t.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueue(function(){return null!==t.timerHandle?(t.clearTimeout(),t.op().then(function(e){return t.deferred.resolve(e)})):Promise.resolve()})},t.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},t}(),kr=function(){function t(){this.tail=Promise.resolve(),this.delayedOperations=[],this.operationInProgress=!1}return t.prototype.enqueue=function(t){var e=this;this.verifyNotFailed();var n=this.tail.then(function(){return e.operationInProgress=!0,t().catch(function(t){e.failure=t,e.operationInProgress=!1;var n=t.stack||t.message||"";throw d("INTERNAL UNHANDLED ERROR: ",n),n.indexOf("Firestore Test Simulated Error")<0&&setTimeout(function(){throw t},0),t}).then(function(t){return e.operationInProgress=!1,t})});return this.tail=n,n},t.prototype.enqueueAfterDelay=function(t,e,n){var r=this;this.verifyNotFailed(),y(!this.containsDelayedOperation(t),"Attempted to schedule multiple operations with timer id "+t+".");var i=Sr.createAndSchedule(this,t,e,n,function(t){return r.removeDelayedOperation(t)});return this.delayedOperations.push(i),i},t.prototype.verifyNotFailed=function(){this.failure&&m("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},t.prototype.verifyOperationInProgress=function(){y(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},t.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},t.prototype.containsDelayedOperation=function(t){return this.delayedOperations.findIndex(function(e){return e.timerId===t})>=0},t.prototype.runDelayedOperationsEarly=function(t){var e=this;return this.drain().then(function(){y(t===hr.All||e.containsDelayedOperation(t),"Attempted to drain to missing operation "+t),e.delayedOperations.sort(function(t,e){return t.targetTimeMs-e.targetTimeMs});for(var n=0,r=e.delayedOperations;n<r.length;n++){var i=r[n];if(i.skipDelay(),t!==hr.All&&i.timerId===t)break}return e.drain()})},t.prototype.removeDelayedOperation=function(t){var e=this.delayedOperations.indexOf(t);y(e>=0,"Delayed operation not found."),this.delayedOperations.splice(e,1)},t}(),Nr=function(){function t(t,e,n,r,i){this.queue=t,this.timerId=e,this.initialDelayMs=n,this.backoffFactor=r,this.maxDelayMs=i,this.timerPromise=null,this.reset()}return t.prototype.reset=function(){this.currentBaseMs=0},t.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},t.prototype.backoffAndRun=function(t){this.cancel();var e=this.currentBaseMs+this.jitterDelayMs();this.currentBaseMs>0&&p("ExponentialBackoff","Backing off for "+e+" ms (base delay: "+this.currentBaseMs+" ms)"),this.timerPromise=this.queue.enqueueAfterDelay(this.timerId,e,t),this.currentBaseMs*=this.backoffFactor,this.currentBaseMs<this.initialDelayMs&&(this.currentBaseMs=this.initialDelayMs),this.currentBaseMs>this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},t.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},t.prototype.jitterDelayMs=function(){return(Math.random()-.5)*this.currentBaseMs},t}();!function(t){t[t.Initial=0]="Initial",t[t.Auth=1]="Auth",t[t.Open=2]="Open",t[t.Error=3]="Error",t[t.Backoff=4]="Backoff",t[t.Stopped=5]="Stopped"}(xr||(xr={}));var Ar=1e3,Ir=6e4,Or=1.5,Pr=function(){function t(t,e,n,r,i){this.queue=t,this.idleTimerId=n,this.connection=r,this.credentialsProvider=i,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new Nr(t,e,Ar,Or,Ir),this.state=xr.Initial}return t.prototype.isStarted=function(){return this.state===xr.Backoff||this.state===xr.Auth||this.state===xr.Open},t.prototype.isOpen=function(){return this.state===xr.Open},t.prototype.start=function(t){this.state!==xr.Error?(y(this.state===xr.Initial,"Already started"),this.listener=t,this.auth()):this.performBackoff(t)},t.prototype.stop=function(){this.isStarted()&&this.close(xr.Stopped)},t.prototype.inhibitBackoff=function(){y(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=xr.Initial,this.backoff.reset()},t.prototype.markIdle=function(){var t=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,6e4,function(){return t.handleIdleCloseTimer()}))},t.prototype.sendRequest=function(t){this.cancelIdleCheck(),this.stream.send(t)},t.prototype.handleIdleCloseTimer=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.isOpen()?[2,this.close(xr.Initial)]:[2]})})},t.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},t.prototype.close=function(t,e){return s.__awaiter(this,void 0,void 0,function(){var n;return s.__generator(this,function(r){return y(t===xr.Error||Lt(e),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),t!==xr.Error?this.backoff.reset():e&&e.code===_.RESOURCE_EXHAUSTED&&(d(e.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=t,n=this.listener,this.listener=null,t!==xr.Stopped?[2,n.onClose(e)]:[2]})})},t.prototype.tearDown=function(){},t.prototype.auth=function(){var t=this;y(this.state===xr.Initial,"Must be in initial state to auth"),this.state=xr.Auth,this.credentialsProvider.getToken(!1).then(function(e){t.startStream(e)},function(e){t.queue.enqueue(function(){return s.__awaiter(t,void 0,void 0,function(){var t;return s.__generator(this,function(n){return this.state!==xr.Stopped?(t=new w(_.UNKNOWN,"Fetching auth token failed: "+e.message),[2,this.handleStreamClose(t)]):[2]})})})})},t.prototype.startStream=function(t){var e=this;if(this.state!==xr.Stopped){y(this.state===xr.Auth,"Trying to start stream in a non-auth state");var n=function(t,n){e.queue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.stream===t?[2,n()]:[2]})})})};if(null!==this.listener){var r=this.startRpc(t);this.stream=r,this.stream.onOpen(function(){n(r,function(){return y(e.state===xr.Auth,"Expected stream to be in state auth, but was "+e.state),e.state=xr.Open,e.listener.onOpen()})}),this.stream.onClose(function(t){n(r,function(){return e.handleStreamClose(t)})}),this.stream.onMessage(function(t){n(r,function(){return e.onMessage(t)})})}}},t.prototype.performBackoff=function(t){var e=this;y(this.state===xr.Error,"Should only perform backoff in an error case"),this.state=xr.Backoff,this.backoff.backoffAndRun(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.state===xr.Stopped?[2]:(this.state=xr.Initial,this.start(t),y(this.isStarted(),"PersistentStream should have started"),[2])})})})},t.prototype.handleStreamClose=function(t){return y(this.isStarted(),"Can't handle server close on non-started stream"),p("PersistentStream","close with error: "+t),this.stream=null,this.close(xr.Error,t)},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.ListenStreamConnectionBackoff,hr.ListenStreamIdle,n,r)||this;return o.serializer=i,o}return s.__extends(e,t),e.prototype.startRpc=function(t){return this.connection.openStream("Listen",t)},e.prototype.onMessage=function(t){this.backoff.reset();var e=this.serializer.fromWatchChange(t),n=this.serializer.versionFromListenResponse(t);return this.listener.onWatchChange(e,n)},e.prototype.watch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.addTarget=this.serializer.toTarget(t);var n=this.serializer.toListenRequestLabels(t);n&&(e.labels=n),this.sendRequest(e)},e.prototype.unwatch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.removeTarget=t,this.sendRequest(e)},e}(Pr),Dr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.WriteStreamConnectionBackoff,hr.WriteStreamIdle,n,r)||this;return o.serializer=i,o.handshakeComplete_=!1,o}return s.__extends(e,t),Object.defineProperty(e.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),e.prototype.start=function(e){this.handshakeComplete_=!1,t.prototype.start.call(this,e)},e.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},e.prototype.startRpc=function(t){return this.connection.openStream("Write",t)},e.prototype.onMessage=function(t){if(y(!!t.streamToken,"Got a write response without a stream token"),this.lastStreamToken=t.streamToken,this.handshakeComplete_){this.backoff.reset();var e=this.serializer.fromWriteResults(t.writeResults),n=this.serializer.fromVersion(t.commitTime);return this.listener.onMutationResult(n,e)}return y(!t.writeResults||0===t.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete()},e.prototype.writeHandshake=function(){y(this.isOpen(),"Writing handshake requires an opened stream"),y(!this.handshakeComplete_,"Handshake already completed");var t={};t.database=this.serializer.encodedDatabaseId,this.sendRequest(t)},e.prototype.writeMutations=function(t){var e=this;y(this.isOpen(),"Writing mutations requires an opened stream"),y(this.handshakeComplete_,"Handshake must be complete before writing mutations"),y(this.lastStreamToken.length>0,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:t.map(function(t){return e.serializer.toMutation(t)})};this.sendRequest(n)},e}(Pr),Mr=function(){function t(t,e,n,r){this.queue=t,this.connection=e,this.credentials=n,this.serializer=r}return t.prototype.newPersistentWriteStream=function(){return new Dr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.newPersistentWatchStream=function(){return new Rr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.commit=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,writes:t.map(function(t){return e.serializer.toMutation(t)})};return this.invokeRPC("Commit",n).then(function(t){return e.serializer.fromWriteResults(t.writeResults)})},t.prototype.lookup=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,documents:t.map(function(t){return e.serializer.toName(t)})};return this.invokeStreamingRPC("BatchGetDocuments",n).then(function(n){var r=he();n.forEach(function(t){var n=e.serializer.fromMaybeDocument(t);r=r.insert(n.key,n)});var i=[];return t.forEach(function(t){var e=r.get(t);y(!!e,"Missing entity in write response for "+t),i.push(e)}),i})},t.prototype.invokeRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeRPC(t,e,r)})},t.prototype.invokeStreamingRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeStreamingRPC(t,e,r)})},t}(),Lr=function(){function t(t){this.datastore=t,this.readVersions=me(),this.mutations=[],this.committed=!1}return t.prototype.recordVersion=function(t){var e=t.version;t instanceof ft&&(e=Qt.forDeletedDoc());var n=this.readVersions.get(t.key);if(null!==n){if(!e.isEqual(n))throw new w(_.ABORTED,"Document version changed between two reads.")}else this.readVersions=this.readVersions.insert(t.key,e)},t.prototype.lookup=function(t){var e=this;return this.committed?Promise.reject("Transaction has already completed."):this.mutations.length>0?Promise.reject("Transactions lookups are invalid after writes."):this.datastore.lookup(t).then(function(t){return t.forEach(function(t){return e.recordVersion(t)}),t})},t.prototype.write=function(t){if(this.committed)throw new w(_.FAILED_PRECONDITION,"Transaction has already completed.");this.mutations=this.mutations.concat(t)},t.prototype.precondition=function(t){var e=this.readVersions.get(t);return e?ee.updateTime(e):ee.NONE},t.prototype.preconditionForUpdate=function(t){var e=this.readVersions.get(t);if(e&&e.isEqual(Qt.forDeletedDoc()))throw new w(_.FAILED_PRECONDITION,"Can't update a document that doesn't exist.");return e?ee.updateTime(e):ee.exists(!0)},t.prototype.set=function(t,e){this.write(e.toMutations(t,this.precondition(t)))},t.prototype.update=function(t,e){this.write(e.toMutations(t,this.preconditionForUpdate(t)))},t.prototype.delete=function(t){this.write([new ae(t,this.precondition(t))]),this.readVersions=this.readVersions.insert(t,Qt.forDeletedDoc())},t.prototype.commit=function(){var t=this,e=this.readVersions;return this.mutations.forEach(function(t){e=e.remove(t.key)}),e.isEmpty()?this.datastore.commit(this.mutations).then(function(){t.committed=!0}):Promise.reject(Error("Every document read in a transaction must also be written."))},t}(),Fr=function(){function t(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state=nn.Unknown,this.watchStreamFailures=0,this.onlineStateTimer=null,this.shouldWarnClientIsOffline=!0}return t.prototype.handleWatchStreamStart=function(){var t=this;0===this.watchStreamFailures&&(this.setAndBroadcast(nn.Unknown),y(null===this.onlineStateTimer,"onlineStateTimer shouldn't be started yet"),this.onlineStateTimer=this.asyncQueue.enqueueAfterDelay(hr.OnlineStateTimeout,1e4,function(){return t.onlineStateTimer=null,y(t.state===nn.Unknown,"Timer should be canceled if we transitioned to a different state."),t.logClientOfflineWarningIfNecessary("Backend didn't respond within 10 seconds."),t.setAndBroadcast(nn.Offline),Promise.resolve()}))},t.prototype.handleWatchStreamFailure=function(t){this.state===nn.Online?(this.setAndBroadcast(nn.Unknown),y(0===this.watchStreamFailures,"watchStreamFailures must be 0"),y(null===this.onlineStateTimer,"onlineStateTimer must be null")):(this.watchStreamFailures++,this.watchStreamFailures>=2&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed 2 times. Most recent error: "+t.toString()),this.setAndBroadcast(nn.Offline)))},t.prototype.set=function(t){this.clearOnlineStateTimer(),this.watchStreamFailures=0,t===nn.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(t)},t.prototype.setAndBroadcast=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},t.prototype.logClientOfflineWarningIfNecessary=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(d(e),this.shouldWarnClientIsOffline=!1):p("OnlineStateTracker",e)},t.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},t}(),Ur=function(){function t(t,e,n,r){this.localStore=t,this.datastore=e,this.pendingWrites=[],this.lastBatchSeen=Cn,this.listenTargets={},this.watchStream=null,this.writeStream=null,this.watchChangeAggregator=null,this.onlineStateTracker=new Fr(n,r)}return t.prototype.start=function(){return this.enableNetwork()},t.prototype.isNetworkEnabled=function(){return y(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},t.prototype.enableNetwork=function(){var t=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(e){return t.writeStream.lastStreamToken=e,t.shouldStartWatchStream()?t.startWatchStream():t.onlineStateTracker.set(nn.Unknown),t.fillWritePipeline()}))},t.prototype.disableNetwork=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Offline),[2]})})},t.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},t.prototype.shutdown=function(){return p("RemoteStore","RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),Promise.resolve()},t.prototype.listen=function(t){y(!T(this.listenTargets,t.targetId),"listen called with duplicate targetId!"),this.listenTargets[t.targetId]=t,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(t)},t.prototype.unlisten=function(t){y(T(this.listenTargets,t),"unlisten called without assigned target ID!"),delete this.listenTargets[t],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(t),k(this.listenTargets)&&this.watchStream.markIdle())},t.prototype.getQueryDataForTarget=function(t){return this.listenTargets[t]||null},t.prototype.getRemoteKeysForTarget=function(t){return this.syncEngine.getRemoteKeysForTarget(t)},t.prototype.sendWatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t.targetId),this.watchStream.watch(t)},t.prototype.sendUnwatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t),this.watchStream.unwatch(t)},t.prototype.startWatchStream=function(){y(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchChangeAggregator=new Ie(this),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},t.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!k(this.listenTargets)},t.prototype.cleanUpWatchStreamState=function(){this.watchChangeAggregator=null},t.prototype.onWatchStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return x(this.listenTargets,function(e,n){t.sendWatchRequest(n)}),[2]})})},t.prototype.onWatchStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return y(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(t&&this.onlineStateTracker.handleWatchStreamFailure(t),this.startWatchStream()):this.onlineStateTracker.set(nn.Unknown),[2]})})},t.prototype.onWatchStreamChange=function(t,e){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(n){switch(n.label){case 0:return this.onlineStateTracker.set(nn.Online),t instanceof Ne&&t.state===Te.Removed&&t.cause?[2,this.handleTargetError(t)]:(t instanceof Se?this.watchChangeAggregator.handleDocumentChange(t):t instanceof ke?this.watchChangeAggregator.handleExistenceFilter(t):(y(t instanceof Ne,"Expected watchChange to be an instance of WatchTargetChange"),this.watchChangeAggregator.handleTargetChange(t)),!e.isEqual(Qt.MIN)&&e.compareTo(this.localStore.getLastRemoteSnapshotVersion())>=0?[4,this.raiseWatchSnapshot(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.raiseWatchSnapshot=function(t){var e=this;y(!t.isEqual(Qt.MIN),"Can't raise event for unknown SnapshotVersion");var n=this.watchChangeAggregator.createRemoteEvent(t);return x(n.targetChanges,function(n,r){if(r.resumeToken.length>0){var i=e.listenTargets[n];i&&(e.listenTargets[n]=i.update({resumeToken:r.resumeToken,snapshotVersion:t}))}}),n.targetMismatches.forEach(function(t){var n=e.listenTargets[t];if(n){n.resumeToken=b(),e.sendUnwatchRequest(t);var r=new Xt(n.query,t,Vt.ExistenceFilterMismatch);e.sendWatchRequest(r)}}),this.syncEngine.applyRemoteEvent(n)},t.prototype.handleTargetError=function(t){var e=this;y(!!t.cause,"Handling target error without a cause");var n=t.cause,r=Promise.resolve();return t.targetIds.forEach(function(t){r=r.then(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return T(this.listenTargets,t)?(delete this.listenTargets[t],this.watchChangeAggregator.removeTarget(t),[2,this.syncEngine.rejectListen(t,n)]):[2]})})})}),r},t.prototype.cleanUpWriteStreamState=function(){this.lastBatchSeen=Cn,p("RemoteStore","Stopping write stream with "+this.pendingWrites.length+" pending writes"),this.pendingWrites=[]},t.prototype.fillWritePipeline=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return this.canWriteMutations()?[2,this.localStore.nextMutationBatch(this.lastBatchSeen).then(function(e){if(null!==e)return t.commit(e),t.fillWritePipeline();0===t.pendingWrites.length&&t.writeStream.markIdle()})]:[2]})})},t.prototype.canWriteMutations=function(){return this.isNetworkEnabled()&&this.pendingWrites.length<10},t.prototype.outstandingWrites=function(){return this.pendingWrites.length},t.prototype.commit=function(t){y(this.canWriteMutations(),"commit called when batches can't be written"),this.lastBatchSeen=t.batchId,this.pendingWrites.push(t),this.shouldStartWriteStream()?this.startWriteStream():this.isNetworkEnabled()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(t.mutations)},t.prototype.shouldStartWriteStream=function(){return this.isNetworkEnabled()&&!this.writeStream.isStarted()&&this.pendingWrites.length>0},t.prototype.startWriteStream=function(){y(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)})},t.prototype.onWriteStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.writeStream.writeHandshake(),[2]})})},t.prototype.onWriteHandshakeComplete=function(){var t=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then(function(){for(var e=0,n=t.pendingWrites;e<n.length;e++){var r=n[e];t.writeStream.writeMutations(r.mutations)}})},t.prototype.onMutationResult=function(t,e){var n=this;y(this.pendingWrites.length>0,"Got result for empty pending writes");var r=this.pendingWrites.shift(),i=Sn.from(r,t,e,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(i).then(function(){return n.fillWritePipeline()})},t.prototype.onWriteStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){var e=this;return s.__generator(this,function(n){return y(this.isNetworkEnabled(),"onWriteStreamClose() should only be called when the network is enabled"),t&&this.pendingWrites.length>0?(y(!!t,"We have pending writes, but the write stream closed without an error"),void 0,[2,(this.writeStream.handshakeComplete?this.handleWriteError(t):this.handleHandshakeError(t)).then(function(){e.shouldStartWriteStream()&&e.startWriteStream()})]):[2]})})},t.prototype.handleHandshakeError=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return ue(t.code)||t.code===_.ABORTED?(p("RemoteStore","RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=b(),[2,this.localStore.setLastStreamToken(b())]):[2]})})},t.prototype.handleWriteError=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n=this;return s.__generator(this,function(r){return ue(t.code)?(e=this.pendingWrites.shift(),this.writeStream.inhibitBackoff(),[2,this.syncEngine.rejectFailedWrite(e.batchId,t).then(function(){return n.fillWritePipeline()})]):[2]})})},t.prototype.createTransaction=function(){return new Lr(this.datastore)},t.prototype.handleUserChange=function(t){if(p("RemoteStore","RemoteStore changing users: uid=",t.uid),this.isNetworkEnabled())return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),this.enableNetwork()},t}(),jr=function(){function t(t,e,n,r){this.platform=t,this.databaseInfo=e,this.credentials=n,this.asyncQueue=r}return t.prototype.start=function(t){var e=this,n=new Gn,r=new Gn,i=!1;return this.credentials.setUserChangeListener(function(o){i?e.asyncQueue.enqueue(function(){return e.handleUserChange(o)}):(i=!0,e.initializePersistence(t,r).then(function(){return e.initializeRest(o)}).then(n.resolve,n.reject))}),this.asyncQueue.enqueue(function(){return n.promise}),r.promise},t.prototype.enableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.enableNetwork()})},t.prototype.initializePersistence=function(t,e){var n=this;return t?this.startIndexedDbPersistence().then(e.resolve).catch(function(t){return e.reject(t),n.canFallback(t)?(console.warn("Error enabling offline storage. Falling back to storage disabled: "+t),n.startMemoryPersistence()):Promise.reject(t)}):(e.resolve(),this.startMemoryPersistence())},t.prototype.canFallback=function(t){return t instanceof w?t.code===_.FAILED_PRECONDITION||t.code===_.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||(22===t.code||20===t.code)},t.prototype.startIndexedDbPersistence=function(){this.garbageCollector=new Cr;var t=vr.buildStoragePrefix(this.databaseInfo),e=new He(this.databaseInfo.databaseId,{useProto3Json:!0});return this.persistence=new vr(t,e),this.persistence.start()},t.prototype.startMemoryPersistence=function(){return this.garbageCollector=new pn,this.persistence=new Er,this.persistence.start()},t.prototype.initializeRest=function(t){var e=this;return this.platform.loadConnection(this.databaseInfo).then(function(n){e.localStore=new gr(e.persistence,t,e.garbageCollector);var r=e.platform.newSerializer(e.databaseInfo.databaseId),i=new Mr(e.asyncQueue,n,e.credentials,r);return e.remoteStore=new Ur(e.localStore,i,e.asyncQueue,function(t){e.syncEngine.applyOnlineStateChange(t),e.eventMgr.applyOnlineStateChange(t)}),e.syncEngine=new Tn(e.localStore,e.remoteStore,t),e.remoteStore.syncEngine=e.syncEngine,e.eventMgr=new ln(e.syncEngine),e.localStore.start()}).then(function(){return e.remoteStore.start()})},t.prototype.handleUserChange=function(t){return this.asyncQueue.verifyOperationInProgress(),p("FirestoreClient","User Changed: "+t.uid),this.syncEngine.handleUserChange(t)},t.prototype.disableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.disableNetwork()})},t.prototype.shutdown=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.credentials.removeUserChangeListener(),e.remoteStore.shutdown()}).then(function(){return e.persistence.shutdown(t&&t.purgePersistenceWithDataLoss)})},t.prototype.listen=function(t,e,n){var r=this,i=new fn(t,e,n);return this.asyncQueue.enqueue(function(){return r.eventMgr.listen(i)}),i},t.prototype.unlisten=function(t){var e=this;this.asyncQueue.enqueue(function(){return e.eventMgr.unlisten(t)})},t.prototype.getDocumentFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.readDocument(t)}).then(function(t){if(t instanceof lt)return t;throw new w(_.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")})},t.prototype.getDocumentsFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.executeQuery(t)}).then(function(e){var n=ge(),r=new wn(t,n),i=r.computeDocChanges(e);return r.applyChanges(i).snapshot})},t.prototype.write=function(t){var e=this,n=new Gn;return this.asyncQueue.enqueue(function(){return e.syncEngine.write(t,n)}),n.promise},t.prototype.databaseId=function(){return this.databaseInfo.databaseId},t.prototype.transaction=function(t){var e=this;return this.asyncQueue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(t){return[2]})})}).then(function(){return e.syncEngine.runTransaction(t)})},t}(),Br=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.scheduleEvent(this.observer.next,t)},t.prototype.error=function(t){this.scheduleEvent(this.observer.error,t)},t.prototype.mute=function(){this.muted=!0},t.prototype.scheduleEvent=function(t,e){var n=this;this.muted||setTimeout(function(){n.muted||t(e)},0)},t}(),qr=function(){function t(t){this.uid=t}return t.prototype.isAuthenticated=function(){return null!=this.uid},t.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t.UNAUTHENTICATED=new t(null),t.GOOGLE_CREDENTIALS=new t("google-credentials-uid"),t.FIRST_PARTY=new t("first-party-uid"),t}(),Vr=function(){return function(t,e){this.user=e,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+t}}}(),Wr=function(){function t(){this.userListener=null}return t.prototype.getToken=function(t){return Promise.resolve(null)},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,t(qr.UNAUTHENTICATED)},t.prototype.removeUserChangeListener=function(){y(null!==this.userListener,"removeUserChangeListener() when no listener registered"),this.userListener=null},t}(),Hr=function(){function t(t){var e=this;this.app=t,this.tokenListener=null,this.userCounter=0,this.userListener=null,this.tokenListener=function(){var t=e.getUser();e.currentUser&&t.isEqual(e.currentUser)||(e.currentUser=t,e.userCounter++,e.userListener&&e.userListener(e.currentUser))},this.userCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return t.prototype.getToken=function(t){var e=this;y(null!=this.tokenListener,"getToken cannot be called after listener removed.");var n=this.userCounter;return this.app.INTERNAL.getToken(t).then(function(t){if(e.userCounter!==n)throw new w(_.ABORTED,"getToken aborted due to uid change.");return t?(y("string"==typeof t.accessToken,"Invalid tokenData returned from getToken():"+t),new Vr(t.accessToken,e.currentUser)):null})},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,this.currentUser&&t(this.currentUser)},t.prototype.removeUserChangeListener=function(){y(null!=this.tokenListener,"removeUserChangeListener() called twice"),y(null!==this.userListener,"removeUserChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.userListener=null},t.prototype.getUser=function(){"function"!=typeof this.app.INTERNAL.getUid&&m("This version of the Firestore SDK requires at least version 3.7.0 of firebase.js.");var t=this.app.INTERNAL.getUid();return y(null===t||"string"==typeof t,"Received invalid UID: "+t),new qr(t)},t}(),zr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,this.type="FirstParty",this.user=qr.FIRST_PARTY,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return Object.defineProperty(t.prototype,"authHeaders",{get:function(){return{Authorization:this.gapi.auth.getAuthHeaderValueForFirstParty([]),"X-Goog-AuthUser":this.sessionIndex}},enumerable:!0,configurable:!0}),t}(),Kr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return t.prototype.getToken=function(t){return Promise.resolve(new zr(this.gapi,this.sessionIndex))},t.prototype.setUserChangeListener=function(t){t(qr.FIRST_PARTY)},t.prototype.removeUserChangeListener=function(){},t}();function Gr(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t,["next","error","complete"])}var Qr,Yr=function(){function t(t){this.methodName=t}return t.delete=function(){return Xr.instance},t.serverTimestamp=function(){return $r.instance},t._arrayUnion=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayUnion",arguments,1),new Jr(t)},t._arrayRemove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayRemove",arguments,1),new Zr(t)},t.prototype.isEqual=function(t){return this===t},t}(),Xr=function(t){function e(){return t.call(this,"FieldValue.delete")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),$r=function(t){function e(){return t.call(this,"FieldValue.serverTimestamp")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),Jr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayUnion")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),Zr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayRemove")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),ti=E(Yr,"Use FieldValue.<field>() instead."),ei=/^__.*__$/,ni=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[];return null!==this.fieldMask?n.push(new ie(t,this.data,this.fieldMask,e)):n.push(new re(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}(),ri=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[new ie(t,this.data,this.fieldMask,e)];return this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}();function ii(t){switch(t){case Qr.Set:case Qr.MergeSet:case Qr.Update:return!0;case Qr.Argument:return!1;default:throw m("Unexpected case for UserDataSource: "+t)}}!function(t){t[t.Set=0]="Set",t[t.Update=1]="Update",t[t.MergeSet=2]="MergeSet",t[t.Argument=3]="Argument"}(Qr||(Qr={}));var oi=function(){function t(t,e,n,r,i,o){this.dataSource=t,this.methodName=e,this.path=n,this.arrayElement=r,void 0===i&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=i||[],this.fieldMask=o||[]}return t.prototype.childContextForField=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(e),r},t.prototype.childContextForFieldPath=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},t.prototype.childContextForArray=function(e){return new t(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},t.prototype.createError=function(t){var e=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path.toString()+")";return new w(_.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+t+e)},t.prototype.contains=function(t){return void 0!==this.fieldMask.find(function(e){return t.isPrefixOf(e)})||void 0!==this.fieldTransforms.find(function(e){return t.isPrefixOf(e.field)})},t.prototype.validatePath=function(){if(null!==this.path)for(var t=0;t<this.path.length;t++)this.validatePathSegment(this.path.get(t))},t.prototype.validatePathSegment=function(t){if(ii(this.dataSource)&&ei.test(t))throw this.createError("Document fields cannot begin and end with __")},t}(),ai=function(){return function(t,e){this.databaseId=t,this.key=e}}(),si=function(){function t(t){this.preConverter=t}return t.prototype.parseSetData=function(t,e){var n=new oi(Qr.Set,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",n,e);var r=this.parseData(e,n);return new ni(r,null,n.fieldTransforms)},t.prototype.parseMergeData=function(t,e,n){var r=new oi(Qr.MergeSet,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i,o,a=this.parseData(e,r);if(n){for(var s=[],u=0,c=n;u<c.length;u++){var l=c[u],f=void 0;if(l instanceof rn?f=l:"string"==typeof l?f=fi(t,l):m("Expected stringOrFieldPath to be a string or a FieldPath"),!r.contains(f))throw new w(_.INVALID_ARGUMENT,"Field '"+f+"' is specified in your field mask but missing from your input data.");s.push(f)}i=new $t(s),o=r.fieldTransforms.filter(function(t){return i.covers(t.field)})}else i=new $t(r.fieldMask),o=r.fieldTransforms;return new ni(a,i,o)},t.prototype.parseUpdateData=function(t,e){var n=this,r=new oi(Qr.Update,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i=[],o=It.EMPTY;S(e,function(e,a){var s=fi(t,e),u=r.childContextForFieldPath(s);if((a=n.runPreConverter(a,u))instanceof Xr)i.push(s);else{var c=n.parseData(a,u);null!=c&&(i.push(s),o=o.set(s,c))}});var a=new $t(i);return new ri(o,a,r.fieldTransforms)},t.prototype.parseUpdateVarargs=function(t,e,n,r){var i=new oi(Qr.Update,t,ut.EMPTY_PATH),o=[li(t,e)],a=[n];if(r.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var s=0;s<r.length;s+=2)o.push(li(t,r[s])),a.push(r[s+1]);var u=[],c=It.EMPTY;for(s=0;s<o.length;++s){var l=o[s],f=i.childContextForFieldPath(l),h=this.runPreConverter(a[s],f);if(h instanceof Xr)u.push(l);else{var p=this.parseData(h,f);null!=p&&(u.push(l),c=c.set(l,p))}}var d=new $t(u);return new ri(c,d,i.fieldTransforms)},t.prototype.parseQueryValue=function(t,e){var n=new oi(Qr.Argument,t,ut.EMPTY_PATH),r=this.parseData(e,n);return y(null!=r,"Parsed data should not be null."),y(0===n.fieldTransforms.length,"Field transforms should have been disallowed."),r},t.prototype.runPreConverter=function(t,e){try{return this.preConverter(t)}catch(t){var n=hi(t);throw e.createError(n)}},t.prototype.parseData=function(t,e){if(ui(t=this.runPreConverter(t,e)))return ci("Unsupported field value:",e,t),this.parseObject(t,e);if(t instanceof Yr)return this.parseSentinelFieldValue(t,e),null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.arrayElement)throw e.createError("Nested arrays are not supported");return this.parseArray(t,e)}return this.parseScalarValue(t,e)},t.prototype.parseObject=function(t,e){var n=this,r=new ht(K);return S(t,function(t,i){var o=n.parseData(i,e.childContextForField(t));null!=o&&(r=r.insert(t,o))}),new It(r)},t.prototype.parseArray=function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=o[i],s=this.parseData(a,e.childContextForArray(r));null==s&&(s=gt.INSTANCE),n.push(s),r++}return new Ot(n)},t.prototype.parseSentinelFieldValue=function(t,e){if(!ii(e.dataSource))throw e.createError(t.methodName+"() can only be used with update() and set()");if(null===e.path)throw e.createError(t.methodName+"() is not currently supported inside arrays");if(t instanceof Xr){if(e.dataSource!==Qr.MergeSet)throw e.dataSource===Qr.Update?(y(e.path.length>0,"FieldValue.delete() at the top level should have already been handled."),e.createError("FieldValue.delete() can only appear at the top level of your update data")):e.createError("FieldValue.delete() cannot be used with set() unless you pass {merge:true}");e.fieldMask.push(e.path)}else if(t instanceof $r)e.fieldTransforms.push(new Jt(e.path,Re.instance));else if(t instanceof Jr){var n=this.parseArrayTransformElements(t.methodName,t._elements),r=new De(n);e.fieldTransforms.push(new Jt(e.path,r))}else if(t instanceof Zr){n=this.parseArrayTransformElements(t.methodName,t._elements);var i=new Me(n);e.fieldTransforms.push(new Jt(e.path,i))}else m("Unknown FieldValue type: "+t)},t.prototype.parseScalarValue=function(t,e){if(null===t)return gt.INSTANCE;if("number"==typeof t)return function(t){return Mt(t)&&t<=Dt&&t>=Rt}(t)?new Et(t):new Tt(t);if("boolean"==typeof t)return bt.of(t);if("string"==typeof t)return new Ct(t);if(t instanceof Date)return new xt(et.fromDate(t));if(t instanceof et)return new xt(new et(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)));if(t instanceof tt)return new At(t);if(t instanceof J)return new kt(t);if(t instanceof ai)return new Nt(t.databaseId,t.key);throw e.createError("Unsupported field value: "+j(t))},t.prototype.parseArrayTransformElements=function(t,e){var n=this;return e.map(function(e,r){var i=new oi(Qr.Argument,t,ut.EMPTY_PATH);return n.parseData(e,i.childContextForArray(r))})},t}();function ui(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof et||t instanceof tt||t instanceof J||t instanceof ai||t instanceof Yr)}function ci(t,e,n){if(!ui(n)||!U(n)){var r=j(n);throw"an object"===r?e.createError(t+" a custom object"):e.createError(t+" "+r)}}function li(t,e){if(e instanceof rn)return e._internalPath;if("string"==typeof e)return fi(t,e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. Field path arguments must be of type string or FieldPath.")}function fi(t,e){try{return function(t){if(t.search(on)>=0)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(rn.bind.apply(rn,[void 0].concat(t.split("."))))}catch(e){throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e)._internalPath}catch(e){var n=hi(e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. "+n)}}function hi(t){return t instanceof Error?t.message:t.toString()}var pi="firestore.googleapis.com",di=!0,vi=!1,mi=function(){function t(t){if(void 0===t.host){if(void 0!==t.ssl)throw new w(_.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=pi,this.ssl=di}else R("settings","string","host",t.host),this.host=t.host,D("settings","boolean","ssl",t.ssl),this.ssl=C(t.ssl,di);q("settings",t,["host","ssl","credentials","timestampsInSnapshots"]),D("settings","object","credentials",t.credentials),this.credentials=t.credentials,D("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),this.timestampsInSnapshots=C(t.timestampsInSnapshots,vi)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.timestampsInSnapshots===t.timestampsInSnapshots&&this.credentials===t.credentials},t}(),yi=function(){return function(){}}(),gi=function(){function t(e){var n=this;this._queue=new kr,this.INTERNAL={delete:function(t){return s.__awaiter(n,void 0,void 0,function(){return s.__generator(this,function(e){return this._firestoreClient?[2,this._firestoreClient.shutdown(t)]:[2]})})}};var r=new yi;if("object"==typeof e.options){var i=e;r.firebaseApp=i,r.databaseId=t.databaseIdFromApp(i),r.persistenceKey=r.firebaseApp.name,r.credentials=new Hr(i)}else{var o=e;if(!o.projectId)throw new w(_.INVALID_ARGUMENT,"Must provide projectId");r.databaseId=new it(o.projectId,o.database),r.persistenceKey="[DEFAULT]",r.credentials=new Wr}r.settings=new mi({}),this._config=r,this._databaseId=r.databaseId}return t.prototype.settings=function(t){if(N("Firestore.settings",arguments,1),O("Firestore.settings","object",1,t),T(t,"persistence"))throw new w(_.INVALID_ARGUMENT,'"persistence" is now specified with a separate call to firestore.enablePersistence().');var e=new mi(t);if(this._firestoreClient&&!this._config.settings.isEqual(e))throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._config.settings=e,void 0!==e.credentials&&(this._config.credentials=function(t){if(!t)return new Wr;switch(t.type){case"gapi":return new Kr(t.client,t.sessionIndex||"0");case"provider":return t.client;default:throw new w(_.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.enableNetwork()},t.prototype.disableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.disableNetwork()},t.prototype.enablePersistence=function(){if(this._firestoreClient)throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");return this.configureClient(!0)},t.prototype.ensureClientConfigured=function(){return this._firestoreClient||this.configureClient(!1),this._firestoreClient},t.prototype.configureClient=function(t){var e=this;y(!!this._config.settings.host,"FirestoreSettings.host cannot be falsey"),this._config.settings.timestampsInSnapshots||d("\nThe behavior for Date objects stored in Firestore is going to change\nAND YOUR APP MAY BREAK.\nTo hide this warning and ensure your app does not break, you need to add the\nfollowing code to your app before calling any other Cloud Firestore methods:\n\n  const firestore = firebase.firestore();\n  const settings = {/* your settings... */ timestampsInSnapshots: true};\n  firestore.settings(settings);\n\nWith this change, timestamps stored in Cloud Firestore will be read back as\nFirebase Timestamp objects instead of as system Date objects. So you will also\nneed to update code expecting a Date to instead expect a Timestamp. For example:\n\n  // Old:\n  const date = snapshot.get('created_at');\n  // New:\n  const timestamp = snapshot.get('created_at');\n  const date = timestamp.toDate();\n\nPlease audit all existing usages of Date when you enable the new behavior. In a\nfuture release, the behavior will change to the new behavior, so if you do not\nfollow these steps, YOUR APP MAY BREAK."),y(!this._firestoreClient,"configureClient() called multiple times");var n=new nt(this._config.databaseId,this._config.persistenceKey,this._config.settings.host,this._config.settings.ssl);return this._dataConverter=new si(function(t){if(t instanceof wi){var n=e._config.databaseId,r=t.firestore._config.databaseId;if(!r.isEqual(n))throw new w(_.INVALID_ARGUMENT,"Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return new ai(e._config.databaseId,t._key)}return t}),this._firestoreClient=new jr(g.getPlatform(),n,this._config.credentials,this._queue),this._firestoreClient.start(t)},t.databaseIdFromApp=function(t){var e=t.options;if(!T(e,"projectId")){if(T(e,"firestoreId"))throw new w(_.INVALID_ARGUMENT,'"firestoreId" is now specified as "projectId" in firebase.initializeApp.');throw new w(_.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.')}if(T(e,"firestoreOptions"))throw new w(_.INVALID_ARGUMENT,'"firestoreOptions" values are now specified with Firestore.settings()');var n=e.projectId;if(!n||"string"!=typeof n)throw new w(_.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new it(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this._config.firebaseApp)throw new w(_.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._config.firebaseApp},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("Firestore.collection",arguments,1),O("Firestore.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection path to collection()");return this.ensureClientConfigured(),new ki(at.fromString(t),this)},t.prototype.doc=function(t){if(N("Firestore.doc",arguments,1),O("Firestore.doc","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty document path to doc()");return this.ensureClientConfigured(),wi.forPath(at.fromString(t),this)},t.prototype.runTransaction=function(t){var e=this;return N("Firestore.runTransaction",arguments,1),O("Firestore.runTransaction","function",1,t),this.ensureClientConfigured().transaction(function(n){return t(new bi(e,n))})},t.prototype.batch=function(){return this.ensureClientConfigured(),new _i(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(f()){case i.DEBUG:return"debug";case i.ERROR:return"error";case i.SILENT:return"silent";default:return m("Unknown log level: "+f())}},enumerable:!0,configurable:!0}),t.setLogLevel=function(t){switch(N("Firestore.setLogLevel",arguments,1),O("Firestore.setLogLevel","string",1,t),t){case"debug":h(i.DEBUG);break;case"error":h(i.ERROR);break;case"silent":h(i.SILENT);break;default:throw new w(_.INVALID_ARGUMENT,"Invalid log level: "+t)}},t.prototype._areTimestampsInSnapshotsEnabled=function(){return this._config.settings.timestampsInSnapshots},t}(),bi=function(){function t(t,e){this._firestore=t,this._transaction=e}return t.prototype.get=function(t){var e=this;N("Transaction.get",arguments,1);var n=Ii("Transaction.get",t,this._firestore);return this._transaction.lookup([n._key]).then(function(t){if(!t||1!==t.length)return m("Mismatch in docs returned from document lookup.");var r=t[0];return new Ti(e._firestore,n._key,r instanceof ft?null:r,!1)})},t.prototype.set=function(t,e,n){I("Transaction.set",arguments,2,3);var r=Ii("Transaction.set",t,this._firestore),i=(n=Ni("Transaction.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("Transaction.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("Transaction.set",e);return this._transaction.set(r._key,i),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof e||e instanceof rn?(A("Transaction.update",arguments,3),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("Transaction.update",e,n,o)):(N("Transaction.update",arguments,2),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("Transaction.update",e)),this._transaction.update(r._key,i),this},t.prototype.delete=function(t){N("Transaction.delete",arguments,1);var e=Ii("Transaction.delete",t,this._firestore);return this._transaction.delete(e._key),this},t}(),_i=function(){function t(t){this._firestore=t,this._mutations=[],this._committed=!1}return t.prototype.set=function(t,e,n){I("WriteBatch.set",arguments,2,3),this.verifyNotCommitted();var r=Ii("WriteBatch.set",t,this._firestore),i=(n=Ni("WriteBatch.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("WriteBatch.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("WriteBatch.set",e);return this._mutations=this._mutations.concat(i.toMutations(r._key,ee.NONE)),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.verifyNotCommitted(),"string"==typeof e||e instanceof rn?(A("WriteBatch.update",arguments,3),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("WriteBatch.update",e,n,o)):(N("WriteBatch.update",arguments,2),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("WriteBatch.update",e)),this._mutations=this._mutations.concat(i.toMutations(r._key,ee.exists(!0))),this},t.prototype.delete=function(t){N("WriteBatch.delete",arguments,1),this.verifyNotCommitted();var e=Ii("WriteBatch.delete",t,this._firestore);return this._mutations=this._mutations.concat(new ae(e._key,ee.NONE)),this},t.prototype.commit=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.verifyNotCommitted(),this._committed=!0,this._mutations.length>0?[2,this._firestore.ensureClientConfigured().write(this._mutations)]:[2]})})},t.prototype.verifyNotCommitted=function(){if(this._committed)throw new w(_.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),wi=function(){function t(t,e){this._key=t,this.firestore=e,this._firestoreClient=this.firestore.ensureClientConfigured()}return t.forPath=function(e,n){if(e.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.canonicalString()+" has "+e.length);return new t(new ct(e),n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new ki(this._key.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("DocumentReference.collection",arguments,1),O("DocumentReference.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=at.fromString(t);return new ki(this._key.path.child(e),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentReference",1,e);return this.firestore===e.firestore&&this._key.isEqual(e._key)},t.prototype.set=function(t,e){I("DocumentReference.set",arguments,1,2);var n=(e=Ni("DocumentReference.set",e)).merge||e.mergeFields?this.firestore._dataConverter.parseMergeData("DocumentReference.set",t,e.mergeFields):this.firestore._dataConverter.parseSetData("DocumentReference.set",t);return this._firestoreClient.write(n.toMutations(this._key,ee.NONE))},t.prototype.update=function(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof rn?(A("DocumentReference.update",arguments,2),n=this.firestore._dataConverter.parseUpdateVarargs("DocumentReference.update",t,e,r)):(N("DocumentReference.update",arguments,1),n=this.firestore._dataConverter.parseUpdateData("DocumentReference.update",t)),this._firestoreClient.write(n.toMutations(this._key,ee.exists(!0)))},t.prototype.delete=function(){return N("DocumentReference.delete",arguments,0),this._firestoreClient.write([new ae(this._key,ee.NONE)])},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("DocumentReference.onSnapshot",arguments,1,4);var n,r={includeMetadataChanges:!1},i=0;"object"!=typeof t[i]||Gr(t[i])||(q("DocumentReference.onSnapshot",r=t[i],["includeMetadataChanges"]),D("DocumentReference.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++);var o={includeMetadataChanges:r.includeMetadataChanges};return Gr(t[i])?n=t[i]:(O("DocumentReference.onSnapshot","function",i,t[i]),P("DocumentReference.onSnapshot","function",i+1,t[i+1]),P("DocumentReference.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(o,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){if(e.next){y(t.docs.size<=1,"Too many documents returned on a document query");var r=t.docs.get(n._key);e.next(new Ti(n.firestore,n._key,r,t.fromCache))}},error:r}),o=this._firestoreClient.listen(Ft.atPath(this._key.path),i,t);return function(){i.mute(),n._firestoreClient.unlisten(o)}},t.prototype.get=function(t){var e=this;return q("DocumentReference.get",t,["source"]),t&&L("DocumentReference.get",0,"source",t.source,["default","server","cache"]),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentFromLocalCache(e._key).then(function(t){n(new Ti(e.firestore,e._key,t,!0))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),!i.exists&&i.metadata.fromCache?e(new w(_.UNAVAILABLE,"Failed to get document because the client is offline.")):i.exists&&i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):t(i)},error:e})},t}(),Ei=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Ti=function(){function t(t,e,n,r){this._firestore=t,this._key=e,this._document=n,this._fromCache=r}return t.prototype.data=function(t){return I("DocumentSnapshot.data",arguments,0,1),t=Ai("DocumentSnapshot.data",t),this._document?this.convertObject(this._document.data,mt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},t.prototype.get=function(t,e){if(I("DocumentSnapshot.get",arguments,1,2),e=Ai("DocumentSnapshot.get",e),this._document){var n=this._document.data.field(li("DocumentSnapshot.get",t));if(void 0!==n)return this.convertValue(n,mt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new wi(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ei(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentSnapshot",1,e);return this._firestore===e._firestore&&this._fromCache===e._fromCache&&this._key.isEqual(e._key)&&(null===this._document?null===e._document:this._document.isEqual(e._document))},t.prototype.convertObject=function(t,e){var n=this,r={};return t.forEach(function(t,i){r[t]=n.convertValue(i,e)}),r},t.prototype.convertValue=function(t,e){if(t instanceof It)return this.convertObject(t,e);if(t instanceof Ot)return this.convertArray(t,e);if(t instanceof Nt){var n=t.value(e),r=this._firestore.ensureClientConfigured().databaseId();return t.databaseId.isEqual(r)||d("Document "+this._key.path+" contains a document reference within a different database ("+t.databaseId.projectId+"/"+t.databaseId.database+") which is not supported. It will be treated as a reference in the current database ("+r.projectId+"/"+r.database+") instead."),new wi(n,this._firestore)}return t.value(e)},t.prototype.convertArray=function(t,e){var n=this;return t.internalValue.map(function(t){return n.convertValue(t,e)})},t}(),Ci=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return s.__extends(e,t),e.prototype.data=function(e){var n=t.prototype.data.call(this,e);return y("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},e}(Ti),xi=function(){function t(t,e){this._query=t,this.firestore=e}return t.prototype.where=function(e,n,r){var i;N("Query.where",arguments,3),O("Query.where","string",2,n),B("Query.where",3,r);var o=li("Query.where",e),a=Ut.fromString(n);if(o.isKeyField()){if(a===Ut.ARRAY_CONTAINS)throw new w(_.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof r){if(-1!==r.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===r)throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var s=this._query.path.child(new at([r]));y(s.length%2==0,"Path should be a document key"),i=new Nt(this.firestore._databaseId,new ct(s))}else{if(!(r instanceof wi))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+j(r)+".");var u=r;i=new Nt(this.firestore._databaseId,u._key)}}else i=this.firestore._dataConverter.parseQueryValue("Query.where",r);var c=function(t,e,n){if(n.isEqual(gt.INSTANCE)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new Bt(t)}if(n.isEqual(Tt.NAN)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new qt(t)}return new jt(t,e,n)}(o,a,i);return this.validateNewFilter(c),new t(this._query.addFilter(c),this.firestore)},t.prototype.orderBy=function(e,n){var r;if(I("Query.orderBy",arguments,1,2),P("Query.orderBy","string",2,n),void 0===n||"asc"===n)r=Wt.ASCENDING;else{if("desc"!==n)throw new w(_.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r=Wt.DESCENDING}if(null!==this._query.startAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var i=li("Query.orderBy",e),o=new zt(i,r);return this.validateNewOrderBy(o),new t(this._query.addOrderBy(o),this.firestore)},t.prototype.limit=function(e){if(N("Query.limit",arguments,1),O("Query.limit","number",1,e),e<=0)throw new w(_.INVALID_ARGUMENT,"Invalid Query. Query limit ("+e+") is invalid. Limit must be positive.");return new t(this._query.withLimit(e),this.firestore)},t.prototype.startAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAt",arguments,1);var i=this.boundFromDocOrFields("Query.startAt",e,n,!0);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.startAfter=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAfter",arguments,1);var i=this.boundFromDocOrFields("Query.startAfter",e,n,!1);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.endBefore=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endBefore",arguments,1);var i=this.boundFromDocOrFields("Query.endBefore",e,n,!0);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.endAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endAt",arguments,1);var i=this.boundFromDocOrFields("Query.endAt",e,n,!1);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","Query",1,e);return this.firestore===e.firestore&&this._query.isEqual(e._query)},t.prototype.boundFromDocOrFields=function(t,e,n,r){if(B(t,1,e),e instanceof Ti){if(n.length>0)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"().");var i=e;if(!i.exists)throw new w(_.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+t+"().");return this.boundFromDocument(t,i._document,r)}var o=[e].concat(n);return this.boundFromFields(t,o,r)},t.prototype.boundFromDocument=function(t,e,n){for(var r=[],i=0,o=this._query.orderBy;i<o.length;i++){var a=o[i];if(a.field.isKeyField())r.push(new Nt(this.firestore._databaseId,e.key));else{var s=e.field(a.field);if(void 0===s){var u=a.field.canonicalString();throw new w(_.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+u+"' (used as the orderBy) does not exist.")}r.push(s)}}return new Ht(r,n)},t.prototype.boundFromFields=function(t,e,n){var r=this._query.explicitOrderBy;if(e.length>r.length)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var i=[],o=0;o<e.length;o++){var a=e[o];if(r[o].field.isKeyField()){if("string"!=typeof a)throw new w(_.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+t+"(), but got a "+typeof a);if(-1!==a.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Invalid query. Document ID '"+a+"' contains a slash in "+t+"()");var s=new ct(this._query.path.child(a));i.push(new Nt(this.firestore._databaseId,s))}else{var u=this.firestore._dataConverter.parseQueryValue(t,a);i.push(u)}}return new Ht(i,n)},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("Query.onSnapshot",arguments,1,4);var n,r={},i=0;return"object"!=typeof t[i]||Gr(t[i])||(q("Query.onSnapshot",r=t[i],["includeMetadataChanges"]),D("Query.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++),Gr(t[i])?n=t[i]:(O("Query.onSnapshot","function",i,t[i]),P("Query.onSnapshot","function",i+1,t[i+1]),P("Query.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(r,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){e.next&&e.next(new Si(n.firestore,n._query,t))},error:r}),o=this.firestore.ensureClientConfigured(),a=o.listen(this._query,i,t);return function(){i.mute(),o.unlisten(a)}},t.prototype.get=function(t){var e=this;return I("Query.get",arguments,0,1),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentsFromLocalCache(e._query).then(function(t){n(new Si(e.firestore,e._query,t))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):t(i)},error:e})},t.prototype.validateNewFilter=function(t){if(t instanceof jt)if(t.isInequality()){var e=this._query.getInequalityFilterField();if(null!==e&&!e.isEqual(t.field))throw new w(_.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+e.toString()+"' and '"+t.field.toString()+"'");var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(t.field,n)}else if(t.op===Ut.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new w(_.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},t.prototype.validateNewOrderBy=function(t){if(null===this._query.getFirstOrderByField()){var e=this._query.getInequalityFilterField();null!==e&&this.validateOrderByAndInequalityMatch(e,t.field)}},t.prototype.validateOrderByAndInequalityMatch=function(t,e){if(!e.isEqual(t))throw new w(_.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+e.toString()+"' instead.")},t}(),Si=function(){function t(t,e,n){this._firestore=t,this._originalQuery=e,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new Ei(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach(function(e){return t.push(e)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;I("QuerySnapshot.forEach",arguments,1,2),O("QuerySnapshot.forEach","function",1,t),this._snapshot.docs.forEach(function(r){t.call(e,n.convertToDocumentImpl(r))})},Object.defineProperty(t.prototype,"query",{get:function(){return new xi(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),t.prototype.docChanges=function(t){q("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),t&&D("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges);var e=t&&t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new w(_.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e,n){if(n.oldDocs.isEmpty()){var r,i=0;return n.docChanges.map(function(e){var o=new Ci(t,e.doc.key,e.doc,n.fromCache);return y(e.type===be.Added,"Invalid event type for first snapshot"),y(!r||n.query.docComparator(r,e.doc)<0,"Got added events in wrong order"),r=e.doc,{type:"added",doc:o,oldIndex:-1,newIndex:i++}})}var o=n.oldDocs;return n.docChanges.filter(function(t){return e||t.type!==be.Metadata}).map(function(e){var r=new Ci(t,e.doc.key,e.doc,n.fromCache),i=-1,a=-1;return e.type!==be.Added&&(y((i=o.indexOf(e.doc.key))>=0,"Index for document not found"),o=o.delete(e.doc.key)),e.type!==be.Removed&&(o=o.add(e.doc),a=o.indexOf(e.doc.key)),{type:function(t){switch(t){case be.Added:return"added";case be.Modified:case be.Metadata:return"modified";case be.Removed:return"removed";default:return m("Unknown change type: "+t)}}(e.type),doc:r,oldIndex:i,newIndex:a}})}(this._firestore,e,this._snapshot),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","QuerySnapshot",1,e);return this._firestore===e._firestore&&this._originalQuery.isEqual(e._originalQuery)&&this._snapshot.isEqual(e._snapshot)},t.prototype.convertToDocumentImpl=function(t){return new Ci(this._firestore,t.key,t,this.metadata.fromCache)},t}();["length","forEach","map"].concat("undefined"!=typeof Symbol?[Symbol.iterator]:[]).forEach(function(t){try{Object.defineProperty(Si.prototype.docChanges,t,{get:function(){return function(){throw new w(_.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a method, so usages like "querySnapshot.docChanges" should become "querySnapshot.docChanges()"')}()}})}catch(t){}});var ki=function(t){function e(e,n){var r=t.call(this,Ft.atPath(e),n)||this;if(e.length%2!=1)throw new w(_.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.canonicalString()+" has "+e.length);return r}return s.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._query.path.popLast();return t.isEmpty()?null:new wi(new ct(t),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.doc=function(t){if(I("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=z.newId()),O("CollectionReference.doc","string",1,t),""===t)throw new w(_.INVALID_ARGUMENT,"Document path must be a non-empty string");var e=at.fromString(t);return wi.forPath(this._query.path.child(e),this.firestore)},e.prototype.add=function(t){N("CollectionReference.add",arguments,1),O("CollectionReference.add","object",1,t);var e=this.doc();return e.set(t).then(function(){return e})},e}(xi);function Ni(t,e){if(void 0===e)return{merge:!1};if(q(t,e,["merge","mergeFields"]),D(t,"boolean","merge",e.merge),M(t,"mergeFields","a string or a FieldPath",e.mergeFields,function(t){return"string"==typeof t||t instanceof rn}),void 0!==e.mergeFields&&void 0!==e.merge)throw new w(_.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Ai(t,e){return void 0===e?{}:(q(t,e,["serverTimestamps"]),L(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function Ii(t,e,n){if(e instanceof wi){if(e.firestore!==n)throw new w(_.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw V(t,"DocumentReference",1,e)}var Oi=E(gi,"Use firebase.firestore() instead."),Pi=E(bi,"Use firebase.firestore().runTransaction() instead."),Ri=E(_i,"Use firebase.firestore().batch() instead."),Di=E(wi,"Use firebase.firestore().doc() instead."),Mi=E(Ti),Li=E(Ci),Fi=E(xi),Ui=E(Si),ji=E(ki,"Use firebase.firestore().collection() instead."),Bi={Firestore:Oi,GeoPoint:tt,Timestamp:et,Blob:Z,Transaction:Pi,WriteBatch:Ri,DocumentReference:Di,DocumentSnapshot:Mi,Query:Fi,QueryDocumentSnapshot:Li,QuerySnapshot:Ui,CollectionReference:ji,FieldPath:rn,FieldValue:ti,setLogLevel:gi.setLogLevel};function qi(t){t.INTERNAL.registerService("firestore",function(t){return new gi(t)},function(t){y(t&&"object"==typeof t,"shallowCopy() expects object parameter.");var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(Bi))}function Vi(t){qi(t)}Vi(o),e.registerFirestore=Vi}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
 
/*! *****************************************************************************
 
/*! *****************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
 
Copyright (c) Microsoft Corporation. All rights reserved.
Line 82: Line 82:
 
and limitations under the License.
 
and limitations under the License.
 
***************************************************************************** */
 
***************************************************************************** */
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i,o,a=n(82),s=n(198),u=n(321),c=(i=n(14))&&"object"==typeof i&&"default"in i?i.default:i,l=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),a.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:a.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),f=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return a.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),h=function(t){try{if("undefined"!=typeof window&&void 0!==window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new l(e)}}catch(t){}return new f},p=h("localStorage"),d=h("sessionStorage"),v=new s.Logger("@firebase/database"),m=(o=1,function(){return o++}),y=function(t){var e=a.stringToByteArray(t),n=new a.Sha1;n.update(e);var r=n.digest();return a.base64.encodeByteArray(r)},g=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=g.apply(null,t[r]):"object"==typeof t[r]?n+=a.stringify(t[r]):n+=t[r],n+=" ";return n},b=null,_=!0,w=function(t,e){a.assert(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(v.logLevel=s.LogLevel.VERBOSE,b=v.log.bind(v),e&&d.set("logging_enabled",!0)):"function"==typeof t?b=t:(b=null,d.remove("logging_enabled"))},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===_&&(_=!1,null===b&&!0===d.get("logging_enabled")&&w(!0)),b){var n=g.apply(null,t);b(n)}},T=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];E.apply(void 0,[t].concat(e))}},C=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+g.apply(void 0,t);v.error(n)},x=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+g.apply(void 0,t);throw v.error(n),new Error(n)},S=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+g.apply(void 0,t);v.warn(n)},k=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},N="[MIN_NAME]",A="[MAX_NAME]",I=function(t,e){if(t===e)return 0;if(t===N||e===A)return-1;if(e===N||t===A)return 1;var n=U(t),r=U(e);return null!==n?null!==r?n-r==0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},O=function(t,e){return t===e?0:t<e?-1:1},P=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+a.stringify(e))},R=function(t){if("object"!=typeof t||null===t)return a.stringify(t);var e=[];for(var n in t)e.push(n);e.sort();for(var r="{",i=0;i<e.length;i++)0!==i&&(r+=","),r+=a.stringify(e[i]),r+=":",r+=R(t[e[i]]);return r+="}"},D=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},M=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else a.forEach(t,function(t,n){return e(n,t)})},L=function(t){a.assert(!k(t),"Invalid JSON number");var e,n,r,i,o,s,u;for(0===t?(n=0,r=0,e=1/t==-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074)))),s=[],o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(e?1:0),s.reverse(),u=s.join("");var c="";for(o=0;o<64;o+=8){var l=parseInt(u.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),c+=l}return c.toLowerCase()},F=new RegExp("^-?\\d{1,10}$"),U=function(t){if(F.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},j=function(t){try{t()}catch(t){setTimeout(function(){var e=t.stack||"";throw S("Exception was thrown by user callback.",e),t},Math.floor(0))}},B=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},q=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n},V=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=I(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),W=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=a.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=a.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=a.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),H="long_polling",z=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=p.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&p.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(a.assert("string"==typeof t,"typeof type must == string"),a.assert("object"==typeof e,"typeof params must == object"),"websocket"===t)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==H)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return a.forEach(e,function(t,e){r.push(t+"="+e)}),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}();var K,G,Q,Y,X,$=function(t){var e=J(t),n=e.subdomain;"firebase"===e.domain&&x(e.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!=n||"localhost"===e.domain||x("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),e.secure||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new z(e.host,e.secure,n,r),path:new V(e.pathString)}},J=function(t){var e="",n="",r="",i="",o=!0,a="https",s=443;if("string"==typeof t){var u=t.indexOf("//");u>=0&&(a=t.substring(0,u-1),t=t.substring(u+2));var c=t.indexOf("/");-1===c&&(c=t.length);var l=t.indexOf("?");-1===l&&(l=t.length),e=t.substring(0,Math.min(c,l)),c<l&&(i=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(t){}e+="/"+i}return e}(t.substring(c,l)));var f=function(t){var e={};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=t.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var o=i.split("=");2===o.length?e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]):S("Invalid query segment '"+i+"' in query '"+t+"'")}}return e}(t.substring(Math.min(t.length,l)));(u=e.indexOf(":"))>=0?(o="https"===a||"wss"===a,s=parseInt(e.substring(u+1),10)):u=t.length;var h=e.split(".");3===h.length?(n=h[1],r=h[0].toLowerCase()):2===h.length?n=h[0]:"localhost"===h[0].slice(0,u).toLowerCase()&&(n="localhost"),""===r&&"ns"in f&&(r=f.ns)}return{host:e,port:s,domain:n,subdomain:r,secure:o,scheme:a,pathString:i}},Z=/[\[\].#$\/\u0000-\u001F\u007F]/,tt=/[\[\].#$\u0000-\u001F\u007F]/,et=function(t){return"string"==typeof t&&0!==t.length&&!Z.test(t)},nt=function(t){return"string"==typeof t&&0!==t.length&&!tt.test(t)},rt=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!k(t)||t&&"object"==typeof t&&a.contains(t,".sv")},it=function(t,e,n,r,i){i&&void 0===n||ot(a.errorPrefix(t,e,i),n,r)},ot=function(t,e,n){var r=n instanceof V?new W(n,t):n;if(void 0===e)throw new Error(t+"contains undefined "+r.toErrorString());if("function"==typeof e)throw new Error(t+"contains a function "+r.toErrorString()+" with contents = "+e.toString());if(k(e))throw new Error(t+"contains "+e.toString()+" "+r.toErrorString());if("string"==typeof e&&e.length>10485760/3&&a.stringLength(e)>10485760)throw new Error(t+"contains a string greater than 10485760 utf8 bytes "+r.toErrorString()+" ('"+e.substring(0,50)+"...')");if(e&&"object"==typeof e){var i=!1,o=!1;if(a.forEach(e,function(e,n){if(".value"===e)i=!0;else if(".priority"!==e&&".sv"!==e&&(o=!0,!et(e)))throw new Error(t+" contains an invalid key ("+e+") "+r.toErrorString()+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(e),ot(t,n,r),r.pop()}),i&&o)throw new Error(t+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},at=function(t,e,n,r,i){if(!i||void 0!==n){var o=a.errorPrefix(t,e,i);if(!n||"object"!=typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var s=[];a.forEach(n,function(t,e){var n=new V(t);if(ot(o,e,r.child(n)),".priority"===n.getBack()&&!rt(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)}),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!et(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(V.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(o,s)}},st=function(t,e,n,r){if(!r||void 0!==n){if(k(n))throw new Error(a.errorPrefix(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!rt(n))throw new Error(a.errorPrefix(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ut=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(a.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},ct=function(t,e,n,r){if(!(r&&void 0===n||et(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},lt=function(t,e,n,r){if(!(r&&void 0===n||nt(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ft=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},ht=function(t,e,n){var r=n.path.toString();if("string"!=typeof n.repoInfo.host||0===n.repoInfo.host.length||!et(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),nt(t)}(r))throw new Error(a.errorPrefix(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},pt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){a.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),a.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){a.validateArgCount("OnDisconnect.remove",0,1,arguments.length),ft("OnDisconnect.remove",this.path_),a.validateCallback("OnDisconnect.remove",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){a.validateArgCount("OnDisconnect.set",1,2,arguments.length),ft("OnDisconnect.set",this.path_),it("OnDisconnect.set",1,t,this.path_,!1),a.validateCallback("OnDisconnect.set",2,e,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){a.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),ft("OnDisconnect.setWithPriority",this.path_),it("OnDisconnect.setWithPriority",1,t,this.path_,!1),st("OnDisconnect.setWithPriority",2,e,!1),a.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(a.validateArgCount("OnDisconnect.update",1,2,arguments.length),ft("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("OnDisconnect.update",1,t,this.path_,!1),a.validateCallback("OnDisconnect.update",2,e,!0);var i=new a.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),dt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return a.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),vt=(K="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",G=0,Q=[],function(t){var e,n=t===G;G=t;var r=new Array(8);for(e=7;e>=0;e--)r[e]=K.charAt(t%64),t=Math.floor(t/64);a.assert(0===t,"Cannot push at time == 0");var i=r.join("");if(n){for(e=11;e>=0&&63===Q[e];e--)Q[e]=0;Q[e]++}else for(e=0;e<12;e++)Q[e]=Math.floor(64*Math.random());for(e=0;e<12;e++)i+=K.charAt(Q[e]);return a.assert(20===i.length,"nextPushId: Length should be 20."),i}),mt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),yt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new mt(N,t),r=new mt(N,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return mt.MIN},t}(),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return Y},set:function(t){Y=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return I(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw a.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,Y)},e.prototype.makePost=function(t,e){return a.assert("string"==typeof t,"KeyIndex indexValue must always be a string."),new mt(t,Y)},e.prototype.toString=function(){return".key"},e}(yt),bt=new gt;var _t,wt,Et,Tt=function(t){return"number"==typeof t?"number:"+L(t):"string:"+t},Ct=function(t){if(t.isLeafNode()){var e=t.val();a.assert("string"==typeof e||"number"==typeof e||"object"==typeof e&&a.contains(e,".sv"),"Priority must be a string or number.")}else a.assert(t===X||t.isEmpty(),"priority of unexpected type.");a.assert(t===X||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},xt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,a.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Ct(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return _t},set:function(t){_t=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(a.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+Tt(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?L(this.value_):this.value_,this.lazyHash_=y(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(a.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return a.assert(i>=0,"Unknown leaf type: "+n),a.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var St,kt,Nt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,new xt("[PRIORITY-POST]",Et))},e.prototype.makePost=function(t,e){var n=wt(t);return new mt(e,new xt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(yt)),At=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),It=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Pt.EMPTY_NODE,this.right=null!=o?o:Pt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return(i=(r=n(t,(i=this).key))<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return Pt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return Pt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){var t;if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Ot=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new It(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),Pt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new At(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new At(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Ot,t}(),Rt=Math.log(2),Dt=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/Rt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Mt=function(t,e,n,r){t.sort(e);var i=function(e,r){var o,a,s=r-e;if(0==s)return null;if(1==s)return o=t[e],a=n?n(o):o,new It(a,o.node,It.BLACK,null,null);var u=parseInt(s/2,10)+e,c=i(e,u),l=i(u+1,r);return o=t[u],a=n?n(o):o,new It(a,o.node,It.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new It(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,It.BLACK):(s(f,It.BLACK),s(f,It.RED))}return o}(new Dt(t.length));return new Pt(r||e,o)},Lt={},Ft=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return a.assert(Lt&&Nt,"ChildrenNode.ts has not been loaded"),St=St||new t({".priority":Lt},{".priority":Nt})},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=a.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e===Lt?null:e},t.prototype.hasIndex=function(t){return a.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){a.assert(e!==bt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],o=!1,s=n.getIterator(mt.Wrap),u=s.getNext();u;)o=o||e.isDefinedOn(u.node),i.push(u),u=s.getNext();r=o?Mt(i,e.getCompare()):Lt;var c=e.toString(),l=a.clone(this.indexSet_);l[c]=e;var f=a.clone(this.indexes_);return f[c]=r,new t(f,l)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(a.map(this.indexes_,function(t,i){var o=a.safeGet(r.indexSet_,i);if(a.assert(o,"Missing index implementation for "+i),t===Lt){if(o.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(mt.Wrap),c=u.getNext();c;)c.name!=e.name&&s.push(c),c=u.getNext();return s.push(e),Mt(s,o.getCompare())}return Lt}var l=n.get(e.name),f=t;return l&&(f=f.remove(new mt(e.name,l))),f.insert(e,e.node)}),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(a.map(this.indexes_,function(t){if(t===Lt)return t;var r=n.get(e.name);return r?t.remove(new mt(e.name,r)):t}),this.indexSet_)},t}();function Ut(t,e){return I(t.name,e.name)}function jt(t,e){return I(t,e)}var Bt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Ct(this.priorityNode_),this.children_.isEmpty()&&a.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return kt||(kt=new t(new Pt(jt),null,Ft.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||kt},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?kt:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(a.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new mt(e,n),i=void 0,o=void 0;return n.isEmpty()?(i=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_)),new t(i,i.isEmpty()?kt:this.priorityNode_,o)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;a.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Nt,function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+Tt(this.getPriority().val())+":"),this.forEachChild(Nt,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":y(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new mt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===qt?-1:0},t.prototype.withIndex=function(e){if(e===bt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===bt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Nt),r=e.getIterator(Nt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===bt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),qt=new(function(t){function e(){return t.call(this,new Pt(jt),Bt.EMPTY_NODE,Ft.Default)||this}return u.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Bt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Bt));Object.defineProperties(mt,{MIN:{value:new mt(N,Bt.EMPTY_NODE)},MAX:{value:new mt(A,qt)}}),gt.__EMPTY_NODE=Bt.EMPTY_NODE,xt.__childrenNodeConstructor=Bt,X=qt,function(t){Et=t}(qt);var Vt=!0;function Wt(t,e){if(void 0===e&&(e=null),null===t)return Bt.EMPTY_NODE;if("object"==typeof t&&".priority"in t&&(e=t[".priority"]),a.assert(null===e||"string"==typeof e||"number"==typeof e||"object"==typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t)return new xt(t,Wt(e));if(t instanceof Array||!Vt){var n=Bt.EMPTY_NODE,r=t;return a.forEach(r,function(t,e){if(a.contains(r,t)&&"."!==t.substring(0,1)){var i=Wt(e);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}}),n.updatePriority(Wt(e))}var i=[],o=!1,s=t;if(a.forEach(s,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=Wt(s[t]);n.isEmpty()||(o=o||!n.getPriority().isEmpty(),i.push(new mt(t,n)))}}),0==i.length)return Bt.EMPTY_NODE;var u=Mt(i,Ut,function(t){return t.name},jt);if(o){var c=Mt(i,Nt.getCompare());return new Bt(u,Wt(e),new Ft({".priority":c},{".priority":Nt}))}return new Bt(u,Wt(e),Ft.Default)}!function(t){wt=t}(Wt);var Ht,zt,Kt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?I(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return mt.MAX},e.prototype.makePost=function(t,e){var n=Wt(t);return new mt(e,n)},e.prototype.toString=function(){return".value"},e}(yt)),Gt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,a.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return u.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Wt(t),r=Bt.EMPTY_NODE.updateChild(this.indexPath_,n);return new mt(e,r)},e.prototype.maxPost=function(){var t=Bt.EMPTY_NODE.updateChild(this.indexPath_,qt);return new mt(A,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(yt),Qt=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return a.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return a.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return a.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return a.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){a.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),lt("DataSnapshot.child",1,e,!1);var n=new V(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Nt)},t.prototype.hasChild=function(t){a.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),lt("DataSnapshot.hasChild",1,t,!1);var e=new V(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return a.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;return a.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),a.validateCallback("DataSnapshot.forEach",1,e,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return e(new t(i,n.ref_.child(r),Nt))})},t.prototype.hasChildren=function(){return a.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return a.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return a.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),Yt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+a.stringify(this.snapshot.exportVal())},t}(),Xt=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),$t=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Yt("value",this,new Qt(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),Jt=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,a.contains(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.createEvent=function(t,e){a.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Yt(t.type,this,new Qt(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var n=a.getCount(e.callbacks_);if(n===a.getCount(this.callbacks_)){if(1===n){var r=a.getAnyKey(e.callbacks_),i=a.getAnyKey(this.callbacks_);return!(i!==r||e.callbacks_[r]&&this.callbacks_[i]&&e.callbacks_[r]!==this.callbacks_[i])}return a.every(this.callbacks_,function(t,n){return e.callbacks_[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),Zt=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(Ht,"Reference.ts has not been loaded"),Ht},set:function(t){Ht=t},enumerable:!0,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===bt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=N)throw new Error(r);if("string"!=typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!=A)throw new Error(r);if("string"!=typeof n)throw new Error(i)}}else if(t.getIndex()===Nt){if(null!=e&&!rt(e)||null!=n&&!rt(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(a.assert(t.getIndex()instanceof Gt||t.getIndex()===Kt,"unknown index type."),null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return a.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){a.validateArgCount("Query.on",2,4,arguments.length),ut("Query.on",1,e,!1),a.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[e]=n,this.onChildEvent(s,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new $t(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new Jt(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){a.validateArgCount("Query.off",0,3,arguments.length),ut("Query.off",1,t,!0),a.validateCallback("Query.off",2,e,!0),a.validateContextObject("Query.off",3,n,!0);var r=null,i=null;"value"===t?r=new $t(e||null,null,n||null):t&&(e&&((i={})[t]=e),r=new Jt(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;a.validateArgCount("Query.once",1,4,arguments.length),ut("Query.once",1,e,!1),a.validateCallback("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new a.Deferred;c.promise.catch(function(){});var l=function(t){u&&(u=!1,o.off(e,l),n&&n.bind(s.context)(t),c.resolve(t))};return this.on(e,l,function(t){o.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)}),c.promise},t.prototype.limitToFirst=function(e){if(a.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(a.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(a.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid.  Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid.  Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid.  Use Query.orderByValue() instead.');lt("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new V(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path.  Use Query.orderByValue() instead.");var r=new Gt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){a.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(bt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){a.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(Nt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){a.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(Kt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.startAt",0,2,arguments.length),it("Query.startAt",1,e,this.path,!0),ct("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.endAt",0,2,arguments.length),it("Query.endAt",1,e,this.path,!0),ct("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(a.validateArgCount("Query.equalTo",1,2,arguments.length),it("Query.equalTo",1,t,this.path,!1),ct("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return a.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return a.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=R(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(a.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t)){throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.")}var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,a.validateCallback(t,3,r.cancel,!0),r.context=n,a.validateContextObject(t,4,r.context,!0);else if(e)if("object"==typeof e&&null!==e)r.context=e;else{if("function"!=typeof e)throw new Error(a.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),te=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return a.contains(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return a.isEmpty(this.set)},t.prototype.count=function(){return a.getCount(this.set)},t.prototype.each=function(t){a.forEach(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return a.forEach(this.set,function(e){t.push(e)}),t},t}(),ee=function(){function t(){this.value_=null,this.children_=null}return t.prototype.find=function(t){if(null!=this.value_)return this.value_.getChild(t);if(t.isEmpty()||null==this.children_)return null;var e=t.getFront();return t=t.popFront(),this.children_.contains(e)?this.children_.get(e).find(t):null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(e,n);else{null==this.children_&&(this.children_=new te);var r=e.getFront();this.children_.contains(r)||this.children_.add(r,new t);var i=this.children_.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var e=this.value_;this.value_=null;var n=this;return e.forEachChild(Nt,function(t,e){n.remember(new V(t),e)}),this.forget(t)}if(null!==this.children_){var r=t.getFront();if(t=t.popFront(),this.children_.contains(r))this.children_.get(r).forget(t)&&this.children_.remove(r);return!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.value_?e(t,this.value_):this.forEachChild(function(n,r){var i=new V(t.toString()+"/"+n);r.forEachTree(i,e)})},t.prototype.forEachChild=function(t){null!==this.children_&&this.children_.each(function(e,n){t(e,n)})},t}(),ne=function(t,e){return t&&"object"==typeof t?(a.assert(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},re=function(t,e){var n,r=t.getPriority().val(),i=ne(r,e);if(t.isLeafNode()){var o=t,a=ne(o.getValue(),e);return a!==o.getValue()||i!==o.getPriority().val()?new xt(a,Wt(i)):t}var s=t;return n=s,i!==s.getPriority().val()&&(n=n.updatePriority(new xt(i))),s.forEachChild(Nt,function(t,r){var i=re(r,e);i!==r&&(n=n.updateImmediateChild(t,i))}),n};!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(zt||(zt={}));var ie,oe,ae=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,a.assert(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),se=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=zt.ACK_USER_WRITE,this.source=ae.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return a.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new V(e));return new t(V.Empty,n,this.revert)}return a.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ue=function(){return ie||(ie=new Pt(O)),ie},ce=function(){function t(t,e){void 0===e&&(e=ue()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return a.forEach(e,function(t,e){n=n.set(new V(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:V.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new V(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||t.Empty).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(V.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,V.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,V.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(V.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal(function(n,r){r.foreach_(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}(),le=function(){function t(t,e){this.source=t,this.path=e,this.type=zt.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty):new t(this.source,this.path.popFront())},t}(),fe=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=zt.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),he=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=zt.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new V(e));return n.isEmpty()?null:n.value?new fe(this.source,V.Empty,n.value):new t(this.source,V.Empty,n)}return a.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),pe=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),de=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new pe(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new pe(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new pe(Bt.EMPTY_NODE,!1,!1),new pe(Bt.EMPTY_NODE,!1,!1)),t}(),ve=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),me=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,o){a.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()==n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(ve.childRemovedChange(e,s)):a.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(ve.childAddedChange(e,n)):o.trackChildChange(ve.childChangedChange(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Nt,function(t,r){e.hasChild(t)||n.trackChildChange(ve.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(Nt,function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(ve.childChangedChange(e,r,i))}else n.trackChildChange(ve.childAddedChange(e,r))})),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Bt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),ye=function(){function t(){this.changeMap_={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;a.assert(e==ve.CHILD_ADDED||e==ve.CHILD_CHANGED||e==ve.CHILD_REMOVED,"Only child changes supported for tracking"),a.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=a.safeGet(this.changeMap_,n);if(r){var i=r.type;if(e==ve.CHILD_ADDED&&i==ve.CHILD_REMOVED)this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.snapshotNode);else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_ADDED)delete this.changeMap_[n];else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_CHANGED)this.changeMap_[n]=ve.childRemovedChange(n,r.oldSnap);else if(e==ve.CHILD_CHANGED&&i==ve.CHILD_ADDED)this.changeMap_[n]=ve.childAddedChange(n,t.snapshotNode);else{if(e!=ve.CHILD_CHANGED||i!=ve.CHILD_CHANGED)throw a.assertionError("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.oldSnap)}}else this.changeMap_[n]=t},t.prototype.getChanges=function(){return a.getValues(this.changeMap_)},t}(),ge=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),be=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new pe(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),_e=function(){return function(t,e){this.viewCache=t,this.changes=e}}(),we=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){a.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),a.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,s,u=new ye;if(n.type===zt.OVERWRITE){var c=n;c.source.fromUser?o=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(a.assert(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),o=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===zt.MERGE){var l=n;l.source.fromUser?o=this.applyUserMerge_(e,l.path,l.children,r,i,u):(a.assert(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),o=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===zt.ACK_USER_WRITE){var f=n;o=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==zt.LISTEN_COMPLETE)throw a.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,o,h),new _e(o,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(ve.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if(e.isEmpty())if(a.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof Bt?c:Bt.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var p=e.getFront();if(".priority"==p){a.assert(1==e.getLength(),"Can't have a priority with additional path components");var d=o.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);s=null!=v?this.filter_.updatePriority(d,v):o.getNode()}else{var m=e.popFront(),y=void 0;if(o.isCompleteForChild(p)){u=t.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),u);y=null!=g?o.getNode().getImmediateChild(p).updateChild(m,g):o.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,t.getServerCache());s=null!=y?this.filter_.updateChild(o.getNode(),p,y,m,r,i):o.getNode()}}return t.updateEventSnap(s,o.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var h=e.popFront(),p=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"==f?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),f,p,h,ge,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new be(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new be(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=e.popFront(),h=u.getNode().getImmediateChild(l),p=void 0;if(f.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===f.getBack()&&d.getChild(f.parent()).isEmpty()?d:d.updateChild(f,n):Bt.EMPTY_NODE}if(h.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),u},t.prototype.applyMerge_=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:ce.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new V(e),f,r,i,o,a)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new V(e),h,r,i,o,a)}}),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=ce.Empty;return s.getNode().forEachChild(bt,function(t,e){u=u.set(new V(t),e)}),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=ce.Empty;return n.foreach(function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))}),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,ge,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var s=new be(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();a.assert(f instanceof Bt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=e.getFront(),p=n.calcCompleteChild(h,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(h)&&(p=u.getImmediateChild(h)),(c=null!=p?this.filter_.updateChild(u,h,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Bt.EMPTY_NODE,e.popFront(),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,o,i))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(V.Empty),t.updateEventSnap(c,o,this.filter_.filtersNodes())},t}(),Ee=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach(function(t){t.type===ve.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(ve.childMovedChange(t.childName,t.snapshotNode))}),this.generateEventsForType_(i,ve.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,ve.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,ve.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,ve.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,ve.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter(function(t){return t.type===e});a.sort(this.compareChanges_.bind(this)),a.forEach(function(e){var n=o.materializeSingleChange_(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))})})},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_),t)},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw a.assertionError("Should only compare child_ events.");var n=new mt(t.childName,t.snapshotNode),r=new mt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Te=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new me(n.getIndex()),i=n.getNodeFilter();this.processor_=new we(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Bt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Bt.EMPTY_NODE,a.getNode(),null),c=new pe(s,o.isFullyInitialized(),r.filtersNodes()),l=new pe(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new de(l,c),this.eventGenerator_=new Ee(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){a.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var s=this.eventRegistrations_[o];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===zt.MERGE&&null!==t.source.queryId&&(a.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),a.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),a.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(Nt,function(t,e){n.push(ve.childAddedChange(t,e))});return e.isFullyInitialized()&&n.push(ve.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),Ce=function(){function t(){this.views_={}}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(oe,"Reference.ts has not been loaded"),oe},set:function(t){a.assert(!oe,"__referenceConstructor has already been defined"),oe=t},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return a.isEmpty(this.views_)},t.prototype.applyOperation=function(t,e,n){var r=t.source.queryId;if(null!==r){var i=a.safeGet(this.views_,r);return a.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(t,e,n)}var o=[];return a.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(t,e,n))}),o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),s=a.safeGet(this.views_,o);if(!s){var u=n.calcCompleteEventCache(i?r:null),c=!1;u?c=!0:r instanceof Bt?(u=n.calcCompleteEventChildren(r),c=!1):(u=Bt.EMPTY_NODE,c=!1);var l=new de(new pe(u,c,!1),new pe(r,i,!1));s=new Te(t,l),this.views_[o]=s}return s.addEventRegistration(e),s.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i=e.queryIdentifier(),o=[],s=[],u=this.hasCompleteView();if("default"===i){var c=this;a.forEach(this.views_,function(t,e){s=s.concat(e.removeEventRegistration(n,r)),e.isEmpty()&&(delete c.views_[t],e.getQuery().getQueryParams().loadsAllData()||o.push(e.getQuery()))})}else{var l=a.safeGet(this.views_,i);l&&(s=s.concat(l.removeEventRegistration(n,r)),l.isEmpty()&&(delete this.views_[i],l.getQuery().getQueryParams().loadsAllData()||o.push(l.getQuery())))}return u&&!this.hasCompleteView()&&o.push(new t.__referenceConstructor(e.repo,e.path)),{removed:o,events:s}},t.prototype.getQueryViews=function(){var t=this;return Object.keys(this.views_).map(function(e){return t.views_[e]}).filter(function(t){return!t.getQuery().getQueryParams().loadsAllData()})},t.prototype.getCompleteServerCache=function(t){var e=null;return a.forEach(this.views_,function(n,r){e=e||r.getCompleteServerCache(t)}),e},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return a.safeGet(this.views_,e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){return a.findValue(this.views_,function(t){return t.getQuery().getQueryParams().loadsAllData()})||null},t}(),xe=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new ce(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=V.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new ce(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return a.forEach(e,function(e,r){n=n.addWrite(t.child(e),r)}),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,ce.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(V.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(Nt,function(e,n){t.push(new mt(e,n))}):this.writeTree_.children.inorderTraversal(function(e,n){null!=n.value&&t.push(new mt(e,n.value))}),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new ce(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(e){return t.applySubtreeWrite_(V.Empty,this.writeTree_,e)},t.Empty=new t(new ce(null)),t.applySubtreeWrite_=function(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(a.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t.applySubtreeWrite_(e.child(n),o,r)}),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r},t}(),Se=function(){function t(){this.visibleWrites_=xe.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new ke(t,this)},t.prototype.addOverwrite=function(t,e,n,r){a.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){a.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex(function(e){return e.writeId===t});a.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(o=!0)),s--}if(i){if(o)return this.resetTree_(),!0;if(r.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(r.path);else{var c=r.children;a.forEach(c,function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))})}return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(V.Empty)){var a=t.layerTree_(this.allWrites_,function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},e);c=n||Bt.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(e);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(e);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(V.Empty)){var c=n||Bt.EMPTY_NODE;return u.apply(c)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Bt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(Nt,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(Nt,function(t,e){var r=i.childCompoundWrite(new V(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){a.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(V.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){return t.snap?t.path.contains(e):!!a.findKey(t.children,function(n,r){return t.path.child(r).contains(e)})},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,V.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=xe.Empty,i=0;i<t.length;++i){var o=t[i];if(e(o)){var s=o.path,u=void 0;if(o.snap)n.contains(s)?(u=V.relativePath(n,s),r=r.addWrite(u,o.snap)):s.contains(n)&&(u=V.relativePath(s,n),r=r.addWrite(V.Empty,o.snap.getChild(u)));else{if(!o.children)throw a.assertionError("WriteRecord should have .snap or .children");if(n.contains(s))u=V.relativePath(n,s),r=r.addWrites(u,o.children);else if(s.contains(n))if((u=V.relativePath(s,n)).isEmpty())r=r.addWrites(V.Empty,o.children);else{var c=a.safeGet(o.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(V.Empty,l)}}}}}return r},t}(),ke=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),Ne=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=ce.Empty,this.pendingWriteTree_=new Se,this.tagToQueryMap_={},this.queryToTagMap_={}}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new fe(ae.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=ce.Empty;return null!=n.snap?r=r.set(V.Empty,!0):a.forEach(n.children,function(t,e){r=r.set(new V(t),e)}),this.applyOperationToSyncPoints_(new se(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new fe(ae.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new le(ae.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=new fe(ae.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=ce.fromObject(n),l=new he(ae.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=V.relativePath(o,e),u=new le(ae.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,function(t,e){var n=V.relativePath(t,r);i=i||e.getCompleteServerCache(n),o=o||e.hasCompleteView()});var s,u=this.syncPointTree_.get(r);(u?(o=o||u.hasCompleteView(),i=i||u.getCompleteServerCache(V.Empty)):(u=new Ce,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Bt.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild(function(t,e){var n=e.getCompleteServerCache(V.Empty);n&&(i=i.updateImmediateChild(t,n))}));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);a.assert(!(l in this.queryToTagMap_),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap_[l]=f,this.tagToQueryMap_["_"+f]=l}var h=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,h,i,s);if(!c&&!o){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(t){return t.getQueryParams().loadsAllData()}),f=this.syncPointTree_.findOnPath(o,function(t,e){return e.hasCompleteView()});if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(h),d=0;d<p.length;++d){var v=p[d],m=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(m),this.tagForQuery_(m),y.hashFn,y.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach(function(e){var n=i.queryToTagMap_[t.makeQueryKey_(e)];i.listenProvider_.stopListening(t.queryForListening_(e),n)});this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,function(e,n){var r=V.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),a.forEach(n,function(t,e){r=r.concat(e)}),r})},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),o=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,o.hashFn,o.onComplete),u=this.syncPointTree_.subtree(r);if(i)a.assert(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold(function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map(function(t){return t.getQuery()}))),a.forEach(n,function(t,e){r=r.concat(e)}),r}),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Bt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return a.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new V(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap_["_"+t]},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return a.safeGet(this.queryToTagMap_,n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);a.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(V.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(V.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(V.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(V.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(V.Empty));var a=[];return e.children.inorderTraversal(function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))}),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Ae=function(){function t(){this.rootNode_=Bt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Ie=function(){function t(t){this.app_=t}return t.prototype.getToken=function(t){return this.app_.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(E("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(t)})},t.prototype.addTokenChangeListener=function(t){this.app_.INTERNAL.addAuthTokenListener(t)},t.prototype.removeTokenChangeListener=function(t){this.app_.INTERNAL.removeAuthTokenListener(t)},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',S(t)},t}(),Oe=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),a.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return a.deepCopy(this.counters_)},t}(),Pe=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Oe),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Re=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=a.clone(t);return this.last_&&a.forEach(this.last_,function(t,n){e[t]=e[t]-n}),this.last_=t,e},t}(),De=1e4,Me=3e4,Le=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Re(t);var n=De+(Me-De)*Math.random();q(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;a.forEach(e,function(e,i){i>0&&a.contains(t.statsToReport_,e)&&(n[e]=i,r=!0)}),r&&this.server_.reportStats(n),q(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Fe=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new Ue(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.equals(t)})},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.contains(t)||t.contains(e)})},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),Ue=function(){function t(t){this.path_=t,this.events_=[]}return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();b&&E("event: "+e.toString()),j(n)}}},t.prototype.getPath=function(){return this.path_},t}(),je=function(){function t(t){this.allowedEvents_=t,this.listeners_={},a.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=this.listeners_[t].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){a.assert(this.allowedEvents_.find(function(e){return e===t}),"Unknown event: "+t)},t}(),Be=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(n="visibilitychange",e="hidden"):void 0!==document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(n="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))},!1),r}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(je),qe=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||a.isMobileCordova()||(window.addEventListener("online",function(){e.online_||(e.online_=!0,e.trigger("online",!0))},!1),window.addEventListener("offline",function(){e.online_&&(e.online_=!1,e.trigger("online",!1))},!1)),e}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(je),Ve=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&j(function(){n.onMessage_(t[e])})},r=0;r<t.length;++r)e(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),We="pLPCommand",He="pRTLPCB",ze=function(){function t(t,e,n,r){this.connId=t,this.repoInfo=e,this.transportSessionId=n,this.lastSessionId=r,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=T(t),this.stats_=Pe.getCollection(e),this.urlFn=function(t){return e.connectionURL(H,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new Ve(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null},Math.floor(3e4)),function(t){if(a.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}(function(){if(!n.isClosed_){n.scriptTagHolder=new Ke(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1],o=t[2];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"==r)n.id=i,n.password=o;else{if("close"!==r)throw new Error("Unrecognized command received: "+r);i?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(i,function(){n.onClosed_()})):n.onClosed_()}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(r,i)},function(){n.onClosed_()},n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v="5",n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,function(){})}})},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return t.forceAllow_||!t.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.UI)&&!a.isNodeSdk()},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=a.base64Encode(e),r=D(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!a.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=a.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),Ke=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new te,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,a.isNodeSdk())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=m(),window[We+this.uniqueCallbackIdentifier]=e,window[He+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createIFrame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))o='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(t){E("frame writing exception"),t.stack&&E(t.stack),E(t)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||E("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var e=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)},Math.floor(0))),a.isNodeSdk()&&this.myID){var n={disconn:"t"};n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);t.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,function(){clearTimeout(i),r()})},t.prototype.addTag=function(t,e){var n=this;a.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){E("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(t){}},Math.floor(1))},t}(),Ge=null;"undefined"!=typeof MozWebSocket?Ge=MozWebSocket:"undefined"!=typeof WebSocket&&(Ge=WebSocket);var Qe=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=T(this.connId),this.stats_=Pe.getCollection(n),this.connURL=t.connectionURL_(n,r,i)}return t.connectionURL_=function(t,e,n){var r={v:"5"};return!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL("websocket",r)},t.prototype.open=function(t,e){var n=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,p.set("previous_websocket_failure",!0);try{if(a.isNodeSdk()){var i=a.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+c.SDK_VERSION+"/"+r.platform+"/"+i}},s=r.env,u=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(o.proxy={origin:u}),this.mySock=new Ge(this.connURL,[],o)}else this.mySock=new Ge(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var l=t.message||t.data;return l&&this.log_(l),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0},this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(t){n.handleIncomingFrame(t)},this.mySock.onerror=function(t){n.log_("WebSocket error.  Closing connection.");var e=t.message||t.data;e&&n.log_(e),n.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==Ge&&!t.forceDisallow_},t.previouslyFailed=function(){return p.isInMemoryStorage||!0===p.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){p.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=a.jsonEval(e);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},t.prototype.extractFrameCount_=function(t){if(a.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},t.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(t){this.resetKeepAlive();var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=D(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()},Math.floor(45e3))},t.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),Ye=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[ze,Qe]},enumerable:!0,configurable:!0}),t.prototype.initTransports_=function(e){var n=Qe&&Qe.isAvailable(),r=n&&!Qe.previouslyFailed();if(e.webSocketOnly&&(n||S("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),r=!0),r)this.transports_=[Qe];else{var i=this.transports_=[];M(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&i.push(e)})}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Xe=function(){function t(t,e,n,r,i,o,a){this.id=t,this.repoInfo_=e,this.onMessage_=n,this.onReady_=r,this.onDisconnect_=i,this.onKill_=o,this.lastSessionId=a,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=T("c:"+this.id+":"),this.transportManager_=new Ye(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(n,r)},Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=q(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes.  Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes.  Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!=e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);if("c"==e)this.onSecondaryControl_(n);else{if("d"!=e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);"c"==e?this.onControl_(n):"d"==e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=P("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?C("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):C("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),"5"!==n&&S("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),q(function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())},Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received.  New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):q(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(p.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),$e=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),Je=1e3,Ze=3e5,tn=function(t){function e(n,r,i,o,s,u){var c=t.call(this)||this;if(c.repoInfo_=n,c.onDataUpdate_=r,c.onConnectStatus_=i,c.onServerInfoUpdate_=o,c.authTokenProvider_=s,c.authOverride_=u,c.id=e.nextPersistentConnectionId_++,c.log_=T("p:"+c.id+":"),c.interruptReasons_={},c.listens_={},c.outstandingPuts_=[],c.outstandingPutCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=Je,c.maxReconnectDelay_=Ze,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,u&&!a.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return c.scheduleConnect_(0),Be.getInstance().on("visible",c.onVisible_,c),-1===n.host.indexOf("fblocal")&&qe.getInstance().on("online",c.onOnline_,c),c}return u.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(a.stringify(i)),a.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),a.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens_[o][i]=s,this.connected_&&this.sendListen_(s)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens_[i]&&n.listens_[i][o])===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))})},e.warnOnListenWarnings_=function(t,e){if(t&&"object"==typeof t&&a.contains(t,"w")){var n=a.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();S("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||a.isAdmin(t))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=a.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))})}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)})},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}})}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+a.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):C("Unrecognized action received from server: "+a.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;a.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){e.establishConnectionTimer_=null,e.establishConnection_()},Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=Je),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,s=this.lastSessionId,u=!1,c=null,l=function(){c?c.close():(u=!0,r())};this.realtime_={close:l,sendRequest:function(t){a.assert(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(t)}};var f=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(f).then(function(e){u?E("getToken() completed but was canceled"):(E("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,c=new Xe(i,o.repoInfo_,t,n,r,function(t){S(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},s))}).then(null,function(t){o.log_("Failed to get token: "+t),u||(a.CONSTANTS.NODE_ADMIN&&S(t),l())})}},e.prototype.interrupt=function(t){E("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){E("Resuming connection for reason: "+t),delete this.interruptReasons_[t],a.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map(function(t){return R(t)}).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new V(t).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][e],delete this.listens_[r][e],0===a.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},e.prototype.onAuthRevoked_=function(t,e){E("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t=this;this.tryAuth(),a.forEach(this.listens_,function(e,n){a.forEach(n,function(e,n){t.sendListen_(n)})});for(var e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";a.CONSTANTS.NODE_ADMIN?e="admin_node":a.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+c.SDK_VERSION.replace(/\./g,"-")]=1,a.isMobileCordova()?t["framework.cordova"]=1:a.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=qe.getInstance().currentlyOnline();return a.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}($e),en=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=T("p:rest:"),i.listens_={},i}return u.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(a.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(s,n,!1,r),a.safeGet(o.listens_,u)===c)&&i(t?401==t?"permission_denied":"rest_error:"+t:"ok",null)})},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var o=i&&i.accessToken;o&&(e.auth=o);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?"+a.querystring(e);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=a.jsonEval(u.responseText)}catch(t){S("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&S("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()})},e}($e),nn=function(){function t(t,e,n){var r=this;this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Fe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ee,this.persistentConnection_=null;var i=new Ie(n);if(this.stats_=Pe.getCollection(t),e||B())this.server_=new en(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!=typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{a.stringify(o)}catch(t){throw new Error("Invalid authOverride provided: "+t)}}this.persistentConnection_=new tn(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(t){r.server_.refreshAuthToken(t)}),this.statsReporter_=Pe.getOrCreateReporter(t,function(){return new Le(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new Ae,this.infoSyncTree_=new Ne({startListening:function(t,e,n,i){var o=[],a=r.infoData_.getNode(t.path);return a.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Ne({startListening:function(t,e,n,i){return r.server_.listen(t,n,e,function(e,n){var o=i(e,n);r.eventQueue_.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new V(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new V(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var o=[];if(r)if(n){var s=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Wt(e);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Wt(e);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;o.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,o)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;M(t,function(t,n){e.updateInfo_(n,t)})},t.prototype.updateInfo_=function(t,e){var n=new V("/.info/"+t),r=Wt(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Wt(e,n),s=re(a,o),u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserOverwrite(t,s,u,!0);this.eventQueue_.queueEvents(c),this.server_.put(t.toString(),a.val(!0),function(e,n){var o="ok"===e;o||S("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(u,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)});var l=this.abortTransactions_(t);this.rerunTransactions_(l),this.eventQueue_.raiseEventsForChangedPath(l,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),s={};if(a.forEach(e,function(t,e){i=!1;var n=Wt(e);s[t]=re(n,o)}),i)E("update() called with empty data.  Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserMerge(t,s,u);this.eventQueue_.queueEvents(c),this.server_.merge(t.toString(),e,function(e,i){var o="ok"===e;o||S("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(u,!o),s=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(s,a),r.callOnCompleteCallback(n,e,i)}),a.forEach(e,function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=[];(function(t,e){var n=new ee;return t.forEachTree(new V(""),function(t,r){n.remember(t,re(r,e))}),n})(this.onDisconnect_,e).forEachTree(V.Empty,function(e,r){n=n.concat(t.serverSyncTree_.applyServerOverwrite(e,r));var i=t.abortTransactions_(e);t.rerunTransactions_(i)}),this.onDisconnect_=new ee,this.eventQueue_.raiseEventsForChangedPath(V.Empty,n)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Wt(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Wt(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(a.isEmpty(e))return E("onDisconnect().update() called with empty data.  Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,function(i,o){"ok"===i&&a.forEach(e,function(e,n){var i=Wt(n);r.onDisconnect_.remember(t.child(e),i)}),r.callOnCompleteCallback(n,i,o)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Re(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);a.forEach(e,function(t,e){for(var r=t.length;r<n+2;r++)t+=" ";console.log(t+e)})}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),E.apply(void 0,[n].concat(t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&j(function(){if("ok"==e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}})},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new pn(this))},enumerable:!0,configurable:!0}),t}(),rn=function(){function t(e){this.indexedFilter_=new me(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Bt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Bt.EMPTY_NODE);var i=this;return e.forEachChild(Nt,function(t,e){i.matches(new mt(t,e))||(r=r.updateImmediateChild(t,Bt.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),on=function(){function t(t){this.rangedFilter_=new rn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Bt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Bt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(Bt.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Bt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var o;if(this.reverse_){var s=this.index_.getCompare();o=function(t,e){return s(e,t)}}else o=this.index_.getCompare();var u=t;a.assert(u.numChildren()==this.limit_,"");var c=new mt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name==e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:o(p,c);if(f&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(ve.childChangedChange(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(ve.childRemovedChange(e,h));var v=u.updateImmediateChild(e,Bt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(ve.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:f&&o(l,c)>=0?(null!=i&&(i.trackChildChange(ve.childRemovedChange(l.name,l.node)),i.trackChildChange(ve.childAddedChange(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,Bt.EMPTY_NODE)):t},t}(),an=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Nt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:N},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:A},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return a.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==Nt&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==Nt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new me(this.getIndex()):this.hasLimit()?new on(this):new rn(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()?r:(this.index_===Nt?e=n.PRIORITY_INDEX:this.index_===Kt?e=n.VALUE_INDEX:this.index_===bt?e=n.KEY_INDEX:(a.assert(this.index_ instanceof Gt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=a.stringify(e),this.startSet_&&(r[n.START_AT]=a.stringify(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+a.stringify(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=a.stringify(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+a.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_),r)},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),sn=function(t){function e(e,n){if(!(e instanceof nn))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,an.DEFAULT,!1)||this}return u.__extends(e,t),e.prototype.getKey=function(){return a.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return a.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof t?t=String(t):t instanceof V||(null===this.path.getFront()?function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),lt(t,e,n,r)}("Reference.child",1,t,!1):lt("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){a.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){a.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){a.validateArgCount("Reference.set",1,2,arguments.length),ft("Reference.set",this.path),it("Reference.set",1,t,this.path,!1),a.validateCallback("Reference.set",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(a.validateArgCount("Reference.update",1,2,arguments.length),ft("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("Reference.update",1,t,this.path,!1),a.validateCallback("Reference.update",2,e,!0);var i=new a.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(a.validateArgCount("Reference.setWithPriority",2,3,arguments.length),ft("Reference.setWithPriority",this.path),it("Reference.setWithPriority",1,t,this.path,!1),st("Reference.setWithPriority",2,e,!1),a.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new a.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return a.validateArgCount("Reference.remove",0,1,arguments.length),ft("Reference.remove",this.path),a.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(a.validateArgCount("Reference.transaction",1,3,arguments.length),ft("Reference.transaction",this.path),a.validateCallback("Reference.transaction",1,t,!1),a.validateCallback("Reference.transaction",2,e,!0),function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!=typeof n)throw new Error(a.errorPrefix(t,e,r)+"must be a boolean.")}("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new a.Deferred;"function"==typeof e&&r.promise.catch(function(){});return this.repo.startTransaction(this.path,t,function(t,n,i){t?r.reject(t):r.resolve(new dt(n,i)),"function"==typeof e&&e(t,n,i)},n),r.promise},e.prototype.setPriority=function(t,e){a.validateArgCount("Reference.setPriority",1,2,arguments.length),ft("Reference.setPriority",this.path),st("Reference.setPriority",1,t,!1),a.validateCallback("Reference.setPriority",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){a.validateArgCount("Reference.push",0,2,arguments.length),ft("Reference.push",this.path),it("Reference.push",1,t,this.path,!0),a.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=vt(r),o=this.child(i),s=this.child(i);return n=null!=t?o.set(t,e).then(function(){return s}):Promise.resolve(s),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"==typeof e&&n.catch(function(){}),o},e.prototype.onDisconnect=function(){return ft("Reference.onDisconnect",this.path),new pt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),e}(Zt);Zt.__referenceConstructor=sn,Ce.__referenceConstructor=sn;var un,cn=function(){return function(){this.children={},this.childCount=0,this.value=null}}(),ln=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new cn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n,r=e instanceof V?e:new V(e),i=this;null!==(n=r.getFront());){i=new t(n,i,a.safeGet(i.node_.children,n)||new cn),r=r.popFront()}return i},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){a.assert(void 0!==t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;a.forEach(this.node_.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new V(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=a.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(un||(un={})),nn.MAX_TRANSACTION_RETRIES_=25,nn.prototype.transactions_init_=function(){this.transactionQueueTree_=new ln},nn.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},o=new sn(this,t);o.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:m(),applyLocally:r,retryCount:0,unwatcher:function(){o.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new Qt(s.currentInputSnapshot,new sn(this,s.path),Nt);s.onComplete(null,!1,l)}}else{ot("transaction failed: Data returned ",c,s.path),s.status=un.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var p=void 0;if("object"==typeof c&&null!==c&&a.contains(c,".priority"))p=a.safeGet(c,".priority"),a.assert(rt(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||Bt.EMPTY_NODE).getPriority().val();p=p;var d=this.generateServerValues(),v=Wt(c,p),y=re(v,d);s.currentOutputSnapshotRaw=v,s.currentOutputSnapshotResolved=y,s.currentWriteId=this.getNextWriteId_();var g=this.serverSyncTree_.applyUserOverwrite(t,y,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,g),this.sendReadyTransactions_()}},nn.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Bt.EMPTY_NODE},nn.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);a.assert(n.length>0,"Sending zero length transaction queue"),n.every(function(t){return t.status===un.RUN})&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.sendReadyTransactions_(t)})},nn.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map(function(t){return t.currentWriteId}),i=this.getLatestState_(t,r),o=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];a.assert(c.status===un.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=un.SENT,c.retryCount++;var l=V.relativePath(t,c.path);o=o.updateChild(l,c.currentOutputSnapshotRaw)}var f=o.val(!0),h=t;this.server_.put(h.toString(),f,function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=un.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new sn(n,e[a].path),c=new Qt(s,u,Nt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)j(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===un.SENT_NEEDS_ABORT?e[a].status=un.NEEDS_ABORT:e[a].status=un.RUN;else{S("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=un.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}},s)},nn.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},nn.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],o=t.filter(function(t){return t.status===un.RUN}).map(function(t){return t.currentWriteId}),s=0;s<t.length;s++){var u=t[s],c=V.relativePath(e,u.path),l=!1,f=void 0;if(a.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===un.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===un.RUN)if(u.retryCount>=nn.MAX_TRANSACTION_RETRIES_)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,o);u.currentInputSnapshot=h;var p=t[s].update(h.val());if(void 0!==p){ot("transaction failed: Data returned ",p,u.path);var d=Wt(p);"object"==typeof p&&null!=p&&a.contains(p,".priority")||(d=d.updatePriority(h.getPriority()));var v=u.currentWriteId,m=this.generateServerValues(),y=re(d,m);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=un.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var g=new sn(this,t[s].path),b=t[s].currentInputSnapshot,_=new Qt(b,g,Nt);r.push(t[s].onComplete.bind(null,null,!1,_))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)j(r[s]);this.sendReadyTransactions_()}},nn.prototype.getAncestorTransactionNode_=function(t){for(var e,n=this.transactionQueueTree_;null!==(e=t.getFront())&&null===n.getValue();)n=n.subTree(e),t=t.popFront();return n},nn.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort(function(t,e){return t.order-e.order}),e},nn.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild(function(t){n.aggregateTransactionQueuesForNode_(t,e)})},nn.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==un.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild(function(t){e.pruneCompletedTransactionsBelowNode_(t)})},nn.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor(function(t){e.abortTransactionsOnNode_(t)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(t){e.abortTransactionsOnNode_(t)}),n},nn.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o<e.length;o++)if(e[o].status===un.SENT_NEEDS_ABORT);else if(e[o].status===un.SENT)a.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,e[o].status=un.SENT_NEEDS_ABORT,e[o].abortReason="set";else if(a.assert(e[o].status===un.RUN,"Unexpected transaction status in abort"),e[o].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[o].currentWriteId,!0)),e[o].onComplete){n.push(e[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(o=0;o<n.length;o++)j(n[o])}};var fn,hn=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return fn||(fn=new t),fn},t.prototype.interrupt=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].interrupt()},t.prototype.resume=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].resume()},t.prototype.databaseFromApp=function(t,e){var n=e||t.options.databaseURL;void 0===n&&x("Can't determine Firebase Database URL.  Be sure to include databaseURL option when calling firebase.initializeApp().");var r=$(n),i=r.repoInfo;return ht("Invalid Firebase Database URL",1,r),r.path.isEmpty()||x("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,t).database},t.prototype.deleteRepo=function(t){var e=a.safeGet(this.repos_,t.app.name);e&&a.safeGet(e,t.repoInfo_.toURLString())===t||x("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e){var n=a.safeGet(this.repos_,e.name);n||(n={},this.repos_[e.name]=n);var r=a.safeGet(n,t.toURLString());return r&&x("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new nn(t,this.useRestClient_,e),n[t.toURLString()]=r,r},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}(),pn=function(){function t(t){this.repo_=t,t instanceof nn||x("Don't call new Database() directly - please use firebase.database()."),this.root_=new sn(t,V.Empty),this.INTERNAL=new dn(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),a.validateArgCount("database.ref",0,1,arguments.length),t instanceof sn?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),a.validateArgCount(e,1,1,arguments.length);var n=$(t);ht(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&x(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&x("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){a.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){a.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"}},t}(),dn=function(){function t(t){this.database=t}return t.prototype.delete=function(){return u.__awaiter(this,void 0,void 0,function(){return u.__generator(this,function(t){return this.database.checkDeleted_("delete"),hn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},t}(),vn=Object.freeze({forceLongPolling:function(){Qe.forceDisallow(),ze.forceAllow()},forceWebSockets:function(){ze.forceDisallow()},isWebSocketsAvailable:function(){return Qe.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)}}),mn=tn;tn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},tn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var yn=Xe,gn=z,bn=Object.freeze({DataConnection:mn,RealTimeConnection:yn,hijackHash:function(t){var e=tn.prototype.put;return tn.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){tn.prototype.put=e}},ConnectionTarget:gn,queryIdentifier:function(t){return t.queryIdentifier()},listens:function(t){return t.repo.persistentConnection_.listens_},forceRestClient:function(t){hn.getInstance().forceRestClient(t)}}),_n=pn.ServerValue;function wn(e){var n=e.INTERNAL.registerService("database",function(t,e,n){return hn.getInstance().databaseFromApp(t,n)},{Reference:sn,Query:Zt,Database:pn,enableLogging:w,INTERNAL:vn,ServerValue:_n,TEST_ACCESS:bn},null,!0);a.isNodeSdk()&&(t.exports=n)}wn(c),e.registerDatabase=wn,e.Database=pn,e.Query=Zt,e.Reference=sn,e.enableLogging=w,e.ServerValue=_n,e.DataSnapshot=Qt,e.OnDisconnect=pt}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),function(t){var e=n(14),r=n.n(e);(function(){var t,e=e||{},n=this;function i(t){return"string"==typeof t}function o(t){return"boolean"==typeof t}function a(){}function s(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function u(t){return null===t}function c(t){return"array"==s(t)}function l(t){var e=s(t);return"array"==e||"object"==e&&"number"==typeof t.length}function f(t){return"function"==s(t)}function h(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var p="closure_uid_"+(1e9*Math.random()>>>0),d=0;function v(t,e,n){return t.call.apply(t.bind,arguments)}function m(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:m).apply(null,arguments)}function g(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now||function(){return+new Date};function _(t,e){function n(){}n.prototype=e.prototype,t.lb=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.cd=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function w(t){t.prototype.then=t.prototype.then,t.prototype.$goog_Thenable=!0}function E(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function T(t){if(Error.captureStackTrace)Error.captureStackTrace(this,T);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function C(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");T.call(this,n+t[r])}function x(t,e){throw new C("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function S(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function k(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function N(){this.b=this.a=null}_(T,Error),T.prototype.name="CustomError",_(C,T),C.prototype.name="AssertionError",S.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var A=new S(function(){return new O},function(t){t.reset()});function I(){var t=pt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function O(){this.next=this.b=this.a=null}N.prototype.add=function(t,e){var n=A.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},O.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},O.prototype.reset=function(){this.next=this.b=this.a=null};var P=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(i(t))return i(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},R=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,o=i(t)?t.split(""):t,a=0;a<r;a++)a in o&&e.call(n,o[a],a,t)};var D=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),o=i(t)?t.split(""):t,a=0;a<n;a++)a in o&&(r[a]=e.call(void 0,o[a],a,t));return r},M=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t))return!0;return!1};function L(t,e){return 0<=P(t,e)}function F(t,e){var n;return(n=0<=(e=P(t,e)))&&Array.prototype.splice.call(t,e,1),n}function U(t,e){!function(t,e){var n=t.length,r=i(t)?t.split(""):t;for(--n;0<=n;--n)n in r&&e.call(void 0,r[n],n,t)}(t,function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0})}function j(t){return Array.prototype.concat.apply([],arguments)}function B(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function q(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}var V=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function W(t){return $.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(z,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(K,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(G,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(Q,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(Y,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(X,"&#0;")),t):t}var H,z=/&/g,K=/</g,G=/>/g,Q=/"/g,Y=/'/g,X=/\x00/g,$=/[\x00&<>"']/;function J(t,e){return-1!=t.indexOf(e)}function Z(t,e){return t<e?-1:t>e?1:0}t:{var tt=n.navigator;if(tt){var et=tt.userAgent;if(et){H=et;break t}}H=""}function nt(t){return J(H,t)}function rt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function it(t){for(var e in t)return!1;return!0}function ot(t){var e,n={};for(e in t)n[e]=t[e];return n}var at,st,ut="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ct(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<ut.length;o++)n=ut[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function lt(t){n.setTimeout(function(){throw t},0)}function ft(t,e){st||function(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve(void 0);st=function(){t.then(dt)}}else st=function(){var t=dt;!f(n.setImmediate)||n.Window&&n.Window.prototype&&!nt("Edge")&&n.Window.prototype.setImmediate==n.setImmediate?(at||(at=function(){var t=n.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!nt("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=y(function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),void 0!==t&&!nt("Trident")&&!nt("MSIE")){var e=new t,r={},i=r;return e.port1.onmessage=function(){if(void 0!==r.next){var t=(r=r.next).tb;r.tb=null,t()}},function(t){i.next={tb:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}}()),at(t)):n.setImmediate(t)}}(),ht||(st(),ht=!0),pt.add(t,e)}var ht=!1,pt=new N;function dt(){for(var t;t=I();){try{t.a.call(t.b)}catch(t){lt(t)}k(A,t)}ht=!1}function vt(t,e){if(this.a=mt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=a)try{var n=this;t.call(e,function(t){kt(n,yt,t)},function(t){if(!(t instanceof Dt))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}kt(n,gt,t)})}catch(t){kt(this,gt,t)}}var mt=0,yt=2,gt=3;function bt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}bt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var _t=new S(function(){return new bt},function(t){t.reset()});function wt(t,e,n){var r=_t.get();return r.g=t,r.b=e,r.f=n,r}function Et(t){if(t instanceof vt)return t;var e=new vt(a);return kt(e,yt,t),e}function Tt(t){return new vt(function(e,n){n(t)})}function Ct(t,e,n){Nt(t,e,n,null)||ft(g(e,t))}function xt(t,e){t.b||t.a!=yt&&t.a!=gt||At(t),t.f?t.f.next=e:t.b=e,t.f=e}function St(t,e,n,r){var i=wt(null,null,null);return i.a=new vt(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof Dt?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,xt(t,i),i.a}function kt(t,e,n){t.a==mt&&(t===n&&(e=gt,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Nt(n,t.Lc,t.Mc,t)||(t.i=n,t.a=e,t.c=null,At(t),e!=gt||n instanceof Dt||function(t,e){t.g=!0,ft(function(){t.g&&Rt.call(null,e)})}(t,n)))}function Nt(t,e,n,r){if(t instanceof vt)return xt(t,wt(e||a,n||null,r)),!0;if(E(t))return t.then(e,n,r),!0;if(h(t))try{var i=t.then;if(f(i))return function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}var a=!1;try{e.call(t,function(t){a||(a=!0,n.call(i,t))},o)}catch(t){o(t)}}(t,i,e,n,r),!0}catch(t){return n.call(r,t),!0}return!1}function At(t){t.h||(t.h=!0,ft(t.Ub,t))}function It(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ot(t,e,n,r){if(n==gt&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Pt(e,n,r);else try{e.c?e.g.call(e.f):Pt(e,n,r)}catch(t){Rt.call(null,t)}k(_t,e)}function Pt(t,e,n){e==yt?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}vt.prototype.then=function(t,e,n){return St(this,f(t)?t:null,f(e)?e:null,n)},w(vt),(t=vt.prototype).ia=function(t,e){return(t=wt(t,t,e)).c=!0,xt(this,t),this},t.s=function(t,e){return St(this,null,t,e)},t.cancel=function(t){this.a==mt&&ft(function(){!function t(e,n){if(e.a==mt)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&&(s.c||(i++,s.a==e&&(o=s),!(o&&1<i)));s=s.next)o||(a=s);o&&(r.a==mt&&1==i?t(r,n):(a?((i=a).next==r.f&&(r.f=i),i.next=i.next.next):It(r),Ot(r,o,gt,n)))}e.c=null}else kt(e,gt,n)}(this,new Dt(t))},this)},t.Lc=function(t){this.a=mt,kt(this,yt,t)},t.Mc=function(t){this.a=mt,kt(this,gt,t)},t.Ub=function(){for(var t;t=It(this);)Ot(this,t,this.a,this.i);this.h=!1};var Rt=lt;function Dt(t){T.call(this,t)}function Mt(){0!=Lt&&(Ft[this[p]||(this[p]=++d)]=this),this.pa=this.pa,this.ja=this.ja}_(Dt,T),Dt.prototype.name="cancel";var Lt=0,Ft={};function Ut(t){if(!t.pa&&(t.pa=!0,t.ua(),0!=Lt)){var e=t[p]||(t[p]=++d);if(0!=Lt&&t.ja&&0<t.ja.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ft[e]}}function jt(t){return jt[" "](t),t}Mt.prototype.pa=!1,Mt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},jt[" "]=a;var Bt,qt,Vt=nt("Opera"),Wt=nt("Trident")||nt("MSIE"),Ht=nt("Edge"),zt=Ht||Wt,Kt=nt("Gecko")&&!(J(H.toLowerCase(),"webkit")&&!nt("Edge"))&&!(nt("Trident")||nt("MSIE"))&&!nt("Edge"),Gt=J(H.toLowerCase(),"webkit")&&!nt("Edge");function Qt(){var t=n.document;return t?t.documentMode:void 0}t:{var Yt="",Xt=(qt=H,Kt?/rv:([^\);]+)(\)|;)/.exec(qt):Ht?/Edge\/([\d\.]+)/.exec(qt):Wt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(qt):Gt?/WebKit\/(\S+)/.exec(qt):Vt?/(?:Version)[ \/]?(\S+)/.exec(qt):void 0);if(Xt&&(Yt=Xt?Xt[1]:""),Wt){var $t=Qt();if(null!=$t&&$t>parseFloat(Yt)){Bt=String($t);break t}}Bt=Yt}var Jt,Zt={};function te(t){return function(t,e){var n=Zt;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,function(){for(var e=0,n=V(String(Bt)).split("."),r=V(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=Z(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||Z(0==a[2].length,0==s[2].length)||Z(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var ee=n.document;Jt=ee&&Wt?Qt()||("CSS1Compat"==ee.compatMode?parseInt(Bt,10):5):void 0;var ne=Object.freeze||function(t){return t},re=!Wt||9<=Number(Jt),ie=Wt&&!te("9"),oe=function(){if(!n.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return n.addEventListener("test",a,e),n.removeEventListener("test",a,e),t}();function ae(t,e){this.type=t,this.b=this.target=e,this.Gb=!0}function se(t,e){if(ae.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Kt){t:{try{jt(e.nodeName);var o=!0;break t}catch(t){}o=!1}o||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=i(t.pointerType)?t.pointerType:ue[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}ae.prototype.preventDefault=function(){this.Gb=!1},_(se,ae);var ue=ne({2:"touch",3:"pen",4:"mouse"});se.prototype.preventDefault=function(){se.lb.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,ie)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},se.prototype.f=function(){return this.a};var ce="closure_listenable_"+(1e6*Math.random()|0),le=0;function fe(t){t.na=!0,t.listener=null,t.proxy=null,t.src=null,t.La=null}function he(t){this.src=t,this.a={},this.b=0}function pe(t,e){var n=e.type;n in t.a&&F(t.a[n],e)&&(fe(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function de(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.na&&o.listener==e&&o.capture==!!n&&o.La==r)return i}return-1}he.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=de(t,e,r,i);return-1<a?(e=t[a],n||(e.Ia=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.La=i,this.key=++le,this.na=this.Ia=!1}(e,this.src,o,!!r,i)).Ia=n,t.push(e)),e};var ve="closure_lm_"+(1e6*Math.random()|0),me={};function ye(t,e,n,r,i){if(r&&r.once)be(t,e,n,r,i);else if(c(e))for(var o=0;o<e.length;o++)ye(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Ie(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!1,r,i)}function ge(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=h(i)?!!i.capture:!!i,s=Se(t);if(s||(t[ve]=s=new he(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=xe,e=re?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)oe||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(Ee(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function be(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)be(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Oe(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!0,r,i)}function _e(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)_e(t,e[o],n,r,i);else r=h(r)?!!r.capture:!!r,n=Ne(n),t&&t[ce]?(t=t.m,(e=String(e).toString())in t.a&&(-1<(n=de(o=t.a[e],n,r,i))&&(fe(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Se(t))&&(e=t.a[e.toString()],t=-1,e&&(t=de(e,n,r,i)),(n=-1<t?e[t]:null)&&we(n))}function we(t){if("number"!=typeof t&&t&&!t.na){var e=t.src;if(e&&e[ce])pe(e.m,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(Ee(n),r):e.addListener&&e.removeListener&&e.removeListener(r),0,(n=Se(e))?(pe(n,t),0==n.b&&(n.src=null,e[ve]=null)):fe(t)}}}function Ee(t){return t in me?me[t]:me[t]="on"+t}function Te(t,e,n,r){var i=!0;if((t=Se(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.na&&(o=Ce(o,r),i=i&&!1!==o)}return i}function Ce(t,e){var n=t.listener,r=t.La||t.src;return t.Ia&&we(t),n.call(r,e)}function xe(t,e){if(t.na)return!0;if(!re){if(!e)t:{e=["window","event"];for(var r=n,i=0;i<e.length;i++)if(null==(r=r[e[i]])){e=null;break t}e=r}if(e=new se(i=e,this),r=!0,!(0>i.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(t){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=e.b;o;o=o.parentNode)i.push(o);for(t=t.type,o=i.length-1;0<=o;o--){e.b=i[o];var a=Te(i[o],t,!0,e);r=r&&a}for(o=0;o<i.length;o++)e.b=i[o],a=Te(i[o],t,!1,e),r=r&&a}return r}return Ce(t,new se(e,this))}function Se(t){return(t=t[ve])instanceof he?t:null}var ke="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ne(t){return f(t)?t:(t[ke]||(t[ke]=function(e){return t.handleEvent(e)}),t[ke])}function Ae(){Mt.call(this),this.m=new he(this),this.Nb=this,this.Ua=null}function Ie(t,e,n,r,i){t.m.add(String(e),n,!1,r,i)}function Oe(t,e,n,r,i){t.m.add(String(e),n,!0,r,i)}function Pe(t,e,n,r){if(!(e=t.m.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.na&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ia&&pe(t.m,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Gb}function Re(t,e,r){if(f(t))r&&(t=y(t,r));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:n.setTimeout(t,e||0)}function De(t){var e=null;return new vt(function(n,r){-1==(e=Re(function(){n(void 0)},t))&&r(Error("Failed to schedule timer."))}).s(function(t){throw n.clearTimeout(e),t})}function Me(t){if(t.S&&"function"==typeof t.S)return t.S();if(i(t))return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function Le(t){if(t.U&&"function"==typeof t.U)return t.U();if(!t.S||"function"!=typeof t.S){if(l(t)||i(t)){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Fe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Fe)for(n=t.U(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ue(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];je(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)je(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}_(Ae,Mt),Ae.prototype[ce]=!0,Ae.prototype.addEventListener=function(t,e,n,r){ye(this,t,e,n,r)},Ae.prototype.removeEventListener=function(t,e,n,r){_e(this,t,e,n,r)},Ae.prototype.dispatchEvent=function(t){var e,n=this.Ua;if(n)for(e=[];n;n=n.Ua)e.push(n);n=this.Nb;var r=t.type||t;if(i(t))t=new ae(t,n);else if(t instanceof ae)t.target=t.target||n;else{var o=t;ct(t=new ae(r,n),o)}if(o=!0,e)for(var a=e.length-1;0<=a;a--){var s=t.b=e[a];o=Pe(s,r,!0,t)&&o}if(o=Pe(s=t.b=n,r,!0,t)&&o,o=Pe(s,r,!1,t)&&o,e)for(a=0;a<e.length;a++)o=Pe(s=t.b=e[a],r,!1,t)&&o;return o},Ae.prototype.ua=function(){if(Ae.lb.ua.call(this),this.m){var t,e=this.m;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,fe(n[r]);delete e.a[t],e.b--}}this.Ua=null},(t=Fe.prototype).S=function(){Ue(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},t.U=function(){return Ue(this),this.a.concat()},t.clear=function(){this.b={},this.c=this.a.length=0},t.get=function(t,e){return je(this.b,t)?this.b[t]:e},t.set=function(t,e){je(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},t.forEach=function(t,e){for(var n=this.U(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Be=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function qe(t,e){if(this.b=this.m=this.c="",this.i=null,this.h=this.g="",this.f=!1,t instanceof qe){this.f=void 0!==e?e:t.f,Ve(this,t.c),this.m=t.m,this.b=t.b,We(this,t.i),this.g=t.g,e=t.a;var n=new rn;n.c=e.c,e.a&&(n.a=new Fe(e.a),n.b=e.b),He(this,n),this.h=t.h}else t&&(n=String(t).match(Be))?(this.f=!!e,Ve(this,n[1]||"",!0),this.m=Ye(n[2]||""),this.b=Ye(n[3]||"",!0),We(this,n[4]),this.g=Ye(n[5]||"",!0),He(this,n[6]||"",!0),this.h=Ye(n[7]||"")):(this.f=!!e,this.a=new rn(null,this.f))}function Ve(t,e,n){t.c=n?Ye(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function We(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function He(t,e,n){e instanceof rn?(t.a=e,function(t,e){e&&!t.f&&(on(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(sn(this,e),cn(this,n,t))},t)),t.f=e}(t.a,t.f)):(n||(e=Xe(e,en)),t.a=new rn(e,t.f))}function ze(t,e,n){t.a.set(e,n)}function Ke(t,e){return t.a.get(e)}function Ge(t){return t instanceof qe?new qe(t):new qe(t,void 0)}function Qe(t,e){var n=new qe(null,void 0);return Ve(n,"https"),t&&(n.b=t),e&&(n.g=e),n}function Ye(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Xe(t,e,n){return i(t)?(t=encodeURI(t).replace(e,$e),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function $e(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}qe.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Xe(e,Je,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.m)&&t.push(Xe(e,Je,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(Xe(n,"/"==n.charAt(0)?tn:Ze,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Xe(n,nn)),t.join("")};var Je=/[#\/\?@]/g,Ze=/[#\?:]/g,tn=/[#\?]/g,en=/[#\?@]/g,nn=/#/g;function rn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function on(t){t.a||(t.a=new Fe,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function an(t){var e=Le(t);if(void 0===e)throw Error("Keys are undefined");var n=new rn(null,void 0);t=Me(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];c(o)?cn(n,i,o):n.add(i,o)}return n}function sn(t,e){on(t),e=ln(t,e),je(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,je((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ue(t)))}function un(t,e){return on(t),e=ln(t,e),je(t.a.b,e)}function cn(t,e,n){sn(t,e),0<n.length&&(t.c=null,t.a.set(ln(t,e),B(n)),t.b+=n.length)}function ln(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(t=rn.prototype).add=function(t,e){on(this),this.c=null,t=ln(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},t.clear=function(){this.a=this.c=null,this.b=0},t.forEach=function(t,e){on(this),this.a.forEach(function(n,r){R(n,function(n){t.call(e,n,r,this)},this)},this)},t.U=function(){on(this);for(var t=this.a.S(),e=this.a.U(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},t.S=function(t){on(this);var e=[];if(i(t))un(this,t)&&(e=j(e,this.a.get(ln(this,t))));else{t=this.a.S();for(var n=0;n<t.length;n++)e=j(e,t[n])}return e},t.set=function(t,e){return on(this),this.c=null,un(this,t=ln(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},t.get=function(t,e){return 0<(t=t?this.S(t):[]).length?String(t[0]):e},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.U(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.S(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var fn=!Wt||9<=Number(Jt);function hn(){this.a="",this.b=dn}function pn(t){return t instanceof hn&&t.constructor===hn&&t.b===dn?t.a:(x("expected object of type Const, got '"+t+"'"),"type_error:Const")}hn.prototype.ma=!0,hn.prototype.la=function(){return this.a},hn.prototype.toString=function(){return"Const{"+this.a+"}"};var dn={};function vn(t){var e=new hn;return e.a=t,e}function mn(){this.a="",this.b=wn}function yn(t){return t instanceof mn&&t.constructor===mn&&t.b===wn?t.a:(x("expected object of type TrustedResourceUrl, got '"+t+"' of type "+s(t)),"type_error:TrustedResourceUrl")}function gn(t,e){var n=pn(t);if(!_n.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=new mn;return e.a=t,e}(t=n.replace(bn,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof hn?pn(t):encodeURIComponent(String(t))}))}vn(""),mn.prototype.ma=!0,mn.prototype.la=function(){return this.a},mn.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var bn=/%{(\w+)}/g,_n=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,wn={};function En(){this.a="",this.b=Sn}function Tn(t){return t instanceof En&&t.constructor===En&&t.b===Sn?t.a:(x("expected object of type SafeUrl, got '"+t+"' of type "+s(t)),"type_error:SafeUrl")}En.prototype.ma=!0,En.prototype.la=function(){return this.a},En.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Cn=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function xn(t){return t instanceof En?t:(t=t.ma?t.la():String(t),Cn.test(t)||(t="about:invalid#zClosurez"),kn(t))}var Sn={};function kn(t){var e=new En;return e.a=t,e}function Nn(){this.a="",this.b=An}kn("about:blank"),Nn.prototype.ma=!0,Nn.prototype.la=function(){return this.a},Nn.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var An={};function In(t){var e=new Nn;return e.a=t,e}function On(t){var e=document;return i(t)?e.getElementById(t):t}function Pn(t,e){rt(e,function(e,n){e&&e.ma&&(e=e.la()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Rn.hasOwnProperty(n)?t.setAttribute(Rn[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}In("<!DOCTYPE html>"),In(""),In("<br>");var Rn={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Dn(t,e,n){var r=arguments,o=document,a=String(r[0]),s=r[1];if(!fn&&s&&(s.name||s.type)){if(a=["<",a],s.name&&a.push(' name="',W(s.name),'"'),s.type){a.push(' type="',W(s.type),'"');var u={};ct(u,s),delete u.type,s=u}a.push(">"),a=a.join("")}return a=o.createElement(a),s&&(i(s)?a.className=s:c(s)?a.className=s.join(" "):Pn(a,s)),2<r.length&&function(t,e,n){function r(n){n&&e.appendChild(i(n)?t.createTextNode(n):n)}for(var o=2;o<n.length;o++){var a=n[o];!l(a)||h(a)&&0<a.nodeType?r(a):R(Mn(a)?B(a):a,r)}}(o,a,r),a}function Mn(t){if(t&&"number"==typeof t.length){if(h(t))return"function"==typeof t.item||"string"==typeof t.item;if(f(t))return"function"==typeof t.item}return!1}function Ln(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(c(n)){var i=n;n=i.length,r.push("[");for(var o="",a=0;a<n;a++)r.push(o),t(e,i[a],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&&("function"!=typeof(a=n[i])&&(r.push(o),jn(i,r),r.push(":"),t(e,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":jn(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new function(){},t,e),e.join("")}var Fn={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Un=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function jn(t,e){e.push('"',t.replace(Un,function(t){var e=Fn[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Fn[t]=e),e}),'"')}function Bn(){var t=ir();return Wt&&!!Jt&&11==Jt||/Edge\/\d+/.test(t)}function qn(){return n.window&&n.window.location.href||self&&self.location&&self.location.href||""}function Vn(t,e){e=e||n.window;var r="about:blank";t&&(r=Tn(xn(t))),e.location.href=r}function Wn(t){return!!((t=(t||ir()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function Hn(t){t=t||n.window;try{t.close()}catch(t){}}function zn(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=ir().toLowerCase(),r&&(e.target=r,J(n,"crios/")&&(e.target="_blank")),er(ir())==Zn&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof En?n:xn(void 0!==n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((nt("iPhone")&&!nt("iPod")&&!nt("iPad")||nt("iPad")||nt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(a=r.document.createElement("A"),e instanceof En||e instanceof En||(e=e.ma?e.la():String(e),Cn.test(e)||(e="about:invalid#zClosurez"),e=kn(e)),a.href=Tn(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Tn(e),a&&(zt&&J(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,vn("b/12014412, meta tag with sanitized URL"),t=In(t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+W(t)+'">'),a.document.write(function(t){return t instanceof Nn&&t.constructor===Nn&&t.b===An?t.a:(x("expected object of type SafeHtml, got '"+t+"' of type "+s(t)),"type_error:SafeHtml")}(t)),a.document.close())):(a=r.open(Tn(e),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var Kn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;function Gn(){var t=null;return new vt(function(e){"complete"==n.document.readyState?e():(t=function(){e()},be(window,"load",t))}).s(function(e){throw _e(window,"load",t),e})}function Qn(t){return t=t||ir(),!("file:"!==cr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Yn(){var t=n.window;try{return!(!t||t==t.top)}catch(t){return!1}}function Xn(){return"object"!=typeof n.window&&"function"==typeof n.importScripts}function $n(){return r.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.a.INTERNAL.hasOwnProperty("node")?"Node":Xn()?"Worker":"Browser"}function Jn(){var t=$n();return"ReactNative"===t||"Node"===t}var Zn="Firefox",tr="Chrome";function er(t){var e=t.toLowerCase();return J(e,"opera/")||J(e,"opr/")||J(e,"opios/")?"Opera":J(e,"iemobile")?"IEMobile":J(e,"msie")||J(e,"trident/")?"IE":J(e,"edge/")?"Edge":J(e,"firefox/")?Zn:J(e,"silk/")?"Silk":J(e,"blackberry")?"Blackberry":J(e,"webos")?"Webos":!J(e,"safari/")||J(e,"chrome/")||J(e,"crios/")||J(e,"android")?!J(e,"chrome/")&&!J(e,"crios/")||J(e,"edge/")?J(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":tr:"Safari"}var nr={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};function rr(t,e){e=e||[];var n,r=[],i={};for(n in nr)i[nr[n]]=!0;for(n=0;n<e.length;n++)void 0!==i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=$n())?r=er(i=ir()):"Worker"===r&&(r=er(i=ir())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function ir(){return n.navigator&&n.navigator.userAgent||""}function or(t,e){t=t.split("."),e=e||n;for(var r=0;r<t.length&&"object"==typeof e&&null!=e;r++)e=e[t[r]];return r!=t.length&&(e=void 0),e}function ar(){try{var t=n.localStorage,e=dr();if(t)return t.setItem(e,"1"),t.removeItem(e),!Bn()||!!n.indexedDB}catch(t){return Xn()&&!!n.indexedDB}return!1}function sr(){return(ur()||"chrome-extension:"===cr()||Qn())&&!Jn()&&ar()&&!Xn()}function ur(){return"http:"===cr()||"https:"===cr()}function cr(){return n.location&&n.location.protocol||null}function lr(t){return!Wn(t=t||ir())&&er(t)!=Zn}function fr(t){return void 0===t?null:Ln(t)}function hr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function pr(t){if(null!==t)return JSON.parse(t)}function dr(t){return t||Math.floor(1e9*Math.random()).toString()}function vr(t){return"Safari"!=er(t=t||ir())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function mr(){var t=n.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var r=0;r<t.CP.length;r++)t.CP[r]=null}function yr(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=ir(),e=$n(),this.b=Wn(t)||"ReactNative"===e}function gr(){var t=n.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function br(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function _r(){return!(!or("fireauth.oauthhelper",n)&&!or("fireauth.iframe",n))}yr.prototype.get=function(){var t=n.navigator;return!t||"boolean"!=typeof t.onLine||!ur()&&"chrome-extension:"!==cr()&&void 0===t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var wr,Er={};function Tr(t){Er[t]||(Er[t]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t))}try{var Cr={};Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:2}),wr=2==Cr.abcd}catch(qt){wr=!1}function xr(t,e,n){wr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Sr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&xr(t,n,e[n])}function kr(t){var e={};return Sr(e,t),e}function Nr(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)xr(e,n,Nr(t[n]));return e}var Ar="EMAIL_SIGNIN",Ir="email",Or="newEmail",Pr="requestType",Rr="email",Dr="fromEmail",Mr="data",Lr="operation";function Fr(t,e){this.code=jr+t,this.message=e||Br[t]||""}function Ur(t){var e=t&&t.code;return e?new Fr(e.substring(jr.length),t.message):null}_(Fr,Error),Fr.prototype.D=function(){return{code:this.code,message:this.message}},Fr.prototype.toJSON=function(){return this.D()};var jr="auth/",Br={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."};function qr(t){var e=t[zr];if(void 0===e)throw new Fr("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&&!e.length)throw new Fr("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Vr];if(n&&"object"==typeof n){e=n[Qr];var r=n[Kr];if(n=n[Gr],"string"==typeof e&&e.length){if(this.a=e,void 0!==r&&"boolean"!=typeof r)throw new Fr("argument-error",Kr+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new Fr("argument-error",Gr+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==e)throw new Fr("argument-error",Qr+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new Fr("missing-android-pkg-name")}}else if(void 0!==n)throw new Fr("argument-error",Vr+" property must be a non null object when specified.");if(this.f=null,(e=t[Hr])&&"object"==typeof e){if("string"==typeof(e=e[Yr])&&e.length)this.f=e;else if(void 0!==e)throw new Fr("argument-error",Yr+" property must be a non empty string when specified.")}else if(void 0!==e)throw new Fr("argument-error",Hr+" property must be a non null object when specified.");if(void 0!==(t=t[Wr])&&"boolean"!=typeof t)throw new Fr("argument-error",Wr+" property must be a boolean when specified.");this.c=!!t}var Vr="android",Wr="handleCodeInApp",Hr="iOS",zr="url",Kr="installApp",Gr="minimumVersion",Qr="packageName",Yr="bundleId";function Xr(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e)null===e[n]&&delete e[n];return e}var $r=null,Jr=null;function Zr(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Jr[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!$r){$r={},Jr={};for(var t=0;65>t;t++)$r[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Jr[$r[t]]=t,62<=t&&(Jr["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,function(t){e+=String.fromCharCode(t)}),e}function ti(t){this.c=t.sub,b(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function ei(t){return(t=ni(t))&&t.sub&&t.iss&&t.aud&&t.exp?new ti(t):null}function ni(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(Zr(t))}catch(t){}return null}ti.prototype.f=function(){return this.b};var ri="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),ii=["client_id","response_type","scope","redirect_uri","state"],oi={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:ii},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:ii},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:ii},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ri}};function ai(t){for(var e in oi)if(oi[e].Na==t)return oi[e];return null}function si(t){var e={};e["facebook.com"]=hi,e["google.com"]=di,e["github.com"]=pi,e["twitter.com"]=vi;var n=t&&t[ci];try{if(n)return e[n]?new e[n](t):new fi(t);if(void 0!==t[ui])return new li(t)}catch(t){}return null}var ui="idToken",ci="providerId";function li(t){var e=t[ci];if(!e&&t[ui]){var n=ei(t[ui]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,void 0!==t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),xr(this,"providerId",e),xr(this,"isNewUser",n)}function fi(t){li.call(this,t),xr(this,"profile",Nr((t=pr(t.rawUserInfo||"{}"))||{}))}function hi(t){if(fi.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function pi(t){if(fi.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",this.profile&&this.profile.login||null)}function di(t){if(fi.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function vi(t){if(fi.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",t.screenName||null)}function mi(t){var e=Ge(t),n=Ke(e,"link"),r=Ke(Ge(n),"link");return Ke(Ge(e=Ke(e,"deep_link_id")),"link")||e||r||n||t}function yi(t,e){return t.then(function(t){if(t[$o]){var n=ei(t[$o]);if(!n||e!=n.c)throw new Fr("user-mismatch");return t}throw new Fr("user-mismatch")}).s(function(t){throw t&&t.code&&t.code==jr+"user-not-found"?new Fr("user-mismatch"):t})}function gi(t,e,n){if(e.idToken||e.accessToken)e.idToken&&xr(this,"idToken",e.idToken),e.accessToken&&xr(this,"accessToken",e.accessToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new Fr("internal-error","failed to construct a credential");xr(this,"accessToken",e.oauthToken),xr(this,"secret",e.oauthTokenSecret)}xr(this,"providerId",t),xr(this,"signInMethod",n)}function bi(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,{postBody:an(e).toString(),requestUri:"http://localhost"}}function _i(t,e){this.Ac=e||[],Sr(this,{providerId:t,isOAuthProvider:!0}),this.vb={},this.$a=(ai(t)||{}).Ma||null,this.Ya=null}function wi(t){_i.call(this,t,ii),this.a=[]}function Ei(){wi.call(this,"facebook.com")}function Ti(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ei).credential(null,e)}function Ci(){wi.call(this,"github.com")}function xi(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ci).credential(null,e)}function Si(){wi.call(this,"google.com"),this.ta("profile")}function ki(t,e){var n=t;return h(t)&&(n=t.idToken,e=t.accessToken),(new Si).credential(n,e)}function Ni(){_i.call(this,"twitter.com",ri)}function Ai(t,e){var n=t;if(h(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new Fr("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new gi("twitter.com",n,"twitter.com")}function Ii(t,e,n){this.a=t,this.b=e,xr(this,"providerId","password"),xr(this,"signInMethod",n===Oi.EMAIL_LINK_SIGN_IN_METHOD?Oi.EMAIL_LINK_SIGN_IN_METHOD:Oi.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Oi(){Sr(this,{providerId:"password",isOAuthProvider:!1})}function Pi(t,e){if(!(e=Ri(e)))throw new Fr("argument-error","Invalid email link!");return new Ii(t,e,Oi.EMAIL_LINK_SIGN_IN_METHOD)}function Ri(t){var e=Ke((t=new function(t){this.a=Ge(t)}(t=mi(t))).a,"oobCode")||null;return"signIn"===(Ke(t.a,"mode")||null)&&e?e:null}function Di(t){if(!(t.Sa&&t.Ra||t.Fa&&t.$))throw new Fr("internal-error");this.a=t,xr(this,"providerId","phone"),xr(this,"signInMethod","phone")}function Mi(t){return t.a.Fa&&t.a.$?{temporaryProof:t.a.Fa,phoneNumber:t.a.$}:{sessionInfo:t.a.Sa,code:t.a.Ra}}function Li(t){try{this.a=t||r.a.auth()}catch(t){throw new Fr("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Sr(this,{providerId:"phone",isOAuthProvider:!1})}function Fi(t,e){if(!t)throw new Fr("missing-verification-id");if(!e)throw new Fr("missing-verification-code");return new Di({Sa:t,Ra:e})}function Ui(t){if(t.temporaryProof&&t.phoneNumber)return new Di({Fa:t.temporaryProof,$:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret;t=t&&t.oauthIdToken;try{switch(e){case"google.com":return ki(t,n);case"facebook.com":return Ti(n);case"github.com":return xi(n);case"twitter.com":return Ai(n,r);default:return new wi(e).credential(t,n)}}catch(t){return null}}function ji(t){if(!t.isOAuthProvider)throw new Fr("invalid-oauth-provider")}function Bi(t,e,n,r,i){if(this.b=t,this.c=e||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new Fr("invalid-auth-event");if(this.f&&this.a)throw new Fr("invalid-auth-event");if(this.f&&!this.g)throw new Fr("invalid-auth-event")}function qi(t){return(t=t||{}).type?new Bi(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&Ur(t.error)):null}function Vi(){this.b=null,this.a=[]}_(fi,li),_(hi,fi),_(pi,fi),_(di,fi),_(vi,fi),gi.prototype.ya=function(t){return da(t,bi(this))},gi.prototype.c=function(t,e){var n=bi(this);return n.idToken=e,va(t,n)},gi.prototype.f=function(t,e){return yi(ma(t,bi(this)),e)},gi.prototype.D=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},_i.prototype.Da=function(t){return this.vb=ot(t),this},_(wi,_i),wi.prototype.ta=function(t){return L(this.a,t)||this.a.push(t),this},wi.prototype.Ab=function(){return B(this.a)},wi.prototype.credential=function(t,e){if(!t&&!e)throw new Fr("argument-error","credential failed: must provide the ID token and/or the access token.");return new gi(this.providerId,{idToken:t||null,accessToken:e||null},this.providerId)},_(Ei,wi),xr(Ei,"PROVIDER_ID","facebook.com"),xr(Ei,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),_(Ci,wi),xr(Ci,"PROVIDER_ID","github.com"),xr(Ci,"GITHUB_SIGN_IN_METHOD","github.com"),_(Si,wi),xr(Si,"PROVIDER_ID","google.com"),xr(Si,"GOOGLE_SIGN_IN_METHOD","google.com"),_(Ni,_i),xr(Ni,"PROVIDER_ID","twitter.com"),xr(Ni,"TWITTER_SIGN_IN_METHOD","twitter.com"),Ii.prototype.ya=function(t){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,Ca,{email:this.a,oobCode:this.b}):za(t,qa,{email:this.a,password:this.b})},Ii.prototype.c=function(t,e){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,xa,{idToken:e,email:this.a,oobCode:this.b}):za(t,Ma,{idToken:e,email:this.a,password:this.b})},Ii.prototype.f=function(t,e){return yi(this.ya(t),e)},Ii.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},Sr(Oi,{PROVIDER_ID:"password"}),Sr(Oi,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Sr(Oi,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Di.prototype.ya=function(t){return t.Ta(Mi(this))},Di.prototype.c=function(t,e){var n=Mi(this);return n.idToken=e,za(t,Wa,n)},Di.prototype.f=function(t,e){var n=Mi(this);return n.operation="REAUTH",yi(t=za(t,Ha,n),e)},Di.prototype.D=function(){var t={providerId:"phone"};return this.a.Sa&&(t.verificationId=this.a.Sa),this.a.Ra&&(t.verificationCode=this.a.Ra),this.a.Fa&&(t.temporaryProof=this.a.Fa),this.a.$&&(t.phoneNumber=this.a.$),t},Li.prototype.Ta=function(t,e){var n=this.a.b;return Et(e.verify()).then(function(r){if(!i(r))throw new Fr("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":return function(t,e){return za(t,Ra,e)}(n,{phoneNumber:t,recaptchaToken:r}).then(function(t){return"function"==typeof e.reset&&e.reset(),t},function(t){throw"function"==typeof e.reset&&e.reset(),t});default:throw new Fr("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Sr(Li,{PROVIDER_ID:"phone"}),Sr(Li,{PHONE_SIGN_IN_METHOD:"phone"}),Bi.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var Wi=null;function Hi(t){var e="unauthorized-domain",n=void 0,r=Ge(t);t=r.b,"chrome-extension"==(r=r.c)?n=q("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=q("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",Fr.call(this,e,n)}function zi(t,e,n){Fr.call(this,t,n),(t=e||{}).wb&&xr(this,"email",t.wb),t.$&&xr(this,"phoneNumber",t.$),t.credential&&xr(this,"credential",t.credential)}function Ki(t){if(t.code){var e=t.code||"";0==e.indexOf(jr)&&(e=e.substring(jr.length));var n={credential:Ui(t)};if(t.email)n.wb=t.email;else{if(!t.phoneNumber)return new Fr(e,t.message||void 0);n.$=t.phoneNumber}return new zi(e,n,t.message)}return null}Vi.prototype.subscribe=function(t){var e=this;this.a.push(t),this.b||(this.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"==typeof(t=or("universalLinks.subscribe",n))&&t(null,this.b))},Vi.prototype.unsubscribe=function(t){U(this.a,function(e){return e==t})},_(Hi,Fr),_(zi,Fr),zi.prototype.D=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var e=this.credential&&this.credential.D();return e&&ct(t,e),t},zi.prototype.toJSON=function(){return this.D()};var Gi,Qi=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function Yi(){}function Xi(t){return t.c||(t.c=t.b())}function $i(){}function Ji(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Zi(){}function to(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=y(this.bc,this),this.a.onerror=y(this.Bb,this),this.a.onprogress=y(this.cc,this),this.a.ontimeout=y(this.fc,this)}function eo(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function no(t,e,n){this.reset(t,e,n,void 0,void 0)}Yi.prototype.c=null,_($i,Yi),$i.prototype.a=function(){var t=Ji(this);return t?new ActiveXObject(t):new XMLHttpRequest},$i.prototype.b=function(){var t={};return Ji(this)&&(t[0]=!0,t[1]=!0),t},Gi=new $i,_(Zi,Yi),Zi.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new to;throw Error("Unsupported browser")},Zi.prototype.b=function(){return{}},(t=to.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},t.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},t.bc=function(){this.status=200,this.responseText=this.a.responseText,eo(this,4)},t.Bb=function(){this.status=500,this.responseText="",eo(this,4)},t.fc=function(){this.Bb()},t.cc=function(){this.status=200,eo(this,1)},t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},no.prototype.a=null;function ro(t){this.f=t,this.b=this.c=this.a=null}function io(t,e){this.name=t,this.value=e}no.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||b(),delete this.a},io.prototype.toString=function(){return this.name};var oo=new io("SEVERE",1e3),ao=new io("WARNING",900),so=new io("CONFIG",700),uo=new io("FINE",500);ro.prototype.log=function(t,e,n){if(t.value>=function t(e){return e.c?e.c:e.a?t(e.a):(x("Root logger has no level set."),null)}(this).value)for(f(e)&&(e=e()),t=new no(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var co={},lo=null;function fo(t){var e;if(lo||(lo=new ro(""),co[""]=lo,lo.c=so),!(e=co[t])){e=new ro(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=fo(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,co[t]=e}return e}function ho(t,e){t&&t.log(uo,e,void 0)}function po(t){this.f=t}function vo(t){Ae.call(this),this.i=t,this.readyState=mo,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=fo("goog.net.FetchXmlHttp")}_(po,Yi),po.prototype.a=function(){return new vo(this.f)},po.prototype.b=function(t){return function(){return t}}({}),_(vo,Ae);var mo=0;function yo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function go(t){Ae.call(this),this.headers=new Fe,this.C=t||null,this.c=!1,this.w=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.i=this.G=!1,this.g=0,this.u=null,this.o=bo,this.v=this.O=!1}(t=vo.prototype).open=function(t,e){if(this.readyState!=mo)throw this.abort(),Error("Error reopening a connection");this.h=t,this.c=e,this.readyState=1,yo(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.g,method:this.h,credentials:void 0,cache:void 0};t&&(e.body=t),this.i.fetch(new Request(this.c,e)).then(this.ec.bind(this),this.Cb.bind(this))},t.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,yo(this)),this.readyState=mo},t.ec=function(t){this.a&&(this.b||(this.b=t.headers,this.readyState=2,yo(this)),this.a&&(this.readyState=3,yo(this),this.a&&t.text().then(this.dc.bind(this,t),this.Cb.bind(this))))},t.dc=function(t,e){this.a&&(this.status=t.status,this.statusText=t.statusText,this.responseText=e,this.readyState=4,yo(this))},t.Cb=function(t){var e=this.f;e&&e.log(ao,"Failed to fetch url "+this.c,t instanceof Error?t:Error(t)),this.a&&(this.readyState=4,yo(this))},t.setRequestHeader=function(t,e){this.g.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.f)&&t.log(ao,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.f;return t&&t.log(ao,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},_(go,Ae);var bo="";go.prototype.b=fo("goog.net.XhrIo");var _o=/^https?$/i,wo=["POST","PUT"];function Eo(t,e,r,o,a){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);r=r?r.toUpperCase():"GET",t.l=e,t.h="",t.N=r,t.G=!1,t.c=!0,t.a=t.C?t.C.a():Gi.a(),t.w=t.C?Xi(t.C):Xi(Gi),t.a.onreadystatechange=y(t.Fb,t);try{ho(t.b,Oo(t,"Opening Xhr")),t.I=!0,t.a.open(r,String(e),!0),t.I=!1}catch(e){return ho(t.b,Oo(t,"Error opening Xhr: "+e.message)),void Co(t,e)}e=o||"";var s=new Fe(t.headers);a&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||i(t))R(t,e,void 0);else for(var n=Le(t),r=Me(t),o=r.length,a=0;a<o;a++)e.call(void 0,r[a],n&&n[a],t)}(a,function(t,e){s.set(e,t)}),a=function(t){t:{for(var e=To,n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t)){e=o;break t}e=-1}return 0>e?null:i(t)?t.charAt(e):t[e]}(s.U()),o=n.FormData&&e instanceof n.FormData,!L(wo,r)||a||o||s.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),s.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.o&&(t.a.responseType=t.o),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{No(t),0<t.g&&(t.v=function(t){return Wt&&te(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(t.a),ho(t.b,Oo(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=y(t.Ga,t)):t.u=Re(t.Ga,t.g,t)),ho(t.b,Oo(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(e){ho(t.b,Oo(t,"Send error: "+e.message)),Co(t,e)}}function To(t){return"content-type"==t.toLowerCase()}function Co(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,xo(t),ko(t)}function xo(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function So(t){if(t.c&&void 0!==e)if(t.w[1]&&4==Ao(t)&&2==Io(t))ho(t.b,Oo(t,"Local request error detected and ignored"));else if(t.i&&4==Ao(t))Re(t.Fb,0,t);else if(t.dispatchEvent("readystatechange"),4==Ao(t)){ho(t.b,Oo(t,"Request complete")),t.c=!1;try{var r,i=Io(t);t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break t;default:o=!1}if(!(r=o)){var a;if(a=0===i){var s=String(t.l).match(Be)[1]||null;if(!s&&n.self&&n.self.location){var u=n.self.location.protocol;s=u.substr(0,u.length-1)}a=!_o.test(s?s.toLowerCase():"")}r=a}if(r)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<Ao(t)?t.a.statusText:""}catch(e){ho(t.b,"Can not get status: "+e.message),c=""}t.h=c+" ["+Io(t)+"]",xo(t)}}finally{ko(t)}}}function ko(t,e){if(t.a){No(t);var n=t.a,r=t.w[0]?a:null;t.a=null,t.w=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(oo,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function No(t){t.a&&t.v&&(t.a.ontimeout=null),t.u&&(n.clearTimeout(t.u),t.u=null)}function Ao(t){return t.a?t.a.readyState:0}function Io(t){try{return 2<Ao(t)?t.a.status:-1}catch(t){return-1}}function Oo(t,e){return e+" ["+t.N+" "+t.l+" "+Io(t)+"]"}function Po(t,e){this.g=[],this.v=t,this.u=e||null,this.f=this.a=!1,this.c=void 0,this.l=this.w=this.i=!1,this.h=0,this.b=null,this.m=0}function Ro(t,e,n){t.a=!0,t.c=n,t.f=!e,Fo(t)}function Do(t){if(t.a){if(!t.l)throw new Uo(t);t.l=!1}}function Mo(t,e,n,r){t.g.push([e,n,r]),t.a&&Fo(t)}function Lo(t){return M(t.g,function(t){return f(t[1])})}function Fo(t){if(t.h&&t.a&&Lo(t)){var e=t.h,r=qo[e];r&&(n.clearTimeout(r.a),delete qo[e]),t.h=0}t.b&&(t.b.m--,delete t.b),e=t.c;for(var i=r=!1;t.g.length&&!t.i;){var o=t.g.shift(),a=o[0],s=o[1];if(o=o[2],a=t.f?s:a)try{var u=a.call(o||t.u,e);void 0!==u&&(t.f=t.f&&(u==e||u instanceof Error),t.c=e=u),(E(e)||"function"==typeof n.Promise&&e instanceof n.Promise)&&(i=!0,t.i=!0)}catch(n){e=n,t.f=!0,Lo(t)||(r=!0)}}t.c=e,i&&(u=y(t.o,t,!0),i=y(t.o,t,!1),e instanceof Po?(Mo(e,u,i),e.w=!0):e.then(u,i)),r&&(e=new Bo(e),qo[e.a]=e,t.h=e.a)}function Uo(){T.call(this)}function jo(){T.call(this)}function Bo(t){this.a=n.setTimeout(y(this.c,this),0),this.b=t}(t=go.prototype).Ga=function(){void 0!==e&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",ho(this.b,Oo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(){this.a&&this.c&&(ho(this.b,Oo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ko(this))},t.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),ko(this,!0)),go.lb.ua.call(this)},t.Fb=function(){this.pa||(this.I||this.i||this.f?So(this):this.tc())},t.tc=function(){So(this)},t.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case bo:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(oo,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(t){return ho(this.b,"Can not get response: "+t.message),null}},Po.prototype.cancel=function(t){if(this.a)this.c instanceof Po&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.m--,0>=e.m&&e.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(t=new jo(this),Do(this),Ro(this,!1,t))}},Po.prototype.o=function(t,e){this.i=!1,Ro(this,t,e)},Po.prototype.C=function(){Do(this),Ro(this,!0,null)},Po.prototype.then=function(t,e,n){var r,i,o=new vt(function(t,e){r=t,i=e});return Mo(this,r,function(t){t instanceof jo?o.cancel():i(t)}),o.then(t,e,n)},w(Po),_(Uo,T),Uo.prototype.message="Deferred has already fired",Uo.prototype.name="AlreadyCalledError",_(jo,T),jo.prototype.message="Deferred was canceled",jo.prototype.name="CanceledError",Bo.prototype.c=function(){throw delete qo[this.a],this.b};var qo={};function Vo(t){var e={},n=e.document||document,r=yn(t),i=document.createElement("SCRIPT"),o={Hb:i,Ga:void 0},a=new Po(Wo,o),s=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){Ho(i,!0);var t=new Go(Ko,"Timeout reached for loading script "+r);Do(a),Ro(a,!1,t)},u),o.Ga=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ho(i,e.dd||!1,s),a.C())},i.onerror=function(){Ho(i,!0,s);var t=new Go(zo,"Error while loading script "+r);Do(a),Ro(a,!1,t)},ct(o=e.attributes||{},{type:"text/javascript",charset:"UTF-8"}),Pn(i,o),i.src=yn(t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Wo(){if(this&&this.Hb){var t=this.Hb;t&&"SCRIPT"==t.tagName&&Ho(t,!0,this.Ga)}}function Ho(t,e,r){null!=r&&n.clearTimeout(r),t.onload=a,t.onerror=a,t.onreadystatechange=a,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}var zo=0,Ko=1;function Go(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),T.call(this,n),this.code=t}function Qo(t){this.f=t}function Yo(t,e,i){if(this.b=t,t=e||{},this.i=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||Jo,this.f=ot(t.secureTokenHeaders||Zo),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||ta,this.a=ot(t.firebaseHeaders||ea),i&&(this.a["X-Client-Version"]=i,this.f["X-Client-Version"]=i),i="Node"==$n(),!(i=n.XMLHttpRequest||i&&r.a.INTERNAL.node&&r.a.INTERNAL.node.XMLHttpRequest)&&!Xn())throw new Fr("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,Xn()?this.c=new po(self):Jn()?this.c=new Qo(i):this.c=new Zi}_(Go,T),_(Qo,Yi),Qo.prototype.a=function(){return new this.f},Qo.prototype.b=function(){return{}};var Xo,$o="idToken",Jo=new yr(3e4,6e4),Zo={"Content-Type":"application/x-www-form-urlencoded"},ta=new yr(3e4,6e4),ea={"Content-Type":"application/json"};function na(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function ra(t,e){e?(t.a["X-Client-Version"]=e,t.f["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.f["X-Client-Version"])}function ia(t,e,r,i,o,a,s){(function(){var t=ir();return!((t=er(t)!=tr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t||Wt&&Jt&&!(9<Jt))})()||Xn()?t=y(t.o,t):(Xo||(Xo=new vt(function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{n[aa]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};var r=gn(oa,{onload:aa});!function(t,e){Mo(t,null,e,void 0)}(Vo(r),function(){e(Error("CORS_UNSUPPORTED"))})}}(t,e)})),t=y(t.l,t)),t(e,r,i,o,a,s)}Yo.prototype.o=function(t,e,r,i,o,a){if(Xn()&&(void 0===n.fetch||void 0===n.Headers||void 0===n.Request))throw new Fr("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var s=new go(this.c);if(a){s.g=Math.max(0,a);var u=setTimeout(function(){s.dispatchEvent("timeout")},a)}Ie(s,"complete",function(){u&&clearTimeout(u);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ho(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(e){t=null}e&&e(t)}),Oe(s,"ready",function(){u&&clearTimeout(u),Ut(this)}),Oe(s,"timeout",function(){u&&clearTimeout(u),Ut(this),e&&e(null)}),Eo(s,t,r,i,o)};var oa=vn("https://apis.google.com/js/client.js?onload=%{onload}"),aa="__fcb"+Math.floor(1e6*Math.random()).toString();function sa(t){if(!Qi.test(t.email))throw new Fr("invalid-email")}function ua(t){"email"in t&&sa(t)}function ca(t){if(!t[$o])throw new Fr("internal-error")}function la(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new Fr("internal-error")}else{if(!t.sessionInfo)throw new Fr("missing-verification-id");if(!t.code)throw new Fr("missing-verification-code")}}Yo.prototype.l=function(t,e,n,r,i){var o=this;Xo.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})}).s(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})},Yo.prototype.Pa=function(){return za(this,La,{})},Yo.prototype.mb=function(t,e){return za(this,Da,{idToken:t,email:e})},Yo.prototype.nb=function(t,e){return za(this,Ma,{idToken:t,password:e})};var fa={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ha(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new Fr("internal-error")}function pa(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Ki(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Ki(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Ki(t)):t.errorMessage&&(e=Ka(t.errorMessage)),e)throw e;if(!t[$o])throw new Fr("internal-error")}function da(t,e){return e.returnIdpCredential=!0,za(t,Fa,e)}function va(t,e){return e.returnIdpCredential=!0,za(t,ja,e)}function ma(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,za(t,Ua,e)}function ya(t){if(!t.oobCode)throw new Fr("invalid-action-code")}(t=Yo.prototype).ob=function(t,e){var n={idToken:t},r=[];return rt(fa,function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),za(this,Da,n)},t.hb=function(t,e){return ct(t={requestType:"PASSWORD_RESET",email:t},e),za(this,Aa,t)},t.ib=function(t,e){return ct(t={requestType:"EMAIL_SIGNIN",email:t},e),za(this,ka,t)},t.gb=function(t,e){return ct(t={requestType:"VERIFY_EMAIL",idToken:t},e),za(this,Na,t)},t.Ta=function(t){return za(this,Va,t)},t.Xa=function(t,e){return za(this,Pa,{oobCode:t,newPassword:e})},t.Ja=function(t){return za(this,ba,{oobCode:t})},t.Va=function(t){return za(this,ga,{oobCode:t})};var ga={endpoint:"setAccountInfo",B:ya,da:"email"},ba={endpoint:"resetPassword",B:ya,J:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e)throw new Fr("internal-error")}},_a={endpoint:"signupNewUser",B:function(t){if(sa(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},wa={endpoint:"createAuthUri"},Ea={endpoint:"deleteAccount",T:["idToken"]},Ta={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(t){if(!c(t.deleteProvider))throw new Fr("internal-error")}},Ca={endpoint:"emailLinkSignin",T:["email","oobCode"],B:sa,J:ca,R:!0},xa={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:sa,J:ca,R:!0},Sa={endpoint:"getAccountInfo"},ka={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Na={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new Fr("internal-error")},da:"email"},Aa={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("PASSWORD_RESET"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Ia={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},Oa={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(t){if(!t.recaptchaSiteKey)throw new Fr("internal-error")}},Pa={endpoint:"resetPassword",B:ya,da:"email"},Ra={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},Da={endpoint:"setAccountInfo",T:["idToken"],B:ua,R:!0},Ma={endpoint:"setAccountInfo",T:["idToken"],B:function(t){if(ua(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},La={endpoint:"signupNewUser",J:ca,R:!0},Fa={endpoint:"verifyAssertion",B:ha,J:pa,R:!0},Ua={endpoint:"verifyAssertion",B:ha,J:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new Fr("user-not-found");if(t.errorMessage)throw Ka(t.errorMessage);if(!t[$o])throw new Fr("internal-error")},R:!0},ja={endpoint:"verifyAssertion",B:function(t){if(ha(t),!t.idToken)throw new Fr("internal-error")},J:pa,R:!0},Ba={endpoint:"verifyCustomToken",B:function(t){if(!t.token)throw new Fr("invalid-custom-token")},J:ca,R:!0},qa={endpoint:"verifyPassword",B:function(t){if(sa(t),!t.password)throw new Fr("wrong-password")},J:ca,R:!0},Va={endpoint:"verifyPhoneNumber",B:la,J:ca},Wa={endpoint:"verifyPhoneNumber",B:function(t){if(!t.idToken)throw new Fr("internal-error");la(t)},J:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Ki(t);ca(t)}},Ha={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:la,J:ca};function za(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.T))return Tt(new Fr("internal-error"));var r,i=e.Eb||"POST";return Et(n).then(e.B).then(function(){return e.R&&(n.returnSecureToken=!0),function(t,e,n,r,i,o){var a=Ge(t.g+e);ze(a,"key",t.b),o&&ze(a,"cb",b().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&ze(a,u,r[u]);return new vt(function(e,o){ia(t,a.toString(),function(t){t?t.error?o(Ga(t,i||{})):e(t):o(new Fr("network-request-failed"))},n,s?void 0:Ln(hr(r)),t.a,t.h.get())})}(t,e.endpoint,i,n,e.Tb,e.rb||!1)}).then(function(t){return r=t}).then(e.J).then(function(){if(!e.da)return r;if(!(e.da in r))throw new Fr("internal-error");return r[e.da]})}function Ka(t){return Ga({error:{errors:[{message:t}],code:400,message:t}})}function Ga(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new Fr(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",ct(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new Fr(r[i],e);return!e&&t&&(e=fr(t)),new Fr("internal-error",e)}var Qa,Ya={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};function Xa(t){for(var e in Ya)if(Ya[e].id===t)return{firebaseEndpoint:(t=Ya[e]).Za,secureTokenEndpoint:t.fb};return null}function $a(t){this.b=t,this.a=null,this.bb=function(t){return(ns||(ns=new vt(function(t,e){function r(){mr(),or("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){mr(),e(Error("Network Error"))},timeout:ts.get()})}if(or("gapi.iframes.Iframe"))t();else if(or("gapi.load"))r();else{var i="__iframefcb"+Math.floor(1e6*Math.random()).toString();n[i]=function(){or("gapi.load")?r():e(Error("Network Error"))},Et(Vo(i=gn(Za,{onload:i}))).s(function(){e(Error("Network Error"))})}}).s(function(t){throw ns=null,t}))).then(function(){return new vt(function(e,n){or("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},es.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}(this)}Qa=Xa("__EID__")?"__EID__":void 0;var Ja,Za=vn("https://apis.google.com/js/api.js?onload=%{onload}"),ts=new yr(3e4,6e4),es=new yr(5e3,15e3),ns=null;function rs(t,e,n){this.i=t,this.g=e,this.h=n,this.f=null,this.a=Qe(this.i,"/__/auth/iframe"),ze(this.a,"apiKey",this.g),ze(this.a,"appName",this.h),this.b=null,this.c=[]}function is(t,e,n,r,i){this.o=t,this.l=e,this.c=n,this.m=r,this.h=this.g=this.i=null,this.a=i,this.f=null}function os(t){try{return r.a.app(t).auth().xa()}catch(t){return[]}}function as(t,e,n,r,i){this.l=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.o=this.u=this.v=null,this.g=[],this.m=this.a=null}function ss(t){var e=qn();return function(t){return za(t,Ia,{}).then(function(t){return t.authorizedDomains||[]})}(t).then(function(t){t:{var n=Ge(e),r=n.c;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Ge(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:Kn.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Hi(qn())})}function us(t){return t.m?t.m:(t.m=Gn().then(function(){if(!t.u){var e=t.c,n=t.h,r=os(t.b),i=new rs(t.l,t.f,t.b);i.f=e,i.b=n,i.c=B(r||[]),t.u=i.toString()}t.i=new $a(t.u),function(t){if(!t.i)throw Error("IfcHandler must be initialized!");!function(t,e){t.bb.then(function(){t.a.register("authEvent",e,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}(t.i,function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=qi(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Et(n)}return n.status="ERROR",Et(n)})}(t)}),t.m)}function cs(t){return t.o||(t.v=t.c?rr(t.c,os(t.b)):null,t.o=new Yo(t.f,Xa(t.h),t.v)),t.o}function ls(t,e,n,r,i,o,a,s,u,c){return(t=new is(t,e,n,r,i)).i=o,t.g=a,t.h=s,t.b=ot(u||null),t.f=c,t.toString()}function fs(t){if(this.a=t||r.a.INTERNAL.reactNative&&r.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new Fr("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function hs(){if(!vs())throw new Fr("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=n.indexedDB,this.type="indexedDB"}function ps(t){return new vt(function(e,n){var r=t.g.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(t){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new vt(function(e,n){var r=t.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}})}(t).then(function(){return ps(t)}).then(function(t){e(t)}).s(function(t){n(t)})}})}function ds(t){return t.h||(t.h=ps(t)),t.h}function vs(){try{return!!n.indexedDB}catch(t){return!1}}function ms(t){return t.objectStore("firebaseLocalStorage")}function ys(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function gs(t){return new vt(function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(Error(t.target.errorCode))}})}function bs(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Et().then(function(){if(vs()){var t=dr(),r="__sak"+t;return Ja||(Ja=new hs),(n=Ja).set(r,t).then(function(){return n.get(r)}).then(function(e){if(e!==t)throw Error("indexedDB not supported!");return n.P(r)}).then(function(){return n}).s(function(){return e.c})}return e.c}).then(function(t){return e.type=t.type,t.Y(function(t){R(e.a,function(e){e(t)})}),t})}function _s(){this.a={},this.type="inMemory"}function ws(){if(!function(){var t="Node"==$n();if(!(t=Es()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The LocalStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=Es()||r.a.INTERNAL.node.localStorage,this.type="localStorage"}function Es(){try{var t=n.localStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function Ts(){this.type="nullStorage"}function Cs(){if(!function(){var t="Node"==$n();if(!(t=xs()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The SessionStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=xs()||r.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function xs(){try{var t=n.sessionStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}rs.prototype.toString=function(){return this.f?ze(this.a,"v",this.f):sn(this.a.a,"v"),this.b?ze(this.a,"eid",this.b):sn(this.a.a,"eid"),this.c.length?ze(this.a,"fw",this.c.join(",")):sn(this.a.a,"fw"),this.a.toString()},is.prototype.toString=function(){var t=Qe(this.o,"/__/auth/handler");if(ze(t,"apiKey",this.l),ze(t,"appName",this.c),ze(t,"authType",this.m),this.a.isOAuthProvider){var e=this.a;try{var n=r.a.app(this.c).auth().ea()}catch(t){n=null}for(var i in e.Ya=n,ze(t,"providerId",this.a.providerId),n=hr((e=this.a).vb))n[i]=n[i].toString();i=e.Ac,n=ot(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}e.$a&&e.Ya&&!n[e.$a]&&(n[e.$a]=e.Ya),it(n)||ze(t,"customParameters",fr(n))}if("function"==typeof this.a.Ab&&((e=this.a.Ab()).length&&ze(t,"scopes",e.join(","))),this.i?ze(t,"redirectUrl",this.i):sn(t.a,"redirectUrl"),this.g?ze(t,"eventId",this.g):sn(t.a,"eventId"),this.h?ze(t,"v",this.h):sn(t.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Ke(t,s)&&ze(t,s,this.b[s]);return this.f?ze(t,"eid",this.f):sn(t.a,"eid"),(s=os(this.c)).length&&ze(t,"fw",s.join(",")),t.toString()},(t=as.prototype).Ea=function(t,e,n){var r=new Fr("popup-closed-by-user"),i=new Fr("web-storage-unsupported"),o=this,a=!1;return this.ga().then(function(){(function(t){var e={type:"webStorageSupport"};return us(t).then(function(){return function(t,e){return t.bb.then(function(){return new vt(function(n){t.a.send(e.type,e,n,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}(t.i,e)}).then(function(t){if(t&&t.length&&void 0!==t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})})(o).then(function(n){n||(t&&Hn(t),e(i),a=!0)})}).s(function(){}).then(function(){if(!a)return function(t){return new vt(function(e){return function n(){De(2e3).then(function(){if(t&&!t.closed)return n();e()})}()})}(t)}).then(function(){if(!a)return De(n).then(function(){e(r)})})},t.Ib=function(){var t=ir();return!lr(t)&&!vr(t)},t.Db=function(){return!1},t.zb=function(t,e,n,r,i,o,a){if(!t)return Tt(new Fr("popup-blocked"));if(a&&!lr())return this.ga().s(function(e){Hn(t),i(e)}),r(),Et();this.a||(this.a=ss(cs(this)));var s=this;return this.a.then(function(){var e=s.ga().s(function(e){throw Hn(t),i(e),e});return r(),e}).then(function(){(ji(n),a)||Vn(ls(s.l,s.f,s.b,e,n,null,o,s.c,void 0,s.h),t)}).s(function(t){throw"auth/network-request-failed"==t.code&&(s.a=null),t})},t.Ca=function(t,e,n){this.a||(this.a=ss(cs(this)));var r=this;return this.a.then(function(){ji(e),Vn(ls(r.l,r.f,r.b,t,e,qn(),n,r.c,void 0,r.h))}).s(function(t){throw"auth/network-request-failed"==t.code&&(r.a=null),t})},t.ga=function(){var t=this;return us(this).then(function(){return t.i.bb}).s(function(){throw t.a=null,new Fr("network-request-failed")})},t.Mb=function(){return!0},t.va=function(t){this.g.push(t)},t.Ka=function(t){U(this.g,function(e){return e==t})},(t=fs.prototype).get=function(t){return Et(this.a.getItem(t)).then(function(t){return t&&pr(t)})},t.set=function(t,e){return Et(this.a.setItem(t,fr(e)))},t.P=function(t){return Et(this.a.removeItem(t))},t.Y=function(){},t.ca=function(){},(t=hs.prototype).set=function(t,e){var n,r=!1,i=this;return ds(this).then(function(e){return gs((e=ms(ys(n=e,!0))).get(t))}).then(function(o){var a=ms(ys(n,!0));return o?(o.value=e,gs(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=t,o.value=e,gs(a.add(o)))}).then(function(){i.f[t]=e}).ia(function(){r&&i.b--})},t.get=function(t){return ds(this).then(function(e){return gs(ms(ys(e,!1)).get(t))}).then(function(t){return t&&t.value})},t.P=function(t){var e=!1,n=this;return ds(this).then(function(r){return e=!0,n.b++,gs(ms(ys(r,!0)).delete(t))}).then(function(){delete n.f[t]}).ia(function(){e&&n.b--})},t.Kc=function(){var t=this;return ds(this).then(function(t){var e=ms(ys(t,!1));return e.getAll?gs(e.getAll()):new vt(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)r in n?typeof e[r]!=typeof n[r]?i.push(r):"object"==typeof e[r]&&null!=e[r]&&null!=n[r]?0<t(e[r],n[r]).length&&i.push(r):e[r]!==n[r]&&i.push(r):i.push(r);for(r in n)r in e||i.push(r);return i}(t.f,n),t.f=n}return r})},t.Y=function(t){0==this.a.length&&function(t){t.c&&t.c.cancel("STOP_EVENT"),function e(){t.c=De(800).then(y(t.Kc,t)).then(function(e){0<e.length&&R(t.a,function(t){t(e)})}).then(e).s(function(t){"STOP_EVENT"!=t.message&&e()});return t.c}()}(this),this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},(t=bs.prototype).get=function(t){return this.b.then(function(e){return e.get(t)})},t.set=function(t,e){return this.b.then(function(n){return n.set(t,e)})},t.P=function(t){return this.b.then(function(e){return e.P(t)})},t.Y=function(t){this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t})},(t=_s.prototype).get=function(t){return Et(this.a[t])},t.set=function(t,e){return this.a[t]=e,Et()},t.P=function(t){return delete this.a[t],Et()},t.Y=function(){},t.ca=function(){},(t=ws.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(t){n.window&&ye(n.window,"storage",t)},t.ca=function(t){n.window&&_e(n.window,"storage",t)},(t=Ts.prototype).get=function(){return Et(null)},t.set=function(){return Et()},t.P=function(){return Et()},t.Y=function(){},t.ca=function(){},(t=Cs.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(){},t.ca=function(){};var Ss,ks,Ns={A:ws,Qa:Cs},As={A:ws,Qa:Cs},Is={A:fs,Qa:Ts},Os={A:ws,Qa:Ts},Ps={Xc:"local",NONE:"none",Zc:"session"};function Rs(){var t=!(vr(ir())||!Yn()),e=lr(),r=ar();this.o=t,this.h=e,this.m=r,this.a={},Ss||(Ss=new function(){var t={};t.Browser=Ns,t.Node=As,t.ReactNative=Is,t.Worker=Os,this.a=t[$n()]}),t=Ss;try{this.g=!Bn()&&_r()||!n.indexedDB?new t.a.A:new bs(Xn()?new _s:new t.a.A)}catch(t){this.g=new _s,this.h=!0}try{this.i=new t.a.Qa}catch(t){this.i=new _s}this.l=new _s,this.f=y(this.Lb,this),this.b={}}function Ds(){return ks||(ks=new Rs),ks}function Ms(t,e){switch(e){case"session":return t.i;case"none":return t.l;default:return t.g}}function Ls(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Fs(t,e,n){return n=Ls(e,n),"local"==e.A&&(t.b[n]=null),Ms(t,e.A).P(n)}function Us(t){t.c&&(clearInterval(t.c),t.c=null)}(t=Rs.prototype).get=function(t,e){return Ms(this,t.A).get(Ls(t,e))},t.set=function(t,e,n){var r=Ls(t,n),i=this,o=Ms(this,t.A);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.A&&(i.b[r]=e)})},t.addListener=function(t,e,r){t=Ls(t,e),this.m&&(this.b[t]=n.localStorage.getItem(t)),it(this.a)&&(Ms(this,"local").Y(this.f),this.h||(Bn()||!_r())&&n.indexedDB||!this.m||function(t){Us(t),t.c=setInterval(function(){for(var e in t.a){var r=n.localStorage.getItem(e),i=t.b[e];r!=i&&(t.b[e]=r,r=new se({type:"storage",key:e,target:window,oldValue:i,newValue:r,a:!0}),t.Lb(r))}},1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(r)},t.removeListener=function(t,e,n){t=Ls(t,e),this.a[t]&&(U(this.a[t],function(t){return t==n}),0==this.a[t].length&&delete this.a[t]),it(this.a)&&(Ms(this,"local").ca(this.f),Us(this))},t.Lb=function(t){if(t&&t.f){var e=t.a.key;if(null==e)for(var r in this.a){var i=this.b[r];void 0===i&&(i=null);var o=n.localStorage.getItem(r);o!==i&&(this.b[r]=o,this.Wa(r))}else if(0==e.indexOf("firebase:")&&this.a[e]){if(void 0!==t.a.a?Ms(this,"local").ca(this.f):Us(this),this.o)if(r=n.localStorage.getItem(e),(i=t.a.newValue)!==r)null!==i?n.localStorage.setItem(e,i):n.localStorage.removeItem(e);else if(this.b[e]===i&&void 0===t.a.a)return;var a=this;r=function(){void 0===t.a.a&&a.b[e]===n.localStorage.getItem(e)||(a.b[e]=n.localStorage.getItem(e),a.Wa(e))},Wt&&Jt&&10==Jt&&n.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(r,10):r()}}else R(t,y(this.Wa,this))},t.Wa=function(t){this.a[t]&&R(this.a[t],function(t){t()})};var js,Bs={name:"authEvent",A:"local"};function qs(t,e){this.b=-1,this.b=Vs,this.f=n.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.m=n.Int32Array?new Int32Array(64):Array(64),void 0!==js||(js=n.Int32Array?new Int32Array(Ys):Ys),this.reset()}_(qs,function(){this.b=-1});for(var Vs=64,Ws=Vs-1,Hs=[],zs=0;zs<Ws;zs++)Hs[zs]=0;var Ks=j(128,Hs);function Gs(t){for(var e=t.f,n=t.m,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&f)+(0|js[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function Qs(t,e,n){void 0===n&&(n=e.length);var r=0,o=t.c;if(i(e))for(;r<n;)t.f[o++]=e.charCodeAt(r++),o==t.b&&(Gs(t),o=0);else{if(!l(e))throw Error("message must be string or array");for(;r<n;){var a=e[r++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");t.f[o++]=a,o==t.b&&(Gs(t),o=0)}}t.c=o,t.g+=n}qs.prototype.reset=function(){this.g=this.c=0,this.a=n.Int32Array?new Int32Array(this.h):B(this.h)};var Ys=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Xs(){qs.call(this,8,$s)}_(Xs,qs);var $s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Js(t,e,n,r,i){this.l=t,this.i=e,this.m=n,this.o=r||null,this.u=i||null,this.h=e+":"+n,this.v=new function(){this.a=Ds()},this.g=new function(t){this.a=t,this.b=Ds()}(this.h),this.f=null,this.b=[],this.a=this.c=null}function Zs(t){return new Fr("invalid-cordova-configuration",t)}function tu(t){var e=new Xs;Qs(e,t),t=[];var n=8*e.g;56>e.c?Qs(e,Ks,56-e.c):Qs(e,Ks,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(Gs(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return D(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}function eu(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(t){}}function nu(t){return t.f||(t.f=t.ga().then(function(){return new vt(function(e){t.va(function n(r){return e(r),t.Ka(n),!1}),function(t){function e(e){i=!0,o&&o.cancel(),ru(t).then(function(n){var i=r;if(n&&e&&e.url){var o=null;-1!=(i=mi(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"==typeof(o=pr(Ke(o=Ge(i),"firebaseError")||null))?Ur(o):null)?new Bi(n.b,n.c,null,null,o):new Bi(n.b,n.c,i,n.g)),i=o||r}eu(t,i)})}var r=new Bi("unknown",null,null,null,new Fr("no-auth-event")),i=!1,o=De(500).then(function(){return ru(t).then(function(){i||eu(t,r)})}),a=n.handleOpenURL;n.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(or("BuildInfo.packageName",n).toLowerCase()+"://")&&e({url:t}),"function"==typeof a)try{a(t)}catch(t){console.error(t)}},Wi||(Wi=new Vi),Wi.subscribe(e)}(t)})})),t.f}function ru(t){var e=null;return function(t){return t.b.get(Bs,t.a).then(function(t){return qi(t)})}(t.g).then(function(n){return e=n,Fs((n=t.g).b,Bs,n.a)}).then(function(){return e})}(t=Js.prototype).ga=function(){return this.za?this.za:this.za=(Qn(void 0)?Gn().then(function(){return new vt(function(t,e){var r=n.document,i=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);r.addEventListener("deviceready",function(){clearTimeout(i),t()},!1)})}):Tt(Error("Cordova must run in an Android or iOS file scheme."))).then(function(){if("function"!=typeof or("universalLinks.subscribe",n))throw Zs("cordova-universal-links-plugin is not installed");if(void 0===or("BuildInfo.packageName",n))throw Zs("cordova-plugin-buildinfo is not installed");if("function"!=typeof or("cordova.plugins.browsertab.openUrl",n))throw Zs("cordova-plugin-browsertab is not installed");if("function"!=typeof or("cordova.InAppBrowser.open",n))throw Zs("cordova-plugin-inappbrowser is not installed")},function(){throw new Fr("cordova-not-ready")})},t.Ea=function(t,e){return e(new Fr("operation-not-supported-in-this-environment")),Et()},t.zb=function(){return Tt(new Fr("operation-not-supported-in-this-environment"))},t.Mb=function(){return!1},t.Ib=function(){return!0},t.Db=function(){return!0},t.Ca=function(t,e,r){if(this.c)return Tt(new Fr("redirect-operation-pending"));var i=this,o=n.document,a=null,s=null,u=null,c=null;return this.c=Et().then(function(){return ji(e),nu(i)}).then(function(){return function(t,e,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new Bi(e,i,null,o,new Fr("no-auth-event")),s=or("BuildInfo.packageName",n);if("string"!=typeof s)throw new Fr("invalid-cordova-configuration");var u=or("BuildInfo.displayName",n),c={};if(ir().toLowerCase().match(/iphone|ipad|ipod/))c.ibi=s;else{if(!ir().toLowerCase().match(/android/))return Tt(new Fr("operation-not-supported-in-this-environment"));c.apn=s}u&&(c.appDisplayName=u),o=tu(o),c.sessionId=o;var l=ls(t.l,t.i,t.m,e,r,null,i,t.o,c,t.u);return t.ga().then(function(){var e=t.h;return t.v.a.set(Bs,a.D(),e)}).then(function(){var e=or("cordova.plugins.browsertab.isAvailable",n);if("function"!=typeof e)throw new Fr("invalid-cordova-configuration");var r=null;e(function(e){if(e){if("function"!=typeof(r=or("cordova.plugins.browsertab.openUrl",n)))throw new Fr("invalid-cordova-configuration");r(l)}else{if("function"!=typeof(r=or("cordova.InAppBrowser.open",n)))throw new Fr("invalid-cordova-configuration");e=!(!(e=ir()).match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=r(l,e?"_blank":"_system","location=yes")}})})}(i,t,e,r)}).then(function(){return new vt(function(t,e){s=function(){var e=or("cordova.plugins.browsertab.close",n);return t(),"function"==typeof e&&e(),i.a&&"function"==typeof i.a.close&&(i.a.close(),i.a=null),!1},i.va(s),u=function(){a||(a=De(2e3).then(function(){e(new Fr("redirect-cancelled-by-user"))}))},c=function(){gr()&&u()},o.addEventListener("resume",u,!1),ir().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",c,!1)}).s(function(t){return ru(i).then(function(){throw t})})}).ia(function(){u&&o.removeEventListener("resume",u,!1),c&&o.removeEventListener("visibilitychange",c,!1),a&&a.cancel(),s&&i.Ka(s),i.c=null})},t.va=function(t){this.b.push(t),nu(this).s(function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Bi("unknown",null,null,null,new Fr("no-auth-event")),t(e))})},t.Ka=function(t){U(this.b,function(e){return e==t})};var iu={name:"pendingRedirect",A:"session"};function ou(t){return Fs(t.b,iu,t.a)}function au(t,e,n){this.v=t,this.m=e,this.l=n,this.h=[],this.f=!1,this.i=y(this.o,this),this.c=new mu,this.u=new _u,this.g=new function(t){this.a=t,this.b=Ds()}(this.m+":"+this.l),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.u,this.b.linkViaPopup=this.u,this.b.reauthViaPopup=this.u,this.a=su(this.v,this.m,this.l,Qa)}function su(t,e,n,i){var o=r.a.SDK_VERSION||null;return Qn()?new Js(t,e,n,o,i):new as(t,e,n,o,i)}function uu(t){t.f||(t.f=!0,t.a.va(t.i));var e=t.a;return t.a.ga().s(function(n){throw t.a==e&&t.reset(),n})}function cu(t){t.a.Ib()&&uu(t).s(function(e){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(e)&&t.o(n)}),t.a.Db()||yu(t.c)}au.prototype.reset=function(){this.f=!1,this.a.Ka(this.i),this.a=su(this.v,this.m,this.l)},au.prototype.subscribe=function(t){if(L(this.h,t)||this.h.push(t),!this.f){var e=this;(function(t){return t.b.get(iu,t.a).then(function(t){return"pending"==t})})(this.g).then(function(t){t?ou(e.g).then(function(){uu(e).s(function(t){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(t)&&e.o(n)})}):cu(e)}).s(function(){cu(e)})}},au.prototype.unsubscribe=function(t){U(this.h,function(e){return e==t})},au.prototype.o=function(t){if(!t)throw new Fr("invalid-auth-event");for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.sb(t.b,t.c)){(e=this.b[t.b])&&e.h(t,r),e=!0;break}}return yu(this.c),e};var lu=new yr(2e3,1e4),fu=new yr(3e4,6e4);function hu(t,e,n,r,i,o){return t.a.zb(e,n,r,function(){t.f||(t.f=!0,t.a.va(t.i))},function(){t.reset()},i,o)}function pu(t){return!(!t||"auth/cordova-not-ready"!=t.code)}au.prototype.fa=function(){return this.c.fa()},au.prototype.Ca=function(t,e,n){var r,i=this;return function(t){return t.b.set(iu,"pending",t.a)}(this.g).then(function(){return i.a.Ca(t,e,n).s(function(t){if(pu(t))throw new Fr("operation-not-supported-in-this-environment");return r=t,ou(i.g).then(function(){throw r})}).then(function(){return i.a.Mb()?new vt(function(){}):ou(i.g).then(function(){return i.fa()}).then(function(){}).s(function(){})})})},au.prototype.Ea=function(t,e,n,r){return this.a.Ea(n,function(n){t.ha(e,null,n,r)},lu.get())};var du={};function vu(t,e,n){var r=e+":"+n;return du[r]||(du[r]=new au(t,e,n)),du[r]}function mu(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function yu(t){t.g||(t.g=!0,bu(t,!1,null,null))}function gu(t,e){if(t.b=function(){return Et(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function bu(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Tt(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):gu(t,n):gu(t,{user:null}),t.f=[],t.c=[]}function _u(){}function wu(){this.pb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.pb},set:function(t){this.pb=t},enumerable:!1})}function Eu(t,e){this.a=e,xr(this,"verificationId",t)}function Tu(t,e,n,r){return new Li(t).Ta(e,n).then(function(t){return new Eu(t,r)})}function Cu(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function xu(t){this.f=t,this.b=this.a=null,this.c=0}function Su(t,e){var n=e[$o],r=e.refreshToken;e=ku(e.expiresIn),t.b=n,t.c=e,t.a=r}function ku(t){return b()+1e3*parseInt(t,10)}function Nu(t,e){return function(t,e){return new vt(function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?ia(t,t.i+"?key="+encodeURIComponent(t.b),function(t){t?t.error?r(Ga(t)):t.access_token&&t.refresh_token?n(t):r(new Fr("internal-error")):r(new Fr("network-request-failed"))},"POST",an(e).toString(),t.f,t.m.get()):r(new Fr("internal-error"))})}(t.f,e).then(function(e){return t.b=e.access_token,t.c=ku(e.expires_in),t.a=e.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).s(function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e})}function Au(t,e){this.a=t||null,this.b=e||null,Sr(this,{lastSignInTime:br(e||null),creationTime:br(t||null)})}function Iu(t,e){for(var n in ae.call(this,t),e)this[n]=e[n]}function Ou(t,e,n){this.G=[],this.l=t.apiKey,this.o=t.appName,this.u=t.authDomain||null,t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(this.l,Xa(Qa),t),this.h=new xu(this.b),Uu(this,e[$o]),Su(this.h,e),xr(this,"refreshToken",this.h.a),qu(this,n||{}),Ae.call(this),this.I=!1,this.u&&sr()&&(this.a=vu(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=function(t){return new Cu(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=t.h.c-b()-3e5;return 0<e?e:0})}(this),this.V=y(this.Ha,this);var i=this;this.ka=null,this.sa=function(t){i.oa(t.g)},this.X=null,this.O=[],this.ra=function(t){Ru(i,t.c)},this.W=null}function Pu(t,e){t.X&&_e(t.X,"languageCodeChanged",t.sa),(t.X=e)&&ye(e,"languageCodeChanged",t.sa)}function Ru(t,e){t.O=e,ra(t.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,t.O):null)}function Du(t,e){t.W&&_e(t.W,"frameworkChanged",t.ra),(t.W=e)&&ye(e,"frameworkChanged",t.ra)}function Mu(t){try{return r.a.app(t.o).auth()}catch(e){throw new Fr("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.o+"'!")}}function Lu(t){t.C||t.w.b||(t.w.start(),_e(t,"tokenChanged",t.V),ye(t,"tokenChanged",t.V))}function Fu(t){_e(t,"tokenChanged",t.V),t.w.stop()}function Uu(t,e){t.qa=e,xr(t,"_lat",e)}function ju(t){for(var e=[],n=0;n<t.N.length;n++)e.push(t.N[n](t));return function(t){return new vt(function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Ct(t[o],g(i,o,!0),g(i,o,!1));else e(r)})}(e).then(function(){return t})}function Bu(t){t.a&&!t.I&&(t.I=!0,t.a.subscribe(t))}function qu(t,e){Sr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,metadata:new Au(e.createdAt,e.lastLoginAt),providerData:[]})}function Vu(){}function Wu(t){return Et().then(function(){if(t.C)throw new Fr("app-deleted")})}function Hu(t){return D(t.providerData,function(t){return t.providerId})}function zu(t,e){e&&(Ku(t,e.providerId),t.providerData.push(e))}function Ku(t,e){U(t.providerData,function(t){return t.providerId==e})}function Gu(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&xr(t,e,n)}function Qu(t,e){t!=e&&(Sr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,providerData:[]}),e.metadata?xr(t,"metadata",function(t){return new Au(t.a,t.b)}(e.metadata)):xr(t,"metadata",new Au),R(e.providerData,function(e){zu(t,e)}),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.h,e.h),xr(t,"refreshToken",t.h.a))}function Yu(t){return t.F().then(function(e){var n=t.isAnonymous;return function(t,e){return za(t.b,Sa,{idToken:e}).then(y(t.uc,t))}(t,e).then(function(){return n||Gu(t,"isAnonymous",!1),e})})}function Xu(t,e){e[$o]&&t.qa!=e[$o]&&(Su(t.h,e),t.dispatchEvent(new Iu("tokenChanged")),Uu(t,e[$o]),Gu(t,"refreshToken",t.h.a))}function $u(t,e){return Yu(t).then(function(){if(L(Hu(t),e))return ju(t).then(function(){throw new Fr("provider-already-linked")})})}function Ju(t,e,n){return kr({user:t,credential:Ui(e),additionalUserInfo:e=si(e),operationType:n})}function Zu(t,e){return Xu(t,e),t.reload().then(function(){return t})}function tc(t,e,n,i,o){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!o)return Tt(t.i);var a=ai(n.providerId),s=dr(t.uid+":::"),u=null;(!lr()||Yn())&&t.u&&n.isOAuthProvider&&(u=ls(t.u,t.l,t.o,e,n,null,s,r.a.SDK_VERSION||null));var c=zn(u,a&&a.Ba,a&&a.Aa);return i=i().then(function(){if(nc(t),!o)return t.F().then(function(){})}).then(function(){return hu(t.a,c,e,n,s,!!u)}).then(function(){return new vt(function(n,r){t.ha(e,null,new Fr("cancelled-popup-request"),t.g||null),t.f=n,t.v=r,t.g=s,t.c=t.a.Ea(t,e,c,s)})}).then(function(t){return c&&Hn(c),t?kr(t):null}).s(function(t){throw c&&Hn(c),t}),rc(t,i,o)}function ec(t,e,n,r,i){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!i)return Tt(t.i);var o=null,a=dr(t.uid+":::");return r=r().then(function(){if(nc(t),!i)return t.F().then(function(){})}).then(function(){return t.aa=a,ju(t)}).then(function(e){return t.ba&&(e=(e=t.ba).b.set(oc,t.D(),e.a)),e}).then(function(){return t.a.Ca(e,n,a)}).s(function(e){if(o=e,t.ba)return ac(t.ba);throw o}).then(function(){if(o)throw o}),rc(t,r,i)}function nc(t){if(!t.a||!t.I){if(t.a&&!t.I)throw new Fr("internal-error");throw new Fr("auth-domain-config-required")}}function rc(t,e,n){var r=function(t,e,n){return t.i&&!n?(e.cancel(),Tt(t.i)):e.s(function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.i||t.dispatchEvent(new Iu("userInvalidated")),t.i=e),e})}(t,e,n);return t.G.push(r),r.ia(function(){F(t.G,r)}),r}function ic(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!(t.stsTokenManager&&t.stsTokenManager.accessToken&&t.stsTokenManager.expirationTime))return null;n[$o]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null,n.expiresIn=(t.stsTokenManager.expirationTime-b())/1e3;var r=new Ou(e,n,t);return t.providerData&&R(t.providerData,function(t){t&&zu(r,kr(t))}),t.redirectEventId&&(r.aa=t.redirectEventId),r}mu.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},mu.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.b,r=t.c,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;"unknown"!=n||i||o?t.a?(bu(this,!0,null,t.a),Et()):e.wa(n,r)?function(t,e,n){n=n.wa(e.b,e.c);var r=e.f,i=e.g,o=!!e.b.match(/Redirect$/);n(r,i).then(function(e){bu(t,o,e,null)}).s(function(e){bu(t,o,null,e)})}(this,t,e):Tt(new Fr("invalid-auth-event")):(bu(this,!1,null,null),Et())}else Tt(new Fr("invalid-auth-event"))},mu.prototype.fa=function(){var t=this;return new vt(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new Fr("timeout");t.a&&t.a.cancel(),t.a=De(fu.get()).then(function(){t.b||bu(t,!0,null,e)})}(t))})},_u.prototype.h=function(t,e){if(t){var n=t.b,r=t.c;t.a?(e.ha(t.b,null,t.a,t.c),Et()):e.wa(n,r)?function(t,e){var n=t.c,r=t.b;e.wa(r,n)(t.f,t.g).then(function(t){e.ha(r,t,null,n)}).s(function(t){e.ha(r,null,t,n)})}(t,e):Tt(new Fr("invalid-auth-event"))}else Tt(new Fr("invalid-auth-event"))},Eu.prototype.confirm=function(t){return t=Fi(this.verificationId,t),this.a(t)},Cu.prototype.start=function(){this.a=this.c,function t(e,r){e.stop();e.b=De(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(e,r)).then(function(){return t=n.document,e=null,gr()||!t?Et():new vt(function(n){e=function(){gr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)}).s(function(n){throw t.removeEventListener("visibilitychange",e,!1),n});var t,e}).then(function(){return e.h()}).then(function(){t(e,!0)}).s(function(n){e.i(n)&&t(e,!1)})}(this,!0)},Cu.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},xu.prototype.D=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},xu.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?Tt(new Fr("user-token-expired")):t||!this.b||b()>this.c-3e4?this.a?Nu(this,{grant_type:"refresh_token",refresh_token:this.a}):Et(null):Et({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Au.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},_(Iu,ae),_(Ou,Ae),Ou.prototype.oa=function(t){this.ka=t,na(this.b,t)},Ou.prototype.ea=function(){return this.ka},Ou.prototype.xa=function(){return B(this.O)},Ou.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},xr(Ou.prototype,"providerId","firebase"),(t=Ou.prototype).reload=function(){var t=this;return rc(this,Wu(this).then(function(){return Yu(t).then(function(){return ju(t)}).then(Vu)}))},t.ac=function(t){return this.F(t).then(function(t){return new function(t){var e=ni(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new Fr("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Sr(this,{token:t,expirationTime:br(1e3*e.exp),authTime:br(1e3*e.auth_time),issuedAtTime:br(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,claims:e})}(t)})},t.F=function(t){var e=this;return rc(this,Wu(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new Fr("internal-error");return t.accessToken!=e.qa&&(Uu(e,t.accessToken),e.dispatchEvent(new Iu("tokenChanged"))),Gu(e,"refreshToken",t.refreshToken),t.accessToken}))},t.uc=function(t){if(!(t=t.users)||!t.length)throw new Fr("internal-error");qu(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?D(t,function(t){return new function(t,e,n,r,i,o){Sr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n<e.length;n++)zu(this,e[n]);Gu(this,"isAnonymous",!(this.email&&t.passwordHash||this.providerData&&this.providerData.length))},t.cb=function(t){var e=this,n=null;return rc(this,t.f(this.b,this.uid).then(function(t){return Xu(e,t),n=Ju(e,t,"reauthenticate"),e.i=null,e.reload()}).then(function(){return n}),!0)},t.vc=function(t){return Tr("firebase.User.prototype.reauthenticateWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential instead."),this.cb(t).then(function(){})},t.ab=function(t){var e=this,n=null;return rc(this,$u(this,t.providerId).then(function(){return e.F()}).then(function(n){return t.c(e.b,n)}).then(function(t){return n=Ju(e,t,"link"),Zu(e,t)}).then(function(){return n}))},t.mc=function(t){return Tr("firebase.User.prototype.linkWithCredential is deprecated. Please use firebase.User.prototype.linkAndRetrieveDataWithCredential instead."),this.ab(t).then(function(t){return t.user})},t.nc=function(t,e){var n=this;return rc(this,$u(this,"phone").then(function(){return Tu(Mu(n),t,e,y(n.ab,n))}))},t.wc=function(t,e){var n=this;return rc(this,Et().then(function(){return Tu(Mu(n),t,e,y(n.cb,n))}),!0)},t.mb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.mb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.Pc=function(t){var e=this;return rc(this,this.F().then(function(n){return t.c(e.b,n)}).then(function(t){return Xu(e,t),e.reload()}))},t.nb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.nb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.ob=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Wu(this);var e=this;return rc(this,this.F().then(function(n){return e.b.ob(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Xu(e,t),Gu(e,"displayName",t.displayName||null),Gu(e,"photoURL",t.photoUrl||null),R(e.providerData,function(t){"password"===t.providerId&&(xr(t,"displayName",e.displayName),xr(t,"photoURL",e.photoURL))}),ju(e)}).then(Vu))},t.Nc=function(t){var e=this;return rc(this,Yu(this).then(function(n){return L(Hu(e),t)?function(t,e,n){return za(t,Ta,{idToken:e,deleteProvider:n})}(e.b,n,[t]).then(function(t){var n={};return R(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),R(Hu(e),function(t){n[t]||Ku(e,t)}),n[Li.PROVIDER_ID]||xr(e,"phoneNumber",null),ju(e)}):ju(e).then(function(){throw new Fr("no-such-provider")})}))},t.delete=function(){var t=this;return rc(this,this.F().then(function(e){return za(t.b,Ea,{idToken:e})}).then(function(){t.dispatchEvent(new Iu("userDeleted"))})).then(function(){for(var e=0;e<t.G.length;e++)t.G[e].cancel("app-deleted");Pu(t,null),Du(t,null),t.G=[],t.C=!0,Fu(t),xr(t,"refreshToken",null),t.a&&t.a.unsubscribe(t)})},t.sb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.aa||null)==e||"reauthViaRedirect"==t&&(this.aa||null)==e)},t.ha=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?y(this.xb,this):"reauthViaPopup"==t&&e==(this.g||null)?y(this.yb,this):"linkViaRedirect"==t&&(this.aa||null)==e?y(this.xb,this):"reauthViaRedirect"==t&&(this.aa||null)==e?y(this.yb,this):null},t.oc=function(t){var e=this;return tc(this,"linkViaPopup",t,function(){return $u(e,t.providerId).then(function(){return ju(e)})},!1)},t.xc=function(t){return tc(this,"reauthViaPopup",t,function(){return Et()},!0)},t.pc=function(t){var e=this;return ec(this,"linkViaRedirect",t,function(){return $u(e,t.providerId)},!1)},t.yc=function(t){return ec(this,"reauthViaRedirect",t,function(){return Et()},!0)},t.xb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,this.F().then(function(r){return va(n.b,{requestUri:t,sessionId:e,idToken:r})}).then(function(t){return r=Ju(n,t,"link"),Zu(n,t)}).then(function(){return r}))},t.yb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,Et().then(function(){return yi(ma(n.b,{requestUri:t,sessionId:e}),n.uid)}).then(function(t){return r=Ju(n,t,"reauthenticate"),Xu(n,t),n.i=null,n.reload()}).then(function(){return r}),!0)},t.gb=function(t){var e=this,n=null;return rc(this,this.F().then(function(e){return n=e,void 0===t||it(t)?{}:Xr(new qr(t))}).then(function(t){return e.b.gb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},t.toJSON=function(){return this.D()},t.D=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.l,appName:this.o,authDomain:this.u,stsTokenManager:this.h.D(),redirectEventId:this.aa||null};return this.metadata&&ct(t,this.metadata.D()),R(this.providerData,function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))}),t};var oc={name:"redirectUser",A:"session"};function ac(t){return Fs(t.b,oc,t.a)}function sc(t){this.a=t,this.b=Ds(),this.c=null,this.f=function(t){var e=lc("local"),r=lc("session"),i=lc("none");return function(t,e,r){var i=Ls(e,r),o=Ms(t,e.A);return t.get(e,r).then(function(a){var s=null;try{s=pr(n.localStorage.getItem(i))}catch(t){}if(s&&!a)return n.localStorage.removeItem(i),t.set(e,s,r);s&&a&&"localStorage"!=o.type&&n.localStorage.removeItem(i)})}(t.b,e,t.a).then(function(){return t.b.get(r,t.a)}).then(function(n){return n?r:t.b.get(i,t.a).then(function(n){return n?i:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(cc,t.a).then(function(t){return t?lc(t):e})})})}).then(function(e){return t.c=e,uc(t,e.A)}).s(function(){t.c||(t.c=e)})}(this),this.b.addListener(lc("local"),this.a,y(this.g,this))}function uc(t,e){var n,r=[];for(n in Ps)Ps[n]!==e&&r.push(Fs(t.b,lc(Ps[n]),t.a));return r.push(Fs(t.b,cc,t.a)),function(t){return new vt(function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Ct(t[s],g(o,s),a);else e(i)})}(r)}sc.prototype.g=function(){var t=this,e=lc("local");dc(this,function(){return Et().then(function(){return t.c&&"local"!=t.c.A?t.b.get(e,t.a):null}).then(function(n){if(n)return uc(t,"local").then(function(){t.c=e})})})};var cc={name:"persistence",A:"session"};function lc(t){return{name:"authUser",A:t}}function fc(t,e){return dc(t,function(){return t.b.set(t.c,e.D(),t.a)})}function hc(t){return dc(t,function(){return Fs(t.b,t.c,t.a)})}function pc(t,e){return dc(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})})}function dc(t,e){return t.f=t.f.then(e,e),t.f}function vc(t){if(this.l=!1,xr(this,"settings",new wu),xr(this,"app",t),!Ec(this).options||!Ec(this).options.apiKey)throw new Fr("invalid-api-key");t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(Ec(this).options&&Ec(this).options.apiKey,Xa(Qa),t),this.N=[],this.o=[],this.I=[],this.Pb=r.a.INTERNAL.createSubscribe(y(this.ic,this)),this.O=void 0,this.Qb=r.a.INTERNAL.createSubscribe(y(this.jc,this)),_c(this,null),this.h=new sc(Ec(this).options.apiKey+":"+Ec(this).name),this.w=new function(t){this.a=t,this.b=Ds()}(Ec(this).options.apiKey+":"+Ec(this).name),this.V=Sc(this,function(t){var e=Ec(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(oc,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})}(t.w,Ec(t).options.authDomain).then(function(e){return(t.C=e)&&(e.ba=t.w),ac(t.w)});return Sc(t,e)}(t).then(function(){return pc(t.h,e)}).then(function(e){return e?(e.ba=t.w,t.C&&(t.C.aa||null)==(e.aa||null)?e:e.reload().then(function(){return fc(t.h,e).then(function(){return e})}).s(function(n){return"auth/network-request-failed"==n.code?e:hc(t.h)})):null}).then(function(e){_c(t,e||null)});return Sc(t,n)}(this)),this.i=Sc(this,function(t){return t.V.then(function(){return t.fa()}).s(function(){}).then(function(){if(!t.l)return t.ka()}).s(function(){}).then(function(){if(!t.l){t.X=!0;var e=t.h;e.b.addListener(lc("local"),e.a,t.ka)}})}(this)),this.X=!1,this.ka=y(this.Jc,this),this.Ha=y(this.Z,this),this.qa=y(this.Yb,this),this.ra=y(this.gc,this),this.sa=y(this.hc,this),function(t){var e=Ec(t).options.authDomain,n=Ec(t).options.apiKey;e&&sr()&&(t.Ob=t.V.then(function(){if(!t.l){if(t.a=vu(e,n,Ec(t).name),t.a.subscribe(t),Tc(t)&&Bu(Tc(t)),t.C){Bu(t.C);var r=t.C;r.oa(t.ea()),Pu(r,t),Ru(r=t.C,t.G),Du(r,t),t.C=null}return t.a}}))}(this),this.INTERNAL={},this.INTERNAL.delete=y(this.delete,this),this.INTERNAL.logFramework=y(this.qc,this),this.u=0,Ae.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ea()},set:function(t){this.oa(t)},enumerable:!1}),t.W=null}(this),this.G=[]}function mc(t){ae.call(this,"languageCodeChanged"),this.g=t}function yc(t){ae.call(this,"frameworkChanged"),this.c=t}function gc(t){return t.Ob||Tt(new Fr("auth-domain-config-required"))}function bc(t,e){var n={};return n.apiKey=Ec(t).options.apiKey,n.authDomain=Ec(t).options.authDomain,n.appName=Ec(t).name,t.V.then(function(){return function(t,e,n,r){var i=new Ou(t,e);return n&&(i.ba=n),r&&Ru(i,r),i.reload().then(function(){return i})}(n,e,t.w,t.xa())}).then(function(e){return Tc(t)&&e.uid==Tc(t).uid?(Qu(Tc(t),e),t.Z(e)):(_c(t,e),Bu(e),t.Z(e))}).then(function(){xc(t)})}function _c(t,e){Tc(t)&&(function(t,e){U(t.N,function(t){return t==e})}(Tc(t),t.Ha),_e(Tc(t),"tokenChanged",t.qa),_e(Tc(t),"userDeleted",t.ra),_e(Tc(t),"userInvalidated",t.sa),Fu(Tc(t))),e&&(e.N.push(t.Ha),ye(e,"tokenChanged",t.qa),ye(e,"userDeleted",t.ra),ye(e,"userInvalidated",t.sa),0<t.u&&Lu(e)),xr(t,"currentUser",e),e&&(e.oa(t.ea()),Pu(e,t),Ru(e,t.G),Du(e,t))}function wc(t,e){var n=null,r=null;return Sc(t,e.then(function(e){return n=Ui(e),r=si(e),bc(t,e)}).then(function(){return kr({user:Tc(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Ec(t){return t.app}function Tc(t){return t.currentUser}function Cc(t){return Tc(t)&&Tc(t)._lat||null}function xc(t){if(t.X){for(var e=0;e<t.o.length;e++)t.o[e]&&t.o[e](Cc(t));if(t.O!==t.getUid()&&t.I.length)for(t.O=t.getUid(),e=0;e<t.I.length;e++)t.I[e]&&t.I[e](Cc(t))}}function Sc(t,e){return t.N.push(e),e.ia(function(){F(t.N,e)}),e}function kc(){}function Nc(){this.a={},this.b=1e12}sc.prototype.jb=function(t){var e=null,n=this;return function(t){var e=new Fr("invalid-persistence-type"),n=new Fr("unsupported-persistence-type");t:{for(r in Ps)if(Ps[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch($n()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;default:if(!ar()&&"none"!==t)throw n}}(t),dc(this,function(){return t!=n.c.A?n.b.get(n.c,n.a).then(function(r){return e=r,uc(n,t)}).then(function(){if(n.c=lc(t),e)return n.b.set(n.c,e,n.a)}):Et()})},_(vc,Ae),_(mc,ae),_(yc,ae),(t=vc.prototype).jb=function(t){return Sc(this,t=this.h.jb(t))},t.oa=function(t){this.W===t||this.l||(this.W=t,na(this.b,this.W),this.dispatchEvent(new mc(this.ea())))},t.ea=function(){return this.W},t.Qc=function(){var t=n.navigator;this.oa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},t.qc=function(t){this.G.push(t),ra(this.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,this.G):null),this.dispatchEvent(new yc(this.G))},t.xa=function(){return B(this.G)},t.toJSON=function(){return{apiKey:Ec(this).options.apiKey,authDomain:Ec(this).options.authDomain,appName:Ec(this).name,currentUser:Tc(this)&&Tc(this).D()}},t.sb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},t.ha=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?y(this.Xb,this):null},t.Xb=function(t,e){var n=this;t={requestUri:t,sessionId:e},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=da(n.b,t).then(function(t){return r=Ui(t),i=si(t),t});return Sc(this,t=n.V.then(function(){return o}).then(function(t){return bc(n,t)}).then(function(){return kr({user:Tc(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}))},t.Hc=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this,n=ai(t.providerId),i=dr(),o=null;(!lr()||Yn())&&Ec(this).options.authDomain&&t.isOAuthProvider&&(o=ls(Ec(this).options.authDomain,Ec(this).options.apiKey,Ec(this).name,"signInViaPopup",t,null,i,r.a.SDK_VERSION||null));var a=zn(o,n&&n.Ba,n&&n.Aa);return Sc(this,n=gc(this).then(function(e){return hu(e,a,"signInViaPopup",t,i,!!o)}).then(function(){return new vt(function(t,n){e.ha("signInViaPopup",null,new Fr("cancelled-popup-request"),e.g),e.f=t,e.v=n,e.g=i,e.c=e.a.Ea(e,"signInViaPopup",a,i)})}).then(function(t){return a&&Hn(a),t?kr(t):null}).s(function(t){throw a&&Hn(a),t}))},t.Ic=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this;return Sc(this,gc(this).then(function(){return dc(t=e.h,function(){return t.b.set(cc,t.c.A,t.a)});var t}).then(function(){return e.a.Ca("signInViaRedirect",t)}))},t.fa=function(){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var t=this;return Sc(this,gc(this).then(function(){return t.a.fa()}).then(function(t){return t?kr(t):null}))},t.Oc=function(t){if(!t)return Tt(new Fr("null-user"));var e=this,n={};n.apiKey=Ec(this).options.apiKey,n.authDomain=Ec(this).options.authDomain,n.appName=Ec(this).name;var r=function(t,e,n,r){e=e||{apiKey:t.l,authDomain:t.u,appName:t.o};var i=t.h,o={};return o[$o]=i.b,o.refreshToken=i.a,o.expiresIn=(i.c-b())/1e3,e=new Ou(e,o),n&&(e.ba=n),r&&Ru(e,r),Qu(e,t),e}(t,n,e.w,e.xa());return Sc(this,this.i.then(function(){if(Ec(e).options.apiKey!=t.l)return r.reload()}).then(function(){return Tc(e)&&t.uid==Tc(e).uid?(Qu(Tc(e),t),e.Z(t)):(_c(e,r),Bu(r),e.Z(r))}).then(function(){xc(e)}))},t.kb=function(){var t=this;return Sc(this,this.i.then(function(){return Tc(t)?(_c(t,null),hc(t.h).then(function(){xc(t)})):Et()}))},t.Jc=function(){var t=this;return pc(this.h,Ec(this).options.authDomain).then(function(e){if(!t.l){var n;if(n=Tc(t)&&e){n=Tc(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Qu(Tc(t),e),Tc(t).F();(Tc(t)||e)&&(_c(t,e),e&&(Bu(e),e.ba=t.w),t.a&&t.a.subscribe(t),xc(t))}})},t.Z=function(t){return fc(this.h,t)},t.Yb=function(){xc(this),this.Z(Tc(this))},t.gc=function(){this.kb()},t.hc=function(){this.kb()},t.ic=function(t){var e=this;this.addAuthTokenListener(function(){t.next(Tc(e))})},t.jc=function(t){var e=this;!function(t,e){t.I.push(e),Sc(t,t.i.then(function(){!t.l&&L(t.I,e)&&t.O!==t.getUid()&&(t.O=t.getUid(),e(Cc(t)))}))}(this,function(){t.next(Tc(e))})},t.sc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Pb(t,e,n)},t.rc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){i.O=i.getUid(),f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Qb(t,e,n)},t.$b=function(t){var e=this;return Sc(this,this.i.then(function(){return Tc(e)?Tc(e).F(t).then(function(t){return{accessToken:t}}):null}))},t.Jb=function(t){var e=this;return this.i.then(function(){return wc(e,za(e.b,Ba,{token:t}))}).then(function(t){var n=t.user;return Gu(n,"isAnonymous",!1),e.Z(n),t})},t.Bc=function(t){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCustomToken is deprecated. Please use firebase.auth.Auth.prototype.signInWithCustomToken instead."),this.Jb(t)},t.Cc=function(t,e){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.signInWithEmailAndPassword instead."),this.Kb(t,e)},t.Kb=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,qa,{email:t,password:e}))})},t.ub=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,_a,{email:t,password:e}))})},t.Sb=function(t,e){return Tr("firebase.auth.Auth.prototype.createUserAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.createUserWithEmailAndPassword instead."),this.ub(t,e)},t.Ec=function(t){return Tr("firebase.auth.Auth.prototype.signInWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential instead."),this.Oa(t).then(function(t){return t.user})},t.Oa=function(t){var e=this;return this.i.then(function(){return wc(e,t.ya(e.b))})},t.Pa=function(){var t=this;return this.i.then(function(){var e=Tc(t);return e&&e.isAnonymous?kr({user:e,credential:null,additionalUserInfo:kr({providerId:null,isNewUser:!1}),operationType:"signIn"}):wc(t,t.b.Pa()).then(function(e){var n=e.user;return Gu(n,"isAnonymous",!0),t.Z(n),e})})},t.Dc=function(){return Tr("firebase.auth.Auth.prototype.signInAnonymouslyAndRetrieveData is deprecated. Please use firebase.auth.Auth.prototype.signInAnonymously instead."),this.Pa()},t.getUid=function(){return Tc(this)&&Tc(this).uid||null},t.Rb=function(t){this.addAuthTokenListener(t),this.u++,0<this.u&&Tc(this)&&Lu(Tc(this))},t.zc=function(t){var e=this;R(this.o,function(n){n==t&&e.u--}),0>this.u&&(this.u=0),0==this.u&&Tc(this)&&Fu(Tc(this)),this.removeAuthTokenListener(t)},t.addAuthTokenListener=function(t){var e=this;this.o.push(t),Sc(this,this.i.then(function(){e.l||L(e.o,t)&&t(Cc(e))}))},t.removeAuthTokenListener=function(t){U(this.o,function(e){return e==t})},t.delete=function(){this.l=!0;for(var t=0;t<this.N.length;t++)this.N[t].cancel("app-deleted");return this.N=[],this.h&&(t=this.h).b.removeListener(lc("local"),t.a,this.ka),this.a&&this.a.unsubscribe(this),r.a.Promise.resolve()},t.Vb=function(t){return Tr("firebase.auth.Auth.prototype.fetchProvidersForEmail is deprecated. Please use firebase.auth.Auth.prototype.fetchSignInMethodsForEmail instead."),Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.allProviders||[]})}(this.b,t))},t.Wb=function(t){return Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.signinMethods||[]})}(this.b,t))},t.kc=function(t){return!!Ri(t)},t.ib=function(t,e){var n=this;return Sc(this,Et().then(function(){var t=new qr(e);if(!t.c)throw new Fr("argument-error",Wr+" must be true when sending sign in link to email");return Xr(t)}).then(function(e){return n.b.ib(t,e)}).then(function(){}))},t.Rc=function(t){return this.Ja(t).then(function(t){return t.data.email})},t.Xa=function(t,e){return Sc(this,this.b.Xa(t,e).then(function(){}))},t.Ja=function(t){return Sc(this,this.b.Ja(t).then(function(t){return new function(t){var e={},n=t[Ir],r=t[Or];if(!(t=t[Pr])||t!=Ar&&!n)throw Error("Invalid provider user info!");e[Dr]=r||null,e[Rr]=n||null,xr(this,Lr,t),xr(this,Mr,Nr(e))}(t)}))},t.Va=function(t){return Sc(this,this.b.Va(t).then(function(){}))},t.hb=function(t,e){var n=this;return Sc(this,Et().then(function(){return void 0===e||it(e)?{}:Xr(new qr(e))}).then(function(e){return n.b.hb(t,e)}).then(function(){}))},t.Gc=function(t,e){return Sc(this,Tu(this,t,e,y(this.Oa,this)))},t.Fc=function(t,e){var n=this;return Sc(this,Et().then(function(){var r=Pi(t,e||qn());return n.Oa(r)}))},kc.prototype.render=function(){},kc.prototype.reset=function(){},kc.prototype.getResponse=function(){},kc.prototype.execute=function(){};var Ac=null;function Ic(t,e){return(e=Oc(e))&&t.a[e]||null}function Oc(t){return(t=void 0===t?1e12:t)?t.toString():null}function Pc(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=On(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():ye(this.f,"click",this.i)}function Rc(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function Dc(){}Nc.prototype.render=function(t,e){return this.a[this.b.toString()]=new Pc(t,e),this.b++},Nc.prototype.reset=function(t){var e=Ic(this,t);t=Oc(t),e&&t&&(e.delete(),delete this.a[t])},Nc.prototype.getResponse=function(t){return(t=Ic(this,t))?t.getResponse():null},Nc.prototype.execute=function(t){(t=Ic(this,t))&&t.execute()},Pc.prototype.getResponse=function(){return Rc(this),this.b},Pc.prototype.execute=function(){Rc(this);var t=this;this.a||(this.a=setTimeout(function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(t){}t.a=setTimeout(function(){if(t.a=null,t.b=null,n)try{n()}catch(t){}t.h&&t.execute()},6e4)},500))},Pc.prototype.delete=function(){Rc(this),this.g=!0,clearTimeout(this.a),this.a=null,_e(this.f,"click",this.i)},Dc.prototype.g=function(){return Ac||(Ac=new Nc),Et(Ac)},Dc.prototype.c=function(){};var Mc=null;function Lc(){this.b=n.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Fc=vn("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Uc=new yr(3e4,6e4);Lc.prototype.g=function(t){var e=this;return new vt(function(r,i){var o=setTimeout(function(){i(new Fr("network-request-failed"))},Uc.get());!n.grecaptcha||t!==e.f&&!e.b?(n[e.a]=function(){if(n.grecaptcha){e.f=t;var a=n.grecaptcha.render;n.grecaptcha.render=function(t,n){return t=a(t,n),e.b++,t},clearTimeout(o),r(n.grecaptcha)}else clearTimeout(o),i(new Fr("internal-error"));delete n[e.a]},Et(Vo(gn(Fc,{onload:e.a,hl:t||""}))).s(function(){clearTimeout(o),i(new Fr("internal-error","Unable to load external reCAPTCHA dependencies!"))})):(clearTimeout(o),r(n.grecaptcha))})},Lc.prototype.c=function(){this.b--};var jc=null;function Bc(t,e,r,i,o,a,s){if(xr(this,"type","recaptcha"),this.c=this.f=null,this.C=!1,this.l=e,this.g=null,s?(Mc||(Mc=new Dc),s=Mc):(jc||(jc=new Lc),s=jc),this.o=s,this.a=r||{theme:"light",type:"image"},this.h=[],this.a[Wc])throw new Fr("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Hc],!n.document)throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!On(e)||!this.i&&On(e).hasChildNodes())throw new Fr("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new Yo(t,a||null,o||null),this.v=i||function(){return null};var u=this;this.m=[];var c=this.a[qc];this.a[qc]=function(t){if(zc(u,t),"function"==typeof c)c(t);else if("string"==typeof c){var e=or(c,n);"function"==typeof e&&e(t)}};var l=this.a[Vc];this.a[Vc]=function(){if(zc(u,null),"function"==typeof l)l();else if("string"==typeof l){var t=or(l,n);"function"==typeof t&&t()}}}var qc="callback",Vc="expired-callback",Wc="sitekey",Hc="size";function zc(t,e){for(var n=0;n<t.m.length;n++)try{t.m[n](e)}catch(t){}}function Kc(t,e){return t.h.push(e),e.ia(function(){F(t.h,e)}),e}function Gc(t){if(t.C)throw new Fr("internal-error","RecaptchaVerifier instance has been destroyed.")}function Qc(t,e,n){var i=!1;try{this.b=n||r.a.app()}catch(t){throw new Fr("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new Fr("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().xa()}catch(t){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(t){}a=r.a.SDK_VERSION?rr(r.a.SDK_VERSION,a):null,Bc.call(this,n,t,e,function(){try{var t=o.b.auth().ea()}catch(e){t=null}return t},a,Xa(Qa),i)}function Yc(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new Fr("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Xc.length)throw new Fr("internal-error","Argument validator received an unsupported number of arguments.");n=Xc[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new Fr("argument-error",t+" failed: "+r)}(t=Bc.prototype).za=function(){var t=this;return this.f?this.f:this.f=Kc(this,Et().then(function(){if(ur()&&!Xn())return Gn();throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return t.o.g(t.v())}).then(function(e){return t.g=e,za(t.u,Oa,{})}).then(function(e){t.a[Wc]=e.recaptchaSiteKey}).s(function(e){throw t.f=null,e}))},t.render=function(){Gc(this);var t=this;return Kc(this,this.za().then(function(){if(null===t.c){var e=t.l;if(!t.i){var n=On(e);e=Dn("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c}))},t.verify=function(){Gc(this);var t=this;return Kc(this,this.render().then(function(e){return new vt(function(n){var r=t.g.getResponse(e);if(r)n(r);else{var i=function(e){e&&(function(t,e){U(t.m,function(t){return t==e})}(t,i),n(e))};t.m.push(i),t.i&&t.g.execute(t.c)}})}))},t.reset=function(){Gc(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Gc(this),this.C=!0,this.o.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=On(this.l);for(var e;e=t.firstChild;)t.removeChild(e)}},_(Qc,Bc);var Xc="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function $c(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:i}}function Jc(t,e){return{name:t||"",K:"a boolean",optional:!!e,M:o}}function Zc(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:h}}function tl(t,e){return{name:t||"",K:"a function",optional:!!e,M:f}}function el(t,e){return{name:t||"",K:"null",optional:!!e,M:u}}function nl(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ya||!n)}}}function rl(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&i(t.type)&&f(t.verify))}}}function il(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function ol(t,e){for(var n in e){var r=e[n].name;t[r]=ul(r,t[n],e[n].j)}}function al(t,e){for(var n in e){var r=e[n].name;if(r!==n){var i=e[n].qb;Object.defineProperty(t,r,{get:function(){return this[n]},set:function(t){Yc(r,[i],[t],!0),this[n]=t},enumerable:!0})}}}function sl(t,e,n,r){t[e]=ul(e,n,r)}function ul(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Yc(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}ol(vc.prototype,{Va:{name:"applyActionCode",j:[$c("code")]},Ja:{name:"checkActionCode",j:[$c("code")]},Xa:{name:"confirmPasswordReset",j:[$c("code"),$c("newPassword")]},ub:{name:"createUserWithEmailAndPassword",j:[$c("email"),$c("password")]},Sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Vb:{name:"fetchProvidersForEmail",j:[$c("email")]},Wb:{name:"fetchSignInMethodsForEmail",j:[$c("email")]},fa:{name:"getRedirectResult",j:[]},kc:{name:"isSignInWithEmailLink",j:[$c("emailLink")]},rc:{name:"onAuthStateChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},sc:{name:"onIdTokenChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},hb:{name:"sendPasswordResetEmail",j:[$c("email"),il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},ib:{name:"sendSignInLinkToEmail",j:[$c("email"),Zc("actionCodeSettings")]},jb:{name:"setPersistence",j:[$c("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",j:[nl()]},Pa:{name:"signInAnonymously",j:[]},Dc:{name:"signInAnonymouslyAndRetrieveData",j:[]},Ec:{name:"signInWithCredential",j:[nl()]},Jb:{name:"signInWithCustomToken",j:[$c("token")]},Bc:{name:"signInAndRetrieveDataWithCustomToken",j:[$c("token")]},Kb:{name:"signInWithEmailAndPassword",j:[$c("email"),$c("password")]},Fc:{name:"signInWithEmailLink",j:[$c("email"),$c("emailLink",!0)]},Cc:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Gc:{name:"signInWithPhoneNumber",j:[$c("phoneNumber"),rl()]},Hc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Ic:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"updateCurrentUser",j:[il({name:"user",K:"an instance of Firebase User",optional:!1,M:function(t){return!!(t&&t instanceof Ou)}},el(),"user")]},kb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Qc:{name:"useDeviceLanguage",j:[]},Rc:{name:"verifyPasswordResetCode",j:[$c("code")]}}),al(vc.prototype,{lc:{name:"languageCode",qb:il($c(),el(),"languageCode")}}),vc.Persistence=Ps,vc.Persistence.LOCAL="local",vc.Persistence.SESSION="session",vc.Persistence.NONE="none",ol(Ou.prototype,{delete:{name:"delete",j:[]},ac:{name:"getIdTokenResult",j:[Jc("opt_forceRefresh",!0)]},F:{name:"getIdToken",j:[Jc("opt_forceRefresh",!0)]},ab:{name:"linkAndRetrieveDataWithCredential",j:[nl()]},mc:{name:"linkWithCredential",j:[nl()]},nc:{name:"linkWithPhoneNumber",j:[$c("phoneNumber"),rl()]},oc:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},pc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},cb:{name:"reauthenticateAndRetrieveDataWithCredential",j:[nl()]},vc:{name:"reauthenticateWithCredential",j:[nl()]},wc:{name:"reauthenticateWithPhoneNumber",j:[$c("phoneNumber"),rl()]},xc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},yc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},gb:{name:"sendEmailVerification",j:[il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Nc:{name:"unlink",j:[$c("provider")]},mb:{name:"updateEmail",j:[$c("email")]},nb:{name:"updatePassword",j:[$c("password")]},Pc:{name:"updatePhoneNumber",j:[nl("phone")]},ob:{name:"updateProfile",j:[Zc("profile")]}}),ol(Nc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(kc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(vt.prototype,{ia:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),al(wu.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",qb:Jc("appVerificationDisabledForTesting")}}),ol(Eu.prototype,{confirm:{name:"confirm",j:[$c("verificationCode")]}}),sl(Oi,"credential",function(t,e){return new Ii(t,e)},[$c("email"),$c("password")]),ol(Ei.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ei,"credential",Ti,[il($c(),Zc(),"token")]),sl(Oi,"credentialWithLink",Pi,[$c("email"),$c("emailLink")]),ol(Ci.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ci,"credential",xi,[il($c(),Zc(),"token")]),ol(Si.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Si,"credential",ki,[il($c(),il(Zc(),el()),"idToken"),il($c(),el(),"accessToken",!0)]),ol(Ni.prototype,{Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ni,"credential",Ai,[il($c(),Zc(),"token"),$c("secret",!0)]),ol(wi.prototype,{ta:{name:"addScope",j:[$c("scope")]},credential:{name:"credential",j:[il($c(),el(),"idToken",!0),il($c(),el(),"accessToken",!0)]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Li,"credential",Fi,[$c("verificationId"),$c("verificationCode")]),ol(Li.prototype,{Ta:{name:"verifyPhoneNumber",j:[$c("phoneNumber"),rl()]}}),ol(Fr.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(zi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Hi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Qc.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if(void 0===r.a||!r.a.INTERNAL||!r.a.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={Auth:vc,Error:Fr};sl(t,"EmailAuthProvider",Oi,[]),sl(t,"FacebookAuthProvider",Ei,[]),sl(t,"GithubAuthProvider",Ci,[]),sl(t,"GoogleAuthProvider",Si,[]),sl(t,"TwitterAuthProvider",Ni,[]),sl(t,"OAuthProvider",wi,[$c("providerId")]),sl(t,"PhoneAuthProvider",Li,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof vc)}}]),sl(t,"RecaptchaVerifier",Qc,[il($c(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Zc("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof r.a.app.App)}}]),r.a.INTERNAL.registerService("auth",function(t,e){return e({INTERNAL:{getUid:y((t=new vc(t)).getUid,t),getToken:y(t.$b,t),addAuthTokenListener:y(t.Rb,t),removeAuthTokenListener:y(t.zc,t)}}),t},t,function(t,e){if("create"===t)try{e.auth()}catch(t){}}),r.a.INTERNAL.extendNamespace({User:Ou})}()}).call(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}.call(this,n(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
+
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i,o,a=n(82),s=n(198),u=n(322),c=(i=n(14))&&"object"==typeof i&&"default"in i?i.default:i,l=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),a.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:a.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),f=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return a.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),h=function(t){try{if("undefined"!=typeof window&&void 0!==window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new l(e)}}catch(t){}return new f},p=h("localStorage"),d=h("sessionStorage"),v=new s.Logger("@firebase/database"),m=(o=1,function(){return o++}),y=function(t){var e=a.stringToByteArray(t),n=new a.Sha1;n.update(e);var r=n.digest();return a.base64.encodeByteArray(r)},g=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=g.apply(null,t[r]):"object"==typeof t[r]?n+=a.stringify(t[r]):n+=t[r],n+=" ";return n},b=null,_=!0,w=function(t,e){a.assert(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(v.logLevel=s.LogLevel.VERBOSE,b=v.log.bind(v),e&&d.set("logging_enabled",!0)):"function"==typeof t?b=t:(b=null,d.remove("logging_enabled"))},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===_&&(_=!1,null===b&&!0===d.get("logging_enabled")&&w(!0)),b){var n=g.apply(null,t);b(n)}},T=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];E.apply(void 0,[t].concat(e))}},C=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+g.apply(void 0,t);v.error(n)},x=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+g.apply(void 0,t);throw v.error(n),new Error(n)},S=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+g.apply(void 0,t);v.warn(n)},k=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},N="[MIN_NAME]",A="[MAX_NAME]",I=function(t,e){if(t===e)return 0;if(t===N||e===A)return-1;if(e===N||t===A)return 1;var n=U(t),r=U(e);return null!==n?null!==r?n-r==0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},O=function(t,e){return t===e?0:t<e?-1:1},P=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+a.stringify(e))},R=function(t){if("object"!=typeof t||null===t)return a.stringify(t);var e=[];for(var n in t)e.push(n);e.sort();for(var r="{",i=0;i<e.length;i++)0!==i&&(r+=","),r+=a.stringify(e[i]),r+=":",r+=R(t[e[i]]);return r+="}"},D=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},M=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else a.forEach(t,function(t,n){return e(n,t)})},L=function(t){a.assert(!k(t),"Invalid JSON number");var e,n,r,i,o,s,u;for(0===t?(n=0,r=0,e=1/t==-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074)))),s=[],o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(e?1:0),s.reverse(),u=s.join("");var c="";for(o=0;o<64;o+=8){var l=parseInt(u.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),c+=l}return c.toLowerCase()},F=new RegExp("^-?\\d{1,10}$"),U=function(t){if(F.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},j=function(t){try{t()}catch(t){setTimeout(function(){var e=t.stack||"";throw S("Exception was thrown by user callback.",e),t},Math.floor(0))}},B=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},q=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n},V=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=I(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),W=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=a.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=a.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=a.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),H="long_polling",z=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=p.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&p.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(a.assert("string"==typeof t,"typeof type must == string"),a.assert("object"==typeof e,"typeof params must == object"),"websocket"===t)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==H)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return a.forEach(e,function(t,e){r.push(t+"="+e)}),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}();var K,G,Q,Y,X,$=function(t){var e=J(t),n=e.subdomain;"firebase"===e.domain&&x(e.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!=n||"localhost"===e.domain||x("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),e.secure||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new z(e.host,e.secure,n,r),path:new V(e.pathString)}},J=function(t){var e="",n="",r="",i="",o=!0,a="https",s=443;if("string"==typeof t){var u=t.indexOf("//");u>=0&&(a=t.substring(0,u-1),t=t.substring(u+2));var c=t.indexOf("/");-1===c&&(c=t.length);var l=t.indexOf("?");-1===l&&(l=t.length),e=t.substring(0,Math.min(c,l)),c<l&&(i=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(t){}e+="/"+i}return e}(t.substring(c,l)));var f=function(t){var e={};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=t.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var o=i.split("=");2===o.length?e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]):S("Invalid query segment '"+i+"' in query '"+t+"'")}}return e}(t.substring(Math.min(t.length,l)));(u=e.indexOf(":"))>=0?(o="https"===a||"wss"===a,s=parseInt(e.substring(u+1),10)):u=t.length;var h=e.split(".");3===h.length?(n=h[1],r=h[0].toLowerCase()):2===h.length?n=h[0]:"localhost"===h[0].slice(0,u).toLowerCase()&&(n="localhost"),""===r&&"ns"in f&&(r=f.ns)}return{host:e,port:s,domain:n,subdomain:r,secure:o,scheme:a,pathString:i}},Z=/[\[\].#$\/\u0000-\u001F\u007F]/,tt=/[\[\].#$\u0000-\u001F\u007F]/,et=function(t){return"string"==typeof t&&0!==t.length&&!Z.test(t)},nt=function(t){return"string"==typeof t&&0!==t.length&&!tt.test(t)},rt=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!k(t)||t&&"object"==typeof t&&a.contains(t,".sv")},it=function(t,e,n,r,i){i&&void 0===n||ot(a.errorPrefix(t,e,i),n,r)},ot=function(t,e,n){var r=n instanceof V?new W(n,t):n;if(void 0===e)throw new Error(t+"contains undefined "+r.toErrorString());if("function"==typeof e)throw new Error(t+"contains a function "+r.toErrorString()+" with contents = "+e.toString());if(k(e))throw new Error(t+"contains "+e.toString()+" "+r.toErrorString());if("string"==typeof e&&e.length>10485760/3&&a.stringLength(e)>10485760)throw new Error(t+"contains a string greater than 10485760 utf8 bytes "+r.toErrorString()+" ('"+e.substring(0,50)+"...')");if(e&&"object"==typeof e){var i=!1,o=!1;if(a.forEach(e,function(e,n){if(".value"===e)i=!0;else if(".priority"!==e&&".sv"!==e&&(o=!0,!et(e)))throw new Error(t+" contains an invalid key ("+e+") "+r.toErrorString()+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(e),ot(t,n,r),r.pop()}),i&&o)throw new Error(t+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},at=function(t,e,n,r,i){if(!i||void 0!==n){var o=a.errorPrefix(t,e,i);if(!n||"object"!=typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var s=[];a.forEach(n,function(t,e){var n=new V(t);if(ot(o,e,r.child(n)),".priority"===n.getBack()&&!rt(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)}),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!et(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(V.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(o,s)}},st=function(t,e,n,r){if(!r||void 0!==n){if(k(n))throw new Error(a.errorPrefix(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!rt(n))throw new Error(a.errorPrefix(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ut=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(a.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},ct=function(t,e,n,r){if(!(r&&void 0===n||et(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},lt=function(t,e,n,r){if(!(r&&void 0===n||nt(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ft=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},ht=function(t,e,n){var r=n.path.toString();if("string"!=typeof n.repoInfo.host||0===n.repoInfo.host.length||!et(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),nt(t)}(r))throw new Error(a.errorPrefix(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},pt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){a.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),a.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){a.validateArgCount("OnDisconnect.remove",0,1,arguments.length),ft("OnDisconnect.remove",this.path_),a.validateCallback("OnDisconnect.remove",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){a.validateArgCount("OnDisconnect.set",1,2,arguments.length),ft("OnDisconnect.set",this.path_),it("OnDisconnect.set",1,t,this.path_,!1),a.validateCallback("OnDisconnect.set",2,e,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){a.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),ft("OnDisconnect.setWithPriority",this.path_),it("OnDisconnect.setWithPriority",1,t,this.path_,!1),st("OnDisconnect.setWithPriority",2,e,!1),a.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(a.validateArgCount("OnDisconnect.update",1,2,arguments.length),ft("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("OnDisconnect.update",1,t,this.path_,!1),a.validateCallback("OnDisconnect.update",2,e,!0);var i=new a.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),dt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return a.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),vt=(K="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",G=0,Q=[],function(t){var e,n=t===G;G=t;var r=new Array(8);for(e=7;e>=0;e--)r[e]=K.charAt(t%64),t=Math.floor(t/64);a.assert(0===t,"Cannot push at time == 0");var i=r.join("");if(n){for(e=11;e>=0&&63===Q[e];e--)Q[e]=0;Q[e]++}else for(e=0;e<12;e++)Q[e]=Math.floor(64*Math.random());for(e=0;e<12;e++)i+=K.charAt(Q[e]);return a.assert(20===i.length,"nextPushId: Length should be 20."),i}),mt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),yt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new mt(N,t),r=new mt(N,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return mt.MIN},t}(),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return Y},set:function(t){Y=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return I(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw a.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,Y)},e.prototype.makePost=function(t,e){return a.assert("string"==typeof t,"KeyIndex indexValue must always be a string."),new mt(t,Y)},e.prototype.toString=function(){return".key"},e}(yt),bt=new gt;var _t,wt,Et,Tt=function(t){return"number"==typeof t?"number:"+L(t):"string:"+t},Ct=function(t){if(t.isLeafNode()){var e=t.val();a.assert("string"==typeof e||"number"==typeof e||"object"==typeof e&&a.contains(e,".sv"),"Priority must be a string or number.")}else a.assert(t===X||t.isEmpty(),"priority of unexpected type.");a.assert(t===X||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},xt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,a.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Ct(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return _t},set:function(t){_t=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(a.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+Tt(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?L(this.value_):this.value_,this.lazyHash_=y(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(a.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return a.assert(i>=0,"Unknown leaf type: "+n),a.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var St,kt,Nt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,new xt("[PRIORITY-POST]",Et))},e.prototype.makePost=function(t,e){var n=wt(t);return new mt(e,new xt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(yt)),At=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),It=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Pt.EMPTY_NODE,this.right=null!=o?o:Pt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return(i=(r=n(t,(i=this).key))<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return Pt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return Pt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){var t;if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Ot=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new It(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),Pt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new At(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new At(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Ot,t}(),Rt=Math.log(2),Dt=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/Rt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Mt=function(t,e,n,r){t.sort(e);var i=function(e,r){var o,a,s=r-e;if(0==s)return null;if(1==s)return o=t[e],a=n?n(o):o,new It(a,o.node,It.BLACK,null,null);var u=parseInt(s/2,10)+e,c=i(e,u),l=i(u+1,r);return o=t[u],a=n?n(o):o,new It(a,o.node,It.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new It(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,It.BLACK):(s(f,It.BLACK),s(f,It.RED))}return o}(new Dt(t.length));return new Pt(r||e,o)},Lt={},Ft=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return a.assert(Lt&&Nt,"ChildrenNode.ts has not been loaded"),St=St||new t({".priority":Lt},{".priority":Nt})},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=a.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e===Lt?null:e},t.prototype.hasIndex=function(t){return a.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){a.assert(e!==bt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],o=!1,s=n.getIterator(mt.Wrap),u=s.getNext();u;)o=o||e.isDefinedOn(u.node),i.push(u),u=s.getNext();r=o?Mt(i,e.getCompare()):Lt;var c=e.toString(),l=a.clone(this.indexSet_);l[c]=e;var f=a.clone(this.indexes_);return f[c]=r,new t(f,l)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(a.map(this.indexes_,function(t,i){var o=a.safeGet(r.indexSet_,i);if(a.assert(o,"Missing index implementation for "+i),t===Lt){if(o.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(mt.Wrap),c=u.getNext();c;)c.name!=e.name&&s.push(c),c=u.getNext();return s.push(e),Mt(s,o.getCompare())}return Lt}var l=n.get(e.name),f=t;return l&&(f=f.remove(new mt(e.name,l))),f.insert(e,e.node)}),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(a.map(this.indexes_,function(t){if(t===Lt)return t;var r=n.get(e.name);return r?t.remove(new mt(e.name,r)):t}),this.indexSet_)},t}();function Ut(t,e){return I(t.name,e.name)}function jt(t,e){return I(t,e)}var Bt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Ct(this.priorityNode_),this.children_.isEmpty()&&a.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return kt||(kt=new t(new Pt(jt),null,Ft.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||kt},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?kt:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(a.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new mt(e,n),i=void 0,o=void 0;return n.isEmpty()?(i=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_)),new t(i,i.isEmpty()?kt:this.priorityNode_,o)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;a.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Nt,function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+Tt(this.getPriority().val())+":"),this.forEachChild(Nt,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":y(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new mt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===qt?-1:0},t.prototype.withIndex=function(e){if(e===bt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===bt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Nt),r=e.getIterator(Nt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===bt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),qt=new(function(t){function e(){return t.call(this,new Pt(jt),Bt.EMPTY_NODE,Ft.Default)||this}return u.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Bt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Bt));Object.defineProperties(mt,{MIN:{value:new mt(N,Bt.EMPTY_NODE)},MAX:{value:new mt(A,qt)}}),gt.__EMPTY_NODE=Bt.EMPTY_NODE,xt.__childrenNodeConstructor=Bt,X=qt,function(t){Et=t}(qt);var Vt=!0;function Wt(t,e){if(void 0===e&&(e=null),null===t)return Bt.EMPTY_NODE;if("object"==typeof t&&".priority"in t&&(e=t[".priority"]),a.assert(null===e||"string"==typeof e||"number"==typeof e||"object"==typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t)return new xt(t,Wt(e));if(t instanceof Array||!Vt){var n=Bt.EMPTY_NODE,r=t;return a.forEach(r,function(t,e){if(a.contains(r,t)&&"."!==t.substring(0,1)){var i=Wt(e);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}}),n.updatePriority(Wt(e))}var i=[],o=!1,s=t;if(a.forEach(s,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=Wt(s[t]);n.isEmpty()||(o=o||!n.getPriority().isEmpty(),i.push(new mt(t,n)))}}),0==i.length)return Bt.EMPTY_NODE;var u=Mt(i,Ut,function(t){return t.name},jt);if(o){var c=Mt(i,Nt.getCompare());return new Bt(u,Wt(e),new Ft({".priority":c},{".priority":Nt}))}return new Bt(u,Wt(e),Ft.Default)}!function(t){wt=t}(Wt);var Ht,zt,Kt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?I(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return mt.MAX},e.prototype.makePost=function(t,e){var n=Wt(t);return new mt(e,n)},e.prototype.toString=function(){return".value"},e}(yt)),Gt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,a.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return u.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Wt(t),r=Bt.EMPTY_NODE.updateChild(this.indexPath_,n);return new mt(e,r)},e.prototype.maxPost=function(){var t=Bt.EMPTY_NODE.updateChild(this.indexPath_,qt);return new mt(A,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(yt),Qt=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return a.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return a.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return a.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return a.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){a.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),lt("DataSnapshot.child",1,e,!1);var n=new V(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Nt)},t.prototype.hasChild=function(t){a.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),lt("DataSnapshot.hasChild",1,t,!1);var e=new V(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return a.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;return a.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),a.validateCallback("DataSnapshot.forEach",1,e,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return e(new t(i,n.ref_.child(r),Nt))})},t.prototype.hasChildren=function(){return a.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return a.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return a.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),Yt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+a.stringify(this.snapshot.exportVal())},t}(),Xt=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),$t=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Yt("value",this,new Qt(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),Jt=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,a.contains(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.createEvent=function(t,e){a.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Yt(t.type,this,new Qt(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var n=a.getCount(e.callbacks_);if(n===a.getCount(this.callbacks_)){if(1===n){var r=a.getAnyKey(e.callbacks_),i=a.getAnyKey(this.callbacks_);return!(i!==r||e.callbacks_[r]&&this.callbacks_[i]&&e.callbacks_[r]!==this.callbacks_[i])}return a.every(this.callbacks_,function(t,n){return e.callbacks_[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),Zt=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(Ht,"Reference.ts has not been loaded"),Ht},set:function(t){Ht=t},enumerable:!0,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===bt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=N)throw new Error(r);if("string"!=typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!=A)throw new Error(r);if("string"!=typeof n)throw new Error(i)}}else if(t.getIndex()===Nt){if(null!=e&&!rt(e)||null!=n&&!rt(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(a.assert(t.getIndex()instanceof Gt||t.getIndex()===Kt,"unknown index type."),null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return a.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){a.validateArgCount("Query.on",2,4,arguments.length),ut("Query.on",1,e,!1),a.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[e]=n,this.onChildEvent(s,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new $t(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new Jt(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){a.validateArgCount("Query.off",0,3,arguments.length),ut("Query.off",1,t,!0),a.validateCallback("Query.off",2,e,!0),a.validateContextObject("Query.off",3,n,!0);var r=null,i=null;"value"===t?r=new $t(e||null,null,n||null):t&&(e&&((i={})[t]=e),r=new Jt(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;a.validateArgCount("Query.once",1,4,arguments.length),ut("Query.once",1,e,!1),a.validateCallback("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new a.Deferred;c.promise.catch(function(){});var l=function(t){u&&(u=!1,o.off(e,l),n&&n.bind(s.context)(t),c.resolve(t))};return this.on(e,l,function(t){o.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)}),c.promise},t.prototype.limitToFirst=function(e){if(a.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(a.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(a.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid.  Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid.  Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid.  Use Query.orderByValue() instead.');lt("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new V(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path.  Use Query.orderByValue() instead.");var r=new Gt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){a.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(bt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){a.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(Nt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){a.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(Kt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.startAt",0,2,arguments.length),it("Query.startAt",1,e,this.path,!0),ct("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.endAt",0,2,arguments.length),it("Query.endAt",1,e,this.path,!0),ct("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(a.validateArgCount("Query.equalTo",1,2,arguments.length),it("Query.equalTo",1,t,this.path,!1),ct("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return a.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return a.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=R(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(a.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t)){throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.")}var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,a.validateCallback(t,3,r.cancel,!0),r.context=n,a.validateContextObject(t,4,r.context,!0);else if(e)if("object"==typeof e&&null!==e)r.context=e;else{if("function"!=typeof e)throw new Error(a.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),te=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return a.contains(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return a.isEmpty(this.set)},t.prototype.count=function(){return a.getCount(this.set)},t.prototype.each=function(t){a.forEach(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return a.forEach(this.set,function(e){t.push(e)}),t},t}(),ee=function(){function t(){this.value_=null,this.children_=null}return t.prototype.find=function(t){if(null!=this.value_)return this.value_.getChild(t);if(t.isEmpty()||null==this.children_)return null;var e=t.getFront();return t=t.popFront(),this.children_.contains(e)?this.children_.get(e).find(t):null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(e,n);else{null==this.children_&&(this.children_=new te);var r=e.getFront();this.children_.contains(r)||this.children_.add(r,new t);var i=this.children_.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var e=this.value_;this.value_=null;var n=this;return e.forEachChild(Nt,function(t,e){n.remember(new V(t),e)}),this.forget(t)}if(null!==this.children_){var r=t.getFront();if(t=t.popFront(),this.children_.contains(r))this.children_.get(r).forget(t)&&this.children_.remove(r);return!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.value_?e(t,this.value_):this.forEachChild(function(n,r){var i=new V(t.toString()+"/"+n);r.forEachTree(i,e)})},t.prototype.forEachChild=function(t){null!==this.children_&&this.children_.each(function(e,n){t(e,n)})},t}(),ne=function(t,e){return t&&"object"==typeof t?(a.assert(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},re=function(t,e){var n,r=t.getPriority().val(),i=ne(r,e);if(t.isLeafNode()){var o=t,a=ne(o.getValue(),e);return a!==o.getValue()||i!==o.getPriority().val()?new xt(a,Wt(i)):t}var s=t;return n=s,i!==s.getPriority().val()&&(n=n.updatePriority(new xt(i))),s.forEachChild(Nt,function(t,r){var i=re(r,e);i!==r&&(n=n.updateImmediateChild(t,i))}),n};!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(zt||(zt={}));var ie,oe,ae=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,a.assert(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),se=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=zt.ACK_USER_WRITE,this.source=ae.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return a.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new V(e));return new t(V.Empty,n,this.revert)}return a.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ue=function(){return ie||(ie=new Pt(O)),ie},ce=function(){function t(t,e){void 0===e&&(e=ue()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return a.forEach(e,function(t,e){n=n.set(new V(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:V.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new V(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||t.Empty).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(V.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,V.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,V.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(V.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal(function(n,r){r.foreach_(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}(),le=function(){function t(t,e){this.source=t,this.path=e,this.type=zt.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty):new t(this.source,this.path.popFront())},t}(),fe=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=zt.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),he=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=zt.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new V(e));return n.isEmpty()?null:n.value?new fe(this.source,V.Empty,n.value):new t(this.source,V.Empty,n)}return a.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),pe=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),de=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new pe(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new pe(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new pe(Bt.EMPTY_NODE,!1,!1),new pe(Bt.EMPTY_NODE,!1,!1)),t}(),ve=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),me=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,o){a.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()==n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(ve.childRemovedChange(e,s)):a.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(ve.childAddedChange(e,n)):o.trackChildChange(ve.childChangedChange(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Nt,function(t,r){e.hasChild(t)||n.trackChildChange(ve.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(Nt,function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(ve.childChangedChange(e,r,i))}else n.trackChildChange(ve.childAddedChange(e,r))})),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Bt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),ye=function(){function t(){this.changeMap_={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;a.assert(e==ve.CHILD_ADDED||e==ve.CHILD_CHANGED||e==ve.CHILD_REMOVED,"Only child changes supported for tracking"),a.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=a.safeGet(this.changeMap_,n);if(r){var i=r.type;if(e==ve.CHILD_ADDED&&i==ve.CHILD_REMOVED)this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.snapshotNode);else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_ADDED)delete this.changeMap_[n];else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_CHANGED)this.changeMap_[n]=ve.childRemovedChange(n,r.oldSnap);else if(e==ve.CHILD_CHANGED&&i==ve.CHILD_ADDED)this.changeMap_[n]=ve.childAddedChange(n,t.snapshotNode);else{if(e!=ve.CHILD_CHANGED||i!=ve.CHILD_CHANGED)throw a.assertionError("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.oldSnap)}}else this.changeMap_[n]=t},t.prototype.getChanges=function(){return a.getValues(this.changeMap_)},t}(),ge=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),be=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new pe(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),_e=function(){return function(t,e){this.viewCache=t,this.changes=e}}(),we=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){a.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),a.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,s,u=new ye;if(n.type===zt.OVERWRITE){var c=n;c.source.fromUser?o=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(a.assert(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),o=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===zt.MERGE){var l=n;l.source.fromUser?o=this.applyUserMerge_(e,l.path,l.children,r,i,u):(a.assert(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),o=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===zt.ACK_USER_WRITE){var f=n;o=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==zt.LISTEN_COMPLETE)throw a.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,o,h),new _e(o,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(ve.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if(e.isEmpty())if(a.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof Bt?c:Bt.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var p=e.getFront();if(".priority"==p){a.assert(1==e.getLength(),"Can't have a priority with additional path components");var d=o.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);s=null!=v?this.filter_.updatePriority(d,v):o.getNode()}else{var m=e.popFront(),y=void 0;if(o.isCompleteForChild(p)){u=t.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),u);y=null!=g?o.getNode().getImmediateChild(p).updateChild(m,g):o.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,t.getServerCache());s=null!=y?this.filter_.updateChild(o.getNode(),p,y,m,r,i):o.getNode()}}return t.updateEventSnap(s,o.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var h=e.popFront(),p=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"==f?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),f,p,h,ge,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new be(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new be(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=e.popFront(),h=u.getNode().getImmediateChild(l),p=void 0;if(f.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===f.getBack()&&d.getChild(f.parent()).isEmpty()?d:d.updateChild(f,n):Bt.EMPTY_NODE}if(h.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),u},t.prototype.applyMerge_=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:ce.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new V(e),f,r,i,o,a)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new V(e),h,r,i,o,a)}}),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=ce.Empty;return s.getNode().forEachChild(bt,function(t,e){u=u.set(new V(t),e)}),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=ce.Empty;return n.foreach(function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))}),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,ge,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var s=new be(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();a.assert(f instanceof Bt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=e.getFront(),p=n.calcCompleteChild(h,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(h)&&(p=u.getImmediateChild(h)),(c=null!=p?this.filter_.updateChild(u,h,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Bt.EMPTY_NODE,e.popFront(),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,o,i))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(V.Empty),t.updateEventSnap(c,o,this.filter_.filtersNodes())},t}(),Ee=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach(function(t){t.type===ve.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(ve.childMovedChange(t.childName,t.snapshotNode))}),this.generateEventsForType_(i,ve.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,ve.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,ve.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,ve.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,ve.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter(function(t){return t.type===e});a.sort(this.compareChanges_.bind(this)),a.forEach(function(e){var n=o.materializeSingleChange_(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))})})},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_),t)},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw a.assertionError("Should only compare child_ events.");var n=new mt(t.childName,t.snapshotNode),r=new mt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Te=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new me(n.getIndex()),i=n.getNodeFilter();this.processor_=new we(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Bt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Bt.EMPTY_NODE,a.getNode(),null),c=new pe(s,o.isFullyInitialized(),r.filtersNodes()),l=new pe(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new de(l,c),this.eventGenerator_=new Ee(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){a.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var s=this.eventRegistrations_[o];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===zt.MERGE&&null!==t.source.queryId&&(a.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),a.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),a.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(Nt,function(t,e){n.push(ve.childAddedChange(t,e))});return e.isFullyInitialized()&&n.push(ve.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),Ce=function(){function t(){this.views_={}}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(oe,"Reference.ts has not been loaded"),oe},set:function(t){a.assert(!oe,"__referenceConstructor has already been defined"),oe=t},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return a.isEmpty(this.views_)},t.prototype.applyOperation=function(t,e,n){var r=t.source.queryId;if(null!==r){var i=a.safeGet(this.views_,r);return a.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(t,e,n)}var o=[];return a.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(t,e,n))}),o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),s=a.safeGet(this.views_,o);if(!s){var u=n.calcCompleteEventCache(i?r:null),c=!1;u?c=!0:r instanceof Bt?(u=n.calcCompleteEventChildren(r),c=!1):(u=Bt.EMPTY_NODE,c=!1);var l=new de(new pe(u,c,!1),new pe(r,i,!1));s=new Te(t,l),this.views_[o]=s}return s.addEventRegistration(e),s.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i=e.queryIdentifier(),o=[],s=[],u=this.hasCompleteView();if("default"===i){var c=this;a.forEach(this.views_,function(t,e){s=s.concat(e.removeEventRegistration(n,r)),e.isEmpty()&&(delete c.views_[t],e.getQuery().getQueryParams().loadsAllData()||o.push(e.getQuery()))})}else{var l=a.safeGet(this.views_,i);l&&(s=s.concat(l.removeEventRegistration(n,r)),l.isEmpty()&&(delete this.views_[i],l.getQuery().getQueryParams().loadsAllData()||o.push(l.getQuery())))}return u&&!this.hasCompleteView()&&o.push(new t.__referenceConstructor(e.repo,e.path)),{removed:o,events:s}},t.prototype.getQueryViews=function(){var t=this;return Object.keys(this.views_).map(function(e){return t.views_[e]}).filter(function(t){return!t.getQuery().getQueryParams().loadsAllData()})},t.prototype.getCompleteServerCache=function(t){var e=null;return a.forEach(this.views_,function(n,r){e=e||r.getCompleteServerCache(t)}),e},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return a.safeGet(this.views_,e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){return a.findValue(this.views_,function(t){return t.getQuery().getQueryParams().loadsAllData()})||null},t}(),xe=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new ce(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=V.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new ce(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return a.forEach(e,function(e,r){n=n.addWrite(t.child(e),r)}),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,ce.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(V.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(Nt,function(e,n){t.push(new mt(e,n))}):this.writeTree_.children.inorderTraversal(function(e,n){null!=n.value&&t.push(new mt(e,n.value))}),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new ce(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(e){return t.applySubtreeWrite_(V.Empty,this.writeTree_,e)},t.Empty=new t(new ce(null)),t.applySubtreeWrite_=function(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(a.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t.applySubtreeWrite_(e.child(n),o,r)}),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r},t}(),Se=function(){function t(){this.visibleWrites_=xe.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new ke(t,this)},t.prototype.addOverwrite=function(t,e,n,r){a.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){a.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex(function(e){return e.writeId===t});a.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(o=!0)),s--}if(i){if(o)return this.resetTree_(),!0;if(r.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(r.path);else{var c=r.children;a.forEach(c,function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))})}return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(V.Empty)){var a=t.layerTree_(this.allWrites_,function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},e);c=n||Bt.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(e);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(e);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(V.Empty)){var c=n||Bt.EMPTY_NODE;return u.apply(c)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Bt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(Nt,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(Nt,function(t,e){var r=i.childCompoundWrite(new V(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){a.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(V.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){return t.snap?t.path.contains(e):!!a.findKey(t.children,function(n,r){return t.path.child(r).contains(e)})},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,V.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=xe.Empty,i=0;i<t.length;++i){var o=t[i];if(e(o)){var s=o.path,u=void 0;if(o.snap)n.contains(s)?(u=V.relativePath(n,s),r=r.addWrite(u,o.snap)):s.contains(n)&&(u=V.relativePath(s,n),r=r.addWrite(V.Empty,o.snap.getChild(u)));else{if(!o.children)throw a.assertionError("WriteRecord should have .snap or .children");if(n.contains(s))u=V.relativePath(n,s),r=r.addWrites(u,o.children);else if(s.contains(n))if((u=V.relativePath(s,n)).isEmpty())r=r.addWrites(V.Empty,o.children);else{var c=a.safeGet(o.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(V.Empty,l)}}}}}return r},t}(),ke=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),Ne=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=ce.Empty,this.pendingWriteTree_=new Se,this.tagToQueryMap_={},this.queryToTagMap_={}}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new fe(ae.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=ce.Empty;return null!=n.snap?r=r.set(V.Empty,!0):a.forEach(n.children,function(t,e){r=r.set(new V(t),e)}),this.applyOperationToSyncPoints_(new se(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new fe(ae.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new le(ae.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=new fe(ae.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=ce.fromObject(n),l=new he(ae.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=V.relativePath(o,e),u=new le(ae.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,function(t,e){var n=V.relativePath(t,r);i=i||e.getCompleteServerCache(n),o=o||e.hasCompleteView()});var s,u=this.syncPointTree_.get(r);(u?(o=o||u.hasCompleteView(),i=i||u.getCompleteServerCache(V.Empty)):(u=new Ce,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Bt.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild(function(t,e){var n=e.getCompleteServerCache(V.Empty);n&&(i=i.updateImmediateChild(t,n))}));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);a.assert(!(l in this.queryToTagMap_),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap_[l]=f,this.tagToQueryMap_["_"+f]=l}var h=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,h,i,s);if(!c&&!o){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(t){return t.getQueryParams().loadsAllData()}),f=this.syncPointTree_.findOnPath(o,function(t,e){return e.hasCompleteView()});if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(h),d=0;d<p.length;++d){var v=p[d],m=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(m),this.tagForQuery_(m),y.hashFn,y.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach(function(e){var n=i.queryToTagMap_[t.makeQueryKey_(e)];i.listenProvider_.stopListening(t.queryForListening_(e),n)});this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,function(e,n){var r=V.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),a.forEach(n,function(t,e){r=r.concat(e)}),r})},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),o=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,o.hashFn,o.onComplete),u=this.syncPointTree_.subtree(r);if(i)a.assert(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold(function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map(function(t){return t.getQuery()}))),a.forEach(n,function(t,e){r=r.concat(e)}),r}),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Bt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return a.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new V(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap_["_"+t]},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return a.safeGet(this.queryToTagMap_,n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);a.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(V.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(V.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(V.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(V.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(V.Empty));var a=[];return e.children.inorderTraversal(function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))}),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Ae=function(){function t(){this.rootNode_=Bt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Ie=function(){function t(t){this.app_=t}return t.prototype.getToken=function(t){return this.app_.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(E("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(t)})},t.prototype.addTokenChangeListener=function(t){this.app_.INTERNAL.addAuthTokenListener(t)},t.prototype.removeTokenChangeListener=function(t){this.app_.INTERNAL.removeAuthTokenListener(t)},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',S(t)},t}(),Oe=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),a.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return a.deepCopy(this.counters_)},t}(),Pe=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Oe),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Re=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=a.clone(t);return this.last_&&a.forEach(this.last_,function(t,n){e[t]=e[t]-n}),this.last_=t,e},t}(),De=1e4,Me=3e4,Le=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Re(t);var n=De+(Me-De)*Math.random();q(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;a.forEach(e,function(e,i){i>0&&a.contains(t.statsToReport_,e)&&(n[e]=i,r=!0)}),r&&this.server_.reportStats(n),q(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Fe=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new Ue(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.equals(t)})},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.contains(t)||t.contains(e)})},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),Ue=function(){function t(t){this.path_=t,this.events_=[]}return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();b&&E("event: "+e.toString()),j(n)}}},t.prototype.getPath=function(){return this.path_},t}(),je=function(){function t(t){this.allowedEvents_=t,this.listeners_={},a.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=this.listeners_[t].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){a.assert(this.allowedEvents_.find(function(e){return e===t}),"Unknown event: "+t)},t}(),Be=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(n="visibilitychange",e="hidden"):void 0!==document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(n="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))},!1),r}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(je),qe=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||a.isMobileCordova()||(window.addEventListener("online",function(){e.online_||(e.online_=!0,e.trigger("online",!0))},!1),window.addEventListener("offline",function(){e.online_&&(e.online_=!1,e.trigger("online",!1))},!1)),e}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(je),Ve=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&j(function(){n.onMessage_(t[e])})},r=0;r<t.length;++r)e(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),We="pLPCommand",He="pRTLPCB",ze=function(){function t(t,e,n,r){this.connId=t,this.repoInfo=e,this.transportSessionId=n,this.lastSessionId=r,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=T(t),this.stats_=Pe.getCollection(e),this.urlFn=function(t){return e.connectionURL(H,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new Ve(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null},Math.floor(3e4)),function(t){if(a.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}(function(){if(!n.isClosed_){n.scriptTagHolder=new Ke(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1],o=t[2];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"==r)n.id=i,n.password=o;else{if("close"!==r)throw new Error("Unrecognized command received: "+r);i?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(i,function(){n.onClosed_()})):n.onClosed_()}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(r,i)},function(){n.onClosed_()},n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v="5",n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,function(){})}})},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return t.forceAllow_||!t.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.UI)&&!a.isNodeSdk()},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=a.base64Encode(e),r=D(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!a.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=a.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),Ke=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new te,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,a.isNodeSdk())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=m(),window[We+this.uniqueCallbackIdentifier]=e,window[He+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createIFrame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))o='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(t){E("frame writing exception"),t.stack&&E(t.stack),E(t)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||E("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var e=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)},Math.floor(0))),a.isNodeSdk()&&this.myID){var n={disconn:"t"};n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);t.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,function(){clearTimeout(i),r()})},t.prototype.addTag=function(t,e){var n=this;a.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){E("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(t){}},Math.floor(1))},t}(),Ge=null;"undefined"!=typeof MozWebSocket?Ge=MozWebSocket:"undefined"!=typeof WebSocket&&(Ge=WebSocket);var Qe=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=T(this.connId),this.stats_=Pe.getCollection(n),this.connURL=t.connectionURL_(n,r,i)}return t.connectionURL_=function(t,e,n){var r={v:"5"};return!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL("websocket",r)},t.prototype.open=function(t,e){var n=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,p.set("previous_websocket_failure",!0);try{if(a.isNodeSdk()){var i=a.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+c.SDK_VERSION+"/"+r.platform+"/"+i}},s=r.env,u=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(o.proxy={origin:u}),this.mySock=new Ge(this.connURL,[],o)}else this.mySock=new Ge(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var l=t.message||t.data;return l&&this.log_(l),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0},this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(t){n.handleIncomingFrame(t)},this.mySock.onerror=function(t){n.log_("WebSocket error.  Closing connection.");var e=t.message||t.data;e&&n.log_(e),n.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==Ge&&!t.forceDisallow_},t.previouslyFailed=function(){return p.isInMemoryStorage||!0===p.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){p.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=a.jsonEval(e);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},t.prototype.extractFrameCount_=function(t){if(a.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},t.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(t){this.resetKeepAlive();var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=D(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()},Math.floor(45e3))},t.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),Ye=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[ze,Qe]},enumerable:!0,configurable:!0}),t.prototype.initTransports_=function(e){var n=Qe&&Qe.isAvailable(),r=n&&!Qe.previouslyFailed();if(e.webSocketOnly&&(n||S("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),r=!0),r)this.transports_=[Qe];else{var i=this.transports_=[];M(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&i.push(e)})}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Xe=function(){function t(t,e,n,r,i,o,a){this.id=t,this.repoInfo_=e,this.onMessage_=n,this.onReady_=r,this.onDisconnect_=i,this.onKill_=o,this.lastSessionId=a,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=T("c:"+this.id+":"),this.transportManager_=new Ye(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(n,r)},Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=q(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes.  Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes.  Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!=e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);if("c"==e)this.onSecondaryControl_(n);else{if("d"!=e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);"c"==e?this.onControl_(n):"d"==e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=P("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?C("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):C("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),"5"!==n&&S("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),q(function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())},Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received.  New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):q(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(p.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),$e=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),Je=1e3,Ze=3e5,tn=function(t){function e(n,r,i,o,s,u){var c=t.call(this)||this;if(c.repoInfo_=n,c.onDataUpdate_=r,c.onConnectStatus_=i,c.onServerInfoUpdate_=o,c.authTokenProvider_=s,c.authOverride_=u,c.id=e.nextPersistentConnectionId_++,c.log_=T("p:"+c.id+":"),c.interruptReasons_={},c.listens_={},c.outstandingPuts_=[],c.outstandingPutCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=Je,c.maxReconnectDelay_=Ze,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,u&&!a.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return c.scheduleConnect_(0),Be.getInstance().on("visible",c.onVisible_,c),-1===n.host.indexOf("fblocal")&&qe.getInstance().on("online",c.onOnline_,c),c}return u.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(a.stringify(i)),a.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),a.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens_[o][i]=s,this.connected_&&this.sendListen_(s)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens_[i]&&n.listens_[i][o])===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))})},e.warnOnListenWarnings_=function(t,e){if(t&&"object"==typeof t&&a.contains(t,"w")){var n=a.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();S("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||a.isAdmin(t))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=a.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))})}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)})},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}})}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+a.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):C("Unrecognized action received from server: "+a.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;a.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){e.establishConnectionTimer_=null,e.establishConnection_()},Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=Je),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,s=this.lastSessionId,u=!1,c=null,l=function(){c?c.close():(u=!0,r())};this.realtime_={close:l,sendRequest:function(t){a.assert(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(t)}};var f=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(f).then(function(e){u?E("getToken() completed but was canceled"):(E("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,c=new Xe(i,o.repoInfo_,t,n,r,function(t){S(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},s))}).then(null,function(t){o.log_("Failed to get token: "+t),u||(a.CONSTANTS.NODE_ADMIN&&S(t),l())})}},e.prototype.interrupt=function(t){E("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){E("Resuming connection for reason: "+t),delete this.interruptReasons_[t],a.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map(function(t){return R(t)}).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new V(t).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][e],delete this.listens_[r][e],0===a.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},e.prototype.onAuthRevoked_=function(t,e){E("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t=this;this.tryAuth(),a.forEach(this.listens_,function(e,n){a.forEach(n,function(e,n){t.sendListen_(n)})});for(var e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";a.CONSTANTS.NODE_ADMIN?e="admin_node":a.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+c.SDK_VERSION.replace(/\./g,"-")]=1,a.isMobileCordova()?t["framework.cordova"]=1:a.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=qe.getInstance().currentlyOnline();return a.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}($e),en=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=T("p:rest:"),i.listens_={},i}return u.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(a.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(s,n,!1,r),a.safeGet(o.listens_,u)===c)&&i(t?401==t?"permission_denied":"rest_error:"+t:"ok",null)})},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var o=i&&i.accessToken;o&&(e.auth=o);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?"+a.querystring(e);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=a.jsonEval(u.responseText)}catch(t){S("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&S("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()})},e}($e),nn=function(){function t(t,e,n){var r=this;this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Fe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ee,this.persistentConnection_=null;var i=new Ie(n);if(this.stats_=Pe.getCollection(t),e||B())this.server_=new en(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!=typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{a.stringify(o)}catch(t){throw new Error("Invalid authOverride provided: "+t)}}this.persistentConnection_=new tn(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(t){r.server_.refreshAuthToken(t)}),this.statsReporter_=Pe.getOrCreateReporter(t,function(){return new Le(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new Ae,this.infoSyncTree_=new Ne({startListening:function(t,e,n,i){var o=[],a=r.infoData_.getNode(t.path);return a.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Ne({startListening:function(t,e,n,i){return r.server_.listen(t,n,e,function(e,n){var o=i(e,n);r.eventQueue_.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new V(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new V(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var o=[];if(r)if(n){var s=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Wt(e);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Wt(e);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;o.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,o)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;M(t,function(t,n){e.updateInfo_(n,t)})},t.prototype.updateInfo_=function(t,e){var n=new V("/.info/"+t),r=Wt(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Wt(e,n),s=re(a,o),u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserOverwrite(t,s,u,!0);this.eventQueue_.queueEvents(c),this.server_.put(t.toString(),a.val(!0),function(e,n){var o="ok"===e;o||S("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(u,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)});var l=this.abortTransactions_(t);this.rerunTransactions_(l),this.eventQueue_.raiseEventsForChangedPath(l,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),s={};if(a.forEach(e,function(t,e){i=!1;var n=Wt(e);s[t]=re(n,o)}),i)E("update() called with empty data.  Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserMerge(t,s,u);this.eventQueue_.queueEvents(c),this.server_.merge(t.toString(),e,function(e,i){var o="ok"===e;o||S("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(u,!o),s=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(s,a),r.callOnCompleteCallback(n,e,i)}),a.forEach(e,function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=[];(function(t,e){var n=new ee;return t.forEachTree(new V(""),function(t,r){n.remember(t,re(r,e))}),n})(this.onDisconnect_,e).forEachTree(V.Empty,function(e,r){n=n.concat(t.serverSyncTree_.applyServerOverwrite(e,r));var i=t.abortTransactions_(e);t.rerunTransactions_(i)}),this.onDisconnect_=new ee,this.eventQueue_.raiseEventsForChangedPath(V.Empty,n)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Wt(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Wt(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(a.isEmpty(e))return E("onDisconnect().update() called with empty data.  Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,function(i,o){"ok"===i&&a.forEach(e,function(e,n){var i=Wt(n);r.onDisconnect_.remember(t.child(e),i)}),r.callOnCompleteCallback(n,i,o)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Re(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);a.forEach(e,function(t,e){for(var r=t.length;r<n+2;r++)t+=" ";console.log(t+e)})}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),E.apply(void 0,[n].concat(t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&j(function(){if("ok"==e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}})},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new pn(this))},enumerable:!0,configurable:!0}),t}(),rn=function(){function t(e){this.indexedFilter_=new me(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Bt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Bt.EMPTY_NODE);var i=this;return e.forEachChild(Nt,function(t,e){i.matches(new mt(t,e))||(r=r.updateImmediateChild(t,Bt.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),on=function(){function t(t){this.rangedFilter_=new rn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Bt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Bt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(Bt.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Bt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var o;if(this.reverse_){var s=this.index_.getCompare();o=function(t,e){return s(e,t)}}else o=this.index_.getCompare();var u=t;a.assert(u.numChildren()==this.limit_,"");var c=new mt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name==e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:o(p,c);if(f&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(ve.childChangedChange(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(ve.childRemovedChange(e,h));var v=u.updateImmediateChild(e,Bt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(ve.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:f&&o(l,c)>=0?(null!=i&&(i.trackChildChange(ve.childRemovedChange(l.name,l.node)),i.trackChildChange(ve.childAddedChange(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,Bt.EMPTY_NODE)):t},t}(),an=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Nt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:N},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:A},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return a.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==Nt&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==Nt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new me(this.getIndex()):this.hasLimit()?new on(this):new rn(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()?r:(this.index_===Nt?e=n.PRIORITY_INDEX:this.index_===Kt?e=n.VALUE_INDEX:this.index_===bt?e=n.KEY_INDEX:(a.assert(this.index_ instanceof Gt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=a.stringify(e),this.startSet_&&(r[n.START_AT]=a.stringify(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+a.stringify(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=a.stringify(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+a.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_),r)},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),sn=function(t){function e(e,n){if(!(e instanceof nn))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,an.DEFAULT,!1)||this}return u.__extends(e,t),e.prototype.getKey=function(){return a.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return a.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof t?t=String(t):t instanceof V||(null===this.path.getFront()?function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),lt(t,e,n,r)}("Reference.child",1,t,!1):lt("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){a.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){a.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){a.validateArgCount("Reference.set",1,2,arguments.length),ft("Reference.set",this.path),it("Reference.set",1,t,this.path,!1),a.validateCallback("Reference.set",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(a.validateArgCount("Reference.update",1,2,arguments.length),ft("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("Reference.update",1,t,this.path,!1),a.validateCallback("Reference.update",2,e,!0);var i=new a.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(a.validateArgCount("Reference.setWithPriority",2,3,arguments.length),ft("Reference.setWithPriority",this.path),it("Reference.setWithPriority",1,t,this.path,!1),st("Reference.setWithPriority",2,e,!1),a.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new a.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return a.validateArgCount("Reference.remove",0,1,arguments.length),ft("Reference.remove",this.path),a.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(a.validateArgCount("Reference.transaction",1,3,arguments.length),ft("Reference.transaction",this.path),a.validateCallback("Reference.transaction",1,t,!1),a.validateCallback("Reference.transaction",2,e,!0),function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!=typeof n)throw new Error(a.errorPrefix(t,e,r)+"must be a boolean.")}("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new a.Deferred;"function"==typeof e&&r.promise.catch(function(){});return this.repo.startTransaction(this.path,t,function(t,n,i){t?r.reject(t):r.resolve(new dt(n,i)),"function"==typeof e&&e(t,n,i)},n),r.promise},e.prototype.setPriority=function(t,e){a.validateArgCount("Reference.setPriority",1,2,arguments.length),ft("Reference.setPriority",this.path),st("Reference.setPriority",1,t,!1),a.validateCallback("Reference.setPriority",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){a.validateArgCount("Reference.push",0,2,arguments.length),ft("Reference.push",this.path),it("Reference.push",1,t,this.path,!0),a.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=vt(r),o=this.child(i),s=this.child(i);return n=null!=t?o.set(t,e).then(function(){return s}):Promise.resolve(s),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"==typeof e&&n.catch(function(){}),o},e.prototype.onDisconnect=function(){return ft("Reference.onDisconnect",this.path),new pt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),e}(Zt);Zt.__referenceConstructor=sn,Ce.__referenceConstructor=sn;var un,cn=function(){return function(){this.children={},this.childCount=0,this.value=null}}(),ln=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new cn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n,r=e instanceof V?e:new V(e),i=this;null!==(n=r.getFront());){i=new t(n,i,a.safeGet(i.node_.children,n)||new cn),r=r.popFront()}return i},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){a.assert(void 0!==t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;a.forEach(this.node_.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new V(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=a.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(un||(un={})),nn.MAX_TRANSACTION_RETRIES_=25,nn.prototype.transactions_init_=function(){this.transactionQueueTree_=new ln},nn.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},o=new sn(this,t);o.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:m(),applyLocally:r,retryCount:0,unwatcher:function(){o.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new Qt(s.currentInputSnapshot,new sn(this,s.path),Nt);s.onComplete(null,!1,l)}}else{ot("transaction failed: Data returned ",c,s.path),s.status=un.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var p=void 0;if("object"==typeof c&&null!==c&&a.contains(c,".priority"))p=a.safeGet(c,".priority"),a.assert(rt(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||Bt.EMPTY_NODE).getPriority().val();p=p;var d=this.generateServerValues(),v=Wt(c,p),y=re(v,d);s.currentOutputSnapshotRaw=v,s.currentOutputSnapshotResolved=y,s.currentWriteId=this.getNextWriteId_();var g=this.serverSyncTree_.applyUserOverwrite(t,y,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,g),this.sendReadyTransactions_()}},nn.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Bt.EMPTY_NODE},nn.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);a.assert(n.length>0,"Sending zero length transaction queue"),n.every(function(t){return t.status===un.RUN})&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.sendReadyTransactions_(t)})},nn.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map(function(t){return t.currentWriteId}),i=this.getLatestState_(t,r),o=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];a.assert(c.status===un.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=un.SENT,c.retryCount++;var l=V.relativePath(t,c.path);o=o.updateChild(l,c.currentOutputSnapshotRaw)}var f=o.val(!0),h=t;this.server_.put(h.toString(),f,function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=un.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new sn(n,e[a].path),c=new Qt(s,u,Nt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)j(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===un.SENT_NEEDS_ABORT?e[a].status=un.NEEDS_ABORT:e[a].status=un.RUN;else{S("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=un.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}},s)},nn.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},nn.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],o=t.filter(function(t){return t.status===un.RUN}).map(function(t){return t.currentWriteId}),s=0;s<t.length;s++){var u=t[s],c=V.relativePath(e,u.path),l=!1,f=void 0;if(a.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===un.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===un.RUN)if(u.retryCount>=nn.MAX_TRANSACTION_RETRIES_)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,o);u.currentInputSnapshot=h;var p=t[s].update(h.val());if(void 0!==p){ot("transaction failed: Data returned ",p,u.path);var d=Wt(p);"object"==typeof p&&null!=p&&a.contains(p,".priority")||(d=d.updatePriority(h.getPriority()));var v=u.currentWriteId,m=this.generateServerValues(),y=re(d,m);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=un.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var g=new sn(this,t[s].path),b=t[s].currentInputSnapshot,_=new Qt(b,g,Nt);r.push(t[s].onComplete.bind(null,null,!1,_))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)j(r[s]);this.sendReadyTransactions_()}},nn.prototype.getAncestorTransactionNode_=function(t){for(var e,n=this.transactionQueueTree_;null!==(e=t.getFront())&&null===n.getValue();)n=n.subTree(e),t=t.popFront();return n},nn.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort(function(t,e){return t.order-e.order}),e},nn.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild(function(t){n.aggregateTransactionQueuesForNode_(t,e)})},nn.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==un.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild(function(t){e.pruneCompletedTransactionsBelowNode_(t)})},nn.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor(function(t){e.abortTransactionsOnNode_(t)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(t){e.abortTransactionsOnNode_(t)}),n},nn.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o<e.length;o++)if(e[o].status===un.SENT_NEEDS_ABORT);else if(e[o].status===un.SENT)a.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,e[o].status=un.SENT_NEEDS_ABORT,e[o].abortReason="set";else if(a.assert(e[o].status===un.RUN,"Unexpected transaction status in abort"),e[o].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[o].currentWriteId,!0)),e[o].onComplete){n.push(e[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(o=0;o<n.length;o++)j(n[o])}};var fn,hn=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return fn||(fn=new t),fn},t.prototype.interrupt=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].interrupt()},t.prototype.resume=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].resume()},t.prototype.databaseFromApp=function(t,e){var n=e||t.options.databaseURL;void 0===n&&x("Can't determine Firebase Database URL.  Be sure to include databaseURL option when calling firebase.initializeApp().");var r=$(n),i=r.repoInfo;return ht("Invalid Firebase Database URL",1,r),r.path.isEmpty()||x("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,t).database},t.prototype.deleteRepo=function(t){var e=a.safeGet(this.repos_,t.app.name);e&&a.safeGet(e,t.repoInfo_.toURLString())===t||x("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e){var n=a.safeGet(this.repos_,e.name);n||(n={},this.repos_[e.name]=n);var r=a.safeGet(n,t.toURLString());return r&&x("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new nn(t,this.useRestClient_,e),n[t.toURLString()]=r,r},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}(),pn=function(){function t(t){this.repo_=t,t instanceof nn||x("Don't call new Database() directly - please use firebase.database()."),this.root_=new sn(t,V.Empty),this.INTERNAL=new dn(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),a.validateArgCount("database.ref",0,1,arguments.length),t instanceof sn?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),a.validateArgCount(e,1,1,arguments.length);var n=$(t);ht(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&x(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&x("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){a.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){a.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"}},t}(),dn=function(){function t(t){this.database=t}return t.prototype.delete=function(){return u.__awaiter(this,void 0,void 0,function(){return u.__generator(this,function(t){return this.database.checkDeleted_("delete"),hn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},t}(),vn=Object.freeze({forceLongPolling:function(){Qe.forceDisallow(),ze.forceAllow()},forceWebSockets:function(){ze.forceDisallow()},isWebSocketsAvailable:function(){return Qe.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)}}),mn=tn;tn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},tn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var yn=Xe,gn=z,bn=Object.freeze({DataConnection:mn,RealTimeConnection:yn,hijackHash:function(t){var e=tn.prototype.put;return tn.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){tn.prototype.put=e}},ConnectionTarget:gn,queryIdentifier:function(t){return t.queryIdentifier()},listens:function(t){return t.repo.persistentConnection_.listens_},forceRestClient:function(t){hn.getInstance().forceRestClient(t)}}),_n=pn.ServerValue;function wn(e){var n=e.INTERNAL.registerService("database",function(t,e,n){return hn.getInstance().databaseFromApp(t,n)},{Reference:sn,Query:Zt,Database:pn,enableLogging:w,INTERNAL:vn,ServerValue:_n,TEST_ACCESS:bn},null,!0);a.isNodeSdk()&&(t.exports=n)}wn(c),e.registerDatabase=wn,e.Database=pn,e.Query=Zt,e.Reference=sn,e.enableLogging=w,e.ServerValue=_n,e.DataSnapshot=Qt,e.OnDisconnect=pt}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),function(t){var e=n(14),r=n.n(e);(function(){var t,e=e||{},n=this;function i(t){return"string"==typeof t}function o(t){return"boolean"==typeof t}function a(){}function s(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function u(t){return null===t}function c(t){return"array"==s(t)}function l(t){var e=s(t);return"array"==e||"object"==e&&"number"==typeof t.length}function f(t){return"function"==s(t)}function h(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var p="closure_uid_"+(1e9*Math.random()>>>0),d=0;function v(t,e,n){return t.call.apply(t.bind,arguments)}function m(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:m).apply(null,arguments)}function g(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now||function(){return+new Date};function _(t,e){function n(){}n.prototype=e.prototype,t.lb=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.cd=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function w(t){t.prototype.then=t.prototype.then,t.prototype.$goog_Thenable=!0}function E(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function T(t){if(Error.captureStackTrace)Error.captureStackTrace(this,T);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function C(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");T.call(this,n+t[r])}function x(t,e){throw new C("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function S(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function k(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function N(){this.b=this.a=null}_(T,Error),T.prototype.name="CustomError",_(C,T),C.prototype.name="AssertionError",S.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var A=new S(function(){return new O},function(t){t.reset()});function I(){var t=pt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function O(){this.next=this.b=this.a=null}N.prototype.add=function(t,e){var n=A.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},O.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},O.prototype.reset=function(){this.next=this.b=this.a=null};var P=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(i(t))return i(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},R=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,o=i(t)?t.split(""):t,a=0;a<r;a++)a in o&&e.call(n,o[a],a,t)};var D=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),o=i(t)?t.split(""):t,a=0;a<n;a++)a in o&&(r[a]=e.call(void 0,o[a],a,t));return r},M=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t))return!0;return!1};function L(t,e){return 0<=P(t,e)}function F(t,e){var n;return(n=0<=(e=P(t,e)))&&Array.prototype.splice.call(t,e,1),n}function U(t,e){!function(t,e){var n=t.length,r=i(t)?t.split(""):t;for(--n;0<=n;--n)n in r&&e.call(void 0,r[n],n,t)}(t,function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0})}function j(t){return Array.prototype.concat.apply([],arguments)}function B(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function q(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}var V=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function W(t){return $.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(z,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(K,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(G,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(Q,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(Y,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(X,"&#0;")),t):t}var H,z=/&/g,K=/</g,G=/>/g,Q=/"/g,Y=/'/g,X=/\x00/g,$=/[\x00&<>"']/;function J(t,e){return-1!=t.indexOf(e)}function Z(t,e){return t<e?-1:t>e?1:0}t:{var tt=n.navigator;if(tt){var et=tt.userAgent;if(et){H=et;break t}}H=""}function nt(t){return J(H,t)}function rt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function it(t){for(var e in t)return!1;return!0}function ot(t){var e,n={};for(e in t)n[e]=t[e];return n}var at,st,ut="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ct(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<ut.length;o++)n=ut[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function lt(t){n.setTimeout(function(){throw t},0)}function ft(t,e){st||function(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve(void 0);st=function(){t.then(dt)}}else st=function(){var t=dt;!f(n.setImmediate)||n.Window&&n.Window.prototype&&!nt("Edge")&&n.Window.prototype.setImmediate==n.setImmediate?(at||(at=function(){var t=n.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!nt("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=y(function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),void 0!==t&&!nt("Trident")&&!nt("MSIE")){var e=new t,r={},i=r;return e.port1.onmessage=function(){if(void 0!==r.next){var t=(r=r.next).tb;r.tb=null,t()}},function(t){i.next={tb:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}}()),at(t)):n.setImmediate(t)}}(),ht||(st(),ht=!0),pt.add(t,e)}var ht=!1,pt=new N;function dt(){for(var t;t=I();){try{t.a.call(t.b)}catch(t){lt(t)}k(A,t)}ht=!1}function vt(t,e){if(this.a=mt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=a)try{var n=this;t.call(e,function(t){kt(n,yt,t)},function(t){if(!(t instanceof Dt))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}kt(n,gt,t)})}catch(t){kt(this,gt,t)}}var mt=0,yt=2,gt=3;function bt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}bt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var _t=new S(function(){return new bt},function(t){t.reset()});function wt(t,e,n){var r=_t.get();return r.g=t,r.b=e,r.f=n,r}function Et(t){if(t instanceof vt)return t;var e=new vt(a);return kt(e,yt,t),e}function Tt(t){return new vt(function(e,n){n(t)})}function Ct(t,e,n){Nt(t,e,n,null)||ft(g(e,t))}function xt(t,e){t.b||t.a!=yt&&t.a!=gt||At(t),t.f?t.f.next=e:t.b=e,t.f=e}function St(t,e,n,r){var i=wt(null,null,null);return i.a=new vt(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof Dt?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,xt(t,i),i.a}function kt(t,e,n){t.a==mt&&(t===n&&(e=gt,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Nt(n,t.Lc,t.Mc,t)||(t.i=n,t.a=e,t.c=null,At(t),e!=gt||n instanceof Dt||function(t,e){t.g=!0,ft(function(){t.g&&Rt.call(null,e)})}(t,n)))}function Nt(t,e,n,r){if(t instanceof vt)return xt(t,wt(e||a,n||null,r)),!0;if(E(t))return t.then(e,n,r),!0;if(h(t))try{var i=t.then;if(f(i))return function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}var a=!1;try{e.call(t,function(t){a||(a=!0,n.call(i,t))},o)}catch(t){o(t)}}(t,i,e,n,r),!0}catch(t){return n.call(r,t),!0}return!1}function At(t){t.h||(t.h=!0,ft(t.Ub,t))}function It(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ot(t,e,n,r){if(n==gt&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Pt(e,n,r);else try{e.c?e.g.call(e.f):Pt(e,n,r)}catch(t){Rt.call(null,t)}k(_t,e)}function Pt(t,e,n){e==yt?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}vt.prototype.then=function(t,e,n){return St(this,f(t)?t:null,f(e)?e:null,n)},w(vt),(t=vt.prototype).ia=function(t,e){return(t=wt(t,t,e)).c=!0,xt(this,t),this},t.s=function(t,e){return St(this,null,t,e)},t.cancel=function(t){this.a==mt&&ft(function(){!function t(e,n){if(e.a==mt)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&&(s.c||(i++,s.a==e&&(o=s),!(o&&1<i)));s=s.next)o||(a=s);o&&(r.a==mt&&1==i?t(r,n):(a?((i=a).next==r.f&&(r.f=i),i.next=i.next.next):It(r),Ot(r,o,gt,n)))}e.c=null}else kt(e,gt,n)}(this,new Dt(t))},this)},t.Lc=function(t){this.a=mt,kt(this,yt,t)},t.Mc=function(t){this.a=mt,kt(this,gt,t)},t.Ub=function(){for(var t;t=It(this);)Ot(this,t,this.a,this.i);this.h=!1};var Rt=lt;function Dt(t){T.call(this,t)}function Mt(){0!=Lt&&(Ft[this[p]||(this[p]=++d)]=this),this.pa=this.pa,this.ja=this.ja}_(Dt,T),Dt.prototype.name="cancel";var Lt=0,Ft={};function Ut(t){if(!t.pa&&(t.pa=!0,t.ua(),0!=Lt)){var e=t[p]||(t[p]=++d);if(0!=Lt&&t.ja&&0<t.ja.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ft[e]}}function jt(t){return jt[" "](t),t}Mt.prototype.pa=!1,Mt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},jt[" "]=a;var Bt,qt,Vt=nt("Opera"),Wt=nt("Trident")||nt("MSIE"),Ht=nt("Edge"),zt=Ht||Wt,Kt=nt("Gecko")&&!(J(H.toLowerCase(),"webkit")&&!nt("Edge"))&&!(nt("Trident")||nt("MSIE"))&&!nt("Edge"),Gt=J(H.toLowerCase(),"webkit")&&!nt("Edge");function Qt(){var t=n.document;return t?t.documentMode:void 0}t:{var Yt="",Xt=(qt=H,Kt?/rv:([^\);]+)(\)|;)/.exec(qt):Ht?/Edge\/([\d\.]+)/.exec(qt):Wt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(qt):Gt?/WebKit\/(\S+)/.exec(qt):Vt?/(?:Version)[ \/]?(\S+)/.exec(qt):void 0);if(Xt&&(Yt=Xt?Xt[1]:""),Wt){var $t=Qt();if(null!=$t&&$t>parseFloat(Yt)){Bt=String($t);break t}}Bt=Yt}var Jt,Zt={};function te(t){return function(t,e){var n=Zt;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,function(){for(var e=0,n=V(String(Bt)).split("."),r=V(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=Z(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||Z(0==a[2].length,0==s[2].length)||Z(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var ee=n.document;Jt=ee&&Wt?Qt()||("CSS1Compat"==ee.compatMode?parseInt(Bt,10):5):void 0;var ne=Object.freeze||function(t){return t},re=!Wt||9<=Number(Jt),ie=Wt&&!te("9"),oe=function(){if(!n.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return n.addEventListener("test",a,e),n.removeEventListener("test",a,e),t}();function ae(t,e){this.type=t,this.b=this.target=e,this.Gb=!0}function se(t,e){if(ae.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Kt){t:{try{jt(e.nodeName);var o=!0;break t}catch(t){}o=!1}o||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=i(t.pointerType)?t.pointerType:ue[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}ae.prototype.preventDefault=function(){this.Gb=!1},_(se,ae);var ue=ne({2:"touch",3:"pen",4:"mouse"});se.prototype.preventDefault=function(){se.lb.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,ie)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},se.prototype.f=function(){return this.a};var ce="closure_listenable_"+(1e6*Math.random()|0),le=0;function fe(t){t.na=!0,t.listener=null,t.proxy=null,t.src=null,t.La=null}function he(t){this.src=t,this.a={},this.b=0}function pe(t,e){var n=e.type;n in t.a&&F(t.a[n],e)&&(fe(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function de(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.na&&o.listener==e&&o.capture==!!n&&o.La==r)return i}return-1}he.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=de(t,e,r,i);return-1<a?(e=t[a],n||(e.Ia=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.La=i,this.key=++le,this.na=this.Ia=!1}(e,this.src,o,!!r,i)).Ia=n,t.push(e)),e};var ve="closure_lm_"+(1e6*Math.random()|0),me={};function ye(t,e,n,r,i){if(r&&r.once)be(t,e,n,r,i);else if(c(e))for(var o=0;o<e.length;o++)ye(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Ie(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!1,r,i)}function ge(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=h(i)?!!i.capture:!!i,s=Se(t);if(s||(t[ve]=s=new he(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=xe,e=re?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)oe||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(Ee(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function be(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)be(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Oe(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!0,r,i)}function _e(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)_e(t,e[o],n,r,i);else r=h(r)?!!r.capture:!!r,n=Ne(n),t&&t[ce]?(t=t.m,(e=String(e).toString())in t.a&&(-1<(n=de(o=t.a[e],n,r,i))&&(fe(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Se(t))&&(e=t.a[e.toString()],t=-1,e&&(t=de(e,n,r,i)),(n=-1<t?e[t]:null)&&we(n))}function we(t){if("number"!=typeof t&&t&&!t.na){var e=t.src;if(e&&e[ce])pe(e.m,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(Ee(n),r):e.addListener&&e.removeListener&&e.removeListener(r),0,(n=Se(e))?(pe(n,t),0==n.b&&(n.src=null,e[ve]=null)):fe(t)}}}function Ee(t){return t in me?me[t]:me[t]="on"+t}function Te(t,e,n,r){var i=!0;if((t=Se(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.na&&(o=Ce(o,r),i=i&&!1!==o)}return i}function Ce(t,e){var n=t.listener,r=t.La||t.src;return t.Ia&&we(t),n.call(r,e)}function xe(t,e){if(t.na)return!0;if(!re){if(!e)t:{e=["window","event"];for(var r=n,i=0;i<e.length;i++)if(null==(r=r[e[i]])){e=null;break t}e=r}if(e=new se(i=e,this),r=!0,!(0>i.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(t){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=e.b;o;o=o.parentNode)i.push(o);for(t=t.type,o=i.length-1;0<=o;o--){e.b=i[o];var a=Te(i[o],t,!0,e);r=r&&a}for(o=0;o<i.length;o++)e.b=i[o],a=Te(i[o],t,!1,e),r=r&&a}return r}return Ce(t,new se(e,this))}function Se(t){return(t=t[ve])instanceof he?t:null}var ke="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ne(t){return f(t)?t:(t[ke]||(t[ke]=function(e){return t.handleEvent(e)}),t[ke])}function Ae(){Mt.call(this),this.m=new he(this),this.Nb=this,this.Ua=null}function Ie(t,e,n,r,i){t.m.add(String(e),n,!1,r,i)}function Oe(t,e,n,r,i){t.m.add(String(e),n,!0,r,i)}function Pe(t,e,n,r){if(!(e=t.m.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.na&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ia&&pe(t.m,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Gb}function Re(t,e,r){if(f(t))r&&(t=y(t,r));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:n.setTimeout(t,e||0)}function De(t){var e=null;return new vt(function(n,r){-1==(e=Re(function(){n(void 0)},t))&&r(Error("Failed to schedule timer."))}).s(function(t){throw n.clearTimeout(e),t})}function Me(t){if(t.S&&"function"==typeof t.S)return t.S();if(i(t))return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function Le(t){if(t.U&&"function"==typeof t.U)return t.U();if(!t.S||"function"!=typeof t.S){if(l(t)||i(t)){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Fe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Fe)for(n=t.U(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ue(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];je(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)je(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}_(Ae,Mt),Ae.prototype[ce]=!0,Ae.prototype.addEventListener=function(t,e,n,r){ye(this,t,e,n,r)},Ae.prototype.removeEventListener=function(t,e,n,r){_e(this,t,e,n,r)},Ae.prototype.dispatchEvent=function(t){var e,n=this.Ua;if(n)for(e=[];n;n=n.Ua)e.push(n);n=this.Nb;var r=t.type||t;if(i(t))t=new ae(t,n);else if(t instanceof ae)t.target=t.target||n;else{var o=t;ct(t=new ae(r,n),o)}if(o=!0,e)for(var a=e.length-1;0<=a;a--){var s=t.b=e[a];o=Pe(s,r,!0,t)&&o}if(o=Pe(s=t.b=n,r,!0,t)&&o,o=Pe(s,r,!1,t)&&o,e)for(a=0;a<e.length;a++)o=Pe(s=t.b=e[a],r,!1,t)&&o;return o},Ae.prototype.ua=function(){if(Ae.lb.ua.call(this),this.m){var t,e=this.m;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,fe(n[r]);delete e.a[t],e.b--}}this.Ua=null},(t=Fe.prototype).S=function(){Ue(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},t.U=function(){return Ue(this),this.a.concat()},t.clear=function(){this.b={},this.c=this.a.length=0},t.get=function(t,e){return je(this.b,t)?this.b[t]:e},t.set=function(t,e){je(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},t.forEach=function(t,e){for(var n=this.U(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Be=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function qe(t,e){if(this.b=this.m=this.c="",this.i=null,this.h=this.g="",this.f=!1,t instanceof qe){this.f=void 0!==e?e:t.f,Ve(this,t.c),this.m=t.m,this.b=t.b,We(this,t.i),this.g=t.g,e=t.a;var n=new rn;n.c=e.c,e.a&&(n.a=new Fe(e.a),n.b=e.b),He(this,n),this.h=t.h}else t&&(n=String(t).match(Be))?(this.f=!!e,Ve(this,n[1]||"",!0),this.m=Ye(n[2]||""),this.b=Ye(n[3]||"",!0),We(this,n[4]),this.g=Ye(n[5]||"",!0),He(this,n[6]||"",!0),this.h=Ye(n[7]||"")):(this.f=!!e,this.a=new rn(null,this.f))}function Ve(t,e,n){t.c=n?Ye(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function We(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function He(t,e,n){e instanceof rn?(t.a=e,function(t,e){e&&!t.f&&(on(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(sn(this,e),cn(this,n,t))},t)),t.f=e}(t.a,t.f)):(n||(e=Xe(e,en)),t.a=new rn(e,t.f))}function ze(t,e,n){t.a.set(e,n)}function Ke(t,e){return t.a.get(e)}function Ge(t){return t instanceof qe?new qe(t):new qe(t,void 0)}function Qe(t,e){var n=new qe(null,void 0);return Ve(n,"https"),t&&(n.b=t),e&&(n.g=e),n}function Ye(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Xe(t,e,n){return i(t)?(t=encodeURI(t).replace(e,$e),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function $e(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}qe.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Xe(e,Je,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.m)&&t.push(Xe(e,Je,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(Xe(n,"/"==n.charAt(0)?tn:Ze,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Xe(n,nn)),t.join("")};var Je=/[#\/\?@]/g,Ze=/[#\?:]/g,tn=/[#\?]/g,en=/[#\?@]/g,nn=/#/g;function rn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function on(t){t.a||(t.a=new Fe,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function an(t){var e=Le(t);if(void 0===e)throw Error("Keys are undefined");var n=new rn(null,void 0);t=Me(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];c(o)?cn(n,i,o):n.add(i,o)}return n}function sn(t,e){on(t),e=ln(t,e),je(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,je((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ue(t)))}function un(t,e){return on(t),e=ln(t,e),je(t.a.b,e)}function cn(t,e,n){sn(t,e),0<n.length&&(t.c=null,t.a.set(ln(t,e),B(n)),t.b+=n.length)}function ln(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(t=rn.prototype).add=function(t,e){on(this),this.c=null,t=ln(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},t.clear=function(){this.a=this.c=null,this.b=0},t.forEach=function(t,e){on(this),this.a.forEach(function(n,r){R(n,function(n){t.call(e,n,r,this)},this)},this)},t.U=function(){on(this);for(var t=this.a.S(),e=this.a.U(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},t.S=function(t){on(this);var e=[];if(i(t))un(this,t)&&(e=j(e,this.a.get(ln(this,t))));else{t=this.a.S();for(var n=0;n<t.length;n++)e=j(e,t[n])}return e},t.set=function(t,e){return on(this),this.c=null,un(this,t=ln(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},t.get=function(t,e){return 0<(t=t?this.S(t):[]).length?String(t[0]):e},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.U(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.S(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var fn=!Wt||9<=Number(Jt);function hn(){this.a="",this.b=dn}function pn(t){return t instanceof hn&&t.constructor===hn&&t.b===dn?t.a:(x("expected object of type Const, got '"+t+"'"),"type_error:Const")}hn.prototype.ma=!0,hn.prototype.la=function(){return this.a},hn.prototype.toString=function(){return"Const{"+this.a+"}"};var dn={};function vn(t){var e=new hn;return e.a=t,e}function mn(){this.a="",this.b=wn}function yn(t){return t instanceof mn&&t.constructor===mn&&t.b===wn?t.a:(x("expected object of type TrustedResourceUrl, got '"+t+"' of type "+s(t)),"type_error:TrustedResourceUrl")}function gn(t,e){var n=pn(t);if(!_n.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=new mn;return e.a=t,e}(t=n.replace(bn,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof hn?pn(t):encodeURIComponent(String(t))}))}vn(""),mn.prototype.ma=!0,mn.prototype.la=function(){return this.a},mn.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var bn=/%{(\w+)}/g,_n=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,wn={};function En(){this.a="",this.b=Sn}function Tn(t){return t instanceof En&&t.constructor===En&&t.b===Sn?t.a:(x("expected object of type SafeUrl, got '"+t+"' of type "+s(t)),"type_error:SafeUrl")}En.prototype.ma=!0,En.prototype.la=function(){return this.a},En.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Cn=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function xn(t){return t instanceof En?t:(t=t.ma?t.la():String(t),Cn.test(t)||(t="about:invalid#zClosurez"),kn(t))}var Sn={};function kn(t){var e=new En;return e.a=t,e}function Nn(){this.a="",this.b=An}kn("about:blank"),Nn.prototype.ma=!0,Nn.prototype.la=function(){return this.a},Nn.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var An={};function In(t){var e=new Nn;return e.a=t,e}function On(t){var e=document;return i(t)?e.getElementById(t):t}function Pn(t,e){rt(e,function(e,n){e&&e.ma&&(e=e.la()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Rn.hasOwnProperty(n)?t.setAttribute(Rn[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}In("<!DOCTYPE html>"),In(""),In("<br>");var Rn={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Dn(t,e,n){var r=arguments,o=document,a=String(r[0]),s=r[1];if(!fn&&s&&(s.name||s.type)){if(a=["<",a],s.name&&a.push(' name="',W(s.name),'"'),s.type){a.push(' type="',W(s.type),'"');var u={};ct(u,s),delete u.type,s=u}a.push(">"),a=a.join("")}return a=o.createElement(a),s&&(i(s)?a.className=s:c(s)?a.className=s.join(" "):Pn(a,s)),2<r.length&&function(t,e,n){function r(n){n&&e.appendChild(i(n)?t.createTextNode(n):n)}for(var o=2;o<n.length;o++){var a=n[o];!l(a)||h(a)&&0<a.nodeType?r(a):R(Mn(a)?B(a):a,r)}}(o,a,r),a}function Mn(t){if(t&&"number"==typeof t.length){if(h(t))return"function"==typeof t.item||"string"==typeof t.item;if(f(t))return"function"==typeof t.item}return!1}function Ln(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(c(n)){var i=n;n=i.length,r.push("[");for(var o="",a=0;a<n;a++)r.push(o),t(e,i[a],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&&("function"!=typeof(a=n[i])&&(r.push(o),jn(i,r),r.push(":"),t(e,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":jn(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new function(){},t,e),e.join("")}var Fn={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Un=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function jn(t,e){e.push('"',t.replace(Un,function(t){var e=Fn[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Fn[t]=e),e}),'"')}function Bn(){var t=ir();return Wt&&!!Jt&&11==Jt||/Edge\/\d+/.test(t)}function qn(){return n.window&&n.window.location.href||self&&self.location&&self.location.href||""}function Vn(t,e){e=e||n.window;var r="about:blank";t&&(r=Tn(xn(t))),e.location.href=r}function Wn(t){return!!((t=(t||ir()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function Hn(t){t=t||n.window;try{t.close()}catch(t){}}function zn(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=ir().toLowerCase(),r&&(e.target=r,J(n,"crios/")&&(e.target="_blank")),er(ir())==Zn&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof En?n:xn(void 0!==n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((nt("iPhone")&&!nt("iPod")&&!nt("iPad")||nt("iPad")||nt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(a=r.document.createElement("A"),e instanceof En||e instanceof En||(e=e.ma?e.la():String(e),Cn.test(e)||(e="about:invalid#zClosurez"),e=kn(e)),a.href=Tn(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Tn(e),a&&(zt&&J(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,vn("b/12014412, meta tag with sanitized URL"),t=In(t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+W(t)+'">'),a.document.write(function(t){return t instanceof Nn&&t.constructor===Nn&&t.b===An?t.a:(x("expected object of type SafeHtml, got '"+t+"' of type "+s(t)),"type_error:SafeHtml")}(t)),a.document.close())):(a=r.open(Tn(e),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var Kn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;function Gn(){var t=null;return new vt(function(e){"complete"==n.document.readyState?e():(t=function(){e()},be(window,"load",t))}).s(function(e){throw _e(window,"load",t),e})}function Qn(t){return t=t||ir(),!("file:"!==cr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Yn(){var t=n.window;try{return!(!t||t==t.top)}catch(t){return!1}}function Xn(){return"object"!=typeof n.window&&"function"==typeof n.importScripts}function $n(){return r.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.a.INTERNAL.hasOwnProperty("node")?"Node":Xn()?"Worker":"Browser"}function Jn(){var t=$n();return"ReactNative"===t||"Node"===t}var Zn="Firefox",tr="Chrome";function er(t){var e=t.toLowerCase();return J(e,"opera/")||J(e,"opr/")||J(e,"opios/")?"Opera":J(e,"iemobile")?"IEMobile":J(e,"msie")||J(e,"trident/")?"IE":J(e,"edge/")?"Edge":J(e,"firefox/")?Zn:J(e,"silk/")?"Silk":J(e,"blackberry")?"Blackberry":J(e,"webos")?"Webos":!J(e,"safari/")||J(e,"chrome/")||J(e,"crios/")||J(e,"android")?!J(e,"chrome/")&&!J(e,"crios/")||J(e,"edge/")?J(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":tr:"Safari"}var nr={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};function rr(t,e){e=e||[];var n,r=[],i={};for(n in nr)i[nr[n]]=!0;for(n=0;n<e.length;n++)void 0!==i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=$n())?r=er(i=ir()):"Worker"===r&&(r=er(i=ir())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function ir(){return n.navigator&&n.navigator.userAgent||""}function or(t,e){t=t.split("."),e=e||n;for(var r=0;r<t.length&&"object"==typeof e&&null!=e;r++)e=e[t[r]];return r!=t.length&&(e=void 0),e}function ar(){try{var t=n.localStorage,e=dr();if(t)return t.setItem(e,"1"),t.removeItem(e),!Bn()||!!n.indexedDB}catch(t){return Xn()&&!!n.indexedDB}return!1}function sr(){return(ur()||"chrome-extension:"===cr()||Qn())&&!Jn()&&ar()&&!Xn()}function ur(){return"http:"===cr()||"https:"===cr()}function cr(){return n.location&&n.location.protocol||null}function lr(t){return!Wn(t=t||ir())&&er(t)!=Zn}function fr(t){return void 0===t?null:Ln(t)}function hr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function pr(t){if(null!==t)return JSON.parse(t)}function dr(t){return t||Math.floor(1e9*Math.random()).toString()}function vr(t){return"Safari"!=er(t=t||ir())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function mr(){var t=n.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var r=0;r<t.CP.length;r++)t.CP[r]=null}function yr(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=ir(),e=$n(),this.b=Wn(t)||"ReactNative"===e}function gr(){var t=n.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function br(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function _r(){return!(!or("fireauth.oauthhelper",n)&&!or("fireauth.iframe",n))}yr.prototype.get=function(){var t=n.navigator;return!t||"boolean"!=typeof t.onLine||!ur()&&"chrome-extension:"!==cr()&&void 0===t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var wr,Er={};function Tr(t){Er[t]||(Er[t]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t))}try{var Cr={};Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:2}),wr=2==Cr.abcd}catch(qt){wr=!1}function xr(t,e,n){wr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Sr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&xr(t,n,e[n])}function kr(t){var e={};return Sr(e,t),e}function Nr(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)xr(e,n,Nr(t[n]));return e}var Ar="EMAIL_SIGNIN",Ir="email",Or="newEmail",Pr="requestType",Rr="email",Dr="fromEmail",Mr="data",Lr="operation";function Fr(t,e){this.code=jr+t,this.message=e||Br[t]||""}function Ur(t){var e=t&&t.code;return e?new Fr(e.substring(jr.length),t.message):null}_(Fr,Error),Fr.prototype.D=function(){return{code:this.code,message:this.message}},Fr.prototype.toJSON=function(){return this.D()};var jr="auth/",Br={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."};function qr(t){var e=t[zr];if(void 0===e)throw new Fr("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&&!e.length)throw new Fr("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Vr];if(n&&"object"==typeof n){e=n[Qr];var r=n[Kr];if(n=n[Gr],"string"==typeof e&&e.length){if(this.a=e,void 0!==r&&"boolean"!=typeof r)throw new Fr("argument-error",Kr+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new Fr("argument-error",Gr+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==e)throw new Fr("argument-error",Qr+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new Fr("missing-android-pkg-name")}}else if(void 0!==n)throw new Fr("argument-error",Vr+" property must be a non null object when specified.");if(this.f=null,(e=t[Hr])&&"object"==typeof e){if("string"==typeof(e=e[Yr])&&e.length)this.f=e;else if(void 0!==e)throw new Fr("argument-error",Yr+" property must be a non empty string when specified.")}else if(void 0!==e)throw new Fr("argument-error",Hr+" property must be a non null object when specified.");if(void 0!==(t=t[Wr])&&"boolean"!=typeof t)throw new Fr("argument-error",Wr+" property must be a boolean when specified.");this.c=!!t}var Vr="android",Wr="handleCodeInApp",Hr="iOS",zr="url",Kr="installApp",Gr="minimumVersion",Qr="packageName",Yr="bundleId";function Xr(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e)null===e[n]&&delete e[n];return e}var $r=null,Jr=null;function Zr(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Jr[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!$r){$r={},Jr={};for(var t=0;65>t;t++)$r[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Jr[$r[t]]=t,62<=t&&(Jr["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,function(t){e+=String.fromCharCode(t)}),e}function ti(t){this.c=t.sub,b(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function ei(t){return(t=ni(t))&&t.sub&&t.iss&&t.aud&&t.exp?new ti(t):null}function ni(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(Zr(t))}catch(t){}return null}ti.prototype.f=function(){return this.b};var ri="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),ii=["client_id","response_type","scope","redirect_uri","state"],oi={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:ii},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:ii},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:ii},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ri}};function ai(t){for(var e in oi)if(oi[e].Na==t)return oi[e];return null}function si(t){var e={};e["facebook.com"]=hi,e["google.com"]=di,e["github.com"]=pi,e["twitter.com"]=vi;var n=t&&t[ci];try{if(n)return e[n]?new e[n](t):new fi(t);if(void 0!==t[ui])return new li(t)}catch(t){}return null}var ui="idToken",ci="providerId";function li(t){var e=t[ci];if(!e&&t[ui]){var n=ei(t[ui]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,void 0!==t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),xr(this,"providerId",e),xr(this,"isNewUser",n)}function fi(t){li.call(this,t),xr(this,"profile",Nr((t=pr(t.rawUserInfo||"{}"))||{}))}function hi(t){if(fi.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function pi(t){if(fi.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",this.profile&&this.profile.login||null)}function di(t){if(fi.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function vi(t){if(fi.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",t.screenName||null)}function mi(t){var e=Ge(t),n=Ke(e,"link"),r=Ke(Ge(n),"link");return Ke(Ge(e=Ke(e,"deep_link_id")),"link")||e||r||n||t}function yi(t,e){return t.then(function(t){if(t[$o]){var n=ei(t[$o]);if(!n||e!=n.c)throw new Fr("user-mismatch");return t}throw new Fr("user-mismatch")}).s(function(t){throw t&&t.code&&t.code==jr+"user-not-found"?new Fr("user-mismatch"):t})}function gi(t,e,n){if(e.idToken||e.accessToken)e.idToken&&xr(this,"idToken",e.idToken),e.accessToken&&xr(this,"accessToken",e.accessToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new Fr("internal-error","failed to construct a credential");xr(this,"accessToken",e.oauthToken),xr(this,"secret",e.oauthTokenSecret)}xr(this,"providerId",t),xr(this,"signInMethod",n)}function bi(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,{postBody:an(e).toString(),requestUri:"http://localhost"}}function _i(t,e){this.Ac=e||[],Sr(this,{providerId:t,isOAuthProvider:!0}),this.vb={},this.$a=(ai(t)||{}).Ma||null,this.Ya=null}function wi(t){_i.call(this,t,ii),this.a=[]}function Ei(){wi.call(this,"facebook.com")}function Ti(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ei).credential(null,e)}function Ci(){wi.call(this,"github.com")}function xi(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ci).credential(null,e)}function Si(){wi.call(this,"google.com"),this.ta("profile")}function ki(t,e){var n=t;return h(t)&&(n=t.idToken,e=t.accessToken),(new Si).credential(n,e)}function Ni(){_i.call(this,"twitter.com",ri)}function Ai(t,e){var n=t;if(h(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new Fr("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new gi("twitter.com",n,"twitter.com")}function Ii(t,e,n){this.a=t,this.b=e,xr(this,"providerId","password"),xr(this,"signInMethod",n===Oi.EMAIL_LINK_SIGN_IN_METHOD?Oi.EMAIL_LINK_SIGN_IN_METHOD:Oi.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Oi(){Sr(this,{providerId:"password",isOAuthProvider:!1})}function Pi(t,e){if(!(e=Ri(e)))throw new Fr("argument-error","Invalid email link!");return new Ii(t,e,Oi.EMAIL_LINK_SIGN_IN_METHOD)}function Ri(t){var e=Ke((t=new function(t){this.a=Ge(t)}(t=mi(t))).a,"oobCode")||null;return"signIn"===(Ke(t.a,"mode")||null)&&e?e:null}function Di(t){if(!(t.Sa&&t.Ra||t.Fa&&t.$))throw new Fr("internal-error");this.a=t,xr(this,"providerId","phone"),xr(this,"signInMethod","phone")}function Mi(t){return t.a.Fa&&t.a.$?{temporaryProof:t.a.Fa,phoneNumber:t.a.$}:{sessionInfo:t.a.Sa,code:t.a.Ra}}function Li(t){try{this.a=t||r.a.auth()}catch(t){throw new Fr("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Sr(this,{providerId:"phone",isOAuthProvider:!1})}function Fi(t,e){if(!t)throw new Fr("missing-verification-id");if(!e)throw new Fr("missing-verification-code");return new Di({Sa:t,Ra:e})}function Ui(t){if(t.temporaryProof&&t.phoneNumber)return new Di({Fa:t.temporaryProof,$:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret;t=t&&t.oauthIdToken;try{switch(e){case"google.com":return ki(t,n);case"facebook.com":return Ti(n);case"github.com":return xi(n);case"twitter.com":return Ai(n,r);default:return new wi(e).credential(t,n)}}catch(t){return null}}function ji(t){if(!t.isOAuthProvider)throw new Fr("invalid-oauth-provider")}function Bi(t,e,n,r,i){if(this.b=t,this.c=e||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new Fr("invalid-auth-event");if(this.f&&this.a)throw new Fr("invalid-auth-event");if(this.f&&!this.g)throw new Fr("invalid-auth-event")}function qi(t){return(t=t||{}).type?new Bi(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&Ur(t.error)):null}function Vi(){this.b=null,this.a=[]}_(fi,li),_(hi,fi),_(pi,fi),_(di,fi),_(vi,fi),gi.prototype.ya=function(t){return da(t,bi(this))},gi.prototype.c=function(t,e){var n=bi(this);return n.idToken=e,va(t,n)},gi.prototype.f=function(t,e){return yi(ma(t,bi(this)),e)},gi.prototype.D=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},_i.prototype.Da=function(t){return this.vb=ot(t),this},_(wi,_i),wi.prototype.ta=function(t){return L(this.a,t)||this.a.push(t),this},wi.prototype.Ab=function(){return B(this.a)},wi.prototype.credential=function(t,e){if(!t&&!e)throw new Fr("argument-error","credential failed: must provide the ID token and/or the access token.");return new gi(this.providerId,{idToken:t||null,accessToken:e||null},this.providerId)},_(Ei,wi),xr(Ei,"PROVIDER_ID","facebook.com"),xr(Ei,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),_(Ci,wi),xr(Ci,"PROVIDER_ID","github.com"),xr(Ci,"GITHUB_SIGN_IN_METHOD","github.com"),_(Si,wi),xr(Si,"PROVIDER_ID","google.com"),xr(Si,"GOOGLE_SIGN_IN_METHOD","google.com"),_(Ni,_i),xr(Ni,"PROVIDER_ID","twitter.com"),xr(Ni,"TWITTER_SIGN_IN_METHOD","twitter.com"),Ii.prototype.ya=function(t){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,Ca,{email:this.a,oobCode:this.b}):za(t,qa,{email:this.a,password:this.b})},Ii.prototype.c=function(t,e){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,xa,{idToken:e,email:this.a,oobCode:this.b}):za(t,Ma,{idToken:e,email:this.a,password:this.b})},Ii.prototype.f=function(t,e){return yi(this.ya(t),e)},Ii.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},Sr(Oi,{PROVIDER_ID:"password"}),Sr(Oi,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Sr(Oi,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Di.prototype.ya=function(t){return t.Ta(Mi(this))},Di.prototype.c=function(t,e){var n=Mi(this);return n.idToken=e,za(t,Wa,n)},Di.prototype.f=function(t,e){var n=Mi(this);return n.operation="REAUTH",yi(t=za(t,Ha,n),e)},Di.prototype.D=function(){var t={providerId:"phone"};return this.a.Sa&&(t.verificationId=this.a.Sa),this.a.Ra&&(t.verificationCode=this.a.Ra),this.a.Fa&&(t.temporaryProof=this.a.Fa),this.a.$&&(t.phoneNumber=this.a.$),t},Li.prototype.Ta=function(t,e){var n=this.a.b;return Et(e.verify()).then(function(r){if(!i(r))throw new Fr("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":return function(t,e){return za(t,Ra,e)}(n,{phoneNumber:t,recaptchaToken:r}).then(function(t){return"function"==typeof e.reset&&e.reset(),t},function(t){throw"function"==typeof e.reset&&e.reset(),t});default:throw new Fr("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Sr(Li,{PROVIDER_ID:"phone"}),Sr(Li,{PHONE_SIGN_IN_METHOD:"phone"}),Bi.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var Wi=null;function Hi(t){var e="unauthorized-domain",n=void 0,r=Ge(t);t=r.b,"chrome-extension"==(r=r.c)?n=q("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=q("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",Fr.call(this,e,n)}function zi(t,e,n){Fr.call(this,t,n),(t=e||{}).wb&&xr(this,"email",t.wb),t.$&&xr(this,"phoneNumber",t.$),t.credential&&xr(this,"credential",t.credential)}function Ki(t){if(t.code){var e=t.code||"";0==e.indexOf(jr)&&(e=e.substring(jr.length));var n={credential:Ui(t)};if(t.email)n.wb=t.email;else{if(!t.phoneNumber)return new Fr(e,t.message||void 0);n.$=t.phoneNumber}return new zi(e,n,t.message)}return null}Vi.prototype.subscribe=function(t){var e=this;this.a.push(t),this.b||(this.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"==typeof(t=or("universalLinks.subscribe",n))&&t(null,this.b))},Vi.prototype.unsubscribe=function(t){U(this.a,function(e){return e==t})},_(Hi,Fr),_(zi,Fr),zi.prototype.D=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var e=this.credential&&this.credential.D();return e&&ct(t,e),t},zi.prototype.toJSON=function(){return this.D()};var Gi,Qi=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function Yi(){}function Xi(t){return t.c||(t.c=t.b())}function $i(){}function Ji(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Zi(){}function to(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=y(this.bc,this),this.a.onerror=y(this.Bb,this),this.a.onprogress=y(this.cc,this),this.a.ontimeout=y(this.fc,this)}function eo(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function no(t,e,n){this.reset(t,e,n,void 0,void 0)}Yi.prototype.c=null,_($i,Yi),$i.prototype.a=function(){var t=Ji(this);return t?new ActiveXObject(t):new XMLHttpRequest},$i.prototype.b=function(){var t={};return Ji(this)&&(t[0]=!0,t[1]=!0),t},Gi=new $i,_(Zi,Yi),Zi.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new to;throw Error("Unsupported browser")},Zi.prototype.b=function(){return{}},(t=to.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},t.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},t.bc=function(){this.status=200,this.responseText=this.a.responseText,eo(this,4)},t.Bb=function(){this.status=500,this.responseText="",eo(this,4)},t.fc=function(){this.Bb()},t.cc=function(){this.status=200,eo(this,1)},t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},no.prototype.a=null;function ro(t){this.f=t,this.b=this.c=this.a=null}function io(t,e){this.name=t,this.value=e}no.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||b(),delete this.a},io.prototype.toString=function(){return this.name};var oo=new io("SEVERE",1e3),ao=new io("WARNING",900),so=new io("CONFIG",700),uo=new io("FINE",500);ro.prototype.log=function(t,e,n){if(t.value>=function t(e){return e.c?e.c:e.a?t(e.a):(x("Root logger has no level set."),null)}(this).value)for(f(e)&&(e=e()),t=new no(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var co={},lo=null;function fo(t){var e;if(lo||(lo=new ro(""),co[""]=lo,lo.c=so),!(e=co[t])){e=new ro(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=fo(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,co[t]=e}return e}function ho(t,e){t&&t.log(uo,e,void 0)}function po(t){this.f=t}function vo(t){Ae.call(this),this.i=t,this.readyState=mo,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=fo("goog.net.FetchXmlHttp")}_(po,Yi),po.prototype.a=function(){return new vo(this.f)},po.prototype.b=function(t){return function(){return t}}({}),_(vo,Ae);var mo=0;function yo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function go(t){Ae.call(this),this.headers=new Fe,this.C=t||null,this.c=!1,this.w=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.i=this.G=!1,this.g=0,this.u=null,this.o=bo,this.v=this.O=!1}(t=vo.prototype).open=function(t,e){if(this.readyState!=mo)throw this.abort(),Error("Error reopening a connection");this.h=t,this.c=e,this.readyState=1,yo(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.g,method:this.h,credentials:void 0,cache:void 0};t&&(e.body=t),this.i.fetch(new Request(this.c,e)).then(this.ec.bind(this),this.Cb.bind(this))},t.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,yo(this)),this.readyState=mo},t.ec=function(t){this.a&&(this.b||(this.b=t.headers,this.readyState=2,yo(this)),this.a&&(this.readyState=3,yo(this),this.a&&t.text().then(this.dc.bind(this,t),this.Cb.bind(this))))},t.dc=function(t,e){this.a&&(this.status=t.status,this.statusText=t.statusText,this.responseText=e,this.readyState=4,yo(this))},t.Cb=function(t){var e=this.f;e&&e.log(ao,"Failed to fetch url "+this.c,t instanceof Error?t:Error(t)),this.a&&(this.readyState=4,yo(this))},t.setRequestHeader=function(t,e){this.g.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.f)&&t.log(ao,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.f;return t&&t.log(ao,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},_(go,Ae);var bo="";go.prototype.b=fo("goog.net.XhrIo");var _o=/^https?$/i,wo=["POST","PUT"];function Eo(t,e,r,o,a){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);r=r?r.toUpperCase():"GET",t.l=e,t.h="",t.N=r,t.G=!1,t.c=!0,t.a=t.C?t.C.a():Gi.a(),t.w=t.C?Xi(t.C):Xi(Gi),t.a.onreadystatechange=y(t.Fb,t);try{ho(t.b,Oo(t,"Opening Xhr")),t.I=!0,t.a.open(r,String(e),!0),t.I=!1}catch(e){return ho(t.b,Oo(t,"Error opening Xhr: "+e.message)),void Co(t,e)}e=o||"";var s=new Fe(t.headers);a&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||i(t))R(t,e,void 0);else for(var n=Le(t),r=Me(t),o=r.length,a=0;a<o;a++)e.call(void 0,r[a],n&&n[a],t)}(a,function(t,e){s.set(e,t)}),a=function(t){t:{for(var e=To,n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t)){e=o;break t}e=-1}return 0>e?null:i(t)?t.charAt(e):t[e]}(s.U()),o=n.FormData&&e instanceof n.FormData,!L(wo,r)||a||o||s.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),s.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.o&&(t.a.responseType=t.o),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{No(t),0<t.g&&(t.v=function(t){return Wt&&te(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(t.a),ho(t.b,Oo(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=y(t.Ga,t)):t.u=Re(t.Ga,t.g,t)),ho(t.b,Oo(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(e){ho(t.b,Oo(t,"Send error: "+e.message)),Co(t,e)}}function To(t){return"content-type"==t.toLowerCase()}function Co(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,xo(t),ko(t)}function xo(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function So(t){if(t.c&&void 0!==e)if(t.w[1]&&4==Ao(t)&&2==Io(t))ho(t.b,Oo(t,"Local request error detected and ignored"));else if(t.i&&4==Ao(t))Re(t.Fb,0,t);else if(t.dispatchEvent("readystatechange"),4==Ao(t)){ho(t.b,Oo(t,"Request complete")),t.c=!1;try{var r,i=Io(t);t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break t;default:o=!1}if(!(r=o)){var a;if(a=0===i){var s=String(t.l).match(Be)[1]||null;if(!s&&n.self&&n.self.location){var u=n.self.location.protocol;s=u.substr(0,u.length-1)}a=!_o.test(s?s.toLowerCase():"")}r=a}if(r)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<Ao(t)?t.a.statusText:""}catch(e){ho(t.b,"Can not get status: "+e.message),c=""}t.h=c+" ["+Io(t)+"]",xo(t)}}finally{ko(t)}}}function ko(t,e){if(t.a){No(t);var n=t.a,r=t.w[0]?a:null;t.a=null,t.w=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(oo,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function No(t){t.a&&t.v&&(t.a.ontimeout=null),t.u&&(n.clearTimeout(t.u),t.u=null)}function Ao(t){return t.a?t.a.readyState:0}function Io(t){try{return 2<Ao(t)?t.a.status:-1}catch(t){return-1}}function Oo(t,e){return e+" ["+t.N+" "+t.l+" "+Io(t)+"]"}function Po(t,e){this.g=[],this.v=t,this.u=e||null,this.f=this.a=!1,this.c=void 0,this.l=this.w=this.i=!1,this.h=0,this.b=null,this.m=0}function Ro(t,e,n){t.a=!0,t.c=n,t.f=!e,Fo(t)}function Do(t){if(t.a){if(!t.l)throw new Uo(t);t.l=!1}}function Mo(t,e,n,r){t.g.push([e,n,r]),t.a&&Fo(t)}function Lo(t){return M(t.g,function(t){return f(t[1])})}function Fo(t){if(t.h&&t.a&&Lo(t)){var e=t.h,r=qo[e];r&&(n.clearTimeout(r.a),delete qo[e]),t.h=0}t.b&&(t.b.m--,delete t.b),e=t.c;for(var i=r=!1;t.g.length&&!t.i;){var o=t.g.shift(),a=o[0],s=o[1];if(o=o[2],a=t.f?s:a)try{var u=a.call(o||t.u,e);void 0!==u&&(t.f=t.f&&(u==e||u instanceof Error),t.c=e=u),(E(e)||"function"==typeof n.Promise&&e instanceof n.Promise)&&(i=!0,t.i=!0)}catch(n){e=n,t.f=!0,Lo(t)||(r=!0)}}t.c=e,i&&(u=y(t.o,t,!0),i=y(t.o,t,!1),e instanceof Po?(Mo(e,u,i),e.w=!0):e.then(u,i)),r&&(e=new Bo(e),qo[e.a]=e,t.h=e.a)}function Uo(){T.call(this)}function jo(){T.call(this)}function Bo(t){this.a=n.setTimeout(y(this.c,this),0),this.b=t}(t=go.prototype).Ga=function(){void 0!==e&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",ho(this.b,Oo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(){this.a&&this.c&&(ho(this.b,Oo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ko(this))},t.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),ko(this,!0)),go.lb.ua.call(this)},t.Fb=function(){this.pa||(this.I||this.i||this.f?So(this):this.tc())},t.tc=function(){So(this)},t.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case bo:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(oo,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(t){return ho(this.b,"Can not get response: "+t.message),null}},Po.prototype.cancel=function(t){if(this.a)this.c instanceof Po&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.m--,0>=e.m&&e.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(t=new jo(this),Do(this),Ro(this,!1,t))}},Po.prototype.o=function(t,e){this.i=!1,Ro(this,t,e)},Po.prototype.C=function(){Do(this),Ro(this,!0,null)},Po.prototype.then=function(t,e,n){var r,i,o=new vt(function(t,e){r=t,i=e});return Mo(this,r,function(t){t instanceof jo?o.cancel():i(t)}),o.then(t,e,n)},w(Po),_(Uo,T),Uo.prototype.message="Deferred has already fired",Uo.prototype.name="AlreadyCalledError",_(jo,T),jo.prototype.message="Deferred was canceled",jo.prototype.name="CanceledError",Bo.prototype.c=function(){throw delete qo[this.a],this.b};var qo={};function Vo(t){var e={},n=e.document||document,r=yn(t),i=document.createElement("SCRIPT"),o={Hb:i,Ga:void 0},a=new Po(Wo,o),s=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){Ho(i,!0);var t=new Go(Ko,"Timeout reached for loading script "+r);Do(a),Ro(a,!1,t)},u),o.Ga=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ho(i,e.dd||!1,s),a.C())},i.onerror=function(){Ho(i,!0,s);var t=new Go(zo,"Error while loading script "+r);Do(a),Ro(a,!1,t)},ct(o=e.attributes||{},{type:"text/javascript",charset:"UTF-8"}),Pn(i,o),i.src=yn(t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Wo(){if(this&&this.Hb){var t=this.Hb;t&&"SCRIPT"==t.tagName&&Ho(t,!0,this.Ga)}}function Ho(t,e,r){null!=r&&n.clearTimeout(r),t.onload=a,t.onerror=a,t.onreadystatechange=a,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}var zo=0,Ko=1;function Go(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),T.call(this,n),this.code=t}function Qo(t){this.f=t}function Yo(t,e,i){if(this.b=t,t=e||{},this.i=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||Jo,this.f=ot(t.secureTokenHeaders||Zo),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||ta,this.a=ot(t.firebaseHeaders||ea),i&&(this.a["X-Client-Version"]=i,this.f["X-Client-Version"]=i),i="Node"==$n(),!(i=n.XMLHttpRequest||i&&r.a.INTERNAL.node&&r.a.INTERNAL.node.XMLHttpRequest)&&!Xn())throw new Fr("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,Xn()?this.c=new po(self):Jn()?this.c=new Qo(i):this.c=new Zi}_(Go,T),_(Qo,Yi),Qo.prototype.a=function(){return new this.f},Qo.prototype.b=function(){return{}};var Xo,$o="idToken",Jo=new yr(3e4,6e4),Zo={"Content-Type":"application/x-www-form-urlencoded"},ta=new yr(3e4,6e4),ea={"Content-Type":"application/json"};function na(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function ra(t,e){e?(t.a["X-Client-Version"]=e,t.f["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.f["X-Client-Version"])}function ia(t,e,r,i,o,a,s){(function(){var t=ir();return!((t=er(t)!=tr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t||Wt&&Jt&&!(9<Jt))})()||Xn()?t=y(t.o,t):(Xo||(Xo=new vt(function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{n[aa]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};var r=gn(oa,{onload:aa});!function(t,e){Mo(t,null,e,void 0)}(Vo(r),function(){e(Error("CORS_UNSUPPORTED"))})}}(t,e)})),t=y(t.l,t)),t(e,r,i,o,a,s)}Yo.prototype.o=function(t,e,r,i,o,a){if(Xn()&&(void 0===n.fetch||void 0===n.Headers||void 0===n.Request))throw new Fr("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var s=new go(this.c);if(a){s.g=Math.max(0,a);var u=setTimeout(function(){s.dispatchEvent("timeout")},a)}Ie(s,"complete",function(){u&&clearTimeout(u);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ho(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(e){t=null}e&&e(t)}),Oe(s,"ready",function(){u&&clearTimeout(u),Ut(this)}),Oe(s,"timeout",function(){u&&clearTimeout(u),Ut(this),e&&e(null)}),Eo(s,t,r,i,o)};var oa=vn("https://apis.google.com/js/client.js?onload=%{onload}"),aa="__fcb"+Math.floor(1e6*Math.random()).toString();function sa(t){if(!Qi.test(t.email))throw new Fr("invalid-email")}function ua(t){"email"in t&&sa(t)}function ca(t){if(!t[$o])throw new Fr("internal-error")}function la(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new Fr("internal-error")}else{if(!t.sessionInfo)throw new Fr("missing-verification-id");if(!t.code)throw new Fr("missing-verification-code")}}Yo.prototype.l=function(t,e,n,r,i){var o=this;Xo.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})}).s(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})},Yo.prototype.Pa=function(){return za(this,La,{})},Yo.prototype.mb=function(t,e){return za(this,Da,{idToken:t,email:e})},Yo.prototype.nb=function(t,e){return za(this,Ma,{idToken:t,password:e})};var fa={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ha(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new Fr("internal-error")}function pa(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Ki(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Ki(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Ki(t)):t.errorMessage&&(e=Ka(t.errorMessage)),e)throw e;if(!t[$o])throw new Fr("internal-error")}function da(t,e){return e.returnIdpCredential=!0,za(t,Fa,e)}function va(t,e){return e.returnIdpCredential=!0,za(t,ja,e)}function ma(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,za(t,Ua,e)}function ya(t){if(!t.oobCode)throw new Fr("invalid-action-code")}(t=Yo.prototype).ob=function(t,e){var n={idToken:t},r=[];return rt(fa,function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),za(this,Da,n)},t.hb=function(t,e){return ct(t={requestType:"PASSWORD_RESET",email:t},e),za(this,Aa,t)},t.ib=function(t,e){return ct(t={requestType:"EMAIL_SIGNIN",email:t},e),za(this,ka,t)},t.gb=function(t,e){return ct(t={requestType:"VERIFY_EMAIL",idToken:t},e),za(this,Na,t)},t.Ta=function(t){return za(this,Va,t)},t.Xa=function(t,e){return za(this,Pa,{oobCode:t,newPassword:e})},t.Ja=function(t){return za(this,ba,{oobCode:t})},t.Va=function(t){return za(this,ga,{oobCode:t})};var ga={endpoint:"setAccountInfo",B:ya,da:"email"},ba={endpoint:"resetPassword",B:ya,J:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e)throw new Fr("internal-error")}},_a={endpoint:"signupNewUser",B:function(t){if(sa(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},wa={endpoint:"createAuthUri"},Ea={endpoint:"deleteAccount",T:["idToken"]},Ta={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(t){if(!c(t.deleteProvider))throw new Fr("internal-error")}},Ca={endpoint:"emailLinkSignin",T:["email","oobCode"],B:sa,J:ca,R:!0},xa={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:sa,J:ca,R:!0},Sa={endpoint:"getAccountInfo"},ka={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Na={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new Fr("internal-error")},da:"email"},Aa={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("PASSWORD_RESET"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Ia={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},Oa={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(t){if(!t.recaptchaSiteKey)throw new Fr("internal-error")}},Pa={endpoint:"resetPassword",B:ya,da:"email"},Ra={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},Da={endpoint:"setAccountInfo",T:["idToken"],B:ua,R:!0},Ma={endpoint:"setAccountInfo",T:["idToken"],B:function(t){if(ua(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},La={endpoint:"signupNewUser",J:ca,R:!0},Fa={endpoint:"verifyAssertion",B:ha,J:pa,R:!0},Ua={endpoint:"verifyAssertion",B:ha,J:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new Fr("user-not-found");if(t.errorMessage)throw Ka(t.errorMessage);if(!t[$o])throw new Fr("internal-error")},R:!0},ja={endpoint:"verifyAssertion",B:function(t){if(ha(t),!t.idToken)throw new Fr("internal-error")},J:pa,R:!0},Ba={endpoint:"verifyCustomToken",B:function(t){if(!t.token)throw new Fr("invalid-custom-token")},J:ca,R:!0},qa={endpoint:"verifyPassword",B:function(t){if(sa(t),!t.password)throw new Fr("wrong-password")},J:ca,R:!0},Va={endpoint:"verifyPhoneNumber",B:la,J:ca},Wa={endpoint:"verifyPhoneNumber",B:function(t){if(!t.idToken)throw new Fr("internal-error");la(t)},J:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Ki(t);ca(t)}},Ha={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:la,J:ca};function za(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.T))return Tt(new Fr("internal-error"));var r,i=e.Eb||"POST";return Et(n).then(e.B).then(function(){return e.R&&(n.returnSecureToken=!0),function(t,e,n,r,i,o){var a=Ge(t.g+e);ze(a,"key",t.b),o&&ze(a,"cb",b().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&ze(a,u,r[u]);return new vt(function(e,o){ia(t,a.toString(),function(t){t?t.error?o(Ga(t,i||{})):e(t):o(new Fr("network-request-failed"))},n,s?void 0:Ln(hr(r)),t.a,t.h.get())})}(t,e.endpoint,i,n,e.Tb,e.rb||!1)}).then(function(t){return r=t}).then(e.J).then(function(){if(!e.da)return r;if(!(e.da in r))throw new Fr("internal-error");return r[e.da]})}function Ka(t){return Ga({error:{errors:[{message:t}],code:400,message:t}})}function Ga(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new Fr(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",ct(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new Fr(r[i],e);return!e&&t&&(e=fr(t)),new Fr("internal-error",e)}var Qa,Ya={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};function Xa(t){for(var e in Ya)if(Ya[e].id===t)return{firebaseEndpoint:(t=Ya[e]).Za,secureTokenEndpoint:t.fb};return null}function $a(t){this.b=t,this.a=null,this.bb=function(t){return(ns||(ns=new vt(function(t,e){function r(){mr(),or("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){mr(),e(Error("Network Error"))},timeout:ts.get()})}if(or("gapi.iframes.Iframe"))t();else if(or("gapi.load"))r();else{var i="__iframefcb"+Math.floor(1e6*Math.random()).toString();n[i]=function(){or("gapi.load")?r():e(Error("Network Error"))},Et(Vo(i=gn(Za,{onload:i}))).s(function(){e(Error("Network Error"))})}}).s(function(t){throw ns=null,t}))).then(function(){return new vt(function(e,n){or("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},es.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}(this)}Qa=Xa("__EID__")?"__EID__":void 0;var Ja,Za=vn("https://apis.google.com/js/api.js?onload=%{onload}"),ts=new yr(3e4,6e4),es=new yr(5e3,15e3),ns=null;function rs(t,e,n){this.i=t,this.g=e,this.h=n,this.f=null,this.a=Qe(this.i,"/__/auth/iframe"),ze(this.a,"apiKey",this.g),ze(this.a,"appName",this.h),this.b=null,this.c=[]}function is(t,e,n,r,i){this.o=t,this.l=e,this.c=n,this.m=r,this.h=this.g=this.i=null,this.a=i,this.f=null}function os(t){try{return r.a.app(t).auth().xa()}catch(t){return[]}}function as(t,e,n,r,i){this.l=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.o=this.u=this.v=null,this.g=[],this.m=this.a=null}function ss(t){var e=qn();return function(t){return za(t,Ia,{}).then(function(t){return t.authorizedDomains||[]})}(t).then(function(t){t:{var n=Ge(e),r=n.c;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Ge(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:Kn.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Hi(qn())})}function us(t){return t.m?t.m:(t.m=Gn().then(function(){if(!t.u){var e=t.c,n=t.h,r=os(t.b),i=new rs(t.l,t.f,t.b);i.f=e,i.b=n,i.c=B(r||[]),t.u=i.toString()}t.i=new $a(t.u),function(t){if(!t.i)throw Error("IfcHandler must be initialized!");!function(t,e){t.bb.then(function(){t.a.register("authEvent",e,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}(t.i,function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=qi(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Et(n)}return n.status="ERROR",Et(n)})}(t)}),t.m)}function cs(t){return t.o||(t.v=t.c?rr(t.c,os(t.b)):null,t.o=new Yo(t.f,Xa(t.h),t.v)),t.o}function ls(t,e,n,r,i,o,a,s,u,c){return(t=new is(t,e,n,r,i)).i=o,t.g=a,t.h=s,t.b=ot(u||null),t.f=c,t.toString()}function fs(t){if(this.a=t||r.a.INTERNAL.reactNative&&r.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new Fr("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function hs(){if(!vs())throw new Fr("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=n.indexedDB,this.type="indexedDB"}function ps(t){return new vt(function(e,n){var r=t.g.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(t){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new vt(function(e,n){var r=t.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}})}(t).then(function(){return ps(t)}).then(function(t){e(t)}).s(function(t){n(t)})}})}function ds(t){return t.h||(t.h=ps(t)),t.h}function vs(){try{return!!n.indexedDB}catch(t){return!1}}function ms(t){return t.objectStore("firebaseLocalStorage")}function ys(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function gs(t){return new vt(function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(Error(t.target.errorCode))}})}function bs(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Et().then(function(){if(vs()){var t=dr(),r="__sak"+t;return Ja||(Ja=new hs),(n=Ja).set(r,t).then(function(){return n.get(r)}).then(function(e){if(e!==t)throw Error("indexedDB not supported!");return n.P(r)}).then(function(){return n}).s(function(){return e.c})}return e.c}).then(function(t){return e.type=t.type,t.Y(function(t){R(e.a,function(e){e(t)})}),t})}function _s(){this.a={},this.type="inMemory"}function ws(){if(!function(){var t="Node"==$n();if(!(t=Es()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The LocalStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=Es()||r.a.INTERNAL.node.localStorage,this.type="localStorage"}function Es(){try{var t=n.localStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function Ts(){this.type="nullStorage"}function Cs(){if(!function(){var t="Node"==$n();if(!(t=xs()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The SessionStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=xs()||r.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function xs(){try{var t=n.sessionStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}rs.prototype.toString=function(){return this.f?ze(this.a,"v",this.f):sn(this.a.a,"v"),this.b?ze(this.a,"eid",this.b):sn(this.a.a,"eid"),this.c.length?ze(this.a,"fw",this.c.join(",")):sn(this.a.a,"fw"),this.a.toString()},is.prototype.toString=function(){var t=Qe(this.o,"/__/auth/handler");if(ze(t,"apiKey",this.l),ze(t,"appName",this.c),ze(t,"authType",this.m),this.a.isOAuthProvider){var e=this.a;try{var n=r.a.app(this.c).auth().ea()}catch(t){n=null}for(var i in e.Ya=n,ze(t,"providerId",this.a.providerId),n=hr((e=this.a).vb))n[i]=n[i].toString();i=e.Ac,n=ot(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}e.$a&&e.Ya&&!n[e.$a]&&(n[e.$a]=e.Ya),it(n)||ze(t,"customParameters",fr(n))}if("function"==typeof this.a.Ab&&((e=this.a.Ab()).length&&ze(t,"scopes",e.join(","))),this.i?ze(t,"redirectUrl",this.i):sn(t.a,"redirectUrl"),this.g?ze(t,"eventId",this.g):sn(t.a,"eventId"),this.h?ze(t,"v",this.h):sn(t.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Ke(t,s)&&ze(t,s,this.b[s]);return this.f?ze(t,"eid",this.f):sn(t.a,"eid"),(s=os(this.c)).length&&ze(t,"fw",s.join(",")),t.toString()},(t=as.prototype).Ea=function(t,e,n){var r=new Fr("popup-closed-by-user"),i=new Fr("web-storage-unsupported"),o=this,a=!1;return this.ga().then(function(){(function(t){var e={type:"webStorageSupport"};return us(t).then(function(){return function(t,e){return t.bb.then(function(){return new vt(function(n){t.a.send(e.type,e,n,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}(t.i,e)}).then(function(t){if(t&&t.length&&void 0!==t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})})(o).then(function(n){n||(t&&Hn(t),e(i),a=!0)})}).s(function(){}).then(function(){if(!a)return function(t){return new vt(function(e){return function n(){De(2e3).then(function(){if(t&&!t.closed)return n();e()})}()})}(t)}).then(function(){if(!a)return De(n).then(function(){e(r)})})},t.Ib=function(){var t=ir();return!lr(t)&&!vr(t)},t.Db=function(){return!1},t.zb=function(t,e,n,r,i,o,a){if(!t)return Tt(new Fr("popup-blocked"));if(a&&!lr())return this.ga().s(function(e){Hn(t),i(e)}),r(),Et();this.a||(this.a=ss(cs(this)));var s=this;return this.a.then(function(){var e=s.ga().s(function(e){throw Hn(t),i(e),e});return r(),e}).then(function(){(ji(n),a)||Vn(ls(s.l,s.f,s.b,e,n,null,o,s.c,void 0,s.h),t)}).s(function(t){throw"auth/network-request-failed"==t.code&&(s.a=null),t})},t.Ca=function(t,e,n){this.a||(this.a=ss(cs(this)));var r=this;return this.a.then(function(){ji(e),Vn(ls(r.l,r.f,r.b,t,e,qn(),n,r.c,void 0,r.h))}).s(function(t){throw"auth/network-request-failed"==t.code&&(r.a=null),t})},t.ga=function(){var t=this;return us(this).then(function(){return t.i.bb}).s(function(){throw t.a=null,new Fr("network-request-failed")})},t.Mb=function(){return!0},t.va=function(t){this.g.push(t)},t.Ka=function(t){U(this.g,function(e){return e==t})},(t=fs.prototype).get=function(t){return Et(this.a.getItem(t)).then(function(t){return t&&pr(t)})},t.set=function(t,e){return Et(this.a.setItem(t,fr(e)))},t.P=function(t){return Et(this.a.removeItem(t))},t.Y=function(){},t.ca=function(){},(t=hs.prototype).set=function(t,e){var n,r=!1,i=this;return ds(this).then(function(e){return gs((e=ms(ys(n=e,!0))).get(t))}).then(function(o){var a=ms(ys(n,!0));return o?(o.value=e,gs(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=t,o.value=e,gs(a.add(o)))}).then(function(){i.f[t]=e}).ia(function(){r&&i.b--})},t.get=function(t){return ds(this).then(function(e){return gs(ms(ys(e,!1)).get(t))}).then(function(t){return t&&t.value})},t.P=function(t){var e=!1,n=this;return ds(this).then(function(r){return e=!0,n.b++,gs(ms(ys(r,!0)).delete(t))}).then(function(){delete n.f[t]}).ia(function(){e&&n.b--})},t.Kc=function(){var t=this;return ds(this).then(function(t){var e=ms(ys(t,!1));return e.getAll?gs(e.getAll()):new vt(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)r in n?typeof e[r]!=typeof n[r]?i.push(r):"object"==typeof e[r]&&null!=e[r]&&null!=n[r]?0<t(e[r],n[r]).length&&i.push(r):e[r]!==n[r]&&i.push(r):i.push(r);for(r in n)r in e||i.push(r);return i}(t.f,n),t.f=n}return r})},t.Y=function(t){0==this.a.length&&function(t){t.c&&t.c.cancel("STOP_EVENT"),function e(){t.c=De(800).then(y(t.Kc,t)).then(function(e){0<e.length&&R(t.a,function(t){t(e)})}).then(e).s(function(t){"STOP_EVENT"!=t.message&&e()});return t.c}()}(this),this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},(t=bs.prototype).get=function(t){return this.b.then(function(e){return e.get(t)})},t.set=function(t,e){return this.b.then(function(n){return n.set(t,e)})},t.P=function(t){return this.b.then(function(e){return e.P(t)})},t.Y=function(t){this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t})},(t=_s.prototype).get=function(t){return Et(this.a[t])},t.set=function(t,e){return this.a[t]=e,Et()},t.P=function(t){return delete this.a[t],Et()},t.Y=function(){},t.ca=function(){},(t=ws.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(t){n.window&&ye(n.window,"storage",t)},t.ca=function(t){n.window&&_e(n.window,"storage",t)},(t=Ts.prototype).get=function(){return Et(null)},t.set=function(){return Et()},t.P=function(){return Et()},t.Y=function(){},t.ca=function(){},(t=Cs.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(){},t.ca=function(){};var Ss,ks,Ns={A:ws,Qa:Cs},As={A:ws,Qa:Cs},Is={A:fs,Qa:Ts},Os={A:ws,Qa:Ts},Ps={Xc:"local",NONE:"none",Zc:"session"};function Rs(){var t=!(vr(ir())||!Yn()),e=lr(),r=ar();this.o=t,this.h=e,this.m=r,this.a={},Ss||(Ss=new function(){var t={};t.Browser=Ns,t.Node=As,t.ReactNative=Is,t.Worker=Os,this.a=t[$n()]}),t=Ss;try{this.g=!Bn()&&_r()||!n.indexedDB?new t.a.A:new bs(Xn()?new _s:new t.a.A)}catch(t){this.g=new _s,this.h=!0}try{this.i=new t.a.Qa}catch(t){this.i=new _s}this.l=new _s,this.f=y(this.Lb,this),this.b={}}function Ds(){return ks||(ks=new Rs),ks}function Ms(t,e){switch(e){case"session":return t.i;case"none":return t.l;default:return t.g}}function Ls(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Fs(t,e,n){return n=Ls(e,n),"local"==e.A&&(t.b[n]=null),Ms(t,e.A).P(n)}function Us(t){t.c&&(clearInterval(t.c),t.c=null)}(t=Rs.prototype).get=function(t,e){return Ms(this,t.A).get(Ls(t,e))},t.set=function(t,e,n){var r=Ls(t,n),i=this,o=Ms(this,t.A);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.A&&(i.b[r]=e)})},t.addListener=function(t,e,r){t=Ls(t,e),this.m&&(this.b[t]=n.localStorage.getItem(t)),it(this.a)&&(Ms(this,"local").Y(this.f),this.h||(Bn()||!_r())&&n.indexedDB||!this.m||function(t){Us(t),t.c=setInterval(function(){for(var e in t.a){var r=n.localStorage.getItem(e),i=t.b[e];r!=i&&(t.b[e]=r,r=new se({type:"storage",key:e,target:window,oldValue:i,newValue:r,a:!0}),t.Lb(r))}},1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(r)},t.removeListener=function(t,e,n){t=Ls(t,e),this.a[t]&&(U(this.a[t],function(t){return t==n}),0==this.a[t].length&&delete this.a[t]),it(this.a)&&(Ms(this,"local").ca(this.f),Us(this))},t.Lb=function(t){if(t&&t.f){var e=t.a.key;if(null==e)for(var r in this.a){var i=this.b[r];void 0===i&&(i=null);var o=n.localStorage.getItem(r);o!==i&&(this.b[r]=o,this.Wa(r))}else if(0==e.indexOf("firebase:")&&this.a[e]){if(void 0!==t.a.a?Ms(this,"local").ca(this.f):Us(this),this.o)if(r=n.localStorage.getItem(e),(i=t.a.newValue)!==r)null!==i?n.localStorage.setItem(e,i):n.localStorage.removeItem(e);else if(this.b[e]===i&&void 0===t.a.a)return;var a=this;r=function(){void 0===t.a.a&&a.b[e]===n.localStorage.getItem(e)||(a.b[e]=n.localStorage.getItem(e),a.Wa(e))},Wt&&Jt&&10==Jt&&n.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(r,10):r()}}else R(t,y(this.Wa,this))},t.Wa=function(t){this.a[t]&&R(this.a[t],function(t){t()})};var js,Bs={name:"authEvent",A:"local"};function qs(t,e){this.b=-1,this.b=Vs,this.f=n.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.m=n.Int32Array?new Int32Array(64):Array(64),void 0!==js||(js=n.Int32Array?new Int32Array(Ys):Ys),this.reset()}_(qs,function(){this.b=-1});for(var Vs=64,Ws=Vs-1,Hs=[],zs=0;zs<Ws;zs++)Hs[zs]=0;var Ks=j(128,Hs);function Gs(t){for(var e=t.f,n=t.m,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&f)+(0|js[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function Qs(t,e,n){void 0===n&&(n=e.length);var r=0,o=t.c;if(i(e))for(;r<n;)t.f[o++]=e.charCodeAt(r++),o==t.b&&(Gs(t),o=0);else{if(!l(e))throw Error("message must be string or array");for(;r<n;){var a=e[r++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");t.f[o++]=a,o==t.b&&(Gs(t),o=0)}}t.c=o,t.g+=n}qs.prototype.reset=function(){this.g=this.c=0,this.a=n.Int32Array?new Int32Array(this.h):B(this.h)};var Ys=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Xs(){qs.call(this,8,$s)}_(Xs,qs);var $s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Js(t,e,n,r,i){this.l=t,this.i=e,this.m=n,this.o=r||null,this.u=i||null,this.h=e+":"+n,this.v=new function(){this.a=Ds()},this.g=new function(t){this.a=t,this.b=Ds()}(this.h),this.f=null,this.b=[],this.a=this.c=null}function Zs(t){return new Fr("invalid-cordova-configuration",t)}function tu(t){var e=new Xs;Qs(e,t),t=[];var n=8*e.g;56>e.c?Qs(e,Ks,56-e.c):Qs(e,Ks,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(Gs(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return D(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}function eu(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(t){}}function nu(t){return t.f||(t.f=t.ga().then(function(){return new vt(function(e){t.va(function n(r){return e(r),t.Ka(n),!1}),function(t){function e(e){i=!0,o&&o.cancel(),ru(t).then(function(n){var i=r;if(n&&e&&e.url){var o=null;-1!=(i=mi(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"==typeof(o=pr(Ke(o=Ge(i),"firebaseError")||null))?Ur(o):null)?new Bi(n.b,n.c,null,null,o):new Bi(n.b,n.c,i,n.g)),i=o||r}eu(t,i)})}var r=new Bi("unknown",null,null,null,new Fr("no-auth-event")),i=!1,o=De(500).then(function(){return ru(t).then(function(){i||eu(t,r)})}),a=n.handleOpenURL;n.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(or("BuildInfo.packageName",n).toLowerCase()+"://")&&e({url:t}),"function"==typeof a)try{a(t)}catch(t){console.error(t)}},Wi||(Wi=new Vi),Wi.subscribe(e)}(t)})})),t.f}function ru(t){var e=null;return function(t){return t.b.get(Bs,t.a).then(function(t){return qi(t)})}(t.g).then(function(n){return e=n,Fs((n=t.g).b,Bs,n.a)}).then(function(){return e})}(t=Js.prototype).ga=function(){return this.za?this.za:this.za=(Qn(void 0)?Gn().then(function(){return new vt(function(t,e){var r=n.document,i=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);r.addEventListener("deviceready",function(){clearTimeout(i),t()},!1)})}):Tt(Error("Cordova must run in an Android or iOS file scheme."))).then(function(){if("function"!=typeof or("universalLinks.subscribe",n))throw Zs("cordova-universal-links-plugin is not installed");if(void 0===or("BuildInfo.packageName",n))throw Zs("cordova-plugin-buildinfo is not installed");if("function"!=typeof or("cordova.plugins.browsertab.openUrl",n))throw Zs("cordova-plugin-browsertab is not installed");if("function"!=typeof or("cordova.InAppBrowser.open",n))throw Zs("cordova-plugin-inappbrowser is not installed")},function(){throw new Fr("cordova-not-ready")})},t.Ea=function(t,e){return e(new Fr("operation-not-supported-in-this-environment")),Et()},t.zb=function(){return Tt(new Fr("operation-not-supported-in-this-environment"))},t.Mb=function(){return!1},t.Ib=function(){return!0},t.Db=function(){return!0},t.Ca=function(t,e,r){if(this.c)return Tt(new Fr("redirect-operation-pending"));var i=this,o=n.document,a=null,s=null,u=null,c=null;return this.c=Et().then(function(){return ji(e),nu(i)}).then(function(){return function(t,e,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new Bi(e,i,null,o,new Fr("no-auth-event")),s=or("BuildInfo.packageName",n);if("string"!=typeof s)throw new Fr("invalid-cordova-configuration");var u=or("BuildInfo.displayName",n),c={};if(ir().toLowerCase().match(/iphone|ipad|ipod/))c.ibi=s;else{if(!ir().toLowerCase().match(/android/))return Tt(new Fr("operation-not-supported-in-this-environment"));c.apn=s}u&&(c.appDisplayName=u),o=tu(o),c.sessionId=o;var l=ls(t.l,t.i,t.m,e,r,null,i,t.o,c,t.u);return t.ga().then(function(){var e=t.h;return t.v.a.set(Bs,a.D(),e)}).then(function(){var e=or("cordova.plugins.browsertab.isAvailable",n);if("function"!=typeof e)throw new Fr("invalid-cordova-configuration");var r=null;e(function(e){if(e){if("function"!=typeof(r=or("cordova.plugins.browsertab.openUrl",n)))throw new Fr("invalid-cordova-configuration");r(l)}else{if("function"!=typeof(r=or("cordova.InAppBrowser.open",n)))throw new Fr("invalid-cordova-configuration");e=!(!(e=ir()).match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=r(l,e?"_blank":"_system","location=yes")}})})}(i,t,e,r)}).then(function(){return new vt(function(t,e){s=function(){var e=or("cordova.plugins.browsertab.close",n);return t(),"function"==typeof e&&e(),i.a&&"function"==typeof i.a.close&&(i.a.close(),i.a=null),!1},i.va(s),u=function(){a||(a=De(2e3).then(function(){e(new Fr("redirect-cancelled-by-user"))}))},c=function(){gr()&&u()},o.addEventListener("resume",u,!1),ir().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",c,!1)}).s(function(t){return ru(i).then(function(){throw t})})}).ia(function(){u&&o.removeEventListener("resume",u,!1),c&&o.removeEventListener("visibilitychange",c,!1),a&&a.cancel(),s&&i.Ka(s),i.c=null})},t.va=function(t){this.b.push(t),nu(this).s(function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Bi("unknown",null,null,null,new Fr("no-auth-event")),t(e))})},t.Ka=function(t){U(this.b,function(e){return e==t})};var iu={name:"pendingRedirect",A:"session"};function ou(t){return Fs(t.b,iu,t.a)}function au(t,e,n){this.v=t,this.m=e,this.l=n,this.h=[],this.f=!1,this.i=y(this.o,this),this.c=new mu,this.u=new _u,this.g=new function(t){this.a=t,this.b=Ds()}(this.m+":"+this.l),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.u,this.b.linkViaPopup=this.u,this.b.reauthViaPopup=this.u,this.a=su(this.v,this.m,this.l,Qa)}function su(t,e,n,i){var o=r.a.SDK_VERSION||null;return Qn()?new Js(t,e,n,o,i):new as(t,e,n,o,i)}function uu(t){t.f||(t.f=!0,t.a.va(t.i));var e=t.a;return t.a.ga().s(function(n){throw t.a==e&&t.reset(),n})}function cu(t){t.a.Ib()&&uu(t).s(function(e){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(e)&&t.o(n)}),t.a.Db()||yu(t.c)}au.prototype.reset=function(){this.f=!1,this.a.Ka(this.i),this.a=su(this.v,this.m,this.l)},au.prototype.subscribe=function(t){if(L(this.h,t)||this.h.push(t),!this.f){var e=this;(function(t){return t.b.get(iu,t.a).then(function(t){return"pending"==t})})(this.g).then(function(t){t?ou(e.g).then(function(){uu(e).s(function(t){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(t)&&e.o(n)})}):cu(e)}).s(function(){cu(e)})}},au.prototype.unsubscribe=function(t){U(this.h,function(e){return e==t})},au.prototype.o=function(t){if(!t)throw new Fr("invalid-auth-event");for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.sb(t.b,t.c)){(e=this.b[t.b])&&e.h(t,r),e=!0;break}}return yu(this.c),e};var lu=new yr(2e3,1e4),fu=new yr(3e4,6e4);function hu(t,e,n,r,i,o){return t.a.zb(e,n,r,function(){t.f||(t.f=!0,t.a.va(t.i))},function(){t.reset()},i,o)}function pu(t){return!(!t||"auth/cordova-not-ready"!=t.code)}au.prototype.fa=function(){return this.c.fa()},au.prototype.Ca=function(t,e,n){var r,i=this;return function(t){return t.b.set(iu,"pending",t.a)}(this.g).then(function(){return i.a.Ca(t,e,n).s(function(t){if(pu(t))throw new Fr("operation-not-supported-in-this-environment");return r=t,ou(i.g).then(function(){throw r})}).then(function(){return i.a.Mb()?new vt(function(){}):ou(i.g).then(function(){return i.fa()}).then(function(){}).s(function(){})})})},au.prototype.Ea=function(t,e,n,r){return this.a.Ea(n,function(n){t.ha(e,null,n,r)},lu.get())};var du={};function vu(t,e,n){var r=e+":"+n;return du[r]||(du[r]=new au(t,e,n)),du[r]}function mu(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function yu(t){t.g||(t.g=!0,bu(t,!1,null,null))}function gu(t,e){if(t.b=function(){return Et(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function bu(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Tt(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):gu(t,n):gu(t,{user:null}),t.f=[],t.c=[]}function _u(){}function wu(){this.pb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.pb},set:function(t){this.pb=t},enumerable:!1})}function Eu(t,e){this.a=e,xr(this,"verificationId",t)}function Tu(t,e,n,r){return new Li(t).Ta(e,n).then(function(t){return new Eu(t,r)})}function Cu(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function xu(t){this.f=t,this.b=this.a=null,this.c=0}function Su(t,e){var n=e[$o],r=e.refreshToken;e=ku(e.expiresIn),t.b=n,t.c=e,t.a=r}function ku(t){return b()+1e3*parseInt(t,10)}function Nu(t,e){return function(t,e){return new vt(function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?ia(t,t.i+"?key="+encodeURIComponent(t.b),function(t){t?t.error?r(Ga(t)):t.access_token&&t.refresh_token?n(t):r(new Fr("internal-error")):r(new Fr("network-request-failed"))},"POST",an(e).toString(),t.f,t.m.get()):r(new Fr("internal-error"))})}(t.f,e).then(function(e){return t.b=e.access_token,t.c=ku(e.expires_in),t.a=e.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).s(function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e})}function Au(t,e){this.a=t||null,this.b=e||null,Sr(this,{lastSignInTime:br(e||null),creationTime:br(t||null)})}function Iu(t,e){for(var n in ae.call(this,t),e)this[n]=e[n]}function Ou(t,e,n){this.G=[],this.l=t.apiKey,this.o=t.appName,this.u=t.authDomain||null,t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(this.l,Xa(Qa),t),this.h=new xu(this.b),Uu(this,e[$o]),Su(this.h,e),xr(this,"refreshToken",this.h.a),qu(this,n||{}),Ae.call(this),this.I=!1,this.u&&sr()&&(this.a=vu(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=function(t){return new Cu(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=t.h.c-b()-3e5;return 0<e?e:0})}(this),this.V=y(this.Ha,this);var i=this;this.ka=null,this.sa=function(t){i.oa(t.g)},this.X=null,this.O=[],this.ra=function(t){Ru(i,t.c)},this.W=null}function Pu(t,e){t.X&&_e(t.X,"languageCodeChanged",t.sa),(t.X=e)&&ye(e,"languageCodeChanged",t.sa)}function Ru(t,e){t.O=e,ra(t.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,t.O):null)}function Du(t,e){t.W&&_e(t.W,"frameworkChanged",t.ra),(t.W=e)&&ye(e,"frameworkChanged",t.ra)}function Mu(t){try{return r.a.app(t.o).auth()}catch(e){throw new Fr("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.o+"'!")}}function Lu(t){t.C||t.w.b||(t.w.start(),_e(t,"tokenChanged",t.V),ye(t,"tokenChanged",t.V))}function Fu(t){_e(t,"tokenChanged",t.V),t.w.stop()}function Uu(t,e){t.qa=e,xr(t,"_lat",e)}function ju(t){for(var e=[],n=0;n<t.N.length;n++)e.push(t.N[n](t));return function(t){return new vt(function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Ct(t[o],g(i,o,!0),g(i,o,!1));else e(r)})}(e).then(function(){return t})}function Bu(t){t.a&&!t.I&&(t.I=!0,t.a.subscribe(t))}function qu(t,e){Sr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,metadata:new Au(e.createdAt,e.lastLoginAt),providerData:[]})}function Vu(){}function Wu(t){return Et().then(function(){if(t.C)throw new Fr("app-deleted")})}function Hu(t){return D(t.providerData,function(t){return t.providerId})}function zu(t,e){e&&(Ku(t,e.providerId),t.providerData.push(e))}function Ku(t,e){U(t.providerData,function(t){return t.providerId==e})}function Gu(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&xr(t,e,n)}function Qu(t,e){t!=e&&(Sr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,providerData:[]}),e.metadata?xr(t,"metadata",function(t){return new Au(t.a,t.b)}(e.metadata)):xr(t,"metadata",new Au),R(e.providerData,function(e){zu(t,e)}),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.h,e.h),xr(t,"refreshToken",t.h.a))}function Yu(t){return t.F().then(function(e){var n=t.isAnonymous;return function(t,e){return za(t.b,Sa,{idToken:e}).then(y(t.uc,t))}(t,e).then(function(){return n||Gu(t,"isAnonymous",!1),e})})}function Xu(t,e){e[$o]&&t.qa!=e[$o]&&(Su(t.h,e),t.dispatchEvent(new Iu("tokenChanged")),Uu(t,e[$o]),Gu(t,"refreshToken",t.h.a))}function $u(t,e){return Yu(t).then(function(){if(L(Hu(t),e))return ju(t).then(function(){throw new Fr("provider-already-linked")})})}function Ju(t,e,n){return kr({user:t,credential:Ui(e),additionalUserInfo:e=si(e),operationType:n})}function Zu(t,e){return Xu(t,e),t.reload().then(function(){return t})}function tc(t,e,n,i,o){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!o)return Tt(t.i);var a=ai(n.providerId),s=dr(t.uid+":::"),u=null;(!lr()||Yn())&&t.u&&n.isOAuthProvider&&(u=ls(t.u,t.l,t.o,e,n,null,s,r.a.SDK_VERSION||null));var c=zn(u,a&&a.Ba,a&&a.Aa);return i=i().then(function(){if(nc(t),!o)return t.F().then(function(){})}).then(function(){return hu(t.a,c,e,n,s,!!u)}).then(function(){return new vt(function(n,r){t.ha(e,null,new Fr("cancelled-popup-request"),t.g||null),t.f=n,t.v=r,t.g=s,t.c=t.a.Ea(t,e,c,s)})}).then(function(t){return c&&Hn(c),t?kr(t):null}).s(function(t){throw c&&Hn(c),t}),rc(t,i,o)}function ec(t,e,n,r,i){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!i)return Tt(t.i);var o=null,a=dr(t.uid+":::");return r=r().then(function(){if(nc(t),!i)return t.F().then(function(){})}).then(function(){return t.aa=a,ju(t)}).then(function(e){return t.ba&&(e=(e=t.ba).b.set(oc,t.D(),e.a)),e}).then(function(){return t.a.Ca(e,n,a)}).s(function(e){if(o=e,t.ba)return ac(t.ba);throw o}).then(function(){if(o)throw o}),rc(t,r,i)}function nc(t){if(!t.a||!t.I){if(t.a&&!t.I)throw new Fr("internal-error");throw new Fr("auth-domain-config-required")}}function rc(t,e,n){var r=function(t,e,n){return t.i&&!n?(e.cancel(),Tt(t.i)):e.s(function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.i||t.dispatchEvent(new Iu("userInvalidated")),t.i=e),e})}(t,e,n);return t.G.push(r),r.ia(function(){F(t.G,r)}),r}function ic(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!(t.stsTokenManager&&t.stsTokenManager.accessToken&&t.stsTokenManager.expirationTime))return null;n[$o]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null,n.expiresIn=(t.stsTokenManager.expirationTime-b())/1e3;var r=new Ou(e,n,t);return t.providerData&&R(t.providerData,function(t){t&&zu(r,kr(t))}),t.redirectEventId&&(r.aa=t.redirectEventId),r}mu.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},mu.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.b,r=t.c,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;"unknown"!=n||i||o?t.a?(bu(this,!0,null,t.a),Et()):e.wa(n,r)?function(t,e,n){n=n.wa(e.b,e.c);var r=e.f,i=e.g,o=!!e.b.match(/Redirect$/);n(r,i).then(function(e){bu(t,o,e,null)}).s(function(e){bu(t,o,null,e)})}(this,t,e):Tt(new Fr("invalid-auth-event")):(bu(this,!1,null,null),Et())}else Tt(new Fr("invalid-auth-event"))},mu.prototype.fa=function(){var t=this;return new vt(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new Fr("timeout");t.a&&t.a.cancel(),t.a=De(fu.get()).then(function(){t.b||bu(t,!0,null,e)})}(t))})},_u.prototype.h=function(t,e){if(t){var n=t.b,r=t.c;t.a?(e.ha(t.b,null,t.a,t.c),Et()):e.wa(n,r)?function(t,e){var n=t.c,r=t.b;e.wa(r,n)(t.f,t.g).then(function(t){e.ha(r,t,null,n)}).s(function(t){e.ha(r,null,t,n)})}(t,e):Tt(new Fr("invalid-auth-event"))}else Tt(new Fr("invalid-auth-event"))},Eu.prototype.confirm=function(t){return t=Fi(this.verificationId,t),this.a(t)},Cu.prototype.start=function(){this.a=this.c,function t(e,r){e.stop();e.b=De(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(e,r)).then(function(){return t=n.document,e=null,gr()||!t?Et():new vt(function(n){e=function(){gr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)}).s(function(n){throw t.removeEventListener("visibilitychange",e,!1),n});var t,e}).then(function(){return e.h()}).then(function(){t(e,!0)}).s(function(n){e.i(n)&&t(e,!1)})}(this,!0)},Cu.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},xu.prototype.D=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},xu.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?Tt(new Fr("user-token-expired")):t||!this.b||b()>this.c-3e4?this.a?Nu(this,{grant_type:"refresh_token",refresh_token:this.a}):Et(null):Et({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Au.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},_(Iu,ae),_(Ou,Ae),Ou.prototype.oa=function(t){this.ka=t,na(this.b,t)},Ou.prototype.ea=function(){return this.ka},Ou.prototype.xa=function(){return B(this.O)},Ou.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},xr(Ou.prototype,"providerId","firebase"),(t=Ou.prototype).reload=function(){var t=this;return rc(this,Wu(this).then(function(){return Yu(t).then(function(){return ju(t)}).then(Vu)}))},t.ac=function(t){return this.F(t).then(function(t){return new function(t){var e=ni(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new Fr("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Sr(this,{token:t,expirationTime:br(1e3*e.exp),authTime:br(1e3*e.auth_time),issuedAtTime:br(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,claims:e})}(t)})},t.F=function(t){var e=this;return rc(this,Wu(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new Fr("internal-error");return t.accessToken!=e.qa&&(Uu(e,t.accessToken),e.dispatchEvent(new Iu("tokenChanged"))),Gu(e,"refreshToken",t.refreshToken),t.accessToken}))},t.uc=function(t){if(!(t=t.users)||!t.length)throw new Fr("internal-error");qu(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?D(t,function(t){return new function(t,e,n,r,i,o){Sr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n<e.length;n++)zu(this,e[n]);Gu(this,"isAnonymous",!(this.email&&t.passwordHash||this.providerData&&this.providerData.length))},t.cb=function(t){var e=this,n=null;return rc(this,t.f(this.b,this.uid).then(function(t){return Xu(e,t),n=Ju(e,t,"reauthenticate"),e.i=null,e.reload()}).then(function(){return n}),!0)},t.vc=function(t){return Tr("firebase.User.prototype.reauthenticateWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential instead."),this.cb(t).then(function(){})},t.ab=function(t){var e=this,n=null;return rc(this,$u(this,t.providerId).then(function(){return e.F()}).then(function(n){return t.c(e.b,n)}).then(function(t){return n=Ju(e,t,"link"),Zu(e,t)}).then(function(){return n}))},t.mc=function(t){return Tr("firebase.User.prototype.linkWithCredential is deprecated. Please use firebase.User.prototype.linkAndRetrieveDataWithCredential instead."),this.ab(t).then(function(t){return t.user})},t.nc=function(t,e){var n=this;return rc(this,$u(this,"phone").then(function(){return Tu(Mu(n),t,e,y(n.ab,n))}))},t.wc=function(t,e){var n=this;return rc(this,Et().then(function(){return Tu(Mu(n),t,e,y(n.cb,n))}),!0)},t.mb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.mb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.Pc=function(t){var e=this;return rc(this,this.F().then(function(n){return t.c(e.b,n)}).then(function(t){return Xu(e,t),e.reload()}))},t.nb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.nb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.ob=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Wu(this);var e=this;return rc(this,this.F().then(function(n){return e.b.ob(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Xu(e,t),Gu(e,"displayName",t.displayName||null),Gu(e,"photoURL",t.photoUrl||null),R(e.providerData,function(t){"password"===t.providerId&&(xr(t,"displayName",e.displayName),xr(t,"photoURL",e.photoURL))}),ju(e)}).then(Vu))},t.Nc=function(t){var e=this;return rc(this,Yu(this).then(function(n){return L(Hu(e),t)?function(t,e,n){return za(t,Ta,{idToken:e,deleteProvider:n})}(e.b,n,[t]).then(function(t){var n={};return R(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),R(Hu(e),function(t){n[t]||Ku(e,t)}),n[Li.PROVIDER_ID]||xr(e,"phoneNumber",null),ju(e)}):ju(e).then(function(){throw new Fr("no-such-provider")})}))},t.delete=function(){var t=this;return rc(this,this.F().then(function(e){return za(t.b,Ea,{idToken:e})}).then(function(){t.dispatchEvent(new Iu("userDeleted"))})).then(function(){for(var e=0;e<t.G.length;e++)t.G[e].cancel("app-deleted");Pu(t,null),Du(t,null),t.G=[],t.C=!0,Fu(t),xr(t,"refreshToken",null),t.a&&t.a.unsubscribe(t)})},t.sb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.aa||null)==e||"reauthViaRedirect"==t&&(this.aa||null)==e)},t.ha=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?y(this.xb,this):"reauthViaPopup"==t&&e==(this.g||null)?y(this.yb,this):"linkViaRedirect"==t&&(this.aa||null)==e?y(this.xb,this):"reauthViaRedirect"==t&&(this.aa||null)==e?y(this.yb,this):null},t.oc=function(t){var e=this;return tc(this,"linkViaPopup",t,function(){return $u(e,t.providerId).then(function(){return ju(e)})},!1)},t.xc=function(t){return tc(this,"reauthViaPopup",t,function(){return Et()},!0)},t.pc=function(t){var e=this;return ec(this,"linkViaRedirect",t,function(){return $u(e,t.providerId)},!1)},t.yc=function(t){return ec(this,"reauthViaRedirect",t,function(){return Et()},!0)},t.xb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,this.F().then(function(r){return va(n.b,{requestUri:t,sessionId:e,idToken:r})}).then(function(t){return r=Ju(n,t,"link"),Zu(n,t)}).then(function(){return r}))},t.yb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,Et().then(function(){return yi(ma(n.b,{requestUri:t,sessionId:e}),n.uid)}).then(function(t){return r=Ju(n,t,"reauthenticate"),Xu(n,t),n.i=null,n.reload()}).then(function(){return r}),!0)},t.gb=function(t){var e=this,n=null;return rc(this,this.F().then(function(e){return n=e,void 0===t||it(t)?{}:Xr(new qr(t))}).then(function(t){return e.b.gb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},t.toJSON=function(){return this.D()},t.D=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.l,appName:this.o,authDomain:this.u,stsTokenManager:this.h.D(),redirectEventId:this.aa||null};return this.metadata&&ct(t,this.metadata.D()),R(this.providerData,function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))}),t};var oc={name:"redirectUser",A:"session"};function ac(t){return Fs(t.b,oc,t.a)}function sc(t){this.a=t,this.b=Ds(),this.c=null,this.f=function(t){var e=lc("local"),r=lc("session"),i=lc("none");return function(t,e,r){var i=Ls(e,r),o=Ms(t,e.A);return t.get(e,r).then(function(a){var s=null;try{s=pr(n.localStorage.getItem(i))}catch(t){}if(s&&!a)return n.localStorage.removeItem(i),t.set(e,s,r);s&&a&&"localStorage"!=o.type&&n.localStorage.removeItem(i)})}(t.b,e,t.a).then(function(){return t.b.get(r,t.a)}).then(function(n){return n?r:t.b.get(i,t.a).then(function(n){return n?i:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(cc,t.a).then(function(t){return t?lc(t):e})})})}).then(function(e){return t.c=e,uc(t,e.A)}).s(function(){t.c||(t.c=e)})}(this),this.b.addListener(lc("local"),this.a,y(this.g,this))}function uc(t,e){var n,r=[];for(n in Ps)Ps[n]!==e&&r.push(Fs(t.b,lc(Ps[n]),t.a));return r.push(Fs(t.b,cc,t.a)),function(t){return new vt(function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Ct(t[s],g(o,s),a);else e(i)})}(r)}sc.prototype.g=function(){var t=this,e=lc("local");dc(this,function(){return Et().then(function(){return t.c&&"local"!=t.c.A?t.b.get(e,t.a):null}).then(function(n){if(n)return uc(t,"local").then(function(){t.c=e})})})};var cc={name:"persistence",A:"session"};function lc(t){return{name:"authUser",A:t}}function fc(t,e){return dc(t,function(){return t.b.set(t.c,e.D(),t.a)})}function hc(t){return dc(t,function(){return Fs(t.b,t.c,t.a)})}function pc(t,e){return dc(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})})}function dc(t,e){return t.f=t.f.then(e,e),t.f}function vc(t){if(this.l=!1,xr(this,"settings",new wu),xr(this,"app",t),!Ec(this).options||!Ec(this).options.apiKey)throw new Fr("invalid-api-key");t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(Ec(this).options&&Ec(this).options.apiKey,Xa(Qa),t),this.N=[],this.o=[],this.I=[],this.Pb=r.a.INTERNAL.createSubscribe(y(this.ic,this)),this.O=void 0,this.Qb=r.a.INTERNAL.createSubscribe(y(this.jc,this)),_c(this,null),this.h=new sc(Ec(this).options.apiKey+":"+Ec(this).name),this.w=new function(t){this.a=t,this.b=Ds()}(Ec(this).options.apiKey+":"+Ec(this).name),this.V=Sc(this,function(t){var e=Ec(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(oc,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})}(t.w,Ec(t).options.authDomain).then(function(e){return(t.C=e)&&(e.ba=t.w),ac(t.w)});return Sc(t,e)}(t).then(function(){return pc(t.h,e)}).then(function(e){return e?(e.ba=t.w,t.C&&(t.C.aa||null)==(e.aa||null)?e:e.reload().then(function(){return fc(t.h,e).then(function(){return e})}).s(function(n){return"auth/network-request-failed"==n.code?e:hc(t.h)})):null}).then(function(e){_c(t,e||null)});return Sc(t,n)}(this)),this.i=Sc(this,function(t){return t.V.then(function(){return t.fa()}).s(function(){}).then(function(){if(!t.l)return t.ka()}).s(function(){}).then(function(){if(!t.l){t.X=!0;var e=t.h;e.b.addListener(lc("local"),e.a,t.ka)}})}(this)),this.X=!1,this.ka=y(this.Jc,this),this.Ha=y(this.Z,this),this.qa=y(this.Yb,this),this.ra=y(this.gc,this),this.sa=y(this.hc,this),function(t){var e=Ec(t).options.authDomain,n=Ec(t).options.apiKey;e&&sr()&&(t.Ob=t.V.then(function(){if(!t.l){if(t.a=vu(e,n,Ec(t).name),t.a.subscribe(t),Tc(t)&&Bu(Tc(t)),t.C){Bu(t.C);var r=t.C;r.oa(t.ea()),Pu(r,t),Ru(r=t.C,t.G),Du(r,t),t.C=null}return t.a}}))}(this),this.INTERNAL={},this.INTERNAL.delete=y(this.delete,this),this.INTERNAL.logFramework=y(this.qc,this),this.u=0,Ae.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ea()},set:function(t){this.oa(t)},enumerable:!1}),t.W=null}(this),this.G=[]}function mc(t){ae.call(this,"languageCodeChanged"),this.g=t}function yc(t){ae.call(this,"frameworkChanged"),this.c=t}function gc(t){return t.Ob||Tt(new Fr("auth-domain-config-required"))}function bc(t,e){var n={};return n.apiKey=Ec(t).options.apiKey,n.authDomain=Ec(t).options.authDomain,n.appName=Ec(t).name,t.V.then(function(){return function(t,e,n,r){var i=new Ou(t,e);return n&&(i.ba=n),r&&Ru(i,r),i.reload().then(function(){return i})}(n,e,t.w,t.xa())}).then(function(e){return Tc(t)&&e.uid==Tc(t).uid?(Qu(Tc(t),e),t.Z(e)):(_c(t,e),Bu(e),t.Z(e))}).then(function(){xc(t)})}function _c(t,e){Tc(t)&&(function(t,e){U(t.N,function(t){return t==e})}(Tc(t),t.Ha),_e(Tc(t),"tokenChanged",t.qa),_e(Tc(t),"userDeleted",t.ra),_e(Tc(t),"userInvalidated",t.sa),Fu(Tc(t))),e&&(e.N.push(t.Ha),ye(e,"tokenChanged",t.qa),ye(e,"userDeleted",t.ra),ye(e,"userInvalidated",t.sa),0<t.u&&Lu(e)),xr(t,"currentUser",e),e&&(e.oa(t.ea()),Pu(e,t),Ru(e,t.G),Du(e,t))}function wc(t,e){var n=null,r=null;return Sc(t,e.then(function(e){return n=Ui(e),r=si(e),bc(t,e)}).then(function(){return kr({user:Tc(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Ec(t){return t.app}function Tc(t){return t.currentUser}function Cc(t){return Tc(t)&&Tc(t)._lat||null}function xc(t){if(t.X){for(var e=0;e<t.o.length;e++)t.o[e]&&t.o[e](Cc(t));if(t.O!==t.getUid()&&t.I.length)for(t.O=t.getUid(),e=0;e<t.I.length;e++)t.I[e]&&t.I[e](Cc(t))}}function Sc(t,e){return t.N.push(e),e.ia(function(){F(t.N,e)}),e}function kc(){}function Nc(){this.a={},this.b=1e12}sc.prototype.jb=function(t){var e=null,n=this;return function(t){var e=new Fr("invalid-persistence-type"),n=new Fr("unsupported-persistence-type");t:{for(r in Ps)if(Ps[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch($n()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;default:if(!ar()&&"none"!==t)throw n}}(t),dc(this,function(){return t!=n.c.A?n.b.get(n.c,n.a).then(function(r){return e=r,uc(n,t)}).then(function(){if(n.c=lc(t),e)return n.b.set(n.c,e,n.a)}):Et()})},_(vc,Ae),_(mc,ae),_(yc,ae),(t=vc.prototype).jb=function(t){return Sc(this,t=this.h.jb(t))},t.oa=function(t){this.W===t||this.l||(this.W=t,na(this.b,this.W),this.dispatchEvent(new mc(this.ea())))},t.ea=function(){return this.W},t.Qc=function(){var t=n.navigator;this.oa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},t.qc=function(t){this.G.push(t),ra(this.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,this.G):null),this.dispatchEvent(new yc(this.G))},t.xa=function(){return B(this.G)},t.toJSON=function(){return{apiKey:Ec(this).options.apiKey,authDomain:Ec(this).options.authDomain,appName:Ec(this).name,currentUser:Tc(this)&&Tc(this).D()}},t.sb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},t.ha=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?y(this.Xb,this):null},t.Xb=function(t,e){var n=this;t={requestUri:t,sessionId:e},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=da(n.b,t).then(function(t){return r=Ui(t),i=si(t),t});return Sc(this,t=n.V.then(function(){return o}).then(function(t){return bc(n,t)}).then(function(){return kr({user:Tc(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}))},t.Hc=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this,n=ai(t.providerId),i=dr(),o=null;(!lr()||Yn())&&Ec(this).options.authDomain&&t.isOAuthProvider&&(o=ls(Ec(this).options.authDomain,Ec(this).options.apiKey,Ec(this).name,"signInViaPopup",t,null,i,r.a.SDK_VERSION||null));var a=zn(o,n&&n.Ba,n&&n.Aa);return Sc(this,n=gc(this).then(function(e){return hu(e,a,"signInViaPopup",t,i,!!o)}).then(function(){return new vt(function(t,n){e.ha("signInViaPopup",null,new Fr("cancelled-popup-request"),e.g),e.f=t,e.v=n,e.g=i,e.c=e.a.Ea(e,"signInViaPopup",a,i)})}).then(function(t){return a&&Hn(a),t?kr(t):null}).s(function(t){throw a&&Hn(a),t}))},t.Ic=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this;return Sc(this,gc(this).then(function(){return dc(t=e.h,function(){return t.b.set(cc,t.c.A,t.a)});var t}).then(function(){return e.a.Ca("signInViaRedirect",t)}))},t.fa=function(){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var t=this;return Sc(this,gc(this).then(function(){return t.a.fa()}).then(function(t){return t?kr(t):null}))},t.Oc=function(t){if(!t)return Tt(new Fr("null-user"));var e=this,n={};n.apiKey=Ec(this).options.apiKey,n.authDomain=Ec(this).options.authDomain,n.appName=Ec(this).name;var r=function(t,e,n,r){e=e||{apiKey:t.l,authDomain:t.u,appName:t.o};var i=t.h,o={};return o[$o]=i.b,o.refreshToken=i.a,o.expiresIn=(i.c-b())/1e3,e=new Ou(e,o),n&&(e.ba=n),r&&Ru(e,r),Qu(e,t),e}(t,n,e.w,e.xa());return Sc(this,this.i.then(function(){if(Ec(e).options.apiKey!=t.l)return r.reload()}).then(function(){return Tc(e)&&t.uid==Tc(e).uid?(Qu(Tc(e),t),e.Z(t)):(_c(e,r),Bu(r),e.Z(r))}).then(function(){xc(e)}))},t.kb=function(){var t=this;return Sc(this,this.i.then(function(){return Tc(t)?(_c(t,null),hc(t.h).then(function(){xc(t)})):Et()}))},t.Jc=function(){var t=this;return pc(this.h,Ec(this).options.authDomain).then(function(e){if(!t.l){var n;if(n=Tc(t)&&e){n=Tc(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Qu(Tc(t),e),Tc(t).F();(Tc(t)||e)&&(_c(t,e),e&&(Bu(e),e.ba=t.w),t.a&&t.a.subscribe(t),xc(t))}})},t.Z=function(t){return fc(this.h,t)},t.Yb=function(){xc(this),this.Z(Tc(this))},t.gc=function(){this.kb()},t.hc=function(){this.kb()},t.ic=function(t){var e=this;this.addAuthTokenListener(function(){t.next(Tc(e))})},t.jc=function(t){var e=this;!function(t,e){t.I.push(e),Sc(t,t.i.then(function(){!t.l&&L(t.I,e)&&t.O!==t.getUid()&&(t.O=t.getUid(),e(Cc(t)))}))}(this,function(){t.next(Tc(e))})},t.sc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Pb(t,e,n)},t.rc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){i.O=i.getUid(),f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Qb(t,e,n)},t.$b=function(t){var e=this;return Sc(this,this.i.then(function(){return Tc(e)?Tc(e).F(t).then(function(t){return{accessToken:t}}):null}))},t.Jb=function(t){var e=this;return this.i.then(function(){return wc(e,za(e.b,Ba,{token:t}))}).then(function(t){var n=t.user;return Gu(n,"isAnonymous",!1),e.Z(n),t})},t.Bc=function(t){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCustomToken is deprecated. Please use firebase.auth.Auth.prototype.signInWithCustomToken instead."),this.Jb(t)},t.Cc=function(t,e){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.signInWithEmailAndPassword instead."),this.Kb(t,e)},t.Kb=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,qa,{email:t,password:e}))})},t.ub=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,_a,{email:t,password:e}))})},t.Sb=function(t,e){return Tr("firebase.auth.Auth.prototype.createUserAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.createUserWithEmailAndPassword instead."),this.ub(t,e)},t.Ec=function(t){return Tr("firebase.auth.Auth.prototype.signInWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential instead."),this.Oa(t).then(function(t){return t.user})},t.Oa=function(t){var e=this;return this.i.then(function(){return wc(e,t.ya(e.b))})},t.Pa=function(){var t=this;return this.i.then(function(){var e=Tc(t);return e&&e.isAnonymous?kr({user:e,credential:null,additionalUserInfo:kr({providerId:null,isNewUser:!1}),operationType:"signIn"}):wc(t,t.b.Pa()).then(function(e){var n=e.user;return Gu(n,"isAnonymous",!0),t.Z(n),e})})},t.Dc=function(){return Tr("firebase.auth.Auth.prototype.signInAnonymouslyAndRetrieveData is deprecated. Please use firebase.auth.Auth.prototype.signInAnonymously instead."),this.Pa()},t.getUid=function(){return Tc(this)&&Tc(this).uid||null},t.Rb=function(t){this.addAuthTokenListener(t),this.u++,0<this.u&&Tc(this)&&Lu(Tc(this))},t.zc=function(t){var e=this;R(this.o,function(n){n==t&&e.u--}),0>this.u&&(this.u=0),0==this.u&&Tc(this)&&Fu(Tc(this)),this.removeAuthTokenListener(t)},t.addAuthTokenListener=function(t){var e=this;this.o.push(t),Sc(this,this.i.then(function(){e.l||L(e.o,t)&&t(Cc(e))}))},t.removeAuthTokenListener=function(t){U(this.o,function(e){return e==t})},t.delete=function(){this.l=!0;for(var t=0;t<this.N.length;t++)this.N[t].cancel("app-deleted");return this.N=[],this.h&&(t=this.h).b.removeListener(lc("local"),t.a,this.ka),this.a&&this.a.unsubscribe(this),r.a.Promise.resolve()},t.Vb=function(t){return Tr("firebase.auth.Auth.prototype.fetchProvidersForEmail is deprecated. Please use firebase.auth.Auth.prototype.fetchSignInMethodsForEmail instead."),Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.allProviders||[]})}(this.b,t))},t.Wb=function(t){return Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.signinMethods||[]})}(this.b,t))},t.kc=function(t){return!!Ri(t)},t.ib=function(t,e){var n=this;return Sc(this,Et().then(function(){var t=new qr(e);if(!t.c)throw new Fr("argument-error",Wr+" must be true when sending sign in link to email");return Xr(t)}).then(function(e){return n.b.ib(t,e)}).then(function(){}))},t.Rc=function(t){return this.Ja(t).then(function(t){return t.data.email})},t.Xa=function(t,e){return Sc(this,this.b.Xa(t,e).then(function(){}))},t.Ja=function(t){return Sc(this,this.b.Ja(t).then(function(t){return new function(t){var e={},n=t[Ir],r=t[Or];if(!(t=t[Pr])||t!=Ar&&!n)throw Error("Invalid provider user info!");e[Dr]=r||null,e[Rr]=n||null,xr(this,Lr,t),xr(this,Mr,Nr(e))}(t)}))},t.Va=function(t){return Sc(this,this.b.Va(t).then(function(){}))},t.hb=function(t,e){var n=this;return Sc(this,Et().then(function(){return void 0===e||it(e)?{}:Xr(new qr(e))}).then(function(e){return n.b.hb(t,e)}).then(function(){}))},t.Gc=function(t,e){return Sc(this,Tu(this,t,e,y(this.Oa,this)))},t.Fc=function(t,e){var n=this;return Sc(this,Et().then(function(){var r=Pi(t,e||qn());return n.Oa(r)}))},kc.prototype.render=function(){},kc.prototype.reset=function(){},kc.prototype.getResponse=function(){},kc.prototype.execute=function(){};var Ac=null;function Ic(t,e){return(e=Oc(e))&&t.a[e]||null}function Oc(t){return(t=void 0===t?1e12:t)?t.toString():null}function Pc(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=On(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():ye(this.f,"click",this.i)}function Rc(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function Dc(){}Nc.prototype.render=function(t,e){return this.a[this.b.toString()]=new Pc(t,e),this.b++},Nc.prototype.reset=function(t){var e=Ic(this,t);t=Oc(t),e&&t&&(e.delete(),delete this.a[t])},Nc.prototype.getResponse=function(t){return(t=Ic(this,t))?t.getResponse():null},Nc.prototype.execute=function(t){(t=Ic(this,t))&&t.execute()},Pc.prototype.getResponse=function(){return Rc(this),this.b},Pc.prototype.execute=function(){Rc(this);var t=this;this.a||(this.a=setTimeout(function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(t){}t.a=setTimeout(function(){if(t.a=null,t.b=null,n)try{n()}catch(t){}t.h&&t.execute()},6e4)},500))},Pc.prototype.delete=function(){Rc(this),this.g=!0,clearTimeout(this.a),this.a=null,_e(this.f,"click",this.i)},Dc.prototype.g=function(){return Ac||(Ac=new Nc),Et(Ac)},Dc.prototype.c=function(){};var Mc=null;function Lc(){this.b=n.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Fc=vn("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Uc=new yr(3e4,6e4);Lc.prototype.g=function(t){var e=this;return new vt(function(r,i){var o=setTimeout(function(){i(new Fr("network-request-failed"))},Uc.get());!n.grecaptcha||t!==e.f&&!e.b?(n[e.a]=function(){if(n.grecaptcha){e.f=t;var a=n.grecaptcha.render;n.grecaptcha.render=function(t,n){return t=a(t,n),e.b++,t},clearTimeout(o),r(n.grecaptcha)}else clearTimeout(o),i(new Fr("internal-error"));delete n[e.a]},Et(Vo(gn(Fc,{onload:e.a,hl:t||""}))).s(function(){clearTimeout(o),i(new Fr("internal-error","Unable to load external reCAPTCHA dependencies!"))})):(clearTimeout(o),r(n.grecaptcha))})},Lc.prototype.c=function(){this.b--};var jc=null;function Bc(t,e,r,i,o,a,s){if(xr(this,"type","recaptcha"),this.c=this.f=null,this.C=!1,this.l=e,this.g=null,s?(Mc||(Mc=new Dc),s=Mc):(jc||(jc=new Lc),s=jc),this.o=s,this.a=r||{theme:"light",type:"image"},this.h=[],this.a[Wc])throw new Fr("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Hc],!n.document)throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!On(e)||!this.i&&On(e).hasChildNodes())throw new Fr("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new Yo(t,a||null,o||null),this.v=i||function(){return null};var u=this;this.m=[];var c=this.a[qc];this.a[qc]=function(t){if(zc(u,t),"function"==typeof c)c(t);else if("string"==typeof c){var e=or(c,n);"function"==typeof e&&e(t)}};var l=this.a[Vc];this.a[Vc]=function(){if(zc(u,null),"function"==typeof l)l();else if("string"==typeof l){var t=or(l,n);"function"==typeof t&&t()}}}var qc="callback",Vc="expired-callback",Wc="sitekey",Hc="size";function zc(t,e){for(var n=0;n<t.m.length;n++)try{t.m[n](e)}catch(t){}}function Kc(t,e){return t.h.push(e),e.ia(function(){F(t.h,e)}),e}function Gc(t){if(t.C)throw new Fr("internal-error","RecaptchaVerifier instance has been destroyed.")}function Qc(t,e,n){var i=!1;try{this.b=n||r.a.app()}catch(t){throw new Fr("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new Fr("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().xa()}catch(t){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(t){}a=r.a.SDK_VERSION?rr(r.a.SDK_VERSION,a):null,Bc.call(this,n,t,e,function(){try{var t=o.b.auth().ea()}catch(e){t=null}return t},a,Xa(Qa),i)}function Yc(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new Fr("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Xc.length)throw new Fr("internal-error","Argument validator received an unsupported number of arguments.");n=Xc[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new Fr("argument-error",t+" failed: "+r)}(t=Bc.prototype).za=function(){var t=this;return this.f?this.f:this.f=Kc(this,Et().then(function(){if(ur()&&!Xn())return Gn();throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return t.o.g(t.v())}).then(function(e){return t.g=e,za(t.u,Oa,{})}).then(function(e){t.a[Wc]=e.recaptchaSiteKey}).s(function(e){throw t.f=null,e}))},t.render=function(){Gc(this);var t=this;return Kc(this,this.za().then(function(){if(null===t.c){var e=t.l;if(!t.i){var n=On(e);e=Dn("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c}))},t.verify=function(){Gc(this);var t=this;return Kc(this,this.render().then(function(e){return new vt(function(n){var r=t.g.getResponse(e);if(r)n(r);else{var i=function(e){e&&(function(t,e){U(t.m,function(t){return t==e})}(t,i),n(e))};t.m.push(i),t.i&&t.g.execute(t.c)}})}))},t.reset=function(){Gc(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Gc(this),this.C=!0,this.o.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=On(this.l);for(var e;e=t.firstChild;)t.removeChild(e)}},_(Qc,Bc);var Xc="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function $c(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:i}}function Jc(t,e){return{name:t||"",K:"a boolean",optional:!!e,M:o}}function Zc(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:h}}function tl(t,e){return{name:t||"",K:"a function",optional:!!e,M:f}}function el(t,e){return{name:t||"",K:"null",optional:!!e,M:u}}function nl(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ya||!n)}}}function rl(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&i(t.type)&&f(t.verify))}}}function il(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function ol(t,e){for(var n in e){var r=e[n].name;t[r]=ul(r,t[n],e[n].j)}}function al(t,e){for(var n in e){var r=e[n].name;if(r!==n){var i=e[n].qb;Object.defineProperty(t,r,{get:function(){return this[n]},set:function(t){Yc(r,[i],[t],!0),this[n]=t},enumerable:!0})}}}function sl(t,e,n,r){t[e]=ul(e,n,r)}function ul(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Yc(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}ol(vc.prototype,{Va:{name:"applyActionCode",j:[$c("code")]},Ja:{name:"checkActionCode",j:[$c("code")]},Xa:{name:"confirmPasswordReset",j:[$c("code"),$c("newPassword")]},ub:{name:"createUserWithEmailAndPassword",j:[$c("email"),$c("password")]},Sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Vb:{name:"fetchProvidersForEmail",j:[$c("email")]},Wb:{name:"fetchSignInMethodsForEmail",j:[$c("email")]},fa:{name:"getRedirectResult",j:[]},kc:{name:"isSignInWithEmailLink",j:[$c("emailLink")]},rc:{name:"onAuthStateChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},sc:{name:"onIdTokenChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},hb:{name:"sendPasswordResetEmail",j:[$c("email"),il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},ib:{name:"sendSignInLinkToEmail",j:[$c("email"),Zc("actionCodeSettings")]},jb:{name:"setPersistence",j:[$c("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",j:[nl()]},Pa:{name:"signInAnonymously",j:[]},Dc:{name:"signInAnonymouslyAndRetrieveData",j:[]},Ec:{name:"signInWithCredential",j:[nl()]},Jb:{name:"signInWithCustomToken",j:[$c("token")]},Bc:{name:"signInAndRetrieveDataWithCustomToken",j:[$c("token")]},Kb:{name:"signInWithEmailAndPassword",j:[$c("email"),$c("password")]},Fc:{name:"signInWithEmailLink",j:[$c("email"),$c("emailLink",!0)]},Cc:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Gc:{name:"signInWithPhoneNumber",j:[$c("phoneNumber"),rl()]},Hc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Ic:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"updateCurrentUser",j:[il({name:"user",K:"an instance of Firebase User",optional:!1,M:function(t){return!!(t&&t instanceof Ou)}},el(),"user")]},kb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Qc:{name:"useDeviceLanguage",j:[]},Rc:{name:"verifyPasswordResetCode",j:[$c("code")]}}),al(vc.prototype,{lc:{name:"languageCode",qb:il($c(),el(),"languageCode")}}),vc.Persistence=Ps,vc.Persistence.LOCAL="local",vc.Persistence.SESSION="session",vc.Persistence.NONE="none",ol(Ou.prototype,{delete:{name:"delete",j:[]},ac:{name:"getIdTokenResult",j:[Jc("opt_forceRefresh",!0)]},F:{name:"getIdToken",j:[Jc("opt_forceRefresh",!0)]},ab:{name:"linkAndRetrieveDataWithCredential",j:[nl()]},mc:{name:"linkWithCredential",j:[nl()]},nc:{name:"linkWithPhoneNumber",j:[$c("phoneNumber"),rl()]},oc:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},pc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},cb:{name:"reauthenticateAndRetrieveDataWithCredential",j:[nl()]},vc:{name:"reauthenticateWithCredential",j:[nl()]},wc:{name:"reauthenticateWithPhoneNumber",j:[$c("phoneNumber"),rl()]},xc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},yc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},gb:{name:"sendEmailVerification",j:[il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Nc:{name:"unlink",j:[$c("provider")]},mb:{name:"updateEmail",j:[$c("email")]},nb:{name:"updatePassword",j:[$c("password")]},Pc:{name:"updatePhoneNumber",j:[nl("phone")]},ob:{name:"updateProfile",j:[Zc("profile")]}}),ol(Nc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(kc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(vt.prototype,{ia:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),al(wu.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",qb:Jc("appVerificationDisabledForTesting")}}),ol(Eu.prototype,{confirm:{name:"confirm",j:[$c("verificationCode")]}}),sl(Oi,"credential",function(t,e){return new Ii(t,e)},[$c("email"),$c("password")]),ol(Ei.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ei,"credential",Ti,[il($c(),Zc(),"token")]),sl(Oi,"credentialWithLink",Pi,[$c("email"),$c("emailLink")]),ol(Ci.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ci,"credential",xi,[il($c(),Zc(),"token")]),ol(Si.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Si,"credential",ki,[il($c(),il(Zc(),el()),"idToken"),il($c(),el(),"accessToken",!0)]),ol(Ni.prototype,{Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ni,"credential",Ai,[il($c(),Zc(),"token"),$c("secret",!0)]),ol(wi.prototype,{ta:{name:"addScope",j:[$c("scope")]},credential:{name:"credential",j:[il($c(),el(),"idToken",!0),il($c(),el(),"accessToken",!0)]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Li,"credential",Fi,[$c("verificationId"),$c("verificationCode")]),ol(Li.prototype,{Ta:{name:"verifyPhoneNumber",j:[$c("phoneNumber"),rl()]}}),ol(Fr.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(zi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Hi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Qc.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if(void 0===r.a||!r.a.INTERNAL||!r.a.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={Auth:vc,Error:Fr};sl(t,"EmailAuthProvider",Oi,[]),sl(t,"FacebookAuthProvider",Ei,[]),sl(t,"GithubAuthProvider",Ci,[]),sl(t,"GoogleAuthProvider",Si,[]),sl(t,"TwitterAuthProvider",Ni,[]),sl(t,"OAuthProvider",wi,[$c("providerId")]),sl(t,"PhoneAuthProvider",Li,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof vc)}}]),sl(t,"RecaptchaVerifier",Qc,[il($c(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Zc("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof r.a.app.App)}}]),r.a.INTERNAL.registerService("auth",function(t,e){return e({INTERNAL:{getUid:y((t=new vc(t)).getUid,t),getToken:y(t.$b,t),addAuthTokenListener:y(t.Rb,t),removeAuthTokenListener:y(t.zc,t)}}),t},t,function(t,e){if("create"===t)try{e.auth()}catch(t){}}),r.a.INTERNAL.extendNamespace({User:Ou})}()}).call(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}.call(this,n(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});
 
/*! *****************************************************************************
 
/*! *****************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
 
Copyright (c) Microsoft Corporation. All rights reserved.
Line 97: Line 97:
 
and limitations under the License.
 
and limitations under the License.
 
***************************************************************************** */
 
***************************************************************************** */
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=s(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},l.prototype.delete=function(t){delete this.map[s(t)]},l.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},l.prototype.set=function(t,e){this.map[s(t)]=u(e)},l.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},v.call(m.prototype),v.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];g.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=m,t.Response=g,t.fetch=function(t,n){return new Promise(function(r,i){var o=new m(t,n),a=new XMLHttpRequest;a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new g(i,n))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=h(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=d(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=f(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=h(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function m(t,e){var n,r,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),o.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete c[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(66),n(148))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(326),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(66))},function(t,e,n){"use strict";n.r(e),function(t,e){n(325);var r=setTimeout;function i(){}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function a(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}s(e.promise,r)}else(1===t._state?s:u)(e.promise,t._value)})):t._deferreds.push(e)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(i);return a(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,e,n)),n},o.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},o.all=function(t){return new o(function(e,n){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(t,e)},n)}r[t]=a,0==--i&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)o(a,r[a])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){r(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();function h(t,e){return t(e={exports:{}},e.exports),e.exports}f.Promise||(f.Promise=o);var p=h(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),d=h(function(t){var e=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)}),v=(d.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),m=function(t){if(!v(t))throw TypeError(t+" is not an object!");return t},y=function(t){try{return!!t()}catch(t){return!0}},g=!y(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=p.document,_=v(b)&&v(b.createElement),w=function(t){return _?b.createElement(t):{}},E=!g&&!y(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),T=function(t,e){if(!v(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!v(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},C=Object.defineProperty,x={f:g?Object.defineProperty:function(t,e,n){if(m(t),e=T(e,!0),m(n),E)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=g?function(t,e,n){return x.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},N={}.hasOwnProperty,A=function(t,e){return N.call(t,e)},I=0,O=Math.random(),P=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++I+O).toString(36))},R=h(function(t){var e=P("src"),n=Function.toString,r=(""+n).split("toString");d.inspectSource=function(t){return n.call(t)},(t.exports=function(t,n,i,o){var a="function"==typeof i;a&&(A(i,"name")||k(i,"name",n)),t[n]!==i&&(a&&(A(i,e)||k(i,e,t[n]?""+t[n]:r.join(String(n)))),t===p?t[n]=i:o?t[n]?t[n]=i:k(t,n,i):(delete t[n],k(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||n.call(this)})}),D=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},M=function(t,e,n){var r,i,o,a,s=t&M.F,u=t&M.G,c=t&M.S,l=t&M.P,f=t&M.B,h=u?p:c?p[e]||(p[e]={}):(p[e]||{}).prototype,v=u?d:d[e]||(d[e]={}),m=v.prototype||(v.prototype={});for(r in u&&(n=e),n)o=((i=!s&&h&&void 0!==h[r])?h:n)[r],a=f&&i?D(o,p):l&&"function"==typeof o?D(Function.call,o):o,h&&R(h,r,o,t&M.U),v[r]!=o&&k(v,r,a),l&&m[r]!=o&&(m[r]=o)};p.core=d,M.F=1,M.G=2,M.S=4,M.P=8,M.B=16,M.W=32,M.U=64,M.R=128;var L=M,F={}.toString,U=function(t){return F.call(t).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==U(t)?t.split(""):Object(t)},B=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t},q=function(t){return Object(B(t))},V=Math.ceil,W=Math.floor,H=function(t){return isNaN(t=+t)?0:(t>0?W:V)(t)},z=Math.min,K=function(t){return t>0?z(H(t),9007199254740991):0},G=Array.isArray||function(t){return"Array"==U(t)},Q=p["__core-js_shared__"]||(p["__core-js_shared__"]={}),Y=function(t){return Q[t]||(Q[t]={})},X=h(function(t){var e=Y("wks"),n=p.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:P)("Symbol."+t))}).store=e}),$=X("species"),J=function(t,e){return new(function(t){var e;return G(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!G(e.prototype)||(e=void 0),v(e)&&null===(e=e[$])&&(e=void 0)),void 0===e?Array:e}(t))(e)},Z=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,a=6==t,s=5==t||a,u=e||J;return function(e,c,l){for(var f,h,p=q(e),d=j(p),v=D(c,l,3),m=K(d.length),y=0,g=n?u(e,m):r?u(e,0):void 0;m>y;y++)if((s||y in d)&&(h=v(f=d[y],y,p),t))if(n)g[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:g.push(f)}else if(o)return!1;return a?-1:i||o?o:g}},tt=X("unscopables"),et=Array.prototype;void 0==et[tt]&&k(et,tt,{});var nt=function(t){et[tt][t]=!0},rt=Z(5),it=!0;"find"in[]&&Array(1).find(function(){it=!1}),L(L.P+L.F*it,"Array",{find:function(t){return rt(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("find");d.Array.find;var ot=Z(6),at=!0;"findIndex"in[]&&Array(1).findIndex(function(){at=!1}),L(L.P+L.F*at,"Array",{findIndex:function(t){return ot(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("findIndex");d.Array.findIndex;var st,ut=function(t){return j(B(t))},ct=Math.max,lt=Math.min,ft=Y("keys"),ht=function(t){return ft[t]||(ft[t]=P(t))},pt=(st=!1,function(t,e,n){var r,i=ut(t),o=K(i.length),a=function(t,e){return(t=H(t))<0?ct(t+e,0):lt(t,e)}(n,o);if(st&&e!=e){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((st||a in i)&&i[a]===e)return st||a||0;return!st&&-1}),dt=ht("IE_PROTO"),vt=function(t,e){var n,r=ut(t),i=0,o=[];for(n in r)n!=dt&&A(r,n)&&o.push(n);for(;e.length>i;)A(r,n=e[i++])&&(~pt(o,n)||o.push(n));return o},mt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),yt=Object.keys||function(t){return vt(t,mt)},gt={f:Object.getOwnPropertySymbols},bt={f:{}.propertyIsEnumerable},_t=Object.assign,wt=!_t||y(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=_t({},t)[n]||Object.keys(_t({},e)).join("")!=r})?function(t,e){for(var n=q(t),r=arguments.length,i=1,o=gt.f,a=bt.f;r>i;)for(var s,u=j(arguments[i++]),c=o?yt(u).concat(o(u)):yt(u),l=c.length,f=0;l>f;)a.call(u,s=c[f++])&&(n[s]=u[s]);return n}:_t;L(L.S+L.F,"Object",{assign:wt});d.Object.assign;var Et=X("match"),Tt=function(t,e,n){if(v(r=e)&&(void 0!==(i=r[Et])?i:"RegExp"==U(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(B(t))},Ct=X("match"),xt="".startsWith;L(L.P+L.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Ct]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=Tt(this,t,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return xt?xt.call(e,r,n):e.slice(n,n+r.length)===r}});d.String.startsWith;L(L.P,"String",{repeat:function(t){var e=String(B(this)),n="",r=H(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});d.String.repeat;var St=h(function(t){var e=P("meta"),n=x.f,r=0,i=Object.isExtensible||function(){return!0},o=!y(function(){return i(Object.preventExtensions({}))}),a=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},s=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!v(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!A(t,e)){if(!i(t))return"F";if(!n)return"E";a(t)}return t[e].i},getWeak:function(t,n){if(!A(t,e)){if(!i(t))return!0;if(!n)return!1;a(t)}return t[e].w},onFreeze:function(t){return o&&s.NEED&&i(t)&&!A(t,e)&&a(t),t}}}),kt=(St.KEY,St.NEED,St.fastKey,St.getWeak,St.onFreeze,x.f),Nt=X("toStringTag"),At=function(t,e,n){t&&!A(t=n?t:t.prototype,Nt)&&kt(t,Nt,{configurable:!0,value:e})},It={f:X},Ot=x.f,Pt=function(t){var e=d.Symbol||(d.Symbol=p.Symbol||{});"_"==t.charAt(0)||t in e||Ot(e,t,{value:It.f(t)})},Rt=g?Object.defineProperties:function(t,e){m(t);for(var n,r=yt(e),i=r.length,o=0;i>o;)x.f(t,n=r[o++],e[n]);return t},Dt=p.document,Mt=Dt&&Dt.documentElement,Lt=ht("IE_PROTO"),Ft=function(){},Ut=function(){var t,e=w("iframe"),n=mt.length;for(e.style.display="none",Mt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Ut=t.F;n--;)delete Ut.prototype[mt[n]];return Ut()},jt=Object.create||function(t,e){var n;return null!==t?(Ft.prototype=m(t),n=new Ft,Ft.prototype=null,n[Lt]=t):n=Ut(),void 0===e?n:Rt(n,e)},Bt=mt.concat("length","prototype"),qt={f:Object.getOwnPropertyNames||function(t){return vt(t,Bt)}},Vt=qt.f,Wt={}.toString,Ht="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zt={f:function(t){return Ht&&"[object Window]"==Wt.call(t)?function(t){try{return Vt(t)}catch(t){return Ht.slice()}}(t):Vt(ut(t))}},Kt=Object.getOwnPropertyDescriptor,Gt={f:g?Kt:function(t,e){if(t=ut(t),e=T(e,!0),E)try{return Kt(t,e)}catch(t){}if(A(t,e))return S(!bt.f.call(t,e),t[e])}},Qt=St.KEY,Yt=Gt.f,Xt=x.f,$t=zt.f,Jt=p.Symbol,Zt=p.JSON,te=Zt&&Zt.stringify,ee=X("_hidden"),ne=X("toPrimitive"),re={}.propertyIsEnumerable,ie=Y("symbol-registry"),oe=Y("symbols"),ae=Y("op-symbols"),se=Object.prototype,ue="function"==typeof Jt,ce=p.QObject,le=!ce||!ce.prototype||!ce.prototype.findChild,fe=g&&y(function(){return 7!=jt(Xt({},"a",{get:function(){return Xt(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Yt(se,e);r&&delete se[e],Xt(t,e,n),r&&t!==se&&Xt(se,e,r)}:Xt,he=function(t){var e=oe[t]=jt(Jt.prototype);return e._k=t,e},pe=ue&&"symbol"==typeof Jt.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Jt},de=function(t,e,n){return t===se&&de(ae,e,n),m(t),e=T(e,!0),m(n),A(oe,e)?(n.enumerable?(A(t,ee)&&t[ee][e]&&(t[ee][e]=!1),n=jt(n,{enumerable:S(0,!1)})):(A(t,ee)||Xt(t,ee,S(1,{})),t[ee][e]=!0),fe(t,e,n)):Xt(t,e,n)},ve=function(t,e){m(t);for(var n,r=function(t){var e=yt(t),n=gt.f;if(n)for(var r,i=n(t),o=bt.f,a=0;i.length>a;)o.call(t,r=i[a++])&&e.push(r);return e}(e=ut(e)),i=0,o=r.length;o>i;)de(t,n=r[i++],e[n]);return t},me=function(t){var e=re.call(this,t=T(t,!0));return!(this===se&&A(oe,t)&&!A(ae,t))&&(!(e||!A(this,t)||!A(oe,t)||A(this,ee)&&this[ee][t])||e)},ye=function(t,e){if(t=ut(t),e=T(e,!0),t!==se||!A(oe,e)||A(ae,e)){var n=Yt(t,e);return!n||!A(oe,e)||A(t,ee)&&t[ee][e]||(n.enumerable=!0),n}},ge=function(t){for(var e,n=$t(ut(t)),r=[],i=0;n.length>i;)A(oe,e=n[i++])||e==ee||e==Qt||r.push(e);return r},be=function(t){for(var e,n=t===se,r=$t(n?ae:ut(t)),i=[],o=0;r.length>o;)!A(oe,e=r[o++])||n&&!A(se,e)||i.push(oe[e]);return i};ue||(R((Jt=function(){if(this instanceof Jt)throw TypeError("Symbol is not a constructor!");var t=P(arguments.length>0?arguments[0]:void 0),e=function(n){this===se&&e.call(ae,n),A(this,ee)&&A(this[ee],t)&&(this[ee][t]=!1),fe(this,t,S(1,n))};return g&&le&&fe(se,t,{configurable:!0,set:e}),he(t)}).prototype,"toString",function(){return this._k}),Gt.f=ye,x.f=de,qt.f=zt.f=ge,bt.f=me,gt.f=be,g&&R(se,"propertyIsEnumerable",me,!0),It.f=function(t){return he(X(t))}),L(L.G+L.W+L.F*!ue,{Symbol:Jt});for(var _e="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),we=0;_e.length>we;)X(_e[we++]);for(var Ee=yt(X.store),Te=0;Ee.length>Te;)Pt(Ee[Te++]);L(L.S+L.F*!ue,"Symbol",{for:function(t){return A(ie,t+="")?ie[t]:ie[t]=Jt(t)},keyFor:function(t){if(!pe(t))throw TypeError(t+" is not a symbol!");for(var e in ie)if(ie[e]===t)return e},useSetter:function(){le=!0},useSimple:function(){le=!1}}),L(L.S+L.F*!ue,"Object",{create:function(t,e){return void 0===e?jt(t):ve(jt(t),e)},defineProperty:de,defineProperties:ve,getOwnPropertyDescriptor:ye,getOwnPropertyNames:ge,getOwnPropertySymbols:be}),Zt&&L(L.S+L.F*(!ue||y(function(){var t=Jt();return"[null]"!=te([t])||"{}"!=te({a:t})||"{}"!=te(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(v(e)||void 0!==t)&&!pe(t))return G(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!pe(e))return e}),r[1]=e,te.apply(Zt,r)}}),Jt.prototype[ne]||k(Jt.prototype,ne,Jt.prototype.valueOf),At(Jt,"Symbol"),At(Math,"Math",!0),At(p.JSON,"JSON",!0);var Ce=X("toStringTag"),xe="Arguments"==U(function(){return arguments}()),Se={};Se[X("toStringTag")]="z",Se+""!="[object z]"&&R(Object.prototype,"toString",function(){return"[object "+(void 0===(t=this)?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?n:xe?U(e):"Object"==(r=U(e))&&"function"==typeof e.callee?"Arguments":r)+"]";var t,e,n,r},!0),Pt("asyncIterator"),Pt("observable");d.Symbol;var ke={},Ne={};k(Ne,X("iterator"),function(){return this});var Ae,Ie=function(t,e,n){t.prototype=jt(Ne,{next:S(1,n)}),At(t,e+" Iterator")},Oe=ht("IE_PROTO"),Pe=Object.prototype,Re=Object.getPrototypeOf||function(t){return t=q(t),A(t,Oe)?t[Oe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Pe:null},De=X("iterator"),Me=!([].keys&&"next"in[].keys()),Le=function(){return this},Fe=function(t,e,n,r,i,o,a){Ie(n,e,r);var s,u,c,l=function(t){if(!Me&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",h="values"==i,p=!1,d=t.prototype,v=d[De]||d["@@iterator"]||i&&d[i],m=v||l(i),y=i?h?l("entries"):m:void 0,g="Array"==e&&d.entries||v;if(g&&(c=Re(g.call(new t)))!==Object.prototype&&c.next&&(At(c,f,!0),"function"!=typeof c[De]&&k(c,De,Le)),h&&v&&"values"!==v.name&&(p=!0,m=function(){return v.call(this)}),(Me||p||!d[De])&&k(d,De,m),ke[e]=m,ke[f]=Le,i)if(s={values:h?m:l("values"),keys:o?m:l("keys"),entries:y},a)for(u in s)u in d||R(d,u,s[u]);else L(L.P+L.F*(Me||p),e,s);return s},Ue=(Ae=!0,function(t,e){var n,r,i=String(B(t)),o=H(e),a=i.length;return o<0||o>=a?Ae?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?Ae?i.charAt(o):n:Ae?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});Fe(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ue(e,n),this._i+=t.length,{value:t,done:!1})});var je=function(t,e){return{value:e,done:!!t}},Be=Fe(Array,"Array",function(t,e){this._t=ut(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,je(1)):je(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ke.Arguments=ke.Array,nt("keys"),nt("values"),nt("entries");for(var qe=X("iterator"),Ve=X("toStringTag"),We=ke.Array,He={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},ze=yt(He),Ke=0;Ke<ze.length;Ke++){var Ge,Qe=ze[Ke],Ye=He[Qe],Xe=p[Qe],$e=Xe&&Xe.prototype;if($e&&($e[qe]||k($e,qe,We),$e[Ve]||k($e,Ve,Qe),ke[Qe]=We,Ye))for(Ge in Be)$e[Ge]||R($e,Ge,Be[Ge],!0)}It.f("iterator")}.call(this,n(327).setImmediate,n(66))},function(t,e,n){"use strict";n(328);var r,i=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r;n(323),n(322),n(320),n(317),n(297),n(315),console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(329);((r=i)&&r.__esModule?r:{default:r}).default.initializeApp({apiKey:"AIzaSyCvzQxxjxFKPL6pLT00_iiChoEJwwvgjZ4",authDomain:"igem-7f6f6.firebaseapp.com",databaseURL:"https://igem-7f6f6.firebaseio.com",projectId:"igem-7f6f6",storageBucket:"igem-7f6f6.appspot.com",messagingSenderId:"184454883093"});var o=fetch("https://igem-7f6f6.firebaseio.com/.json",{method:"get"});e.default=o},function(t,e,n){var r=n(46),i=n(118),o=n(43),a=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),n=null==n?0:a(r(n),292)){var s=(o(t)+"e").split("e"),u=e(s[0]+"e"+(+s[1]+n));return+((s=(o(u)+"e").split("e"))[0]+"e"+(+s[1]-n))}return e(t)}}},function(t,e,n){var r=n(53),i=n(77);t.exports=function(t){return r(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},function(t,e,n){var r=n(222)("length");t.exports=r},function(t,e,n){var r=n(334),i=n(105),o=n(333);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=!0;return r(t,function(t,r,i){return n=!!e(t,r,i)}),n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(10);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(134),i=n(173),o=n(54),a=n(49),s=n(71),u=n(55);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=i(e))?t(c,n,l):void 0}})},function(t,e,n){n(339),t.exports=n(26).Reflect.get},function(t,e,n){t.exports=n(340)},function(t,e,n){var r=n(149),i=n(105),o=n(106),a=n(43);t.exports=function(t){return function(e){e=a(e);var n=i(e)?o(e):void 0,s=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return s[t]()+u}}},function(t,e,n){var r=n(342)("toUpperCase");t.exports=r},function(t,e){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",i="\\d+",o="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",s="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+s+")",h="(?:"+l+"|"+s+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),v="(?:"+[o,u,c].join("|")+")"+d,m=RegExp([l+"?"+a+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",h+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,v].join("|"),"g");t.exports=function(t){return t.match(m)||[]}},function(t,e){var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return n.test(t)}},function(t,e){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(n)||[]}},function(t,e,n){var r=n(346),i=n(345),o=n(43),a=n(344);t.exports=function(t,e,n){return t=o(t),void 0===(e=n?void 0:e)?i(t)?a(t):r(t):t.match(e)||[]}},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,n){var r=n(348)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=r},function(t,e,n){var r=n(199),i=n(141),o=n(347),a=RegExp("['’]","g");t.exports=function(t){return function(e){return r(o(i(e).replace(a,"")),t,"")}}},function(t,e){t.exports=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}},function(t,e,n){var r=n(67),i=n(85),o=n(52),a=n(38),s=n(96),u=n(351),c=n(231),l=n(113),f=n(106),h=n(72),p="[object Map]",d="[object Set]",v=r?r.iterator:void 0;t.exports=function(t){if(!t)return[];if(a(t))return s(t)?f(t):i(t);if(v&&t[v])return u(t[v]());var e=o(t);return(e==p?c:e==d?l:h)(t)}},function(t,e,n){var r=n(90),i=n(15);t.exports=function(t,e){return r(i(t,e),1)}},function(t,e,n){var r=n(41),i=n(30),o="[object RegExp]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(354),i=n(63),o=n(115),a=o&&o.isRegExp,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(128),i=n(149),o=n(105),a=n(77),s=n(355),u=n(106),c=n(43),l=4294967295;t.exports=function(t,e,n){return n&&"number"!=typeof n&&a(t,e,n)&&(e=n=void 0),(n=void 0===n?l:n>>>0)?(t=c(t))&&("string"==typeof e||null!=e&&!s(e))&&!(e=r(e))&&o(t)?i(u(t),0,n):t.split(e,n):[]}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,s=r(n((e-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},function(t,e,n){var r=n(358),i=n(77),o=n(161);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){t.exports=function(t){return t&&t.length?t[0]:void 0}},function(t,e){var n=Math.max,r=Math.min;t.exports=function(t,e,i){return t>=r(e,i)&&t<n(e,i)}},function(t,e,n){var r=n(48);t.exports=function(t,e){return r(e,function(e){return t[e]})}},function(t,e,n){var r=n(227),i=n(211),o=n(113),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e,n){var r=n(153),i=n(150),o=n(154),a=n(210),s=n(18),u=n(212),c="Expected a function",l=8,f=32,h=128,p=256;t.exports=function(t){return i(function(e){var n=e.length,i=n,d=r.prototype.thru;for(t&&e.reverse();i--;){var v=e[i];if("function"!=typeof v)throw new TypeError(c);if(d&&!m&&"wrapper"==a(v))var m=new r([],!0)}for(i=m?i:n;++i<n;){v=e[i];var y=a(v),g="wrapper"==y?o(v):void 0;m=g&&u(g[0])&&g[1]==(h|l|f|p)&&!g[4].length&&1==g[9]?m[a(g[0])].apply(m,g[3]):1==v.length&&u(v)?m[y]():m.thru(v)}return function(){var t=arguments,r=t[0];if(m&&1==t.length&&s(r))return m.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}},function(t,e,n){var r=n(364)();t.exports=r},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(68);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}},function(t,e,n){var r=n(367),i=n(366),o=n(47);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}},function(t,e,n){var r=n(68);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(48),i=n(34),o=n(201),a=n(372),s=n(63),u=n(371),c=n(47);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=o(t,function(t,n,i){return{criteria:r(e,function(e){return e(t)}),index:++l,value:t}});return a(f,function(t,e){return u(t,e,n)})}},function(t,e,n){var r=n(90),i=n(373),o=n(53),a=n(77),s=o(function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])});t.exports=s},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){return t&&t.length?(e=n||void 0===e?1:i(e),r(t,0,e<0?0:e)):[]}},function(t,e,n){var r=n(108),i=n(92),o=n(91),a=n(39),s=n(64);t.exports=function(t,e,n,u){if(!a(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var p=s(e[c]),d=n;if(c!=f){var v=h[p];void 0===(d=u?u(v,p,h):void 0)&&(d=a(v)?v:o(e[c+1])?[]:{})}r(h,p,d),h=h[p]}return t}},function(t,e,n){var r=n(202),i=n(223);t.exports=function(t,e){return r(t,e,function(e,n){return i(t,n)})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=-1,i=t.length;++n<i&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=t.length;n--&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(128),i=n(149),o=n(381),a=n(380),s=n(106),u=n(43),c=/^\s+|\s+$/g;t.exports=function(t,e,n){if((t=u(t))&&(n||void 0===e))return t.replace(c,"");if(!t||!(e=r(e)))return t;var l=s(t),f=s(e),h=a(l,f),p=o(l,f)+1;return i(l,h,p).join("")}},function(t,e,n){var r=n(48),i=n(85),o=n(18),a=n(68),s=n(250),u=n(64),c=n(43);t.exports=function(t){return o(t)?r(t,u):a(t)?[t]:i(s(c(t)))}},function(t,e,n){var r=n(90);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},function(t,e,n){var r=n(111),i=n(150)(function(t,e){return r(t,256,void 0,void 0,void 0,e)});t.exports=i},function(t,e,n){var r=n(206),i=n(34),o=1;t.exports=function(t){return i("function"==typeof t?t:r(t,o))}},function(t,e,n){var r=n(52),i=n(30),o="[object WeakMap]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(41),i=n(30),o=n(81),a="[object DOMException]",s="[object Error]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==s||e==a||"string"==typeof t.message&&"string"==typeof t.name&&!o(t)}},function(t,e,n){var r=n(111),i=8;function o(t,e,n){var a=r(t,i,void 0,void 0,void 0,void 0,void 0,e=n?void 0:e);return a.placeholder=o.placeholder,a}o.placeholder={},t.exports=o},function(t,e,n){var r=n(52),i=n(30),o="[object Set]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(390),i=n(63),o=n(115),a=o&&o.isSet,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(52),i=n(30),o="[object Map]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(392),i=n(63),o=n(115),a=o&&o.isMap,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(86),i=n(107),o=n(88);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(67),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e,n){var r=n(151),i=n(398),o=n(397),a=n(396),s=n(395),u="[object Boolean]",c="[object Date]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]";t.exports=function(t,e,n){var k=t.constructor;switch(e){case m:return r(t);case u:case c:return new k(+t);case y:return i(t,n);case g:case b:case _:case w:case E:case T:case C:case x:case S:return s(t,n);case l:return new k;case f:case d:return new k(t);case h:return o(t);case p:return new k;case v:return a(t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(84),i=n(204);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(84),i=n(157);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){(function(t){var r=n(33),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(117)(t))},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(39),i=n(88),o=n(404),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},function(t,e,n){var r=n(84),i=n(205);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(206),i=4;t.exports=function(t){return r(t,i)}},function(t,e,n){var r=n(215),i=n(214),o=n(109),a="__lodash_placeholder__",s=1,u=2,c=4,l=8,f=128,h=256,p=Math.min;t.exports=function(t,e){var n=t[1],d=e[1],v=n|d,m=v<(s|u|f),y=d==f&&n==l||d==f&&n==h&&t[7].length<=e[8]||d==(f|h)&&e[7].length<=e[8]&&n==l;if(!m&&!y)return t;d&s&&(t[2]=e[2],v|=n&s?0:c);var g=e[3];if(g){var b=t[3];t[3]=b?r(b,g,e[4]):g,t[4]=b?o(t[3],a):e[4]}return(g=e[5])&&(b=t[5],t[5]=b?i(b,g,e[6]):g,t[6]=b?o(t[5],a):e[6]),(g=e[7])&&(t[7]=g),d&f&&(t[8]=null==t[8]?e[8]:p(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=v,t}},function(t,e,n){var r=n(126),i=n(110),o=n(33),a=1;t.exports=function(t,e,n,s){var u=e&a,c=i(t);return function e(){for(var i=-1,a=arguments.length,l=-1,f=s.length,h=Array(f+a),p=this&&this!==o&&this instanceof e?c:t;++l<f;)h[l]=s[l];for(;a--;)h[l++]=arguments[++i];return r(p,u?n:this,h)}}},function(t,e,n){var r=n(85),i=n(91),o=Math.min;t.exports=function(t,e){for(var n=t.length,a=o(e.length,n),s=r(t);a--;){var u=e[a];t[a]=i(u,n)?s[u]:void 0}return t}},function(t,e,n){var r=n(87),i=n(122),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return r(o,function(n){var r="_."+n[0];e&n[1]&&!i(t,r)&&t.push(r)}),t.sort()}},function(t,e){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,e){var r=e.length;if(!r)return t;var i=r-1;return e[i]=(r>1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var e=t.match(n);return e?e[1].split(r):[]}},function(t,e,n){var r=n(156),i=n(153),o=n(85);t.exports=function(t){if(t instanceof r)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=o(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},function(t,e,n){var r=n(156),i=n(153),o=n(155),a=n(18),s=n(30),u=n(414),c=Object.prototype.hasOwnProperty;function l(t){if(s(t)&&!a(t)&&!(t instanceof r)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=o.prototype,l.prototype.constructor=l,t.exports=l},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}},function(t,e,n){var r=n(126),i=n(110),o=n(216),a=n(213),s=n(152),u=n(109),c=n(33);t.exports=function(t,e,n){var l=i(t);return function i(){for(var f=arguments.length,h=Array(f),p=f,d=s(i);p--;)h[p]=arguments[p];var v=f<3&&h[0]!==d&&h[f-1]!==d?[]:u(h,d);return(f-=v.length)<n?a(t,e,o,i.placeholder,void 0,h,v,void 0,void 0,n-f):r(this&&this!==c&&this instanceof i?l:t,this,h)}}},function(t,e,n){var r=n(110),i=n(33),o=1;t.exports=function(t,e,n){var a=e&o,s=r(t);return function e(){return(this&&this!==i&&this instanceof e?s:t).apply(a?n:this,arguments)}}},function(t,e,n){var r=n(111),i=128;t.exports=function(t,e,n){return e=n?void 0:e,e=t&&null==e?t.length:e,r(t,i,void 0,void 0,void 0,void 0,e)}},function(t,e,n){t.exports={ary:n(420),assign:n(207),clone:n(407),curry:n(389),forEach:n(87),isArray:n(18),isError:n(388),isFunction:n(44),isWeakMap:n(387),iteratee:n(386),keys:n(114),rearg:n(385),toInteger:n(46),toPath:n(383)}},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var o=n[i];t.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e,n){var r=n(422),i=n(21),o=Array.prototype.push;function a(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function s(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,c,l){var f,h="function"==typeof n,p=n===Object(n);if(p&&(l=c,c=n,n=void 0),null==c)throw new TypeError;l||(l={});var d={cap:!("cap"in l)||l.cap,curry:!("curry"in l)||l.curry,fixed:!("fixed"in l)||l.fixed,immutable:!("immutable"in l)||l.immutable,rearg:!("rearg"in l)||l.rearg},v="curry"in l&&l.curry,m="fixed"in l&&l.fixed,y="rearg"in l&&l.rearg,g=h?c:i,b=h?c.runInContext():void 0,_=h?c:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},w=_.ary,E=_.assign,T=_.clone,C=_.curry,x=_.forEach,S=_.isArray,k=_.isError,N=_.isFunction,A=_.isWeakMap,I=_.keys,O=_.rearg,P=_.toInteger,R=_.toPath,D=I(r.aryMethod),M={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(s(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],n=arguments[1],r=t(e,n),i=r.length;return d.cap&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(t){return function(e){var n=this;if(!N(n))return t(n,Object(e));var r=[];return x(I(e),function(t){N(e[t])&&r.push([t,n.prototype[t]])}),t(n,Object(e)),x(r,function(t){var e=t[1];N(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]}),n}},nthArg:function(t){return function(e){var n=e<0?1:P(e)+1;return C(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return C(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),l)}}};function L(t,e){if(d.cap){var n=r.iterateeRearg[t];if(n)return function(t,e){return q(t,function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(O(a(t,n),e),n)})}(e,n);var i=!h&&r.iterateeAry[t];if(i)return function(t,e){return q(t,function(t){return"function"==typeof t?a(t,e):t})}(e,i)}return e}function F(t,e,n){if(d.fixed&&(m||!r.skipFixed[t])){var i=r.methodSpread[t],a=i&&i.start;return void 0===a?w(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var a=i[e],s=i.slice(0,e);return a&&o.apply(s,a),e!=r&&o.apply(s,i.slice(e+1)),t.apply(this,s)}}(e,a)}return e}function U(t,e,n){return d.rearg&&n>1&&(y||!r.skipRearg[t])?O(e,r.methodRearg[t]||r.aryRearg[n]):e}function j(t,e){for(var n=-1,r=(e=R(e)).length,i=r-1,o=T(Object(t)),a=o;null!=a&&++n<r;){var s=e[n],u=a[s];null==u||N(u)||k(u)||A(u)||(a[s]=T(n==i?u:Object(u))),a=a[s]}return o}function B(e,n){var i=r.aliasToReal[e]||e,o=r.remap[i]||i,a=l;return function(e){var r=h?b:_,s=h?b[o]:n,u=E(E({},a),e);return t(r,i,s,u)}}function q(t,e){return function(){var n=arguments.length;if(!n)return t();for(var r=Array(n);n--;)r[n]=arguments[n];var i=d.rearg?0:n-1;return r[i]=e(r[i]),t.apply(void 0,r)}}function V(t,e){var n,i=r.aliasToReal[t]||t,o=e,a=M[i];return a?o=a(e):d.immutable&&(r.mutate.array[i]?o=u(e,s):r.mutate.object[i]?o=u(e,function(t){return function(e){return t({},e)}}(e)):r.mutate.set[i]&&(o=u(e,j))),x(D,function(t){return x(r.aryMethod[t],function(e){if(i==e){var a=r.methodSpread[i],s=a&&a.afterRearg;return n=s?F(i,U(i,o,t),t):U(i,F(i,o,t),t),n=L(i,n),u=n,c=t,n=v||d.curry&&c>1?C(u,c):u,!1}var u,c}),!n}),n||(n=o),n==e&&(n=v?C(n,1):function(){return e.apply(this,arguments)}),n.convert=B(i,e),r.placeholder[i]&&(f=!0,n.placeholder=e.placeholder=g),n}if(!p)return V(n,c);var W=c,H=[];return x(D,function(t){x(r.aryMethod[t],function(t){var e=W[r.remap[t]||t];e&&H.push([t,V(t,e)])})}),x(I(W),function(t){var e=W[t];if("function"==typeof e){for(var n=H.length;n--;)if(H[n][0]==t)return;e.convert=B(t,e),H.push([t,e])}}),x(H,function(t){W[t[0]]=t[1]}),W.convert=function(t){return W.runInContext.convert(t)(void 0)},f&&(W.placeholder=g),x(I(W),function(t){x(r.realToAlias[t]||[],function(e){W[e]=W[t]})}),W}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){var r=n(219),i=n(42)("iterator"),o=n(78);t.exports=n(26).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){n(172),n(135),t.exports=n(425)},function(t,e,n){t.exports=n(426)},function(t,e,n){var r=n(42)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(56),i=n(95);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(78),i=n(42)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(55);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(184),i=n(49),o=n(93),a=n(431),s=n(430),u=n(259),c=n(429),l=n(220);i(i.S+i.F*!n(428)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,m=void 0!==v,y=0,g=l(h);if(m&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==g||p==Array&&s(g))for(n=new p(e=u(h.length));e>y;y++)c(n,y,m?v(h[y],y):h[y]);else for(f=g.call(h),n=new p;!(i=f.next()).done;y++)c(n,y,m?a(f,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){n(135),n(432),t.exports=n(26).Array.from},function(t,e,n){t.exports=n(433)},function(t,e,n){var r=n(434),i=n(427);t.exports=function(t){if(i(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return r(t)}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n;return r(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}},function(t,e,n){var r=n(34),i=n(38),o=n(28);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,a);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(62);t.exports=function(t,e,n,i){return r(t,function(t,r,o){e(i,t,n(t),o)}),i}},function(t,e){t.exports=function(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}},function(t,e,n){var r=n(440),i=n(439),o=n(34),a=n(18);t.exports=function(t,e){return function(n,s){var u=a(n)?r:i,c=e?e():{};return u(n,t,o(s,2),c)}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(55),i=n(220);t.exports=n(26).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){n(172),n(135),t.exports=n(443)},function(t,e,n){t.exports=n(444)},function(t,e,n){var r=n(445);t.exports=function(t,e){var n=[],i=!0,o=!1,a=void 0;try{for(var s,u=r(t);!(i=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return n}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e,n){var r=n(119);t.exports=function(t){return r(t)?t:[]}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=Math.min;t.exports=function(t,e,n){for(var l=n?o:i,f=t[0].length,h=t.length,p=h,d=Array(h),v=1/0,m=[];p--;){var y=t[p];p&&e&&(y=a(y,s(e))),v=c(y.length,v),d[p]=!n&&(e||f>=120&&y.length>=120)?new r(p&&y):void 0}y=t[0];var g=-1,b=d[0];t:for(;++g<f&&m.length<v;){var _=y[g],w=e?e(_):_;if(_=n||0!==_?_:0,!(b?u(b,w):l(m,w,n))){for(p=h;--p;){var E=d[p];if(!(E?u(E,w):l(t[p],w,n)))continue t}b&&b.push(w),m.push(_)}}return m}},function(t,e,n){var r=n(48),i=n(449),o=n(53),a=n(448),s=o(function(t){var e=r(t,a);return e.length&&e[0]===t[0]?i(e):[]});t.exports=s},function(t,e,n){var r=n(125);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(222),i=n(451),o=n(168),a=n(64);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(158),i=n(20),o=n(223),a=n(168),s=n(225),u=n(224),c=n(64),l=1,f=2;t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,l|f)}}},function(t,e,n){var r=n(225),i=n(28);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(65)(n(33),"Promise");t.exports=r},function(t,e,n){var r=n(65)(n(33),"DataView");t.exports=r},function(t,e,n){var r=n(230),i=1,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,s,u){var c=n&i,l=r(t),f=l.length;if(f!=r(e).length&&!c)return!1;for(var h=f;h--;){var p=l[h];if(!(c?p in e:o.call(e,p)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var v=!0;u.set(t,e),u.set(e,t);for(var m=c;++h<f;){var y=t[p=l[h]],g=e[p];if(a)var b=c?a(g,y,p,e,t,u):a(y,g,p,t,e,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(v=!1)}return u.delete(t),u.delete(e),v}},function(t,e,n){var r=n(67),i=n(232),o=n(130),a=n(234),s=n(231),u=n(113),c=1,l=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",v="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",E=r?r.prototype:void 0,T=E?E.valueOf:void 0;t.exports=function(t,e,n,r,E,C,x){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _:return!(t.byteLength!=e.byteLength||!C(new i(t),new i(e)));case f:case h:case v:return o(+t,+e);case p:return t.name==e.name&&t.message==e.message;case m:case g:return t==e+"";case d:var S=s;case y:var k=r&c;if(S||(S=u),t.size!=e.size&&!k)return!1;var N=x.get(t);if(N)return N==e;r|=l,x.set(t,e);var A=a(S(t),S(e),r,E,C,x);return x.delete(t),A;case b:if(T)return T.call(t)==T.call(e)}return!1}},function(t,e,n){var r=n(159),i=n(234),o=n(459),a=n(458),s=n(52),u=n(18),c=n(89),l=n(116),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,y,g){var b=u(t),_=u(e),w=b?p:s(t),E=_?p:s(e),T=(w=w==h?d:w)==d,C=(E=E==h?d:E)==d,x=w==E;if(x&&c(t)){if(!c(e))return!1;b=!0,T=!1}if(x&&!T)return g||(g=new r),b||l(t)?i(t,e,n,m,y,g):o(t,e,w,n,m,y,g);if(!(n&f)){var S=T&&v.call(t,"__wrapped__"),k=C&&v.call(e,"__wrapped__");if(S||k){var N=S?t.value():t,A=k?e.value():e;return g||(g=new r),y(N,A,n,m,g)}}return!!x&&(g||(g=new r),a(t,e,n,m,y,g))}},function(t,e,n){var r=n(132),i=n(166),o=n(167),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<a-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e,n){var r=n(132);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e,n){var r=n(159),i=n(158),o=1,a=2;t.exports=function(t,e,n,s){var u=n.length,c=u,l=!s;if(null==t)return!c;for(t=Object(t);u--;){var f=n[u];if(l&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++u<c;){var h=(f=n[u])[0],p=t[h],d=f[1];if(l&&f[2]){if(void 0===p&&!(h in t))return!1}else{var v=new r;if(s)var m=s(p,d,h,t,e,v);if(!(void 0===m?i(d,p,o|a,s,v):m))return!1}}return!0}},function(t,e,n){var r=n(466),i=n(455),o=n(224);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(38);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(t,e,n){var r=n(235)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(41),i=n(165),o=n(30),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(472)();t.exports=r},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=[];return r(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}},function(t,e,n){var r=n(239),i=n(128),o=n(46),a=n(43);t.exports=function(t,e,n){return t=a(t),n=null==n?0:r(o(n),0,t.length),e=i(e),t.slice(n,n+e.length)==e}},function(t,e,n){var r=n(67),i=n(127),o=n(18),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){var n="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,n),this}},function(t,e,n){var r=n(93),i=n(94);n(169)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(481),t.exports=n(26).Object.keys},function(t,e,n){n(255),t.exports=n(26).Object.getOwnPropertySymbols},function(t,e,n){var r=n(69),i=n(134).f;n(169)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){n(484);var r=n(26).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(486),i=n(246),o=n(47),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e,n){var r=n(125),i=n(124);t.exports=function(t,e){return e.length<2?t:r(t,i(e,0,-1))}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(126),i=n(92),o=n(489),a=n(488),s=n(64);t.exports=function(t,e,n){e=i(e,t);var u=null==(t=a(t,e))?t:t[s(o(e))];return null==u?void 0:r(u,t,n)}},function(t,e,n){var r=n(41),i=n(30),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(129);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).get(t)}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(129);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,n){var r=n(131);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(131);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(131);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(131),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}},function(t,e,n){var r=n(133),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(33)["__core-js_shared__"];t.exports=r},function(t,e,n){var r,i=n(507),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(44),i=n(508),o=n(39),a=n(248),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},function(t,e,n){var r=n(133);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(510),i=n(505),o=n(504),a=n(503),s=n(502);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(511),i=n(132),o=n(166);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(249),i=500;t.exports=function(t){var e=r(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(67),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(253);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},i(e,n)}t.exports=i},function(t,e,n){var r=n(49);r(r.S,"Object",{create:n(175)})},function(t,e,n){n(518);var r=n(26).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){t.exports=n(519)},function(t,e,n){var r=n(71),i=n(55),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(184)(Function.call,n(134).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(49);r(r.S,"Object",{setPrototypeOf:n(521).set})},function(t,e,n){n(522),t.exports=n(26).Object.setPrototypeOf},function(t,e,n){var r=n(93),i=n(173);n(169)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){n(524),t.exports=n(26).Object.getPrototypeOf},function(t,e,n){t.exports=n(525)},function(t,e,n){n(170)("observable")},function(t,e,n){n(170)("asyncIterator")},function(t,e){},function(t,e,n){var r=n(69),i=n(254).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(182);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(94),i=n(176),o=n(136);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(137)("meta"),i=n(71),o=n(54),a=n(56).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(79)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){n(255),n(529),n(528),n(527),t.exports=n(26).Symbol},function(t,e,n){t.exports=n(534)},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(537),i=n(536),o=n(78),a=n(69);t.exports=n(257)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(57).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(56),i=n(55),o=n(94);t.exports=n(70)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(175),i=n(95),o=n(174),a={};n(80)(a,n(42)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(180),i=n(181);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){n(135),n(172),t.exports=n(171).f("iterator")},function(t,e,n){t.exports=n(543)},function(t,e,n){var r=n(49);r(r.S+r.F*!n(70),"Object",{defineProperty:n(56).f})},function(t,e,n){n(545);var r=n(26).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(180),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(69),i=n(259),o=n(547);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(94),i=n(176),o=n(136),a=n(93),s=n(260),u=Object.assign;t.exports=!u||n(79)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=i.f,f=o.f;u>c;)for(var h,p=s(arguments[c++]),d=l?r(p).concat(l(p)):r(p),v=d.length,m=0;v>m;)f.call(p,h=d[m++])&&(n[h]=p[h]);return n}:u},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(49);r(r.S+r.F,"Object",{assign:n(549)})},function(t,e,n){n(551),t.exports=n(26).Object.assign},function(t,e,n){t.exports=n(552)},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(185),i=n(186),o=n(555);t.exports=function(){function t(t,e,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=n(101),s=n(37);u(n(330));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"home"},n.handleItemClick=function(t,e){var r=e.name;return n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var t=this.state.activeItem;return console.log(window.location.hash),o.default.createElement("div",null,o.default.createElement(s.Menu,{basic:!0,style:{"border-radius":"0",height:"58px",width:"101%","margin-left":"-1px","margin-top":"-1px"}},o.default.createElement(s.Container,null,o.default.createElement(s.Menu.Item,{header:!0},o.default.createElement("img",{className:"ui small image",src:"https://image.ibb.co/evyeZd/logo.png"})),o.default.createElement(a.Link,{to:"/"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"home",active:"home"===t,onClick:this.handleItemClick})),o.default.createElement(a.Link,{to:"/Outreach"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"outreach",active:"outreach"===t,onClick:this.handleItemClick})))))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=d(i),a=d(n(557)),s=(d(n(61)),d(n(312))),u=d(n(309)),c=d(n(301)),l=(d(n(76)),d(n(300))),f=d(n(299)),h=d(n(298)),p=n(101);n(37);function d(t){return t&&t.__esModule?t:{default:t}}var v=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={visible:!1},n.toggleVisibility=function(){return n.setState({visible:!n.state.visible})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(p.HashRouter,null,o.default.createElement("div",null,o.default.createElement(a.default,null),o.default.createElement(p.Route,{exact:!0,path:"/",component:s.default}),o.default.createElement(p.Route,{exact:!0,path:"/Team",component:u.default}),o.default.createElement(p.Route,{exact:!0,path:"/Profile",component:c.default}),o.default.createElement(p.Route,{exact:!0,path:"/SidebarExample",component:h.default}),o.default.createElement(p.Route,{exact:!0,path:"/Outreach",component:f.default}),o.default.createElement(l.default,null)))}}]),e}();e.default=v},function(t,e,n){"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},function(t,e,n){"use strict";var r=n(559);t.exports=function(t){return r(t)&&3==t.nodeType}},function(t,e,n){"use strict";var r=n(560);t.exports=function t(e,n){return!(!e||!n)&&(e===n||!r(e)&&(r(n)?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}},function(t,e,n){"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},function(t,e,n){"use strict";
+
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=s(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},l.prototype.delete=function(t){delete this.map[s(t)]},l.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},l.prototype.set=function(t,e){this.map[s(t)]=u(e)},l.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},v.call(m.prototype),v.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];g.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=m,t.Response=g,t.fetch=function(t,n){return new Promise(function(r,i){var o=new m(t,n),a=new XMLHttpRequest;a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new g(i,n))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=h(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=d(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=f(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=h(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function m(t,e){var n,r,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),o.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete c[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(66),n(148))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(327),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(66))},function(t,e,n){"use strict";n.r(e),function(t,e){n(326);var r=setTimeout;function i(){}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function a(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}s(e.promise,r)}else(1===t._state?s:u)(e.promise,t._value)})):t._deferreds.push(e)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(i);return a(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,e,n)),n},o.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},o.all=function(t){return new o(function(e,n){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(t,e)},n)}r[t]=a,0==--i&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)o(a,r[a])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){r(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();function h(t,e){return t(e={exports:{}},e.exports),e.exports}f.Promise||(f.Promise=o);var p=h(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),d=h(function(t){var e=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)}),v=(d.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),m=function(t){if(!v(t))throw TypeError(t+" is not an object!");return t},y=function(t){try{return!!t()}catch(t){return!0}},g=!y(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=p.document,_=v(b)&&v(b.createElement),w=function(t){return _?b.createElement(t):{}},E=!g&&!y(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),T=function(t,e){if(!v(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!v(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},C=Object.defineProperty,x={f:g?Object.defineProperty:function(t,e,n){if(m(t),e=T(e,!0),m(n),E)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=g?function(t,e,n){return x.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},N={}.hasOwnProperty,A=function(t,e){return N.call(t,e)},I=0,O=Math.random(),P=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++I+O).toString(36))},R=h(function(t){var e=P("src"),n=Function.toString,r=(""+n).split("toString");d.inspectSource=function(t){return n.call(t)},(t.exports=function(t,n,i,o){var a="function"==typeof i;a&&(A(i,"name")||k(i,"name",n)),t[n]!==i&&(a&&(A(i,e)||k(i,e,t[n]?""+t[n]:r.join(String(n)))),t===p?t[n]=i:o?t[n]?t[n]=i:k(t,n,i):(delete t[n],k(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||n.call(this)})}),D=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},M=function(t,e,n){var r,i,o,a,s=t&M.F,u=t&M.G,c=t&M.S,l=t&M.P,f=t&M.B,h=u?p:c?p[e]||(p[e]={}):(p[e]||{}).prototype,v=u?d:d[e]||(d[e]={}),m=v.prototype||(v.prototype={});for(r in u&&(n=e),n)o=((i=!s&&h&&void 0!==h[r])?h:n)[r],a=f&&i?D(o,p):l&&"function"==typeof o?D(Function.call,o):o,h&&R(h,r,o,t&M.U),v[r]!=o&&k(v,r,a),l&&m[r]!=o&&(m[r]=o)};p.core=d,M.F=1,M.G=2,M.S=4,M.P=8,M.B=16,M.W=32,M.U=64,M.R=128;var L=M,F={}.toString,U=function(t){return F.call(t).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==U(t)?t.split(""):Object(t)},B=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t},q=function(t){return Object(B(t))},V=Math.ceil,W=Math.floor,H=function(t){return isNaN(t=+t)?0:(t>0?W:V)(t)},z=Math.min,K=function(t){return t>0?z(H(t),9007199254740991):0},G=Array.isArray||function(t){return"Array"==U(t)},Q=p["__core-js_shared__"]||(p["__core-js_shared__"]={}),Y=function(t){return Q[t]||(Q[t]={})},X=h(function(t){var e=Y("wks"),n=p.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:P)("Symbol."+t))}).store=e}),$=X("species"),J=function(t,e){return new(function(t){var e;return G(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!G(e.prototype)||(e=void 0),v(e)&&null===(e=e[$])&&(e=void 0)),void 0===e?Array:e}(t))(e)},Z=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,a=6==t,s=5==t||a,u=e||J;return function(e,c,l){for(var f,h,p=q(e),d=j(p),v=D(c,l,3),m=K(d.length),y=0,g=n?u(e,m):r?u(e,0):void 0;m>y;y++)if((s||y in d)&&(h=v(f=d[y],y,p),t))if(n)g[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:g.push(f)}else if(o)return!1;return a?-1:i||o?o:g}},tt=X("unscopables"),et=Array.prototype;void 0==et[tt]&&k(et,tt,{});var nt=function(t){et[tt][t]=!0},rt=Z(5),it=!0;"find"in[]&&Array(1).find(function(){it=!1}),L(L.P+L.F*it,"Array",{find:function(t){return rt(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("find");d.Array.find;var ot=Z(6),at=!0;"findIndex"in[]&&Array(1).findIndex(function(){at=!1}),L(L.P+L.F*at,"Array",{findIndex:function(t){return ot(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("findIndex");d.Array.findIndex;var st,ut=function(t){return j(B(t))},ct=Math.max,lt=Math.min,ft=Y("keys"),ht=function(t){return ft[t]||(ft[t]=P(t))},pt=(st=!1,function(t,e,n){var r,i=ut(t),o=K(i.length),a=function(t,e){return(t=H(t))<0?ct(t+e,0):lt(t,e)}(n,o);if(st&&e!=e){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((st||a in i)&&i[a]===e)return st||a||0;return!st&&-1}),dt=ht("IE_PROTO"),vt=function(t,e){var n,r=ut(t),i=0,o=[];for(n in r)n!=dt&&A(r,n)&&o.push(n);for(;e.length>i;)A(r,n=e[i++])&&(~pt(o,n)||o.push(n));return o},mt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),yt=Object.keys||function(t){return vt(t,mt)},gt={f:Object.getOwnPropertySymbols},bt={f:{}.propertyIsEnumerable},_t=Object.assign,wt=!_t||y(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=_t({},t)[n]||Object.keys(_t({},e)).join("")!=r})?function(t,e){for(var n=q(t),r=arguments.length,i=1,o=gt.f,a=bt.f;r>i;)for(var s,u=j(arguments[i++]),c=o?yt(u).concat(o(u)):yt(u),l=c.length,f=0;l>f;)a.call(u,s=c[f++])&&(n[s]=u[s]);return n}:_t;L(L.S+L.F,"Object",{assign:wt});d.Object.assign;var Et=X("match"),Tt=function(t,e,n){if(v(r=e)&&(void 0!==(i=r[Et])?i:"RegExp"==U(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(B(t))},Ct=X("match"),xt="".startsWith;L(L.P+L.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Ct]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=Tt(this,t,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return xt?xt.call(e,r,n):e.slice(n,n+r.length)===r}});d.String.startsWith;L(L.P,"String",{repeat:function(t){var e=String(B(this)),n="",r=H(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});d.String.repeat;var St=h(function(t){var e=P("meta"),n=x.f,r=0,i=Object.isExtensible||function(){return!0},o=!y(function(){return i(Object.preventExtensions({}))}),a=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},s=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!v(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!A(t,e)){if(!i(t))return"F";if(!n)return"E";a(t)}return t[e].i},getWeak:function(t,n){if(!A(t,e)){if(!i(t))return!0;if(!n)return!1;a(t)}return t[e].w},onFreeze:function(t){return o&&s.NEED&&i(t)&&!A(t,e)&&a(t),t}}}),kt=(St.KEY,St.NEED,St.fastKey,St.getWeak,St.onFreeze,x.f),Nt=X("toStringTag"),At=function(t,e,n){t&&!A(t=n?t:t.prototype,Nt)&&kt(t,Nt,{configurable:!0,value:e})},It={f:X},Ot=x.f,Pt=function(t){var e=d.Symbol||(d.Symbol=p.Symbol||{});"_"==t.charAt(0)||t in e||Ot(e,t,{value:It.f(t)})},Rt=g?Object.defineProperties:function(t,e){m(t);for(var n,r=yt(e),i=r.length,o=0;i>o;)x.f(t,n=r[o++],e[n]);return t},Dt=p.document,Mt=Dt&&Dt.documentElement,Lt=ht("IE_PROTO"),Ft=function(){},Ut=function(){var t,e=w("iframe"),n=mt.length;for(e.style.display="none",Mt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Ut=t.F;n--;)delete Ut.prototype[mt[n]];return Ut()},jt=Object.create||function(t,e){var n;return null!==t?(Ft.prototype=m(t),n=new Ft,Ft.prototype=null,n[Lt]=t):n=Ut(),void 0===e?n:Rt(n,e)},Bt=mt.concat("length","prototype"),qt={f:Object.getOwnPropertyNames||function(t){return vt(t,Bt)}},Vt=qt.f,Wt={}.toString,Ht="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zt={f:function(t){return Ht&&"[object Window]"==Wt.call(t)?function(t){try{return Vt(t)}catch(t){return Ht.slice()}}(t):Vt(ut(t))}},Kt=Object.getOwnPropertyDescriptor,Gt={f:g?Kt:function(t,e){if(t=ut(t),e=T(e,!0),E)try{return Kt(t,e)}catch(t){}if(A(t,e))return S(!bt.f.call(t,e),t[e])}},Qt=St.KEY,Yt=Gt.f,Xt=x.f,$t=zt.f,Jt=p.Symbol,Zt=p.JSON,te=Zt&&Zt.stringify,ee=X("_hidden"),ne=X("toPrimitive"),re={}.propertyIsEnumerable,ie=Y("symbol-registry"),oe=Y("symbols"),ae=Y("op-symbols"),se=Object.prototype,ue="function"==typeof Jt,ce=p.QObject,le=!ce||!ce.prototype||!ce.prototype.findChild,fe=g&&y(function(){return 7!=jt(Xt({},"a",{get:function(){return Xt(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Yt(se,e);r&&delete se[e],Xt(t,e,n),r&&t!==se&&Xt(se,e,r)}:Xt,he=function(t){var e=oe[t]=jt(Jt.prototype);return e._k=t,e},pe=ue&&"symbol"==typeof Jt.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Jt},de=function(t,e,n){return t===se&&de(ae,e,n),m(t),e=T(e,!0),m(n),A(oe,e)?(n.enumerable?(A(t,ee)&&t[ee][e]&&(t[ee][e]=!1),n=jt(n,{enumerable:S(0,!1)})):(A(t,ee)||Xt(t,ee,S(1,{})),t[ee][e]=!0),fe(t,e,n)):Xt(t,e,n)},ve=function(t,e){m(t);for(var n,r=function(t){var e=yt(t),n=gt.f;if(n)for(var r,i=n(t),o=bt.f,a=0;i.length>a;)o.call(t,r=i[a++])&&e.push(r);return e}(e=ut(e)),i=0,o=r.length;o>i;)de(t,n=r[i++],e[n]);return t},me=function(t){var e=re.call(this,t=T(t,!0));return!(this===se&&A(oe,t)&&!A(ae,t))&&(!(e||!A(this,t)||!A(oe,t)||A(this,ee)&&this[ee][t])||e)},ye=function(t,e){if(t=ut(t),e=T(e,!0),t!==se||!A(oe,e)||A(ae,e)){var n=Yt(t,e);return!n||!A(oe,e)||A(t,ee)&&t[ee][e]||(n.enumerable=!0),n}},ge=function(t){for(var e,n=$t(ut(t)),r=[],i=0;n.length>i;)A(oe,e=n[i++])||e==ee||e==Qt||r.push(e);return r},be=function(t){for(var e,n=t===se,r=$t(n?ae:ut(t)),i=[],o=0;r.length>o;)!A(oe,e=r[o++])||n&&!A(se,e)||i.push(oe[e]);return i};ue||(R((Jt=function(){if(this instanceof Jt)throw TypeError("Symbol is not a constructor!");var t=P(arguments.length>0?arguments[0]:void 0),e=function(n){this===se&&e.call(ae,n),A(this,ee)&&A(this[ee],t)&&(this[ee][t]=!1),fe(this,t,S(1,n))};return g&&le&&fe(se,t,{configurable:!0,set:e}),he(t)}).prototype,"toString",function(){return this._k}),Gt.f=ye,x.f=de,qt.f=zt.f=ge,bt.f=me,gt.f=be,g&&R(se,"propertyIsEnumerable",me,!0),It.f=function(t){return he(X(t))}),L(L.G+L.W+L.F*!ue,{Symbol:Jt});for(var _e="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),we=0;_e.length>we;)X(_e[we++]);for(var Ee=yt(X.store),Te=0;Ee.length>Te;)Pt(Ee[Te++]);L(L.S+L.F*!ue,"Symbol",{for:function(t){return A(ie,t+="")?ie[t]:ie[t]=Jt(t)},keyFor:function(t){if(!pe(t))throw TypeError(t+" is not a symbol!");for(var e in ie)if(ie[e]===t)return e},useSetter:function(){le=!0},useSimple:function(){le=!1}}),L(L.S+L.F*!ue,"Object",{create:function(t,e){return void 0===e?jt(t):ve(jt(t),e)},defineProperty:de,defineProperties:ve,getOwnPropertyDescriptor:ye,getOwnPropertyNames:ge,getOwnPropertySymbols:be}),Zt&&L(L.S+L.F*(!ue||y(function(){var t=Jt();return"[null]"!=te([t])||"{}"!=te({a:t})||"{}"!=te(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(v(e)||void 0!==t)&&!pe(t))return G(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!pe(e))return e}),r[1]=e,te.apply(Zt,r)}}),Jt.prototype[ne]||k(Jt.prototype,ne,Jt.prototype.valueOf),At(Jt,"Symbol"),At(Math,"Math",!0),At(p.JSON,"JSON",!0);var Ce=X("toStringTag"),xe="Arguments"==U(function(){return arguments}()),Se={};Se[X("toStringTag")]="z",Se+""!="[object z]"&&R(Object.prototype,"toString",function(){return"[object "+(void 0===(t=this)?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?n:xe?U(e):"Object"==(r=U(e))&&"function"==typeof e.callee?"Arguments":r)+"]";var t,e,n,r},!0),Pt("asyncIterator"),Pt("observable");d.Symbol;var ke={},Ne={};k(Ne,X("iterator"),function(){return this});var Ae,Ie=function(t,e,n){t.prototype=jt(Ne,{next:S(1,n)}),At(t,e+" Iterator")},Oe=ht("IE_PROTO"),Pe=Object.prototype,Re=Object.getPrototypeOf||function(t){return t=q(t),A(t,Oe)?t[Oe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Pe:null},De=X("iterator"),Me=!([].keys&&"next"in[].keys()),Le=function(){return this},Fe=function(t,e,n,r,i,o,a){Ie(n,e,r);var s,u,c,l=function(t){if(!Me&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",h="values"==i,p=!1,d=t.prototype,v=d[De]||d["@@iterator"]||i&&d[i],m=v||l(i),y=i?h?l("entries"):m:void 0,g="Array"==e&&d.entries||v;if(g&&(c=Re(g.call(new t)))!==Object.prototype&&c.next&&(At(c,f,!0),"function"!=typeof c[De]&&k(c,De,Le)),h&&v&&"values"!==v.name&&(p=!0,m=function(){return v.call(this)}),(Me||p||!d[De])&&k(d,De,m),ke[e]=m,ke[f]=Le,i)if(s={values:h?m:l("values"),keys:o?m:l("keys"),entries:y},a)for(u in s)u in d||R(d,u,s[u]);else L(L.P+L.F*(Me||p),e,s);return s},Ue=(Ae=!0,function(t,e){var n,r,i=String(B(t)),o=H(e),a=i.length;return o<0||o>=a?Ae?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?Ae?i.charAt(o):n:Ae?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});Fe(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ue(e,n),this._i+=t.length,{value:t,done:!1})});var je=function(t,e){return{value:e,done:!!t}},Be=Fe(Array,"Array",function(t,e){this._t=ut(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,je(1)):je(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ke.Arguments=ke.Array,nt("keys"),nt("values"),nt("entries");for(var qe=X("iterator"),Ve=X("toStringTag"),We=ke.Array,He={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},ze=yt(He),Ke=0;Ke<ze.length;Ke++){var Ge,Qe=ze[Ke],Ye=He[Qe],Xe=p[Qe],$e=Xe&&Xe.prototype;if($e&&($e[qe]||k($e,qe,We),$e[Ve]||k($e,Ve,Qe),ke[Qe]=We,Ye))for(Ge in Be)$e[Ge]||R($e,Ge,Be[Ge],!0)}It.f("iterator")}.call(this,n(328).setImmediate,n(66))},function(t,e,n){"use strict";n(329);var r,i=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r;n(324),n(323),n(321),n(318),n(298),n(316),console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),t.exports=i},function(t,e,n){var r=n(46),i=n(118),o=n(43),a=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),n=null==n?0:a(r(n),292)){var s=(o(t)+"e").split("e"),u=e(s[0]+"e"+(+s[1]+n));return+((s=(o(u)+"e").split("e"))[0]+"e"+(+s[1]-n))}return e(t)}}},function(t,e,n){var r=n(53),i=n(77);t.exports=function(t){return r(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},function(t,e,n){var r=n(223)("length");t.exports=r},function(t,e,n){var r=n(334),i=n(105),o=n(333);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=!0;return r(t,function(t,r,i){return n=!!e(t,r,i)}),n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(10);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(134),i=n(173),o=n(54),a=n(49),s=n(71),u=n(55);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=i(e))?t(c,n,l):void 0}})},function(t,e,n){n(339),t.exports=n(26).Reflect.get},function(t,e,n){t.exports=n(340)},function(t,e,n){var r=n(149),i=n(105),o=n(106),a=n(43);t.exports=function(t){return function(e){e=a(e);var n=i(e)?o(e):void 0,s=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return s[t]()+u}}},function(t,e,n){var r=n(342)("toUpperCase");t.exports=r},function(t,e){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",i="\\d+",o="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",s="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+s+")",h="(?:"+l+"|"+s+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),v="(?:"+[o,u,c].join("|")+")"+d,m=RegExp([l+"?"+a+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",h+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,v].join("|"),"g");t.exports=function(t){return t.match(m)||[]}},function(t,e){var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return n.test(t)}},function(t,e){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(n)||[]}},function(t,e,n){var r=n(346),i=n(345),o=n(43),a=n(344);t.exports=function(t,e,n){return t=o(t),void 0===(e=n?void 0:e)?i(t)?a(t):r(t):t.match(e)||[]}},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,n){var r=n(348)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=r},function(t,e,n){var r=n(200),i=n(141),o=n(347),a=RegExp("['’]","g");t.exports=function(t){return function(e){return r(o(i(e).replace(a,"")),t,"")}}},function(t,e){t.exports=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}},function(t,e,n){var r=n(67),i=n(85),o=n(52),a=n(38),s=n(96),u=n(351),c=n(232),l=n(113),f=n(106),h=n(72),p="[object Map]",d="[object Set]",v=r?r.iterator:void 0;t.exports=function(t){if(!t)return[];if(a(t))return s(t)?f(t):i(t);if(v&&t[v])return u(t[v]());var e=o(t);return(e==p?c:e==d?l:h)(t)}},function(t,e,n){var r=n(90),i=n(15);t.exports=function(t,e){return r(i(t,e),1)}},function(t,e,n){var r=n(41),i=n(30),o="[object RegExp]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(354),i=n(63),o=n(115),a=o&&o.isRegExp,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(128),i=n(149),o=n(105),a=n(77),s=n(355),u=n(106),c=n(43),l=4294967295;t.exports=function(t,e,n){return n&&"number"!=typeof n&&a(t,e,n)&&(e=n=void 0),(n=void 0===n?l:n>>>0)?(t=c(t))&&("string"==typeof e||null!=e&&!s(e))&&!(e=r(e))&&o(t)?i(u(t),0,n):t.split(e,n):[]}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,s=r(n((e-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},function(t,e,n){var r=n(358),i=n(77),o=n(161);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){t.exports=function(t){return t&&t.length?t[0]:void 0}},function(t,e){var n=Math.max,r=Math.min;t.exports=function(t,e,i){return t>=r(e,i)&&t<n(e,i)}},function(t,e,n){var r=n(48);t.exports=function(t,e){return r(e,function(e){return t[e]})}},function(t,e,n){var r=n(228),i=n(212),o=n(113),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e,n){var r=n(153),i=n(150),o=n(154),a=n(211),s=n(18),u=n(213),c="Expected a function",l=8,f=32,h=128,p=256;t.exports=function(t){return i(function(e){var n=e.length,i=n,d=r.prototype.thru;for(t&&e.reverse();i--;){var v=e[i];if("function"!=typeof v)throw new TypeError(c);if(d&&!m&&"wrapper"==a(v))var m=new r([],!0)}for(i=m?i:n;++i<n;){v=e[i];var y=a(v),g="wrapper"==y?o(v):void 0;m=g&&u(g[0])&&g[1]==(h|l|f|p)&&!g[4].length&&1==g[9]?m[a(g[0])].apply(m,g[3]):1==v.length&&u(v)?m[y]():m.thru(v)}return function(){var t=arguments,r=t[0];if(m&&1==t.length&&s(r))return m.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}},function(t,e,n){var r=n(364)();t.exports=r},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(68);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}},function(t,e,n){var r=n(367),i=n(366),o=n(47);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}},function(t,e,n){var r=n(68);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(48),i=n(34),o=n(202),a=n(372),s=n(63),u=n(371),c=n(47);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=o(t,function(t,n,i){return{criteria:r(e,function(e){return e(t)}),index:++l,value:t}});return a(f,function(t,e){return u(t,e,n)})}},function(t,e,n){var r=n(90),i=n(373),o=n(53),a=n(77),s=o(function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])});t.exports=s},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){return t&&t.length?(e=n||void 0===e?1:i(e),r(t,0,e<0?0:e)):[]}},function(t,e,n){var r=n(108),i=n(92),o=n(91),a=n(39),s=n(64);t.exports=function(t,e,n,u){if(!a(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var p=s(e[c]),d=n;if(c!=f){var v=h[p];void 0===(d=u?u(v,p,h):void 0)&&(d=a(v)?v:o(e[c+1])?[]:{})}r(h,p,d),h=h[p]}return t}},function(t,e,n){var r=n(203),i=n(224);t.exports=function(t,e){return r(t,e,function(e,n){return i(t,n)})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=-1,i=t.length;++n<i&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=t.length;n--&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(128),i=n(149),o=n(381),a=n(380),s=n(106),u=n(43),c=/^\s+|\s+$/g;t.exports=function(t,e,n){if((t=u(t))&&(n||void 0===e))return t.replace(c,"");if(!t||!(e=r(e)))return t;var l=s(t),f=s(e),h=a(l,f),p=o(l,f)+1;return i(l,h,p).join("")}},function(t,e,n){var r=n(48),i=n(85),o=n(18),a=n(68),s=n(251),u=n(64),c=n(43);t.exports=function(t){return o(t)?r(t,u):a(t)?[t]:i(s(c(t)))}},function(t,e,n){var r=n(90);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},function(t,e,n){var r=n(111),i=n(150)(function(t,e){return r(t,256,void 0,void 0,void 0,e)});t.exports=i},function(t,e,n){var r=n(207),i=n(34),o=1;t.exports=function(t){return i("function"==typeof t?t:r(t,o))}},function(t,e,n){var r=n(52),i=n(30),o="[object WeakMap]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(41),i=n(30),o=n(81),a="[object DOMException]",s="[object Error]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==s||e==a||"string"==typeof t.message&&"string"==typeof t.name&&!o(t)}},function(t,e,n){var r=n(111),i=8;function o(t,e,n){var a=r(t,i,void 0,void 0,void 0,void 0,void 0,e=n?void 0:e);return a.placeholder=o.placeholder,a}o.placeholder={},t.exports=o},function(t,e,n){var r=n(52),i=n(30),o="[object Set]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(390),i=n(63),o=n(115),a=o&&o.isSet,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(52),i=n(30),o="[object Map]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(392),i=n(63),o=n(115),a=o&&o.isMap,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(86),i=n(107),o=n(88);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(67),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e,n){var r=n(151),i=n(398),o=n(397),a=n(396),s=n(395),u="[object Boolean]",c="[object Date]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]";t.exports=function(t,e,n){var k=t.constructor;switch(e){case m:return r(t);case u:case c:return new k(+t);case y:return i(t,n);case g:case b:case _:case w:case E:case T:case C:case x:case S:return s(t,n);case l:return new k;case f:case d:return new k(t);case h:return o(t);case p:return new k;case v:return a(t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(84),i=n(205);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(84),i=n(157);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){(function(t){var r=n(33),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(117)(t))},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(39),i=n(88),o=n(404),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},function(t,e,n){var r=n(84),i=n(206);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(207),i=4;t.exports=function(t){return r(t,i)}},function(t,e,n){var r=n(216),i=n(215),o=n(109),a="__lodash_placeholder__",s=1,u=2,c=4,l=8,f=128,h=256,p=Math.min;t.exports=function(t,e){var n=t[1],d=e[1],v=n|d,m=v<(s|u|f),y=d==f&&n==l||d==f&&n==h&&t[7].length<=e[8]||d==(f|h)&&e[7].length<=e[8]&&n==l;if(!m&&!y)return t;d&s&&(t[2]=e[2],v|=n&s?0:c);var g=e[3];if(g){var b=t[3];t[3]=b?r(b,g,e[4]):g,t[4]=b?o(t[3],a):e[4]}return(g=e[5])&&(b=t[5],t[5]=b?i(b,g,e[6]):g,t[6]=b?o(t[5],a):e[6]),(g=e[7])&&(t[7]=g),d&f&&(t[8]=null==t[8]?e[8]:p(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=v,t}},function(t,e,n){var r=n(126),i=n(110),o=n(33),a=1;t.exports=function(t,e,n,s){var u=e&a,c=i(t);return function e(){for(var i=-1,a=arguments.length,l=-1,f=s.length,h=Array(f+a),p=this&&this!==o&&this instanceof e?c:t;++l<f;)h[l]=s[l];for(;a--;)h[l++]=arguments[++i];return r(p,u?n:this,h)}}},function(t,e,n){var r=n(85),i=n(91),o=Math.min;t.exports=function(t,e){for(var n=t.length,a=o(e.length,n),s=r(t);a--;){var u=e[a];t[a]=i(u,n)?s[u]:void 0}return t}},function(t,e,n){var r=n(87),i=n(122),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return r(o,function(n){var r="_."+n[0];e&n[1]&&!i(t,r)&&t.push(r)}),t.sort()}},function(t,e){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,e){var r=e.length;if(!r)return t;var i=r-1;return e[i]=(r>1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var e=t.match(n);return e?e[1].split(r):[]}},function(t,e,n){var r=n(156),i=n(153),o=n(85);t.exports=function(t){if(t instanceof r)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=o(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},function(t,e,n){var r=n(156),i=n(153),o=n(155),a=n(18),s=n(30),u=n(414),c=Object.prototype.hasOwnProperty;function l(t){if(s(t)&&!a(t)&&!(t instanceof r)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=o.prototype,l.prototype.constructor=l,t.exports=l},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}},function(t,e,n){var r=n(126),i=n(110),o=n(217),a=n(214),s=n(152),u=n(109),c=n(33);t.exports=function(t,e,n){var l=i(t);return function i(){for(var f=arguments.length,h=Array(f),p=f,d=s(i);p--;)h[p]=arguments[p];var v=f<3&&h[0]!==d&&h[f-1]!==d?[]:u(h,d);return(f-=v.length)<n?a(t,e,o,i.placeholder,void 0,h,v,void 0,void 0,n-f):r(this&&this!==c&&this instanceof i?l:t,this,h)}}},function(t,e,n){var r=n(110),i=n(33),o=1;t.exports=function(t,e,n){var a=e&o,s=r(t);return function e(){return(this&&this!==i&&this instanceof e?s:t).apply(a?n:this,arguments)}}},function(t,e,n){var r=n(111),i=128;t.exports=function(t,e,n){return e=n?void 0:e,e=t&&null==e?t.length:e,r(t,i,void 0,void 0,void 0,void 0,e)}},function(t,e,n){t.exports={ary:n(420),assign:n(208),clone:n(407),curry:n(389),forEach:n(87),isArray:n(18),isError:n(388),isFunction:n(44),isWeakMap:n(387),iteratee:n(386),keys:n(114),rearg:n(385),toInteger:n(46),toPath:n(383)}},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var o=n[i];t.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e,n){var r=n(422),i=n(21),o=Array.prototype.push;function a(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function s(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,c,l){var f,h="function"==typeof n,p=n===Object(n);if(p&&(l=c,c=n,n=void 0),null==c)throw new TypeError;l||(l={});var d={cap:!("cap"in l)||l.cap,curry:!("curry"in l)||l.curry,fixed:!("fixed"in l)||l.fixed,immutable:!("immutable"in l)||l.immutable,rearg:!("rearg"in l)||l.rearg},v="curry"in l&&l.curry,m="fixed"in l&&l.fixed,y="rearg"in l&&l.rearg,g=h?c:i,b=h?c.runInContext():void 0,_=h?c:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},w=_.ary,E=_.assign,T=_.clone,C=_.curry,x=_.forEach,S=_.isArray,k=_.isError,N=_.isFunction,A=_.isWeakMap,I=_.keys,O=_.rearg,P=_.toInteger,R=_.toPath,D=I(r.aryMethod),M={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(s(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],n=arguments[1],r=t(e,n),i=r.length;return d.cap&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(t){return function(e){var n=this;if(!N(n))return t(n,Object(e));var r=[];return x(I(e),function(t){N(e[t])&&r.push([t,n.prototype[t]])}),t(n,Object(e)),x(r,function(t){var e=t[1];N(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]}),n}},nthArg:function(t){return function(e){var n=e<0?1:P(e)+1;return C(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return C(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),l)}}};function L(t,e){if(d.cap){var n=r.iterateeRearg[t];if(n)return function(t,e){return q(t,function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(O(a(t,n),e),n)})}(e,n);var i=!h&&r.iterateeAry[t];if(i)return function(t,e){return q(t,function(t){return"function"==typeof t?a(t,e):t})}(e,i)}return e}function F(t,e,n){if(d.fixed&&(m||!r.skipFixed[t])){var i=r.methodSpread[t],a=i&&i.start;return void 0===a?w(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var a=i[e],s=i.slice(0,e);return a&&o.apply(s,a),e!=r&&o.apply(s,i.slice(e+1)),t.apply(this,s)}}(e,a)}return e}function U(t,e,n){return d.rearg&&n>1&&(y||!r.skipRearg[t])?O(e,r.methodRearg[t]||r.aryRearg[n]):e}function j(t,e){for(var n=-1,r=(e=R(e)).length,i=r-1,o=T(Object(t)),a=o;null!=a&&++n<r;){var s=e[n],u=a[s];null==u||N(u)||k(u)||A(u)||(a[s]=T(n==i?u:Object(u))),a=a[s]}return o}function B(e,n){var i=r.aliasToReal[e]||e,o=r.remap[i]||i,a=l;return function(e){var r=h?b:_,s=h?b[o]:n,u=E(E({},a),e);return t(r,i,s,u)}}function q(t,e){return function(){var n=arguments.length;if(!n)return t();for(var r=Array(n);n--;)r[n]=arguments[n];var i=d.rearg?0:n-1;return r[i]=e(r[i]),t.apply(void 0,r)}}function V(t,e){var n,i=r.aliasToReal[t]||t,o=e,a=M[i];return a?o=a(e):d.immutable&&(r.mutate.array[i]?o=u(e,s):r.mutate.object[i]?o=u(e,function(t){return function(e){return t({},e)}}(e)):r.mutate.set[i]&&(o=u(e,j))),x(D,function(t){return x(r.aryMethod[t],function(e){if(i==e){var a=r.methodSpread[i],s=a&&a.afterRearg;return n=s?F(i,U(i,o,t),t):U(i,F(i,o,t),t),n=L(i,n),u=n,c=t,n=v||d.curry&&c>1?C(u,c):u,!1}var u,c}),!n}),n||(n=o),n==e&&(n=v?C(n,1):function(){return e.apply(this,arguments)}),n.convert=B(i,e),r.placeholder[i]&&(f=!0,n.placeholder=e.placeholder=g),n}if(!p)return V(n,c);var W=c,H=[];return x(D,function(t){x(r.aryMethod[t],function(t){var e=W[r.remap[t]||t];e&&H.push([t,V(t,e)])})}),x(I(W),function(t){var e=W[t];if("function"==typeof e){for(var n=H.length;n--;)if(H[n][0]==t)return;e.convert=B(t,e),H.push([t,e])}}),x(H,function(t){W[t[0]]=t[1]}),W.convert=function(t){return W.runInContext.convert(t)(void 0)},f&&(W.placeholder=g),x(I(W),function(t){x(r.realToAlias[t]||[],function(e){W[e]=W[t]})}),W}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){var r=n(220),i=n(42)("iterator"),o=n(78);t.exports=n(26).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){n(172),n(135),t.exports=n(425)},function(t,e,n){t.exports=n(426)},function(t,e,n){var r=n(42)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(56),i=n(95);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(78),i=n(42)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(55);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(184),i=n(49),o=n(93),a=n(431),s=n(430),u=n(260),c=n(429),l=n(221);i(i.S+i.F*!n(428)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,m=void 0!==v,y=0,g=l(h);if(m&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==g||p==Array&&s(g))for(n=new p(e=u(h.length));e>y;y++)c(n,y,m?v(h[y],y):h[y]);else for(f=g.call(h),n=new p;!(i=f.next()).done;y++)c(n,y,m?a(f,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){n(135),n(432),t.exports=n(26).Array.from},function(t,e,n){t.exports=n(433)},function(t,e,n){var r=n(434),i=n(427);t.exports=function(t){if(i(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return r(t)}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n;return r(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}},function(t,e,n){var r=n(34),i=n(38),o=n(28);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,a);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(62);t.exports=function(t,e,n,i){return r(t,function(t,r,o){e(i,t,n(t),o)}),i}},function(t,e){t.exports=function(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}},function(t,e,n){var r=n(440),i=n(439),o=n(34),a=n(18);t.exports=function(t,e){return function(n,s){var u=a(n)?r:i,c=e?e():{};return u(n,t,o(s,2),c)}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(55),i=n(221);t.exports=n(26).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){n(172),n(135),t.exports=n(443)},function(t,e,n){t.exports=n(444)},function(t,e,n){var r=n(445);t.exports=function(t,e){var n=[],i=!0,o=!1,a=void 0;try{for(var s,u=r(t);!(i=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return n}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e,n){var r=n(119);t.exports=function(t){return r(t)?t:[]}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=Math.min;t.exports=function(t,e,n){for(var l=n?o:i,f=t[0].length,h=t.length,p=h,d=Array(h),v=1/0,m=[];p--;){var y=t[p];p&&e&&(y=a(y,s(e))),v=c(y.length,v),d[p]=!n&&(e||f>=120&&y.length>=120)?new r(p&&y):void 0}y=t[0];var g=-1,b=d[0];t:for(;++g<f&&m.length<v;){var _=y[g],w=e?e(_):_;if(_=n||0!==_?_:0,!(b?u(b,w):l(m,w,n))){for(p=h;--p;){var E=d[p];if(!(E?u(E,w):l(t[p],w,n)))continue t}b&&b.push(w),m.push(_)}}return m}},function(t,e,n){var r=n(48),i=n(449),o=n(53),a=n(448),s=o(function(t){var e=r(t,a);return e.length&&e[0]===t[0]?i(e):[]});t.exports=s},function(t,e,n){var r=n(125);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(223),i=n(451),o=n(168),a=n(64);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(158),i=n(20),o=n(224),a=n(168),s=n(226),u=n(225),c=n(64),l=1,f=2;t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,l|f)}}},function(t,e,n){var r=n(226),i=n(28);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(65)(n(33),"Promise");t.exports=r},function(t,e,n){var r=n(65)(n(33),"DataView");t.exports=r},function(t,e,n){var r=n(231),i=1,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,s,u){var c=n&i,l=r(t),f=l.length;if(f!=r(e).length&&!c)return!1;for(var h=f;h--;){var p=l[h];if(!(c?p in e:o.call(e,p)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var v=!0;u.set(t,e),u.set(e,t);for(var m=c;++h<f;){var y=t[p=l[h]],g=e[p];if(a)var b=c?a(g,y,p,e,t,u):a(y,g,p,t,e,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(v=!1)}return u.delete(t),u.delete(e),v}},function(t,e,n){var r=n(67),i=n(233),o=n(130),a=n(235),s=n(232),u=n(113),c=1,l=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",v="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",E=r?r.prototype:void 0,T=E?E.valueOf:void 0;t.exports=function(t,e,n,r,E,C,x){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _:return!(t.byteLength!=e.byteLength||!C(new i(t),new i(e)));case f:case h:case v:return o(+t,+e);case p:return t.name==e.name&&t.message==e.message;case m:case g:return t==e+"";case d:var S=s;case y:var k=r&c;if(S||(S=u),t.size!=e.size&&!k)return!1;var N=x.get(t);if(N)return N==e;r|=l,x.set(t,e);var A=a(S(t),S(e),r,E,C,x);return x.delete(t),A;case b:if(T)return T.call(t)==T.call(e)}return!1}},function(t,e,n){var r=n(159),i=n(235),o=n(459),a=n(458),s=n(52),u=n(18),c=n(89),l=n(116),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,y,g){var b=u(t),_=u(e),w=b?p:s(t),E=_?p:s(e),T=(w=w==h?d:w)==d,C=(E=E==h?d:E)==d,x=w==E;if(x&&c(t)){if(!c(e))return!1;b=!0,T=!1}if(x&&!T)return g||(g=new r),b||l(t)?i(t,e,n,m,y,g):o(t,e,w,n,m,y,g);if(!(n&f)){var S=T&&v.call(t,"__wrapped__"),k=C&&v.call(e,"__wrapped__");if(S||k){var N=S?t.value():t,A=k?e.value():e;return g||(g=new r),y(N,A,n,m,g)}}return!!x&&(g||(g=new r),a(t,e,n,m,y,g))}},function(t,e,n){var r=n(132),i=n(166),o=n(167),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<a-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e,n){var r=n(132);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e,n){var r=n(159),i=n(158),o=1,a=2;t.exports=function(t,e,n,s){var u=n.length,c=u,l=!s;if(null==t)return!c;for(t=Object(t);u--;){var f=n[u];if(l&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++u<c;){var h=(f=n[u])[0],p=t[h],d=f[1];if(l&&f[2]){if(void 0===p&&!(h in t))return!1}else{var v=new r;if(s)var m=s(p,d,h,t,e,v);if(!(void 0===m?i(d,p,o|a,s,v):m))return!1}}return!0}},function(t,e,n){var r=n(466),i=n(455),o=n(225);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(38);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(t,e,n){var r=n(236)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(41),i=n(165),o=n(30),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(472)();t.exports=r},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=[];return r(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}},function(t,e,n){var r=n(240),i=n(128),o=n(46),a=n(43);t.exports=function(t,e,n){return t=a(t),n=null==n?0:r(o(n),0,t.length),e=i(e),t.slice(n,n+e.length)==e}},function(t,e,n){var r=n(67),i=n(127),o=n(18),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){var n="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,n),this}},function(t,e,n){var r=n(93),i=n(94);n(169)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(481),t.exports=n(26).Object.keys},function(t,e,n){n(256),t.exports=n(26).Object.getOwnPropertySymbols},function(t,e,n){var r=n(69),i=n(134).f;n(169)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){n(484);var r=n(26).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(486),i=n(247),o=n(47),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e,n){var r=n(125),i=n(124);t.exports=function(t,e){return e.length<2?t:r(t,i(e,0,-1))}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(126),i=n(92),o=n(489),a=n(488),s=n(64);t.exports=function(t,e,n){e=i(e,t);var u=null==(t=a(t,e))?t:t[s(o(e))];return null==u?void 0:r(u,t,n)}},function(t,e,n){var r=n(41),i=n(30),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(129);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).get(t)}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(129);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,n){var r=n(131);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(131);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(131);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(131),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}},function(t,e,n){var r=n(133),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(33)["__core-js_shared__"];t.exports=r},function(t,e,n){var r,i=n(507),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(44),i=n(508),o=n(39),a=n(249),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},function(t,e,n){var r=n(133);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(510),i=n(505),o=n(504),a=n(503),s=n(502);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(511),i=n(132),o=n(166);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(250),i=500;t.exports=function(t){var e=r(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(67),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(254);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},i(e,n)}t.exports=i},function(t,e,n){var r=n(49);r(r.S,"Object",{create:n(175)})},function(t,e,n){n(518);var r=n(26).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){t.exports=n(519)},function(t,e,n){var r=n(71),i=n(55),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(184)(Function.call,n(134).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(49);r(r.S,"Object",{setPrototypeOf:n(521).set})},function(t,e,n){n(522),t.exports=n(26).Object.setPrototypeOf},function(t,e,n){var r=n(93),i=n(173);n(169)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){n(524),t.exports=n(26).Object.getPrototypeOf},function(t,e,n){t.exports=n(525)},function(t,e,n){n(170)("observable")},function(t,e,n){n(170)("asyncIterator")},function(t,e){},function(t,e,n){var r=n(69),i=n(255).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(182);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(94),i=n(176),o=n(136);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(137)("meta"),i=n(71),o=n(54),a=n(56).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(79)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){n(256),n(529),n(528),n(527),t.exports=n(26).Symbol},function(t,e,n){t.exports=n(534)},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(537),i=n(536),o=n(78),a=n(69);t.exports=n(258)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(57).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(56),i=n(55),o=n(94);t.exports=n(70)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(175),i=n(95),o=n(174),a={};n(80)(a,n(42)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(180),i=n(181);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){n(135),n(172),t.exports=n(171).f("iterator")},function(t,e,n){t.exports=n(543)},function(t,e,n){var r=n(49);r(r.S+r.F*!n(70),"Object",{defineProperty:n(56).f})},function(t,e,n){n(545);var r=n(26).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(180),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(69),i=n(260),o=n(547);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(94),i=n(176),o=n(136),a=n(93),s=n(261),u=Object.assign;t.exports=!u||n(79)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=i.f,f=o.f;u>c;)for(var h,p=s(arguments[c++]),d=l?r(p).concat(l(p)):r(p),v=d.length,m=0;v>m;)f.call(p,h=d[m++])&&(n[h]=p[h]);return n}:u},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(49);r(r.S+r.F,"Object",{assign:n(549)})},function(t,e,n){n(551),t.exports=n(26).Object.assign},function(t,e,n){t.exports=n(552)},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(185),i=n(186),o=n(555);t.exports=function(){function t(t,e,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=n(101),s=n(37);u(n(199));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"home"},n.handleItemClick=function(t,e){var r=e.name;return n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"handleChange",value:function(t){var e=this.state.pages;e.home.title=t.target.value,this.setState({pages:e})}},{key:"componentDidMount",value:function(){var t=this;setTimeout(function(){t.setState({PageItems:o.default.createElement("div",null)})},100)}},{key:"render",value:function(){var t=this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.Menu,{basic:!0,style:{"border-radius":"0",height:"58px",width:"101%","margin-left":"-1px","margin-top":"-1px"}},o.default.createElement(s.Container,null,o.default.createElement(s.Menu.Item,{header:!0},o.default.createElement("img",{className:"ui small image",src:"https://image.ibb.co/evyeZd/logo.png"})),o.default.createElement(a.Link,{to:"/"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"home",active:"home"===t,onClick:this.handleItemClick})),o.default.createElement(a.Link,{to:"/Outreach"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"outreach",active:"outreach"===t,onClick:this.handleItemClick})),"                    ")))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=m(o),s=m(n(557)),u=(m(n(61)),m(n(313))),c=m(n(310)),l=m(n(302)),f=(m(n(76)),m(n(301))),h=m(n(300)),p=m(n(299)),d=n(101),v=m(n(199));n(37);function m(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={visible:!1,data:{}},n.toggleVisibility=function(){return n.setState({visible:!n.state.visible})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),i(e,[{key:"componentDidMount",value:function(){var t=this;v.default.then(function(e){return e.json().then(function(e){t.setState({data:e})})})}},{key:"render",value:function(){var t=this;return a.default.createElement(d.HashRouter,null,this.state.data&&a.default.createElement("div",null,a.default.createElement(s.default,{pages:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/",render:function(e){return a.default.createElement(u.default,r({},e,{data:t.state.data.pages}))}}),a.default.createElement(d.Route,{exact:!0,path:"/Team",component:c.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/Profile",component:l.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/SidebarExample",component:p.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/Outreach",component:h.default,data:this.state.data.pages}),a.default.createElement(f.default,null)))}}]),e}();e.default=y},function(t,e,n){"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},function(t,e,n){"use strict";var r=n(559);t.exports=function(t){return r(t)&&3==t.nodeType}},function(t,e,n){"use strict";var r=n(560);t.exports=function t(e,n){return!(!e||!n)&&(e===n||!r(e)&&(r(n)?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}},function(t,e,n){"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},function(t,e,n){"use strict";
 
/** @license React v16.4.1
 
/** @license React v16.4.1
 
  * react-dom.production.min.js
 
  * react-dom.production.min.js
Line 105: Line 105:
 
  * This source code is licensed under the MIT license found in the
 
  * This source code is licensed under the MIT license found in the
 
  * LICENSE file in the root directory of this source tree.
 
  * LICENSE file in the root directory of this source tree.
*/var r=n(186),i=n(0),o=n(563),a=n(265),s=n(185),u=n(562),c=n(190),l=n(561),f=n(264);function h(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}i||h("227");var p={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(t,e,n,r,i,o,a,s,u){(function(t,e,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(t){this._caughtError=t,this._hasCaughtError=!0}}).apply(p,arguments)},invokeGuardedCallbackAndCatchFirstError:function(t,e,n,r,i,o,a,s,u){if(p.invokeGuardedCallback.apply(this,arguments),p.hasCaughtError()){var c=p.clearCaughtError();p._hasRethrowError||(p._hasRethrowError=!0,p._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(p._hasRethrowError){var t=p._rethrowError;throw p._rethrowError=null,p._hasRethrowError=!1,t}}.apply(p,arguments)},hasCaughtError:function(){return p._hasCaughtError},clearCaughtError:function(){if(p._hasCaughtError){var t=p._caughtError;return p._caughtError=null,p._hasCaughtError=!1,t}h("198")}};var d=null,v={};function m(){if(d)for(var t in v){var e=v[t],n=d.indexOf(t);if(-1<n||h("96",t),!g[n])for(var r in e.extractEvents||h("97",t),g[n]=e,n=e.eventTypes){var i=void 0,o=n[r],a=e,s=r;b.hasOwnProperty(s)&&h("99",s),b[s]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&y(u[i],a,s);i=!0}else o.registrationName?(y(o.registrationName,a,s),i=!0):i=!1;i||h("98",r,t)}}}function y(t,e,n){_[t]&&h("100",t),_[t]=e,w[t]=e.eventTypes[n].dependencies}var g=[],b={},_={},w={};function E(t){d&&h("101"),d=Array.prototype.slice.call(t),m()}function T(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];v.hasOwnProperty(e)&&v[e]===r||(v[e]&&h("102",e),v[e]=r,n=!0)}n&&m()}var C={plugins:g,eventNameDispatchConfigs:b,registrationNameModules:_,registrationNameDependencies:w,possibleRegistrationNames:null,injectEventPluginOrder:E,injectEventPluginsByName:T},x=null,S=null,k=null;function N(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=k(r),p.invokeGuardedCallbackAndCatchFirstError(e,n,void 0,t),t.currentTarget=null}function A(t,e){return null==e&&h("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function I(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var O=null;function P(t,e){if(t){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)N(t,e,n[i],r[i]);else n&&N(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function R(t){return P(t,!0)}function D(t){return P(t,!1)}var M={injectEventPluginOrder:E,injectEventPluginsByName:T};function L(t,e){var n=t.stateNode;if(!n)return null;var r=x(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}return t?null:(n&&"function"!=typeof n&&h("231",e,typeof n),n)}function F(t,e){null!==t&&(O=A(O,t)),t=O,O=null,t&&(I(t,e?R:D),O&&h("95"),p.rethrowCaughtError())}function U(t,e,n,r){for(var i=null,o=0;o<g.length;o++){var a=g[o];a&&(a=a.extractEvents(t,e,n,r))&&(i=A(i,a))}F(i,!1)}var j={injection:M,getListener:L,runEventsInBatch:F,runExtractedEventsInBatch:U},B=Math.random().toString(36).slice(2),q="__reactInternalInstance$"+B,V="__reactEventHandlers$"+B;function W(t){if(t[q])return t[q];for(;!t[q];){if(!t.parentNode)return null;t=t.parentNode}return 5===(t=t[q]).tag||6===t.tag?t:null}function H(t){if(5===t.tag||6===t.tag)return t.stateNode;h("33")}function z(t){return t[V]||null}var K={precacheFiberNode:function(t,e){e[q]=t},getClosestInstanceFromNode:W,getInstanceFromNode:function(t){return!(t=t[q])||5!==t.tag&&6!==t.tag?null:t},getNodeFromInstance:H,getFiberCurrentPropsFromNode:z,updateFiberProps:function(t,e){t[V]=e}};function G(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Q(t,e,n){for(var r=[];t;)r.push(t),t=G(t);for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)}function Y(t,e,n){(e=L(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function X(t){t&&t.dispatchConfig.phasedRegistrationNames&&Q(t._targetInst,Y,t)}function $(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst;Q(e=e?G(e):null,Y,t)}}function J(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=L(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function Z(t){t&&t.dispatchConfig.registrationName&&J(t._targetInst,null,t)}function tt(t){I(t,X)}function et(t,e,n,r){if(n&&r)t:{for(var i=n,o=r,a=0,s=i;s;s=G(s))a++;s=0;for(var u=o;u;u=G(u))s++;for(;0<a-s;)i=G(i),a--;for(;0<s-a;)o=G(o),s--;for(;a--;){if(i===o||i===o.alternate)break t;i=G(i),o=G(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=G(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=G(r);for(r=0;r<i.length;r++)J(i[r],"bubbled",t);for(t=n.length;0<t--;)J(n[t],"captured",e)}var nt={accumulateTwoPhaseDispatches:tt,accumulateTwoPhaseDispatchesSkipTarget:function(t){I(t,$)},accumulateEnterLeaveDispatches:et,accumulateDirectDispatches:function(t){I(t,Z)}};function rt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}var it={animationend:rt("Animation","AnimationEnd"),animationiteration:rt("Animation","AnimationIteration"),animationstart:rt("Animation","AnimationStart"),transitionend:rt("Transition","TransitionEnd")},ot={},at={};function st(t){if(ot[t])return ot[t];if(!it[t])return t;var e,n=it[t];for(e in n)if(n.hasOwnProperty(e)&&e in at)return ot[t]=n[e];return t}o.canUseDOM&&(at=document.createElement("div").style,"AnimationEvent"in window||(delete it.animationend.animation,delete it.animationiteration.animation,delete it.animationstart.animation),"TransitionEvent"in window||delete it.transitionend.transition);var ut=st("animationend"),ct=st("animationiteration"),lt=st("animationstart"),ft=st("transitionend"),ht="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pt=null;function dt(){return!pt&&o.canUseDOM&&(pt="textContent"in document.documentElement?"textContent":"innerText"),pt}var vt={_root:null,_startText:null,_fallbackText:null};function mt(){if(vt._fallbackText)return vt._fallbackText;var t,e,n=vt._startText,r=n.length,i=yt(),o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return vt._fallbackText=i.slice(t,1<e?1-e:void 0),vt._fallbackText}function yt(){return"value"in vt._root?vt._root.value:vt._root[dt()]}var gt="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),bt={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function _t(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}function wt(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Et(t){t instanceof this||h("223"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Tt(t){t.eventPool=[],t.getPooled=wt,t.release=Et}a(_t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;for(e=0;e<gt.length;e++)this[gt[e]]=null}}),_t.Interface=bt,_t.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return a(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=a({},r.Interface,t),n.extend=r.extend,Tt(n),n},Tt(_t);var Ct=_t.extend({data:null}),xt=_t.extend({data:null}),St=[9,13,27,32],kt=o.canUseDOM&&"CompositionEvent"in window,Nt=null;o.canUseDOM&&"documentMode"in document&&(Nt=document.documentMode);var At=o.canUseDOM&&"TextEvent"in window&&!Nt,It=o.canUseDOM&&(!kt||Nt&&8<Nt&&11>=Nt),Ot=String.fromCharCode(32),Pt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Rt=!1;function Dt(t,e){switch(t){case"keyup":return-1!==St.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Mt(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Lt=!1;var Ft={eventTypes:Pt,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(kt)t:{switch(t){case"compositionstart":i=Pt.compositionStart;break t;case"compositionend":i=Pt.compositionEnd;break t;case"compositionupdate":i=Pt.compositionUpdate;break t}i=void 0}else Lt?Dt(t,n)&&(i=Pt.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=Pt.compositionStart);return i?(It&&(Lt||i!==Pt.compositionStart?i===Pt.compositionEnd&&Lt&&(o=mt()):(vt._root=r,vt._startText=yt(),Lt=!0)),i=Ct.getPooled(i,e,n,r),o?i.data=o:null!==(o=Mt(n))&&(i.data=o),tt(i),o=i):o=null,(t=At?function(t,e){switch(t){case"compositionend":return Mt(e);case"keypress":return 32!==e.which?null:(Rt=!0,Ot);case"textInput":return(t=e.data)===Ot&&Rt?null:t;default:return null}}(t,n):function(t,e){if(Lt)return"compositionend"===t||!kt&&Dt(t,e)?(t=mt(),vt._root=null,vt._startText=null,vt._fallbackText=null,Lt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return It?null:e.data;default:return null}}(t,n))?((e=xt.getPooled(Pt.beforeInput,e,n,r)).data=t,tt(e)):e=null,null===o?e:null===e?o:[o,e]}},Ut=null,jt={injectFiberControlledHostComponent:function(t){Ut=t}},Bt=null,qt=null;function Vt(t){if(t=S(t)){Ut&&"function"==typeof Ut.restoreControlledState||h("194");var e=x(t.stateNode);Ut.restoreControlledState(t.stateNode,t.type,e)}}function Wt(t){Bt?qt?qt.push(t):qt=[t]:Bt=t}function Ht(){return null!==Bt||null!==qt}function zt(){if(Bt){var t=Bt,e=qt;if(qt=Bt=null,Vt(t),e)for(t=0;t<e.length;t++)Vt(e[t])}}var Kt={injection:jt,enqueueStateRestore:Wt,needsStateRestore:Ht,restoreStateIfNeeded:zt};function Gt(t,e){return t(e)}function Qt(t,e,n){return t(e,n)}function Yt(){}var Xt=!1;function $t(t,e){if(Xt)return t(e);Xt=!0;try{return Gt(t,e)}finally{Xt=!1,Ht()&&(Yt(),zt())}}var Jt={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zt(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Jt[t.type]:"textarea"===e}function te(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ee(t,e){return!(!o.canUseDOM||e&&!("addEventListener"in document))&&((e=(t="on"+t)in document)||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"==typeof e[t]),e)}function ne(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function re(t){t._valueTracker||(t._valueTracker=function(t){var e=ne(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function ie(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ne(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}var oe=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ae="function"==typeof Symbol&&Symbol.for,se=ae?Symbol.for("react.element"):60103,ue=ae?Symbol.for("react.portal"):60106,ce=ae?Symbol.for("react.fragment"):60107,le=ae?Symbol.for("react.strict_mode"):60108,fe=ae?Symbol.for("react.profiler"):60114,he=ae?Symbol.for("react.provider"):60109,pe=ae?Symbol.for("react.context"):60110,de=ae?Symbol.for("react.async_mode"):60111,ve=ae?Symbol.for("react.forward_ref"):60112,me=ae?Symbol.for("react.timeout"):60113,ye="function"==typeof Symbol&&Symbol.iterator;function ge(t){return null===t||void 0===t?null:"function"==typeof(t=ye&&t[ye]||t["@@iterator"])?t:null}function be(t){var e=t.type;if("function"==typeof e)return e.displayName||e.name;if("string"==typeof e)return e;switch(e){case de:return"AsyncMode";case pe:return"Context.Consumer";case ce:return"ReactFragment";case ue:return"ReactPortal";case fe:return"Profiler("+t.pendingProps.id+")";case he:return"Context.Provider";case le:return"StrictMode";case me:return"Timeout"}if("object"==typeof e&&null!==e)switch(e.$$typeof){case ve:return""!==(t=e.render.displayName||e.render.name||"")?"ForwardRef("+t+")":"ForwardRef"}return null}function _e(t){var e="";do{t:switch(t.tag){case 0:case 1:case 2:case 5:var n=t._debugOwner,r=t._debugSource,i=be(t),o=null;n&&(o=be(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break t;default:i=""}e+=i,t=t.return}while(t);return e}var we=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ee={},Te={};function Ce(t,e,n,r,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xe[t]=new Ce(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xe[e]=new Ce(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){xe[t]=new Ce(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(t){xe[t]=new Ce(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){xe[t]=new Ce(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){xe[t]=new Ce(t,3,!0,t.toLowerCase(),null)}),["capture","download"].forEach(function(t){xe[t]=new Ce(t,4,!1,t.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(t){xe[t]=new Ce(t,6,!1,t.toLowerCase(),null)}),["rowSpan","start"].forEach(function(t){xe[t]=new Ce(t,5,!1,t.toLowerCase(),null)});var Se=/[\-:]([a-z])/g;function ke(t){return t[1].toUpperCase()}function Ne(t,e,n,r){var i=xe.hasOwnProperty(e)?xe[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||void 0===e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!Te.hasOwnProperty(t)||!Ee.hasOwnProperty(t)&&(we.test(t)?Te[t]=!0:(Ee[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function Ae(t,e){var n=e.checked;return a({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Ie(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=Me(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Oe(t,e){null!=(e=e.checked)&&Ne(t,"checked",e,!1)}function Pe(t,e){Oe(t,e);var n=Me(e.value);null!=n&&("number"===e.type?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n)),e.hasOwnProperty("value")?De(t,e.type,n):e.hasOwnProperty("defaultValue")&&De(t,e.type,Me(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Re(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){e=""+t._wrapperState.initialValue;var r=t.value;n||e===r||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!t.defaultChecked,""!==n&&(t.name=n)}function De(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Me(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),xe.tabIndex=new Ce("tabIndex",1,!1,"tabindex",null);var Le={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Fe(t,e,n){return(t=_t.getPooled(Le.change,t,e,n)).type="change",Wt(n),tt(t),t}var Ue=null,je=null;function Be(t){F(t,!1)}function qe(t){if(ie(H(t)))return t}function Ve(t,e){if("change"===t)return e}var We=!1;function He(){Ue&&(Ue.detachEvent("onpropertychange",ze),je=Ue=null)}function ze(t){"value"===t.propertyName&&qe(je)&&$t(Be,t=Fe(je,t,te(t)))}function Ke(t,e,n){"focus"===t?(He(),je=n,(Ue=e).attachEvent("onpropertychange",ze)):"blur"===t&&He()}function Ge(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return qe(je)}function Qe(t,e){if("click"===t)return qe(e)}function Ye(t,e){if("input"===t||"change"===t)return qe(e)}o.canUseDOM&&(We=ee("input")&&(!document.documentMode||9<document.documentMode));var Xe={eventTypes:Le,_isInputEventSupported:We,extractEvents:function(t,e,n,r){var i=e?H(e):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Ve:Zt(i)?We?o=Ye:(o=Ge,a=Ke):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Qe),o&&(o=o(t,e)))return Fe(o,n,r);a&&a(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&De(i,"number",i.value)}},$e=_t.extend({view:null,detail:null}),Je={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ze(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Je[t])&&!!e[t]}function tn(){return Ze}var en=$e.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tn,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)}}),nn=en.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),rn={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},on={eventTypes:rn,extractEvents:function(t,e,n,r){var i="mouseover"===t||"pointerover"===t,o="mouseout"===t||"pointerout"===t;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=e,e=(e=n.relatedTarget||n.toElement)?W(e):null):o=null,o===e)return null;var a=void 0,s=void 0,u=void 0,c=void 0;return"mouseout"===t||"mouseover"===t?(a=en,s=rn.mouseLeave,u=rn.mouseEnter,c="mouse"):"pointerout"!==t&&"pointerover"!==t||(a=nn,s=rn.pointerLeave,u=rn.pointerEnter,c="pointer"),t=null==o?i:H(o),i=null==e?i:H(e),(s=a.getPooled(s,o,n,r)).type=c+"leave",s.target=t,s.relatedTarget=i,(n=a.getPooled(u,e,n,r)).type=c+"enter",n.target=i,n.relatedTarget=t,et(s,n,o,e),[s,n]}};function an(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!=(2&e.effectTag))return 1;for(;e.return;)if(0!=(2&(e=e.return).effectTag))return 1}return 3===e.tag?2:3}function sn(t){2!==an(t)&&h("188")}function un(t){var e=t.alternate;if(!e)return 3===(e=an(t))&&h("188"),1===e?null:t;for(var n=t,r=e;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return sn(i),t;if(a===r)return sn(i),e;a=a.sibling}h("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||h("189")}}n.alternate!==r&&h("190")}return 3!==n.tag&&h("188"),n.stateNode.current===n?t:e}function cn(t){if(!(t=un(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}var ln=_t.extend({animationName:null,elapsedTime:null,pseudoElement:null}),fn=_t.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),hn=$e.extend({relatedTarget:null});function pn(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var dn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn=$e.extend({key:function(t){if(t.key){var e=dn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=pn(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?vn[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tn,charCode:function(t){return"keypress"===t.type?pn(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?pn(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),yn=en.extend({dataTransfer:null}),gn=$e.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tn}),bn=_t.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),_n=en.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),wn=[["abort","abort"],[ut,"animationEnd"],[ct,"animationIteration"],[lt,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ft,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],En={},Tn={};function Cn(t,e){var n=t[0],r="on"+((t=t[1])[0].toUpperCase()+t.slice(1));e={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:e},En[t]=e,Tn[n]=e}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(t){Cn(t,!0)}),wn.forEach(function(t){Cn(t,!1)});var xn={eventTypes:En,isInteractiveTopLevelEventType:function(t){return void 0!==(t=Tn[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,r){var i=Tn[t];if(!i)return null;switch(t){case"keypress":if(0===pn(n))return null;case"keydown":case"keyup":t=mn;break;case"blur":case"focus":t=hn;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=en;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=gn;break;case ut:case ct:case lt:t=ln;break;case ft:t=bn;break;case"scroll":t=$e;break;case"wheel":t=_n;break;case"copy":case"cut":case"paste":t=fn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=nn;break;default:t=_t}return tt(e=t.getPooled(i,e,n,r)),e}},Sn=xn.isInteractiveTopLevelEventType,kn=[];function Nn(t){var e=t.targetInst;do{if(!e){t.ancestors.push(e);break}var n;for(n=e;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;t.ancestors.push(e),e=W(n)}while(e);for(n=0;n<t.ancestors.length;n++)e=t.ancestors[n],U(t.topLevelType,e,t.nativeEvent,te(t.nativeEvent))}var An=!0;function In(t){An=!!t}function On(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!1)}function Pn(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!0)}function Rn(t,e){Qt(Dn,t,e)}function Dn(t,e){if(An){var n=te(e);if(null===(n=W(n))||"number"!=typeof n.tag||2===an(n)||(n=null),kn.length){var r=kn.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{$t(Nn,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>kn.length&&kn.push(t)}}}var Mn={get _enabled(){return An},setEnabled:In,isEnabled:function(){return An},trapBubbledEvent:On,trapCapturedEvent:Pn,dispatchEvent:Dn},Ln={},Fn=0,Un="_reactListenersID"+(""+Math.random()).slice(2);function jn(t){return Object.prototype.hasOwnProperty.call(t,Un)||(t[Un]=Fn++,Ln[t[Un]]={}),Ln[t[Un]]}function Bn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qn(t,e){var n,r=Bn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=Bn(r)}}function Vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var Wn=o.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Hn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},zn=null,Kn=null,Gn=null,Qn=!1;function Yn(t,e){if(Qn||null==zn||zn!==u())return null;var n=zn;return"selectionStart"in n&&Vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Gn&&c(Gn,n)?null:(Gn=n,(t=_t.getPooled(Hn.select,Kn,t,e)).type="select",t.target=zn,tt(t),t)}var Xn={eventTypes:Hn,extractEvents:function(t,e,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){t:{o=jn(o),i=w.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break t}}o=!0}i=!o}if(i)return null;switch(o=e?H(e):window,t){case"focus":(Zt(o)||"true"===o.contentEditable)&&(zn=o,Kn=e,Gn=null);break;case"blur":Gn=Kn=zn=null;break;case"mousedown":Qn=!0;break;case"contextmenu":case"mouseup":return Qn=!1,Yn(n,r);case"selectionchange":if(Wn)break;case"keydown":case"keyup":return Yn(n,r)}return null}};M.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=K.getFiberCurrentPropsFromNode,S=K.getInstanceFromNode,k=K.getNodeFromInstance,M.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:on,ChangeEventPlugin:Xe,SelectEventPlugin:Xn,BeforeInputEventPlugin:Ft});var $n="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Jn=Date,Zn=setTimeout,tr=clearTimeout,er=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var nr=performance;er=function(){return nr.now()}}else er=function(){return Jn.now()};var rr=void 0,ir=void 0;if(o.canUseDOM){var or="function"==typeof $n?$n:function(){h("276")},ar=null,sr=null,ur=-1,cr=!1,lr=!1,fr=0,hr=33,pr=33,dr={didTimeout:!1,timeRemaining:function(){var t=fr-er();return 0<t?t:0}},vr=function(t,e){var n=t.scheduledCallback,r=!1;try{n(e),r=!0}finally{ir(t),r||(cr=!0,window.postMessage(mr,"*"))}},mr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){if(t.source===window&&t.data===mr&&(cr=!1,null!==ar)){if(null!==ar){var e=er();if(!(-1===ur||ur>e)){t=-1;for(var n=[],r=ar;null!==r;){var i=r.timeoutTime;-1!==i&&i<=e?n.push(r):-1!==i&&(-1===t||i<t)&&(t=i),r=r.next}if(0<n.length)for(dr.didTimeout=!0,e=0,r=n.length;e<r;e++)vr(n[e],dr);ur=t}}for(t=er();0<fr-t&&null!==ar;)t=ar,dr.didTimeout=!1,vr(t,dr),t=er();null===ar||lr||(lr=!0,or(yr))}},!1);var yr=function(t){lr=!1;var e=t-fr+pr;e<pr&&hr<pr?(8>e&&(e=8),pr=e<hr?hr:e):hr=e,fr=t+pr,cr||(cr=!0,window.postMessage(mr,"*"))};rr=function(t,e){var n=-1;return null!=e&&"number"==typeof e.timeout&&(n=er()+e.timeout),(-1===ur||-1!==n&&n<ur)&&(ur=n),t={scheduledCallback:t,timeoutTime:n,prev:null,next:null},null===ar?ar=t:null!==(e=t.prev=sr)&&(e.next=t),sr=t,lr||(lr=!0,or(yr)),t},ir=function(t){if(null!==t.prev||ar===t){var e=t.next,n=t.prev;t.next=null,t.prev=null,null!==e?null!==n?(n.next=e,e.prev=n):(e.prev=null,ar=e):null!==n?(n.next=null,sr=n):sr=ar=null}}}else{var gr=new Map;rr=function(t){var e={scheduledCallback:t,timeoutTime:0,next:null,prev:null},n=Zn(function(){t({timeRemaining:function(){return 1/0},didTimeout:!1})});return gr.set(t,n),e},ir=function(t){var e=gr.get(t.scheduledCallback);gr.delete(t),tr(e)}}function br(t,e){return t=a({children:void 0},e),(e=function(t){var e="";return i.Children.forEach(t,function(t){null==t||"string"!=typeof t&&"number"!=typeof t||(e+=t)}),e}(e.children))&&(t.children=e),t}function _r(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+n,e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function wr(t,e){var n=e.value;t._wrapperState={initialValue:null!=n?n:e.defaultValue,wasMultiple:!!e.multiple}}function Er(t,e){return null!=e.dangerouslySetInnerHTML&&h("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Tr(t,e){var n=e.value;null==n&&(n=e.defaultValue,null!=(e=e.children)&&(null!=n&&h("92"),Array.isArray(e)&&(1>=e.length||h("93"),e=e[0]),n=""+e),null==n&&(n="")),t._wrapperState={initialValue:""+n}}function Cr(t,e){var n=e.value;null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&(t.defaultValue=n)),null!=e.defaultValue&&(t.defaultValue=e.defaultValue)}function xr(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}var Sr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function kr(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nr(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?kr(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ar,Ir=void 0,Or=(Ar=function(t,e){if(t.namespaceURI!==Sr.svg||"innerHTML"in t)t.innerHTML=e;else{for((Ir=Ir||document.createElement("div")).innerHTML="<svg>"+e+"</svg>",e=Ir.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction(function(){return Ar(t,e)})}:Ar);function Pr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dr=["Webkit","ms","Moz","O"];function Mr(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=e[n];i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||Rr.hasOwnProperty(i)&&Rr[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(Rr).forEach(function(t){Dr.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Rr[e]=Rr[t]})});var Lr=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fr(t,e,n){e&&(Lr[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&h("137",t,n()),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&h("60"),"object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||h("61")),null!=e.style&&"object"!=typeof e.style&&h("62",n()))}function Ur(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jr=s.thatReturns("");function Br(t,e){var n=jn(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=w[e];for(var r=0;r<e.length;r++){var i=e[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Pn("scroll",t);break;case"focus":case"blur":Pn("focus",t),Pn("blur",t),n.blur=!0,n.focus=!0;break;case"cancel":case"close":ee(i,!0)&&Pn(i,t);break;case"invalid":case"submit":case"reset":break;default:-1===ht.indexOf(i)&&On(i,t)}n[i]=!0}}}function qr(t,e,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Sr.html&&(r=kr(t)),r===Sr.html?"script"===t?((t=n.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):t="string"==typeof e.is?n.createElement(t,{is:e.is}):n.createElement(t):t=n.createElementNS(r,t),t}function Vr(t,e){return(9===e.nodeType?e:e.ownerDocument).createTextNode(t)}function Wr(t,e,n,r){var i=Ur(e,n);switch(e){case"iframe":case"object":On("load",t);var o=n;break;case"video":case"audio":for(o=0;o<ht.length;o++)On(ht[o],t);o=n;break;case"source":On("error",t),o=n;break;case"img":case"image":case"link":On("error",t),On("load",t),o=n;break;case"form":On("reset",t),On("submit",t),o=n;break;case"details":On("toggle",t),o=n;break;case"input":Ie(t,n),o=Ae(t,n),On("invalid",t),Br(r,"onChange");break;case"option":o=br(t,n);break;case"select":wr(t,n),o=a({},n,{value:void 0}),On("invalid",t),Br(r,"onChange");break;case"textarea":Tr(t,n),o=Er(t,n),On("invalid",t),Br(r,"onChange");break;default:o=n}Fr(e,o,jr);var u,c=o;for(u in c)if(c.hasOwnProperty(u)){var l=c[u];"style"===u?Mr(t,l):"dangerouslySetInnerHTML"===u?null!=(l=l?l.__html:void 0)&&Or(t,l):"children"===u?"string"==typeof l?("textarea"!==e||""!==l)&&Pr(t,l):"number"==typeof l&&Pr(t,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(_.hasOwnProperty(u)?null!=l&&Br(r,u):null!=l&&Ne(t,u,l,i))}switch(e){case"input":re(t),Re(t,n,!1);break;case"textarea":re(t),xr(t);break;case"option":null!=n.value&&t.setAttribute("value",n.value);break;case"select":t.multiple=!!n.multiple,null!=(e=n.value)?_r(t,!!n.multiple,e,!1):null!=n.defaultValue&&_r(t,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(t.onclick=s)}}function Hr(t,e,n,r,i){var o=null;switch(e){case"input":n=Ae(t,n),r=Ae(t,r),o=[];break;case"option":n=br(t,n),r=br(t,r),o=[];break;case"select":n=a({},n,{value:void 0}),r=a({},r,{value:void 0}),o=[];break;case"textarea":n=Er(t,n),r=Er(t,r),o=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(t.onclick=s)}Fr(e,r,jr),e=t=void 0;var u=null;for(t in n)if(!r.hasOwnProperty(t)&&n.hasOwnProperty(t)&&null!=n[t])if("style"===t){var c=n[t];for(e in c)c.hasOwnProperty(e)&&(u||(u={}),u[e]="")}else"dangerouslySetInnerHTML"!==t&&"children"!==t&&"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&"autoFocus"!==t&&(_.hasOwnProperty(t)?o||(o=[]):(o=o||[]).push(t,null));for(t in r){var l=r[t];if(c=null!=n?n[t]:void 0,r.hasOwnProperty(t)&&l!==c&&(null!=l||null!=c))if("style"===t)if(c){for(e in c)!c.hasOwnProperty(e)||l&&l.hasOwnProperty(e)||(u||(u={}),u[e]="");for(e in l)l.hasOwnProperty(e)&&c[e]!==l[e]&&(u||(u={}),u[e]=l[e])}else u||(o||(o=[]),o.push(t,u)),u=l;else"dangerouslySetInnerHTML"===t?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(o=o||[]).push(t,""+l)):"children"===t?c===l||"string"!=typeof l&&"number"!=typeof l||(o=o||[]).push(t,""+l):"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&(_.hasOwnProperty(t)?(null!=l&&Br(i,t),o||c===l||(o=[])):(o=o||[]).push(t,l))}return u&&(o=o||[]).push("style",u),o}function zr(t,e,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&Oe(t,i),Ur(n,r),r=Ur(n,i);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?Mr(t,s):"dangerouslySetInnerHTML"===a?Or(t,s):"children"===a?Pr(t,s):Ne(t,a,s,r)}switch(n){case"input":Pe(t,i);break;case"textarea":Cr(t,i);break;case"select":t._wrapperState.initialValue=void 0,e=t._wrapperState.wasMultiple,t._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?_r(t,!!i.multiple,n,!1):e!==!!i.multiple&&(null!=i.defaultValue?_r(t,!!i.multiple,i.defaultValue,!0):_r(t,!!i.multiple,i.multiple?[]:"",!1))}}function Kr(t,e,n,r,i){switch(e){case"iframe":case"object":On("load",t);break;case"video":case"audio":for(r=0;r<ht.length;r++)On(ht[r],t);break;case"source":On("error",t);break;case"img":case"image":case"link":On("error",t),On("load",t);break;case"form":On("reset",t),On("submit",t);break;case"details":On("toggle",t);break;case"input":Ie(t,n),On("invalid",t),Br(i,"onChange");break;case"select":wr(t,n),On("invalid",t),Br(i,"onChange");break;case"textarea":Tr(t,n),On("invalid",t),Br(i,"onChange")}for(var o in Fr(e,n,jr),r=null,n)if(n.hasOwnProperty(o)){var a=n[o];"children"===o?"string"==typeof a?t.textContent!==a&&(r=["children",a]):"number"==typeof a&&t.textContent!==""+a&&(r=["children",""+a]):_.hasOwnProperty(o)&&null!=a&&Br(i,o)}switch(e){case"input":re(t),Re(t,n,!0);break;case"textarea":re(t),xr(t);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(t.onclick=s)}return r}function Gr(t,e){return t.nodeValue!==e}var Qr={createElement:qr,createTextNode:Vr,setInitialProperties:Wr,diffProperties:Hr,updateProperties:zr,diffHydratedProperties:Kr,diffHydratedText:Gr,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(t,e,n){switch(e){case"input":if(Pe(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=z(r);i||h("90"),ie(r),Pe(r,i)}}}break;case"textarea":Cr(t,n);break;case"select":null!=(e=n.value)&&_r(t,!!n.multiple,e,!1)}}},Yr=null,Xr=null;function $r(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function Jr(t,e){return"textarea"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"==typeof e.dangerouslySetInnerHTML.__html}var Zr=er,ti=rr,ei=ir;function ni(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function ri(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}new Set;var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){ii[++oi]=t.current,t.current=e}var ci=ai(f),li=ai(!1),fi=f;function hi(t){return di(t)?fi:ci.current}function pi(t,e){var n=t.type.contextTypes;if(!n)return f;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function di(t){return 2===t.tag&&null!=t.type.childContextTypes}function vi(t){di(t)&&(si(li),si(ci))}function mi(t){si(li),si(ci)}function yi(t,e,n){ci.current!==f&&h("168"),ui(ci,e),ui(li,n)}function gi(t,e){var n=t.stateNode,r=t.type.childContextTypes;if("function"!=typeof n.getChildContext)return e;for(var i in n=n.getChildContext())i in r||h("108",be(t)||"Unknown",i);return a({},e,n)}function bi(t){if(!di(t))return!1;var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||f,fi=ci.current,ui(ci,e),ui(li,li.current),!0}function _i(t,e){var n=t.stateNode;if(n||h("169"),e){var r=gi(t,fi);n.__reactInternalMemoizedMergedChildContext=r,si(li),si(ci),ui(ci,r)}else si(li);ui(li,e)}function wi(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=e,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ei(t,e,n){var r=t.alternate;return null===r?((r=new wi(t.tag,e,t.key,t.mode)).type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ti(t,e,n){var r=t.type,i=t.key;if(t=t.props,"function"==typeof r)var o=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)o=5;else switch(r){case ce:return Ci(t.children,e,n,i);case de:o=11,e|=3;break;case le:o=11,e|=2;break;case fe:return(r=new wi(15,t,i,4|e)).type=fe,r.expirationTime=n,r;case me:o=16,e|=2;break;default:t:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case he:o=13;break t;case pe:o=12;break t;case ve:o=14;break t;default:h("130",null==r?r:typeof r,"")}o=void 0}}return(e=new wi(o,t,i,e)).type=r,e.expirationTime=n,e}function Ci(t,e,n,r){return(t=new wi(10,t,r,e)).expirationTime=n,t}function xi(t,e,n){return(t=new wi(6,t,null,e)).expirationTime=n,t}function Si(t,e,n){return(e=new wi(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ki(t,e,n){return t={current:e=new wi(3,null,null,e?3:0),containerInfo:t,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},e.stateNode=t}var Ni=null,Ai=null;function Ii(t){return function(e){try{return t(e)}catch(t){}}}function Oi(t){"function"==typeof Ni&&Ni(t)}function Pi(t){"function"==typeof Ai&&Ai(t)}var Ri=!1;function Di(t){return{expirationTime:0,baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Mi(t){return{expirationTime:t.expirationTime,baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Li(t){return{expirationTime:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Fi(t,e,n){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e),(0===t.expirationTime||t.expirationTime>n)&&(t.expirationTime=n)}function Ui(t,e,n){var r=t.alternate;if(null===r){var i=t.updateQueue,o=null;null===i&&(i=t.updateQueue=Di(t.memoizedState))}else i=t.updateQueue,o=r.updateQueue,null===i?null===o?(i=t.updateQueue=Di(t.memoizedState),o=r.updateQueue=Di(r.memoizedState)):i=t.updateQueue=Mi(o):null===o&&(o=r.updateQueue=Mi(i));null===o||i===o?Fi(i,e,n):null===i.lastUpdate||null===o.lastUpdate?(Fi(i,e,n),Fi(o,e,n)):(Fi(i,e,n),o.lastUpdate=e)}function ji(t,e,n){var r=t.updateQueue;null===(r=null===r?t.updateQueue=Di(t.memoizedState):Bi(t,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=e:(r.lastCapturedUpdate.next=e,r.lastCapturedUpdate=e),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Bi(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=Mi(e)),e}function qi(t,e,n,r,i,o){switch(n.tag){case 1:return"function"==typeof(t=n.payload)?t.call(o,r,i):t;case 3:t.effectTag=-1025&t.effectTag|64;case 0:if(null===(i="function"==typeof(t=n.payload)?t.call(o,r,i):t)||void 0===i)break;return a({},r,i);case 2:Ri=!0}return r}function Vi(t,e,n,r,i){if(Ri=!1,!(0===e.expirationTime||e.expirationTime>i)){for(var o=(e=Bi(t,e)).baseState,a=null,s=0,u=e.firstUpdate,c=o;null!==u;){var l=u.expirationTime;l>i?(null===a&&(a=u,o=c),(0===s||s>l)&&(s=l)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastEffect?e.firstEffect=e.lastEffect=u:(e.lastEffect.nextEffect=u,e.lastEffect=u))),u=u.next}for(l=null,u=e.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>i?(null===l&&(l=u,null===a&&(o=c)),(0===s||s>f)&&(s=f)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastCapturedEffect?e.firstCapturedEffect=e.lastCapturedEffect=u:(e.lastCapturedEffect.nextEffect=u,e.lastCapturedEffect=u))),u=u.next}null===a&&(e.lastUpdate=null),null===l?e.lastCapturedUpdate=null:t.effectTag|=32,null===a&&null===l&&(o=c),e.baseState=o,e.firstUpdate=a,e.firstCapturedUpdate=l,e.expirationTime=s,t.memoizedState=c}}function Wi(t,e){"function"!=typeof t&&h("191",t),t.call(e)}function Hi(t,e,n){for(null!==e.firstCapturedUpdate&&(null!==e.lastUpdate&&(e.lastUpdate.next=e.firstCapturedUpdate,e.lastUpdate=e.lastCapturedUpdate),e.firstCapturedUpdate=e.lastCapturedUpdate=null),t=e.firstEffect,e.firstEffect=e.lastEffect=null;null!==t;){var r=t.callback;null!==r&&(t.callback=null,Wi(r,n)),t=t.nextEffect}for(t=e.firstCapturedEffect,e.firstCapturedEffect=e.lastCapturedEffect=null;null!==t;)null!==(e=t.callback)&&(t.callback=null,Wi(e,n)),t=t.nextEffect}function zi(t,e){return{value:t,source:e,stack:_e(e)}}var Ki=ai(null),Gi=ai(null),Qi=ai(0);function Yi(t){var e=t.type._context;ui(Qi,e._changedBits),ui(Gi,e._currentValue),ui(Ki,t),e._currentValue=t.pendingProps.value,e._changedBits=t.stateNode}function Xi(t){var e=Qi.current,n=Gi.current;si(Ki),si(Gi),si(Qi),(t=t.type._context)._currentValue=n,t._changedBits=e}var $i={},Ji=ai($i),Zi=ai($i),to=ai($i);function eo(t){return t===$i&&h("174"),t}function no(t,e){ui(to,e),ui(Zi,t),ui(Ji,$i);var n=e.nodeType;switch(n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Nr(null,"");break;default:e=Nr(e=(n=8===n?e.parentNode:e).namespaceURI||null,n=n.tagName)}si(Ji),ui(Ji,e)}function ro(t){si(Ji),si(Zi),si(to)}function io(t){Zi.current===t&&(si(Ji),si(Zi))}function oo(t,e,n){var r=t.memoizedState;r=null===(e=e(n,r))||void 0===e?r:a({},r,e),t.memoizedState=r,null!==(t=t.updateQueue)&&0===t.expirationTime&&(t.baseState=r)}var ao={isMounted:function(t){return!!(t=t._reactInternalFiber)&&2===an(t)},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=ba(),r=Li(n=ya(n,t));r.tag=2,void 0!==e&&null!==e&&(r.callback=e),Ui(t,r,n),ga(t,n)}};function so(t,e,n,r,i,o){var a=t.stateNode;return t=t.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!c(e,n)||!c(r,i))}function uo(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&ao.enqueueReplaceState(e,e.state,null)}function co(t,e){var n=t.type,r=t.stateNode,i=t.pendingProps,o=hi(t);r.props=i,r.state=t.memoizedState,r.refs=f,r.context=pi(t,o),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState),"function"==typeof(o=t.type.getDerivedStateFromProps)&&(oo(t,o,i),r.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&ao.enqueueReplaceState(r,r.state,null),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState)),"function"==typeof r.componentDidMount&&(t.effectTag|=4)}var lo=Array.isArray;function fo(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&h("110"),r=n.stateNode),r||h("147",t);var i=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs===f?r.refs={}:r.refs;null===t?delete e[i]:e[i]=t})._stringRef=i,e)}"string"!=typeof t&&h("148"),n._owner||h("254",t)}return t}function ho(t,e){"textarea"!==t.type&&h("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function po(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e,n){return(t=Ei(t,e,n)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function a(e){return t&&null===e.alternate&&(e.effectTag=2),e}function s(t,e,n,r){return null===e||6!==e.tag?((e=xi(n,t.mode,r)).return=t,e):((e=i(e,n,r)).return=t,e)}function u(t,e,n,r){return null!==e&&e.type===n.type?((r=i(e,n.props,r)).ref=fo(t,e,n),r.return=t,r):((r=Ti(n,t.mode,r)).ref=fo(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Si(n,t.mode,r)).return=t,e):((e=i(e,n.children||[],r)).return=t,e)}function l(t,e,n,r,o){return null===e||10!==e.tag?((e=Ci(n,t.mode,r,o)).return=t,e):((e=i(e,n,r)).return=t,e)}function f(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=xi(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case se:return(n=Ti(e,t.mode,n)).ref=fo(t,null,e),n.return=t,n;case ue:return(e=Si(e,t.mode,n)).return=t,e}if(lo(e)||ge(e))return(e=Ci(e,t.mode,n,null)).return=t,e;ho(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case se:return n.key===i?n.type===ce?l(t,e,n.props.children,r,i):u(t,e,n,r):null;case ue:return n.key===i?c(t,e,n,r):null}if(lo(n)||ge(n))return null!==i?null:l(t,e,n,r,null);ho(t,n)}return null}function d(t,e,n,r,i){if("string"==typeof r||"number"==typeof r)return s(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case se:return t=t.get(null===r.key?n:r.key)||null,r.type===ce?l(e,t,r.props.children,i,r.key):u(e,t,r,i);case ue:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(lo(r)||ge(r))return l(e,t=t.get(n)||null,r,i,null);ho(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,h=a,v=a=0,m=null;null!==h&&v<s.length;v++){h.index>v?(m=h,h=null):m=h.sibling;var y=p(i,h,s[v],u);if(null===y){null===h&&(h=m);break}t&&h&&null===y.alternate&&e(i,h),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,h=m}if(v===s.length)return n(i,h),c;if(null===h){for(;v<s.length;v++)(h=f(i,s[v],u))&&(a=o(h,a,v),null===l?c=h:l.sibling=h,l=h);return c}for(h=r(i,h);v<s.length;v++)(m=d(h,i,v,s[v],u))&&(t&&null!==m.alternate&&h.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return t&&h.forEach(function(t){return e(i,t)}),c}function m(i,a,s,u){var c=ge(s);"function"!=typeof c&&h("150"),null==(s=c.call(s))&&h("151");for(var l=c=null,v=a,m=a=0,y=null,g=s.next();null!==v&&!g.done;m++,g=s.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(i,v,g.value,u);if(null===b){v||(v=y);break}t&&v&&null===b.alternate&&e(i,v),a=o(b,a,m),null===l?c=b:l.sibling=b,l=b,v=y}if(g.done)return n(i,v),c;if(null===v){for(;!g.done;m++,g=s.next())null!==(g=f(i,g.value,u))&&(a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return c}for(v=r(i,v);!g.done;m++,g=s.next())null!==(g=d(v,i,m,g.value,u))&&(t&&null!==g.alternate&&v.delete(null===g.key?m:g.key),a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return t&&v.forEach(function(t){return e(i,t)}),c}return function(t,r,o,s){var u="object"==typeof o&&null!==o&&o.type===ce&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case se:t:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(10===u.tag?o.type===ce:u.type===o.type){n(t,u.sibling),(r=i(u,o.type===ce?o.props.children:o.props,s)).ref=fo(t,u,o),r.return=t,t=r;break t}n(t,u);break}e(t,u),u=u.sibling}o.type===ce?((r=Ci(o.props.children,t.mode,s,o.key)).return=t,t=r):((s=Ti(o,t.mode,s)).ref=fo(t,r,o),s.return=t,t=s)}return a(t);case ue:t:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[],s)).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Si(o,t.mode,s)).return=t,t=r}return a(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o,s)).return=t,t=r):(n(t,r),(r=xi(o,t.mode,s)).return=t,t=r),a(t);if(lo(o))return v(t,r,o,s);if(ge(o))return m(t,r,o,s);if(c&&ho(t,o),void 0===o&&!u)switch(t.tag){case 2:case 1:h("152",(s=t.type).displayName||s.name||"Component")}return n(t,r)}}var vo=po(!0),mo=po(!1),yo=null,go=null,bo=!1;function _o(t,e){var n=new wi(5,null,null,0);n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function wo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function Eo(t){if(bo){var e=go;if(e){var n=e;if(!wo(t,e)){if(!(e=ni(n))||!wo(t,e))return t.effectTag|=2,bo=!1,void(yo=t);_o(yo,n)}yo=t,go=ri(e)}else t.effectTag|=2,bo=!1,yo=t}}function To(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag;)t=t.return;yo=t}function Co(t){if(t!==yo)return!1;if(!bo)return To(t),bo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!Jr(e,t.memoizedProps))for(e=go;e;)_o(t,e),e=ni(e);return To(t),go=yo?ni(t.stateNode):null,!0}function xo(){go=yo=null,bo=!1}function So(t,e,n){ko(t,e,n,e.expirationTime)}function ko(t,e,n,r){e.child=null===t?mo(e,null,n,r):vo(e,t.child,n,r)}function No(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Ao(t,e,n,r,i){No(t,e);var o=0!=(64&e.effectTag);if(!n&&!o)return r&&_i(e,!1),Po(t,e);n=e.stateNode,oe.current=e;var a=o?null:n.render();return e.effectTag|=1,o&&(ko(t,e,null,i),e.child=null),ko(t,e,a,i),e.memoizedState=n.state,e.memoizedProps=n.props,r&&_i(e,!0),e.child}function Io(t){var e=t.stateNode;e.pendingContext?yi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&yi(0,e.context,!1),no(t,e.containerInfo)}function Oo(t,e,n,r){var i=t.child;for(null!==i&&(i.return=t);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===e&&0!=(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===t.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===t){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Po(t,e){if(null!==t&&e.child!==t.child&&h("153"),null!==e.child){var n=Ei(t=e.child,t.pendingProps,t.expirationTime);for(e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ei(t,t.pendingProps,t.expirationTime)).return=e;n.sibling=null}return e.child}function Ro(t,e,n){if(0===e.expirationTime||e.expirationTime>n){switch(e.tag){case 3:Io(e);break;case 2:bi(e);break;case 4:no(e,e.stateNode.containerInfo);break;case 13:Yi(e)}return null}switch(e.tag){case 0:null!==t&&h("155");var r=e.type,i=e.pendingProps,o=hi(e);return r=r(i,o=pi(e,o)),e.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(o=e.type,e.tag=2,e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(o=o.getDerivedStateFromProps)&&oo(e,o,i),i=bi(e),r.updater=ao,e.stateNode=r,r._reactInternalFiber=e,co(e,n),t=Ao(t,e,!0,i,n)):(e.tag=1,So(t,e,r),e.memoizedProps=i,t=e.child),t;case 1:return i=e.type,n=e.pendingProps,li.current||e.memoizedProps!==n?(i=i(n,r=pi(e,r=hi(e))),e.effectTag|=1,So(t,e,i),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 2:if(i=bi(e),null===t)if(null===e.stateNode){var a=e.pendingProps,s=e.type;r=hi(e);var u=2===e.tag&&null!=e.type.contextTypes;a=new s(a,o=u?pi(e,r):f),e.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=ao,e.stateNode=a,a._reactInternalFiber=e,u&&((u=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,u.__reactInternalMemoizedMaskedChildContext=o),co(e,n),r=!0}else{s=e.type,r=e.stateNode,u=e.memoizedProps,o=e.pendingProps,r.props=u;var c=r.context;a=pi(e,a=hi(e));var l=s.getDerivedStateFromProps;(s="function"==typeof l||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(u!==o||c!==a)&&uo(e,r,o,a),Ri=!1;var p=e.memoizedState;c=r.state=p;var d=e.updateQueue;null!==d&&(Vi(e,d,o,r,n),c=e.memoizedState),u!==o||p!==c||li.current||Ri?("function"==typeof l&&(oo(e,l,o),c=e.memoizedState),(u=Ri||so(e,u,o,p,c,a))?(s||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(e.effectTag|=4)):("function"==typeof r.componentDidMount&&(e.effectTag|=4),e.memoizedProps=o,e.memoizedState=c),r.props=o,r.state=c,r.context=a,r=u):("function"==typeof r.componentDidMount&&(e.effectTag|=4),r=!1)}else s=e.type,r=e.stateNode,o=e.memoizedProps,u=e.pendingProps,r.props=o,c=r.context,a=pi(e,a=hi(e)),(s="function"==typeof(l=s.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(o!==u||c!==a)&&uo(e,r,u,a),Ri=!1,c=e.memoizedState,p=r.state=c,null!==(d=e.updateQueue)&&(Vi(e,d,u,r,n),p=e.memoizedState),o!==u||c!==p||li.current||Ri?("function"==typeof l&&(oo(e,l,u),p=e.memoizedState),(l=Ri||so(e,o,u,c,p,a))?(s||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(u,p,a),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(u,p,a)),"function"==typeof r.componentDidUpdate&&(e.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),e.memoizedProps=u,e.memoizedState=p),r.props=u,r.state=p,r.context=a,r=l):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),r=!1);return Ao(t,e,r,i,n);case 3:return Io(e),null!==(i=e.updateQueue)?(r=null!==(r=e.memoizedState)?r.element:null,Vi(e,i,e.pendingProps,null,n),(i=e.memoizedState.element)===r?(xo(),t=Po(t,e)):(r=e.stateNode,(r=(null===t||null===t.child)&&r.hydrate)&&(go=ri(e.stateNode.containerInfo),yo=e,r=bo=!0),r?(e.effectTag|=2,e.child=mo(e,null,i,n)):(xo(),So(t,e,i)),t=e.child)):(xo(),t=Po(t,e)),t;case 5:return eo(to.current),(i=eo(Ji.current))!==(r=Nr(i,e.type))&&(ui(Zi,e),ui(Ji,r)),null===t&&Eo(e),i=e.type,u=e.memoizedProps,r=e.pendingProps,o=null!==t?t.memoizedProps:null,li.current||u!==r||((u=1&e.mode&&!!r.hidden)&&(e.expirationTime=1073741823),u&&1073741823===n)?(u=r.children,Jr(i,r)?u=null:o&&Jr(i,o)&&(e.effectTag|=16),No(t,e),1073741823!==n&&1&e.mode&&r.hidden?(e.expirationTime=1073741823,e.memoizedProps=r,t=null):(So(t,e,u),e.memoizedProps=r,t=e.child)):t=Po(t,e),t;case 6:return null===t&&Eo(e),e.memoizedProps=e.pendingProps,null;case 16:return null;case 4:return no(e,e.stateNode.containerInfo),i=e.pendingProps,li.current||e.memoizedProps!==i?(null===t?e.child=vo(e,null,i,n):So(t,e,i),e.memoizedProps=i,t=e.child):t=Po(t,e),t;case 14:return i=e.type.render,n=e.pendingProps,r=e.ref,li.current||e.memoizedProps!==n||r!==(null!==t?t.ref:null)?(So(t,e,i=i(n,r)),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 10:return n=e.pendingProps,li.current||e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 11:return n=e.pendingProps.children,li.current||null!==n&&e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 15:return n=e.pendingProps,e.memoizedProps===n?t=Po(t,e):(So(t,e,n.children),e.memoizedProps=n,t=e.child),t;case 13:return function(t,e,n){var r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=!0;if(li.current)a=!1;else if(o===i)return e.stateNode=0,Yi(e),Po(t,e);var s=i.value;if(e.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else{var u=o.value;if(u===s&&(0!==u||1/u==1/s)||u!=u&&s!=s){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else if(s="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,s):1073741823,0==(s|=0)){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e)}else Oo(e,r,s,n)}return e.stateNode=s,Yi(e),So(t,e,i.children),e.child}(t,e,n);case 12:t:if(r=e.type,o=e.pendingProps,u=e.memoizedProps,i=r._currentValue,a=r._changedBits,li.current||0!==a||u!==o){if(e.memoizedProps=o,void 0!==(s=o.unstable_observedBits)&&null!==s||(s=1073741823),e.stateNode=s,0!=(a&s))Oo(e,r,a,n);else if(u===o){t=Po(t,e);break t}n=(n=o.children)(i),e.effectTag|=1,So(t,e,n),t=e.child}else t=Po(t,e);return t;default:h("156")}}function Do(t){t.effectTag|=4}var Mo=void 0,Lo=void 0,Fo=void 0;function Uo(t,e){var n=e.pendingProps;switch(e.tag){case 1:return null;case 2:return vi(e),null;case 3:ro(),mi();var r=e.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(Co(e),e.effectTag&=-3),Mo(e),null;case 5:io(e),r=eo(to.current);var i=e.type;if(null!==t&&null!=e.stateNode){var o=t.memoizedProps,a=e.stateNode,s=eo(Ji.current);a=Hr(a,i,o,n,r),Lo(t,e,a,i,o,n,r,s),t.ref!==e.ref&&(e.effectTag|=128)}else{if(!n)return null===e.stateNode&&h("166"),null;if(t=eo(Ji.current),Co(e))n=e.stateNode,i=e.type,o=e.memoizedProps,n[q]=e,n[V]=o,r=Kr(n,i,o,t,r),e.updateQueue=r,null!==r&&Do(e);else{(t=qr(i,n,r,t))[q]=e,t[V]=n;t:for(o=e.child;null!==o;){if(5===o.tag||6===o.tag)t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}Wr(t,i,n,r),$r(i,n)&&Do(e),e.stateNode=t}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Fo(t,e,t.memoizedProps,n);else{if("string"!=typeof n)return null===e.stateNode&&h("166"),null;r=eo(to.current),eo(Ji.current),Co(e)?(r=e.stateNode,n=e.memoizedProps,r[q]=e,Gr(r,n)&&Do(e)):((r=Vr(n,r))[q]=e,e.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return ro(),Mo(e),null;case 13:return Xi(e),null;case 12:return null;case 0:h("167");default:h("156")}}function jo(t,e){var n=e.source;null===e.stack&&null!==n&&_e(n),null!==n&&be(n),e=e.value,null!==t&&2===t.tag&&be(t);try{e&&e.suppressReactErrorLogging||console.error(e)}catch(t){t&&t.suppressReactErrorLogging||console.error(t)}}function Bo(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){va(t,e)}else e.current=null}function qo(t){switch(Pi(t),t.tag){case 2:Bo(t);var e=t.stateNode;if("function"==typeof e.componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){va(t,e)}break;case 5:Bo(t);break;case 4:Ho(t)}}function Vo(t){return 5===t.tag||3===t.tag||4===t.tag}function Wo(t){t:{for(var e=t.return;null!==e;){if(Vo(e)){var n=e;break t}e=e.return}h("160"),n=void 0}var r=e=void 0;switch(n.tag){case 5:e=n.stateNode,r=!1;break;case 3:case 4:e=n.stateNode.containerInfo,r=!0;break;default:h("161")}16&n.effectTag&&(Pr(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||Vo(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var i=t;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=e,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else e.insertBefore(i.stateNode,n);else r?(o=e,a=i.stateNode,8===o.nodeType?o.parentNode.insertBefore(a,o):o.appendChild(a)):e.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Ho(t){for(var e=t,n=!1,r=void 0,i=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&h("160"),n.tag){case 5:r=n.stateNode,i=!1;break t;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break t}n=n.return}n=!0}if(5===e.tag||6===e.tag){t:for(var o=e,a=o;;)if(qo(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=e.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(e.stateNode)}else if(4===e.tag?r=e.stateNode.containerInfo:qo(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;4===(e=e.return).tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function zo(t,e){switch(e.tag){case 2:break;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps;t=null!==t?t.memoizedProps:r;var i=e.type,o=e.updateQueue;e.updateQueue=null,null!==o&&(n[V]=r,zr(n,o,i,t,r))}break;case 6:null===e.stateNode&&h("162"),e.stateNode.nodeValue=e.memoizedProps;break;case 3:case 15:case 16:break;default:h("163")}}function Ko(t,e,n){(n=Li(n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ja(r),jo(t,e)},n}function Go(t,e,n){(n=Li(n)).tag=3;var r=t.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===la?la=new Set([this]):la.add(this);var n=e.value,r=e.stack;jo(t,e),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Qo(t,e,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=zi(r,n),t=e;do{switch(t.tag){case 3:return t.effectTag|=1024,void ji(t,r=Ko(t,r,o),o);case 2:if(e=r,n=t.stateNode,0==(64&t.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===la||!la.has(n)))return t.effectTag|=1024,void ji(t,r=Go(t,e,o),o)}t=t.return}while(null!==t)}function Yo(t){switch(t.tag){case 2:vi(t);var e=t.effectTag;return 1024&e?(t.effectTag=-1025&e|64,t):null;case 3:return ro(),mi(),1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 5:return io(t),null;case 16:return 1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 4:return ro(),null;case 13:return Xi(t),null;default:return null}}Mo=function(){},Lo=function(t,e,n){(e.updateQueue=n)&&Do(e)},Fo=function(t,e,n,r){n!==r&&Do(e)};var Xo=Zr(),$o=2,Jo=Xo,Zo=0,ta=0,ea=!1,na=null,ra=null,ia=0,oa=-1,aa=!1,sa=null,ua=!1,ca=!1,la=null;function fa(){if(null!==na)for(var t=na.return;null!==t;){var e=t;switch(e.tag){case 2:vi(e);break;case 3:ro(),mi();break;case 5:io(e);break;case 4:ro();break;case 13:Xi(e)}t=t.return}ra=null,ia=0,oa=-1,aa=!1,na=null,ca=!1}function ha(t){for(;;){var e=t.alternate,n=t.return,r=t.sibling;if(0==(512&t.effectTag)){e=Uo(e,t);var i=t;if(1073741823===ia||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==e)return e;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t)),null!==r)return r;if(null===n){ca=!0;break}t=n}else{if(null!==(t=Yo(t)))return t.effectTag&=511,t;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;t=n}}return null}function pa(t){var e=Ro(t.alternate,t,ia);return null===e&&(e=ha(t)),oe.current=null,e}function da(t,e,n){ea&&h("243"),ea=!0,e===ia&&t===ra&&null!==na||(fa(),ia=e,oa=-1,na=Ei((ra=t).current,null,ia),t.pendingCommitExpirationTime=0);var r=!1;for(aa=!n||ia<=$o;;){try{if(n)for(;null!==na&&!$a();)na=pa(na);else for(;null!==na;)na=pa(na)}catch(e){if(null===na)r=!0,Ja(e);else{null===na&&h("271");var i=(n=na).return;if(null===i){r=!0,Ja(e);break}Qo(t,i,n,e,0,ia),na=ha(n)}}break}if(ea=!1,r)return null;if(null===na){if(ca)return t.pendingCommitExpirationTime=e,t.current.alternate;aa&&h("262"),0<=oa&&setTimeout(function(){var e=t.current.expirationTime;0!==e&&(0===t.remainingExpirationTime||t.remainingExpirationTime<e)&&Va(t,e)},oa),function(t){null===ka&&h("246"),ka.remainingExpirationTime=t}(t.current.expirationTime)}return null}function va(t,e){var n;t:{for(ea&&!ua&&h("263"),n=t.return;null!==n;){switch(n.tag){case 2:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===la||!la.has(r))){Ui(n,t=Go(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}break;case 3:Ui(n,t=Ko(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}n=n.return}3===t.tag&&(Ui(t,n=Ko(t,n=zi(e,t),1),1),ga(t,1)),n=void 0}return n}function ma(){var t=2+25*(1+((ba()-2+500)/25|0));return t<=Zo&&(t=Zo+1),Zo=t}function ya(t,e){return t=0!==ta?ta:ea?ua?1:ia:1&e.mode?La?2+10*(1+((t-2+15)/10|0)):2+25*(1+((t-2+500)/25|0)):1,La&&(0===Aa||t>Aa)&&(Aa=t),t}function ga(t,e){for(;null!==t;){if((0===t.expirationTime||t.expirationTime>e)&&(t.expirationTime=e),null!==t.alternate&&(0===t.alternate.expirationTime||t.alternate.expirationTime>e)&&(t.alternate.expirationTime=e),null===t.return){if(3!==t.tag)break;var n=t.stateNode;!ea&&0!==ia&&e<ia&&fa();var r=n.current.expirationTime;ea&&!ua&&ra===n||Va(n,r),ja>Ua&&h("185")}t=t.return}}function ba(){return Jo=Zr()-Xo,$o=2+(Jo/10|0)}function _a(t){var e=ta;ta=2+25*(1+((ba()-2+500)/25|0));try{return t()}finally{ta=e}}function wa(t,e,n,r,i){var o=ta;ta=1;try{return t(e,n,r,i)}finally{ta=o}}var Ea=null,Ta=null,Ca=0,xa=void 0,Sa=!1,ka=null,Na=0,Aa=0,Ia=!1,Oa=!1,Pa=null,Ra=null,Da=!1,Ma=!1,La=!1,Fa=null,Ua=1e3,ja=0,Ba=1;function qa(t){if(0!==Ca){if(t>Ca)return;null!==xa&&ei(xa)}var e=Zr()-Xo;Ca=t,xa=ti(Ha,{timeout:10*(t-2)-e})}function Va(t,e){if(null===t.nextScheduledRoot)t.remainingExpirationTime=e,null===Ta?(Ea=Ta=t,t.nextScheduledRoot=t):(Ta=Ta.nextScheduledRoot=t).nextScheduledRoot=Ea;else{var n=t.remainingExpirationTime;(0===n||e<n)&&(t.remainingExpirationTime=e)}Sa||(Da?Ma&&(ka=t,Na=1,Ya(t,1,!1)):1===e?za():qa(e))}function Wa(){var t=0,e=null;if(null!==Ta)for(var n=Ta,r=Ea;null!==r;){var i=r.remainingExpirationTime;if(0===i){if((null===n||null===Ta)&&h("244"),r===r.nextScheduledRoot){Ea=Ta=r.nextScheduledRoot=null;break}if(r===Ea)Ea=i=r.nextScheduledRoot,Ta.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===Ta){(Ta=n).nextScheduledRoot=Ea,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===t||i<t)&&(t=i,e=r),r===Ta)break;n=r,r=r.nextScheduledRoot}}null!==(n=ka)&&n===e&&1===t?ja++:ja=0,ka=e,Na=t}function Ha(t){Ka(0,!0,t)}function za(){Ka(1,!1,null)}function Ka(t,e,n){if(Ra=n,Wa(),e)for(;null!==ka&&0!==Na&&(0===t||t>=Na)&&(!Ia||ba()>=Na);)ba(),Ya(ka,Na,!Ia),Wa();else for(;null!==ka&&0!==Na&&(0===t||t>=Na);)Ya(ka,Na,!1),Wa();null!==Ra&&(Ca=0,xa=null),0!==Na&&qa(Na),Ra=null,Ia=!1,Qa()}function Ga(t,e){Sa&&h("253"),ka=t,Na=e,Ya(t,e,!1),za(),Qa()}function Qa(){if(ja=0,null!==Fa){var t=Fa;Fa=null;for(var e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){Oa||(Oa=!0,Pa=t)}}}if(Oa)throw t=Pa,Pa=null,Oa=!1,t}function Ya(t,e,n){Sa&&h("245"),Sa=!0,n?null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!0))&&($a()?t.finishedWork=n:Xa(t,n,e)):null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!1))&&Xa(t,n,e),Sa=!1}function Xa(t,e,n){var r=t.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Fa?Fa=[r]:Fa.push(r),r._defer))return t.finishedWork=e,void(t.remainingExpirationTime=0);if(t.finishedWork=null,ua=ea=!0,(n=e.stateNode).current===e&&h("177"),0===(r=n.pendingCommitExpirationTime)&&h("261"),n.pendingCommitExpirationTime=0,ba(),oe.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var i=e.firstEffect}else i=e;else i=e.firstEffect;Yr=An;var o=u();if(Vn(o)){if("selectionStart"in o)var a={start:o.selectionStart,end:o.selectionEnd};else t:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){a=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch(t){a=null;break t}var p=0,d=-1,v=-1,m=0,y=0,g=o,b=null;e:for(;;){for(var _;g!==a||0!==c&&3!==g.nodeType||(d=p+c),g!==f||0!==s&&3!==g.nodeType||(v=p+s),3===g.nodeType&&(p+=g.nodeValue.length),null!==(_=g.firstChild);)b=g,g=_;for(;;){if(g===o)break e;if(b===a&&++m===c&&(d=p),b===f&&++y===s&&(v=p),null!==(_=g.nextSibling))break;b=(g=b).parentNode}g=_}a=-1===d||-1===v?null:{start:d,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xr={focusedElem:o,selectionRange:a},In(!1),sa=i;null!==sa;){o=!1,a=void 0;try{for(;null!==sa;){if(256&sa.effectTag){var w=sa.alternate;switch((c=sa).tag){case 2:if(256&c.effectTag&&null!==w){var E=w.memoizedProps,T=w.memoizedState,C=c.stateNode;C.props=c.memoizedProps,C.state=c.memoizedState;var x=C.getSnapshotBeforeUpdate(E,T);C.__reactInternalSnapshotBeforeUpdate=x}break;case 3:case 5:case 6:case 4:break;default:h("163")}}sa=sa.nextEffect}}catch(t){o=!0,a=t}o&&(null===sa&&h("178"),va(sa,a),null!==sa&&(sa=sa.nextEffect))}for(sa=i;null!==sa;){w=!1,E=void 0;try{for(;null!==sa;){var S=sa.effectTag;if(16&S&&Pr(sa.stateNode,""),128&S){var k=sa.alternate;if(null!==k){var N=k.ref;null!==N&&("function"==typeof N?N(null):N.current=null)}}switch(14&S){case 2:Wo(sa),sa.effectTag&=-3;break;case 6:Wo(sa),sa.effectTag&=-3,zo(sa.alternate,sa);break;case 4:zo(sa.alternate,sa);break;case 8:Ho(T=sa),T.return=null,T.child=null,T.alternate&&(T.alternate.child=null,T.alternate.return=null)}sa=sa.nextEffect}}catch(t){w=!0,E=t}w&&(null===sa&&h("178"),va(sa,E),null!==sa&&(sa=sa.nextEffect))}if(N=Xr,k=u(),S=N.focusedElem,w=N.selectionRange,k!==S&&l(document.documentElement,S)){null!==w&&Vn(S)&&(k=w.start,void 0===(N=w.end)&&(N=k),"selectionStart"in S?(S.selectionStart=k,S.selectionEnd=Math.min(N,S.value.length)):window.getSelection&&(k=window.getSelection(),E=S[dt()].length,N=Math.min(w.start,E),w=void 0===w.end?N:Math.min(w.end,E),!k.extend&&N>w&&(E=w,w=N,N=E),E=qn(S,N),T=qn(S,w),E&&T&&(1!==k.rangeCount||k.anchorNode!==E.node||k.anchorOffset!==E.offset||k.focusNode!==T.node||k.focusOffset!==T.offset)&&((C=document.createRange()).setStart(E.node,E.offset),k.removeAllRanges(),N>w?(k.addRange(C),k.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),k.addRange(C))))),k=[];for(N=S;N=N.parentNode;)1===N.nodeType&&k.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"==typeof S.focus&&S.focus(),S=0;S<k.length;S++)(N=k[S]).element.scrollLeft=N.left,N.element.scrollTop=N.top}for(Xr=null,In(Yr),Yr=null,n.current=e,sa=i;null!==sa;){i=!1,S=void 0;try{for(k=r;null!==sa;){var A=sa.effectTag;if(36&A){var I=sa.alternate;switch(w=k,(N=sa).tag){case 2:var O=N.stateNode;if(4&N.effectTag)if(null===I)O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidMount();else{var P=I.memoizedProps,R=I.memoizedState;O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidUpdate(P,R,O.__reactInternalSnapshotBeforeUpdate)}var D=N.updateQueue;null!==D&&(O.props=N.memoizedProps,O.state=N.memoizedState,Hi(N,D,O));break;case 3:var M=N.updateQueue;if(null!==M){if(E=null,null!==N.child)switch(N.child.tag){case 5:E=N.child.stateNode;break;case 2:E=N.child.stateNode}Hi(N,M,E)}break;case 5:var L=N.stateNode;null===I&&4&N.effectTag&&$r(N.type,N.memoizedProps)&&L.focus();break;case 6:case 4:case 15:case 16:break;default:h("163")}}if(128&A){N=void 0;var F=sa.ref;if(null!==F){var U=sa.stateNode;switch(sa.tag){case 5:N=U;break;default:N=U}"function"==typeof F?F(N):F.current=N}}var j=sa.nextEffect;sa.nextEffect=null,sa=j}}catch(t){i=!0,S=t}i&&(null===sa&&h("178"),va(sa,S),null!==sa&&(sa=sa.nextEffect))}ea=ua=!1,Oi(e.stateNode),0===(e=n.current.expirationTime)&&(la=null),t.remainingExpirationTime=e}function $a(){return!(null===Ra||Ra.timeRemaining()>Ba)&&(Ia=!0)}function Ja(t){null===ka&&h("246"),ka.remainingExpirationTime=0,Oa||(Oa=!0,Pa=t)}function Za(t,e){var n=Da;Da=!0;try{return t(e)}finally{(Da=n)||Sa||za()}}function ts(t,e){if(Da&&!Ma){Ma=!0;try{return t(e)}finally{Ma=!1}}return t(e)}function es(t,e){Sa&&h("187");var n=Da;Da=!0;try{return wa(t,e)}finally{Da=n,za()}}function ns(t,e,n){if(La)return t(e,n);Da||Sa||0===Aa||(Ka(Aa,!1,null),Aa=0);var r=La,i=Da;Da=La=!0;try{return t(e,n)}finally{La=r,(Da=i)||Sa||za()}}function rs(t){var e=Da;Da=!0;try{wa(t)}finally{(Da=e)||Sa||Ka(1,!1,null)}}function is(t,e,n,r,i){var o=e.current;if(n){var a;n=n._reactInternalFiber;t:{for(2===an(n)&&2===n.tag||h("170"),a=n;3!==a.tag;){if(di(a)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}(a=a.return)||h("171")}a=a.stateNode.context}n=di(n)?gi(n,a):a}else n=f;return null===e.context?e.context=n:e.pendingContext=n,e=i,(i=Li(r)).payload={element:t},null!==(e=void 0===e?null:e)&&(i.callback=e),Ui(o,i,r),ga(o,r),r}function os(t){var e=t._reactInternalFiber;return void 0===e&&("function"==typeof t.render?h("188"):h("268",Object.keys(t))),null===(t=cn(e))?null:t.stateNode}function as(t,e,n,r){var i=e.current;return is(t,e,n,i=ya(ba(),i),r)}function ss(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function us(t){var e=t.findFiberByHostInstance;return function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);Ni=Ii(function(t){return e.onCommitFiberRoot(n,t)}),Ai=Ii(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0}(a({},t,{findHostInstanceByFiber:function(t){return null===(t=cn(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}var cs=Za,ls=ns,fs=function(){Sa||0===Aa||(Ka(Aa,!1,null),Aa=0)};function hs(t){this._expirationTime=ma(),this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function ps(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ds(t,e,n){this._internalRoot=ki(t,e,n)}function vs(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function ms(t,e,n,r,i){vs(n)||h("200");var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var t=ss(o._internalRoot);a.call(t)}}null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ds(t,!1,e)}(n,r),"function"==typeof i){var s=i;i=function(){var t=ss(o._internalRoot);s.call(t)}}ts(function(){null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)})}return ss(o._internalRoot)}function ys(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return vs(e)||h("200"),function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ue,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}(t,e,null,n)}jt.injectFiberControlledHostComponent(Qr),hs.prototype.render=function(t){this._defer||h("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,r=new ps;return is(t,e,null,n,r._onCommit),r},hs.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},hs.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||h("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var r=null,i=e;i!==this;)r=i,i=i._next;null===r&&h("251"),r._next=i._next,this._next=e,t.firstBatch=this}this._defer=!1,Ga(t,n),e=this._next,this._next=null,null!==(e=t.firstBatch=e)&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},hs.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},ps.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},ps.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!=typeof n&&h("191",n),n()}}},ds.prototype.render=function(t,e){var n=this._internalRoot,r=new ps;return null!==(e=void 0===e?null:e)&&r.then(e),as(t,n,null,r._onCommit),r},ds.prototype.unmount=function(t){var e=this._internalRoot,n=new ps;return null!==(t=void 0===t?null:t)&&n.then(t),as(null,e,null,n._onCommit),n},ds.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var r=this._internalRoot,i=new ps;return null!==(n=void 0===n?null:n)&&i.then(n),as(e,r,t,i._onCommit),i},ds.prototype.createBatch=function(){var t=new hs(this),e=t._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=t,t._next=null;else{for(n=null;null!==r&&r._expirationTime<=e;)n=r,r=r._next;t._next=r,null!==n&&(n._next=t)}return t},Gt=cs,Qt=ls,Yt=fs;var gs={createPortal:ys,findDOMNode:function(t){return null==t?null:1===t.nodeType?t:os(t)},hydrate:function(t,e,n){return ms(null,t,e,!0,n)},render:function(t,e,n){return ms(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,r){return(null==t||void 0===t._reactInternalFiber)&&h("38"),ms(t,e,n,!1,r)},unmountComponentAtNode:function(t){return vs(t)||h("40"),!!t._reactRootContainer&&(ts(function(){ms(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return ys.apply(void 0,arguments)},unstable_batchedUpdates:Za,unstable_deferredUpdates:_a,unstable_interactiveUpdates:ns,flushSync:es,unstable_flushControlled:rs,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:j,EventPluginRegistry:C,EventPropagators:nt,ReactControlledComponent:Kt,ReactDOMComponentTree:K,ReactDOMEventListener:Mn},unstable_createRoot:function(t,e){return new ds(t,!0,null!=e&&!0===e.hydrate)}};us({findFiberByHostInstance:W,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});var bs={default:gs},_s=bs&&gs||bs;t.exports=_s.default?_s.default:_s},function(t,e,n){"use strict";
+
*/var r=n(186),i=n(0),o=n(563),a=n(266),s=n(185),u=n(562),c=n(190),l=n(561),f=n(265);function h(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}i||h("227");var p={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(t,e,n,r,i,o,a,s,u){(function(t,e,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(t){this._caughtError=t,this._hasCaughtError=!0}}).apply(p,arguments)},invokeGuardedCallbackAndCatchFirstError:function(t,e,n,r,i,o,a,s,u){if(p.invokeGuardedCallback.apply(this,arguments),p.hasCaughtError()){var c=p.clearCaughtError();p._hasRethrowError||(p._hasRethrowError=!0,p._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(p._hasRethrowError){var t=p._rethrowError;throw p._rethrowError=null,p._hasRethrowError=!1,t}}.apply(p,arguments)},hasCaughtError:function(){return p._hasCaughtError},clearCaughtError:function(){if(p._hasCaughtError){var t=p._caughtError;return p._caughtError=null,p._hasCaughtError=!1,t}h("198")}};var d=null,v={};function m(){if(d)for(var t in v){var e=v[t],n=d.indexOf(t);if(-1<n||h("96",t),!g[n])for(var r in e.extractEvents||h("97",t),g[n]=e,n=e.eventTypes){var i=void 0,o=n[r],a=e,s=r;b.hasOwnProperty(s)&&h("99",s),b[s]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&y(u[i],a,s);i=!0}else o.registrationName?(y(o.registrationName,a,s),i=!0):i=!1;i||h("98",r,t)}}}function y(t,e,n){_[t]&&h("100",t),_[t]=e,w[t]=e.eventTypes[n].dependencies}var g=[],b={},_={},w={};function E(t){d&&h("101"),d=Array.prototype.slice.call(t),m()}function T(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];v.hasOwnProperty(e)&&v[e]===r||(v[e]&&h("102",e),v[e]=r,n=!0)}n&&m()}var C={plugins:g,eventNameDispatchConfigs:b,registrationNameModules:_,registrationNameDependencies:w,possibleRegistrationNames:null,injectEventPluginOrder:E,injectEventPluginsByName:T},x=null,S=null,k=null;function N(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=k(r),p.invokeGuardedCallbackAndCatchFirstError(e,n,void 0,t),t.currentTarget=null}function A(t,e){return null==e&&h("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function I(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var O=null;function P(t,e){if(t){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)N(t,e,n[i],r[i]);else n&&N(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function R(t){return P(t,!0)}function D(t){return P(t,!1)}var M={injectEventPluginOrder:E,injectEventPluginsByName:T};function L(t,e){var n=t.stateNode;if(!n)return null;var r=x(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}return t?null:(n&&"function"!=typeof n&&h("231",e,typeof n),n)}function F(t,e){null!==t&&(O=A(O,t)),t=O,O=null,t&&(I(t,e?R:D),O&&h("95"),p.rethrowCaughtError())}function U(t,e,n,r){for(var i=null,o=0;o<g.length;o++){var a=g[o];a&&(a=a.extractEvents(t,e,n,r))&&(i=A(i,a))}F(i,!1)}var j={injection:M,getListener:L,runEventsInBatch:F,runExtractedEventsInBatch:U},B=Math.random().toString(36).slice(2),q="__reactInternalInstance$"+B,V="__reactEventHandlers$"+B;function W(t){if(t[q])return t[q];for(;!t[q];){if(!t.parentNode)return null;t=t.parentNode}return 5===(t=t[q]).tag||6===t.tag?t:null}function H(t){if(5===t.tag||6===t.tag)return t.stateNode;h("33")}function z(t){return t[V]||null}var K={precacheFiberNode:function(t,e){e[q]=t},getClosestInstanceFromNode:W,getInstanceFromNode:function(t){return!(t=t[q])||5!==t.tag&&6!==t.tag?null:t},getNodeFromInstance:H,getFiberCurrentPropsFromNode:z,updateFiberProps:function(t,e){t[V]=e}};function G(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Q(t,e,n){for(var r=[];t;)r.push(t),t=G(t);for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)}function Y(t,e,n){(e=L(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function X(t){t&&t.dispatchConfig.phasedRegistrationNames&&Q(t._targetInst,Y,t)}function $(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst;Q(e=e?G(e):null,Y,t)}}function J(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=L(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function Z(t){t&&t.dispatchConfig.registrationName&&J(t._targetInst,null,t)}function tt(t){I(t,X)}function et(t,e,n,r){if(n&&r)t:{for(var i=n,o=r,a=0,s=i;s;s=G(s))a++;s=0;for(var u=o;u;u=G(u))s++;for(;0<a-s;)i=G(i),a--;for(;0<s-a;)o=G(o),s--;for(;a--;){if(i===o||i===o.alternate)break t;i=G(i),o=G(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=G(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=G(r);for(r=0;r<i.length;r++)J(i[r],"bubbled",t);for(t=n.length;0<t--;)J(n[t],"captured",e)}var nt={accumulateTwoPhaseDispatches:tt,accumulateTwoPhaseDispatchesSkipTarget:function(t){I(t,$)},accumulateEnterLeaveDispatches:et,accumulateDirectDispatches:function(t){I(t,Z)}};function rt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}var it={animationend:rt("Animation","AnimationEnd"),animationiteration:rt("Animation","AnimationIteration"),animationstart:rt("Animation","AnimationStart"),transitionend:rt("Transition","TransitionEnd")},ot={},at={};function st(t){if(ot[t])return ot[t];if(!it[t])return t;var e,n=it[t];for(e in n)if(n.hasOwnProperty(e)&&e in at)return ot[t]=n[e];return t}o.canUseDOM&&(at=document.createElement("div").style,"AnimationEvent"in window||(delete it.animationend.animation,delete it.animationiteration.animation,delete it.animationstart.animation),"TransitionEvent"in window||delete it.transitionend.transition);var ut=st("animationend"),ct=st("animationiteration"),lt=st("animationstart"),ft=st("transitionend"),ht="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pt=null;function dt(){return!pt&&o.canUseDOM&&(pt="textContent"in document.documentElement?"textContent":"innerText"),pt}var vt={_root:null,_startText:null,_fallbackText:null};function mt(){if(vt._fallbackText)return vt._fallbackText;var t,e,n=vt._startText,r=n.length,i=yt(),o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return vt._fallbackText=i.slice(t,1<e?1-e:void 0),vt._fallbackText}function yt(){return"value"in vt._root?vt._root.value:vt._root[dt()]}var gt="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),bt={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function _t(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}function wt(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Et(t){t instanceof this||h("223"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Tt(t){t.eventPool=[],t.getPooled=wt,t.release=Et}a(_t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;for(e=0;e<gt.length;e++)this[gt[e]]=null}}),_t.Interface=bt,_t.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return a(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=a({},r.Interface,t),n.extend=r.extend,Tt(n),n},Tt(_t);var Ct=_t.extend({data:null}),xt=_t.extend({data:null}),St=[9,13,27,32],kt=o.canUseDOM&&"CompositionEvent"in window,Nt=null;o.canUseDOM&&"documentMode"in document&&(Nt=document.documentMode);var At=o.canUseDOM&&"TextEvent"in window&&!Nt,It=o.canUseDOM&&(!kt||Nt&&8<Nt&&11>=Nt),Ot=String.fromCharCode(32),Pt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Rt=!1;function Dt(t,e){switch(t){case"keyup":return-1!==St.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Mt(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Lt=!1;var Ft={eventTypes:Pt,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(kt)t:{switch(t){case"compositionstart":i=Pt.compositionStart;break t;case"compositionend":i=Pt.compositionEnd;break t;case"compositionupdate":i=Pt.compositionUpdate;break t}i=void 0}else Lt?Dt(t,n)&&(i=Pt.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=Pt.compositionStart);return i?(It&&(Lt||i!==Pt.compositionStart?i===Pt.compositionEnd&&Lt&&(o=mt()):(vt._root=r,vt._startText=yt(),Lt=!0)),i=Ct.getPooled(i,e,n,r),o?i.data=o:null!==(o=Mt(n))&&(i.data=o),tt(i),o=i):o=null,(t=At?function(t,e){switch(t){case"compositionend":return Mt(e);case"keypress":return 32!==e.which?null:(Rt=!0,Ot);case"textInput":return(t=e.data)===Ot&&Rt?null:t;default:return null}}(t,n):function(t,e){if(Lt)return"compositionend"===t||!kt&&Dt(t,e)?(t=mt(),vt._root=null,vt._startText=null,vt._fallbackText=null,Lt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return It?null:e.data;default:return null}}(t,n))?((e=xt.getPooled(Pt.beforeInput,e,n,r)).data=t,tt(e)):e=null,null===o?e:null===e?o:[o,e]}},Ut=null,jt={injectFiberControlledHostComponent:function(t){Ut=t}},Bt=null,qt=null;function Vt(t){if(t=S(t)){Ut&&"function"==typeof Ut.restoreControlledState||h("194");var e=x(t.stateNode);Ut.restoreControlledState(t.stateNode,t.type,e)}}function Wt(t){Bt?qt?qt.push(t):qt=[t]:Bt=t}function Ht(){return null!==Bt||null!==qt}function zt(){if(Bt){var t=Bt,e=qt;if(qt=Bt=null,Vt(t),e)for(t=0;t<e.length;t++)Vt(e[t])}}var Kt={injection:jt,enqueueStateRestore:Wt,needsStateRestore:Ht,restoreStateIfNeeded:zt};function Gt(t,e){return t(e)}function Qt(t,e,n){return t(e,n)}function Yt(){}var Xt=!1;function $t(t,e){if(Xt)return t(e);Xt=!0;try{return Gt(t,e)}finally{Xt=!1,Ht()&&(Yt(),zt())}}var Jt={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zt(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Jt[t.type]:"textarea"===e}function te(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ee(t,e){return!(!o.canUseDOM||e&&!("addEventListener"in document))&&((e=(t="on"+t)in document)||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"==typeof e[t]),e)}function ne(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function re(t){t._valueTracker||(t._valueTracker=function(t){var e=ne(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function ie(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ne(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}var oe=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ae="function"==typeof Symbol&&Symbol.for,se=ae?Symbol.for("react.element"):60103,ue=ae?Symbol.for("react.portal"):60106,ce=ae?Symbol.for("react.fragment"):60107,le=ae?Symbol.for("react.strict_mode"):60108,fe=ae?Symbol.for("react.profiler"):60114,he=ae?Symbol.for("react.provider"):60109,pe=ae?Symbol.for("react.context"):60110,de=ae?Symbol.for("react.async_mode"):60111,ve=ae?Symbol.for("react.forward_ref"):60112,me=ae?Symbol.for("react.timeout"):60113,ye="function"==typeof Symbol&&Symbol.iterator;function ge(t){return null===t||void 0===t?null:"function"==typeof(t=ye&&t[ye]||t["@@iterator"])?t:null}function be(t){var e=t.type;if("function"==typeof e)return e.displayName||e.name;if("string"==typeof e)return e;switch(e){case de:return"AsyncMode";case pe:return"Context.Consumer";case ce:return"ReactFragment";case ue:return"ReactPortal";case fe:return"Profiler("+t.pendingProps.id+")";case he:return"Context.Provider";case le:return"StrictMode";case me:return"Timeout"}if("object"==typeof e&&null!==e)switch(e.$$typeof){case ve:return""!==(t=e.render.displayName||e.render.name||"")?"ForwardRef("+t+")":"ForwardRef"}return null}function _e(t){var e="";do{t:switch(t.tag){case 0:case 1:case 2:case 5:var n=t._debugOwner,r=t._debugSource,i=be(t),o=null;n&&(o=be(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break t;default:i=""}e+=i,t=t.return}while(t);return e}var we=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ee={},Te={};function Ce(t,e,n,r,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xe[t]=new Ce(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xe[e]=new Ce(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){xe[t]=new Ce(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(t){xe[t]=new Ce(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){xe[t]=new Ce(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){xe[t]=new Ce(t,3,!0,t.toLowerCase(),null)}),["capture","download"].forEach(function(t){xe[t]=new Ce(t,4,!1,t.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(t){xe[t]=new Ce(t,6,!1,t.toLowerCase(),null)}),["rowSpan","start"].forEach(function(t){xe[t]=new Ce(t,5,!1,t.toLowerCase(),null)});var Se=/[\-:]([a-z])/g;function ke(t){return t[1].toUpperCase()}function Ne(t,e,n,r){var i=xe.hasOwnProperty(e)?xe[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||void 0===e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!Te.hasOwnProperty(t)||!Ee.hasOwnProperty(t)&&(we.test(t)?Te[t]=!0:(Ee[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function Ae(t,e){var n=e.checked;return a({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Ie(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=Me(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Oe(t,e){null!=(e=e.checked)&&Ne(t,"checked",e,!1)}function Pe(t,e){Oe(t,e);var n=Me(e.value);null!=n&&("number"===e.type?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n)),e.hasOwnProperty("value")?De(t,e.type,n):e.hasOwnProperty("defaultValue")&&De(t,e.type,Me(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Re(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){e=""+t._wrapperState.initialValue;var r=t.value;n||e===r||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!t.defaultChecked,""!==n&&(t.name=n)}function De(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Me(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),xe.tabIndex=new Ce("tabIndex",1,!1,"tabindex",null);var Le={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Fe(t,e,n){return(t=_t.getPooled(Le.change,t,e,n)).type="change",Wt(n),tt(t),t}var Ue=null,je=null;function Be(t){F(t,!1)}function qe(t){if(ie(H(t)))return t}function Ve(t,e){if("change"===t)return e}var We=!1;function He(){Ue&&(Ue.detachEvent("onpropertychange",ze),je=Ue=null)}function ze(t){"value"===t.propertyName&&qe(je)&&$t(Be,t=Fe(je,t,te(t)))}function Ke(t,e,n){"focus"===t?(He(),je=n,(Ue=e).attachEvent("onpropertychange",ze)):"blur"===t&&He()}function Ge(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return qe(je)}function Qe(t,e){if("click"===t)return qe(e)}function Ye(t,e){if("input"===t||"change"===t)return qe(e)}o.canUseDOM&&(We=ee("input")&&(!document.documentMode||9<document.documentMode));var Xe={eventTypes:Le,_isInputEventSupported:We,extractEvents:function(t,e,n,r){var i=e?H(e):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Ve:Zt(i)?We?o=Ye:(o=Ge,a=Ke):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Qe),o&&(o=o(t,e)))return Fe(o,n,r);a&&a(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&De(i,"number",i.value)}},$e=_t.extend({view:null,detail:null}),Je={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ze(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Je[t])&&!!e[t]}function tn(){return Ze}var en=$e.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tn,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)}}),nn=en.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),rn={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},on={eventTypes:rn,extractEvents:function(t,e,n,r){var i="mouseover"===t||"pointerover"===t,o="mouseout"===t||"pointerout"===t;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=e,e=(e=n.relatedTarget||n.toElement)?W(e):null):o=null,o===e)return null;var a=void 0,s=void 0,u=void 0,c=void 0;return"mouseout"===t||"mouseover"===t?(a=en,s=rn.mouseLeave,u=rn.mouseEnter,c="mouse"):"pointerout"!==t&&"pointerover"!==t||(a=nn,s=rn.pointerLeave,u=rn.pointerEnter,c="pointer"),t=null==o?i:H(o),i=null==e?i:H(e),(s=a.getPooled(s,o,n,r)).type=c+"leave",s.target=t,s.relatedTarget=i,(n=a.getPooled(u,e,n,r)).type=c+"enter",n.target=i,n.relatedTarget=t,et(s,n,o,e),[s,n]}};function an(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!=(2&e.effectTag))return 1;for(;e.return;)if(0!=(2&(e=e.return).effectTag))return 1}return 3===e.tag?2:3}function sn(t){2!==an(t)&&h("188")}function un(t){var e=t.alternate;if(!e)return 3===(e=an(t))&&h("188"),1===e?null:t;for(var n=t,r=e;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return sn(i),t;if(a===r)return sn(i),e;a=a.sibling}h("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||h("189")}}n.alternate!==r&&h("190")}return 3!==n.tag&&h("188"),n.stateNode.current===n?t:e}function cn(t){if(!(t=un(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}var ln=_t.extend({animationName:null,elapsedTime:null,pseudoElement:null}),fn=_t.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),hn=$e.extend({relatedTarget:null});function pn(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var dn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn=$e.extend({key:function(t){if(t.key){var e=dn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=pn(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?vn[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tn,charCode:function(t){return"keypress"===t.type?pn(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?pn(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),yn=en.extend({dataTransfer:null}),gn=$e.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tn}),bn=_t.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),_n=en.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),wn=[["abort","abort"],[ut,"animationEnd"],[ct,"animationIteration"],[lt,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ft,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],En={},Tn={};function Cn(t,e){var n=t[0],r="on"+((t=t[1])[0].toUpperCase()+t.slice(1));e={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:e},En[t]=e,Tn[n]=e}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(t){Cn(t,!0)}),wn.forEach(function(t){Cn(t,!1)});var xn={eventTypes:En,isInteractiveTopLevelEventType:function(t){return void 0!==(t=Tn[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,r){var i=Tn[t];if(!i)return null;switch(t){case"keypress":if(0===pn(n))return null;case"keydown":case"keyup":t=mn;break;case"blur":case"focus":t=hn;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=en;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=gn;break;case ut:case ct:case lt:t=ln;break;case ft:t=bn;break;case"scroll":t=$e;break;case"wheel":t=_n;break;case"copy":case"cut":case"paste":t=fn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=nn;break;default:t=_t}return tt(e=t.getPooled(i,e,n,r)),e}},Sn=xn.isInteractiveTopLevelEventType,kn=[];function Nn(t){var e=t.targetInst;do{if(!e){t.ancestors.push(e);break}var n;for(n=e;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;t.ancestors.push(e),e=W(n)}while(e);for(n=0;n<t.ancestors.length;n++)e=t.ancestors[n],U(t.topLevelType,e,t.nativeEvent,te(t.nativeEvent))}var An=!0;function In(t){An=!!t}function On(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!1)}function Pn(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!0)}function Rn(t,e){Qt(Dn,t,e)}function Dn(t,e){if(An){var n=te(e);if(null===(n=W(n))||"number"!=typeof n.tag||2===an(n)||(n=null),kn.length){var r=kn.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{$t(Nn,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>kn.length&&kn.push(t)}}}var Mn={get _enabled(){return An},setEnabled:In,isEnabled:function(){return An},trapBubbledEvent:On,trapCapturedEvent:Pn,dispatchEvent:Dn},Ln={},Fn=0,Un="_reactListenersID"+(""+Math.random()).slice(2);function jn(t){return Object.prototype.hasOwnProperty.call(t,Un)||(t[Un]=Fn++,Ln[t[Un]]={}),Ln[t[Un]]}function Bn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qn(t,e){var n,r=Bn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=Bn(r)}}function Vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var Wn=o.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Hn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},zn=null,Kn=null,Gn=null,Qn=!1;function Yn(t,e){if(Qn||null==zn||zn!==u())return null;var n=zn;return"selectionStart"in n&&Vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Gn&&c(Gn,n)?null:(Gn=n,(t=_t.getPooled(Hn.select,Kn,t,e)).type="select",t.target=zn,tt(t),t)}var Xn={eventTypes:Hn,extractEvents:function(t,e,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){t:{o=jn(o),i=w.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break t}}o=!0}i=!o}if(i)return null;switch(o=e?H(e):window,t){case"focus":(Zt(o)||"true"===o.contentEditable)&&(zn=o,Kn=e,Gn=null);break;case"blur":Gn=Kn=zn=null;break;case"mousedown":Qn=!0;break;case"contextmenu":case"mouseup":return Qn=!1,Yn(n,r);case"selectionchange":if(Wn)break;case"keydown":case"keyup":return Yn(n,r)}return null}};M.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=K.getFiberCurrentPropsFromNode,S=K.getInstanceFromNode,k=K.getNodeFromInstance,M.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:on,ChangeEventPlugin:Xe,SelectEventPlugin:Xn,BeforeInputEventPlugin:Ft});var $n="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Jn=Date,Zn=setTimeout,tr=clearTimeout,er=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var nr=performance;er=function(){return nr.now()}}else er=function(){return Jn.now()};var rr=void 0,ir=void 0;if(o.canUseDOM){var or="function"==typeof $n?$n:function(){h("276")},ar=null,sr=null,ur=-1,cr=!1,lr=!1,fr=0,hr=33,pr=33,dr={didTimeout:!1,timeRemaining:function(){var t=fr-er();return 0<t?t:0}},vr=function(t,e){var n=t.scheduledCallback,r=!1;try{n(e),r=!0}finally{ir(t),r||(cr=!0,window.postMessage(mr,"*"))}},mr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){if(t.source===window&&t.data===mr&&(cr=!1,null!==ar)){if(null!==ar){var e=er();if(!(-1===ur||ur>e)){t=-1;for(var n=[],r=ar;null!==r;){var i=r.timeoutTime;-1!==i&&i<=e?n.push(r):-1!==i&&(-1===t||i<t)&&(t=i),r=r.next}if(0<n.length)for(dr.didTimeout=!0,e=0,r=n.length;e<r;e++)vr(n[e],dr);ur=t}}for(t=er();0<fr-t&&null!==ar;)t=ar,dr.didTimeout=!1,vr(t,dr),t=er();null===ar||lr||(lr=!0,or(yr))}},!1);var yr=function(t){lr=!1;var e=t-fr+pr;e<pr&&hr<pr?(8>e&&(e=8),pr=e<hr?hr:e):hr=e,fr=t+pr,cr||(cr=!0,window.postMessage(mr,"*"))};rr=function(t,e){var n=-1;return null!=e&&"number"==typeof e.timeout&&(n=er()+e.timeout),(-1===ur||-1!==n&&n<ur)&&(ur=n),t={scheduledCallback:t,timeoutTime:n,prev:null,next:null},null===ar?ar=t:null!==(e=t.prev=sr)&&(e.next=t),sr=t,lr||(lr=!0,or(yr)),t},ir=function(t){if(null!==t.prev||ar===t){var e=t.next,n=t.prev;t.next=null,t.prev=null,null!==e?null!==n?(n.next=e,e.prev=n):(e.prev=null,ar=e):null!==n?(n.next=null,sr=n):sr=ar=null}}}else{var gr=new Map;rr=function(t){var e={scheduledCallback:t,timeoutTime:0,next:null,prev:null},n=Zn(function(){t({timeRemaining:function(){return 1/0},didTimeout:!1})});return gr.set(t,n),e},ir=function(t){var e=gr.get(t.scheduledCallback);gr.delete(t),tr(e)}}function br(t,e){return t=a({children:void 0},e),(e=function(t){var e="";return i.Children.forEach(t,function(t){null==t||"string"!=typeof t&&"number"!=typeof t||(e+=t)}),e}(e.children))&&(t.children=e),t}function _r(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+n,e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function wr(t,e){var n=e.value;t._wrapperState={initialValue:null!=n?n:e.defaultValue,wasMultiple:!!e.multiple}}function Er(t,e){return null!=e.dangerouslySetInnerHTML&&h("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Tr(t,e){var n=e.value;null==n&&(n=e.defaultValue,null!=(e=e.children)&&(null!=n&&h("92"),Array.isArray(e)&&(1>=e.length||h("93"),e=e[0]),n=""+e),null==n&&(n="")),t._wrapperState={initialValue:""+n}}function Cr(t,e){var n=e.value;null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&(t.defaultValue=n)),null!=e.defaultValue&&(t.defaultValue=e.defaultValue)}function xr(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}var Sr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function kr(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nr(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?kr(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ar,Ir=void 0,Or=(Ar=function(t,e){if(t.namespaceURI!==Sr.svg||"innerHTML"in t)t.innerHTML=e;else{for((Ir=Ir||document.createElement("div")).innerHTML="<svg>"+e+"</svg>",e=Ir.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction(function(){return Ar(t,e)})}:Ar);function Pr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dr=["Webkit","ms","Moz","O"];function Mr(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=e[n];i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||Rr.hasOwnProperty(i)&&Rr[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(Rr).forEach(function(t){Dr.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Rr[e]=Rr[t]})});var Lr=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fr(t,e,n){e&&(Lr[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&h("137",t,n()),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&h("60"),"object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||h("61")),null!=e.style&&"object"!=typeof e.style&&h("62",n()))}function Ur(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jr=s.thatReturns("");function Br(t,e){var n=jn(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=w[e];for(var r=0;r<e.length;r++){var i=e[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Pn("scroll",t);break;case"focus":case"blur":Pn("focus",t),Pn("blur",t),n.blur=!0,n.focus=!0;break;case"cancel":case"close":ee(i,!0)&&Pn(i,t);break;case"invalid":case"submit":case"reset":break;default:-1===ht.indexOf(i)&&On(i,t)}n[i]=!0}}}function qr(t,e,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Sr.html&&(r=kr(t)),r===Sr.html?"script"===t?((t=n.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):t="string"==typeof e.is?n.createElement(t,{is:e.is}):n.createElement(t):t=n.createElementNS(r,t),t}function Vr(t,e){return(9===e.nodeType?e:e.ownerDocument).createTextNode(t)}function Wr(t,e,n,r){var i=Ur(e,n);switch(e){case"iframe":case"object":On("load",t);var o=n;break;case"video":case"audio":for(o=0;o<ht.length;o++)On(ht[o],t);o=n;break;case"source":On("error",t),o=n;break;case"img":case"image":case"link":On("error",t),On("load",t),o=n;break;case"form":On("reset",t),On("submit",t),o=n;break;case"details":On("toggle",t),o=n;break;case"input":Ie(t,n),o=Ae(t,n),On("invalid",t),Br(r,"onChange");break;case"option":o=br(t,n);break;case"select":wr(t,n),o=a({},n,{value:void 0}),On("invalid",t),Br(r,"onChange");break;case"textarea":Tr(t,n),o=Er(t,n),On("invalid",t),Br(r,"onChange");break;default:o=n}Fr(e,o,jr);var u,c=o;for(u in c)if(c.hasOwnProperty(u)){var l=c[u];"style"===u?Mr(t,l):"dangerouslySetInnerHTML"===u?null!=(l=l?l.__html:void 0)&&Or(t,l):"children"===u?"string"==typeof l?("textarea"!==e||""!==l)&&Pr(t,l):"number"==typeof l&&Pr(t,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(_.hasOwnProperty(u)?null!=l&&Br(r,u):null!=l&&Ne(t,u,l,i))}switch(e){case"input":re(t),Re(t,n,!1);break;case"textarea":re(t),xr(t);break;case"option":null!=n.value&&t.setAttribute("value",n.value);break;case"select":t.multiple=!!n.multiple,null!=(e=n.value)?_r(t,!!n.multiple,e,!1):null!=n.defaultValue&&_r(t,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(t.onclick=s)}}function Hr(t,e,n,r,i){var o=null;switch(e){case"input":n=Ae(t,n),r=Ae(t,r),o=[];break;case"option":n=br(t,n),r=br(t,r),o=[];break;case"select":n=a({},n,{value:void 0}),r=a({},r,{value:void 0}),o=[];break;case"textarea":n=Er(t,n),r=Er(t,r),o=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(t.onclick=s)}Fr(e,r,jr),e=t=void 0;var u=null;for(t in n)if(!r.hasOwnProperty(t)&&n.hasOwnProperty(t)&&null!=n[t])if("style"===t){var c=n[t];for(e in c)c.hasOwnProperty(e)&&(u||(u={}),u[e]="")}else"dangerouslySetInnerHTML"!==t&&"children"!==t&&"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&"autoFocus"!==t&&(_.hasOwnProperty(t)?o||(o=[]):(o=o||[]).push(t,null));for(t in r){var l=r[t];if(c=null!=n?n[t]:void 0,r.hasOwnProperty(t)&&l!==c&&(null!=l||null!=c))if("style"===t)if(c){for(e in c)!c.hasOwnProperty(e)||l&&l.hasOwnProperty(e)||(u||(u={}),u[e]="");for(e in l)l.hasOwnProperty(e)&&c[e]!==l[e]&&(u||(u={}),u[e]=l[e])}else u||(o||(o=[]),o.push(t,u)),u=l;else"dangerouslySetInnerHTML"===t?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(o=o||[]).push(t,""+l)):"children"===t?c===l||"string"!=typeof l&&"number"!=typeof l||(o=o||[]).push(t,""+l):"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&(_.hasOwnProperty(t)?(null!=l&&Br(i,t),o||c===l||(o=[])):(o=o||[]).push(t,l))}return u&&(o=o||[]).push("style",u),o}function zr(t,e,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&Oe(t,i),Ur(n,r),r=Ur(n,i);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?Mr(t,s):"dangerouslySetInnerHTML"===a?Or(t,s):"children"===a?Pr(t,s):Ne(t,a,s,r)}switch(n){case"input":Pe(t,i);break;case"textarea":Cr(t,i);break;case"select":t._wrapperState.initialValue=void 0,e=t._wrapperState.wasMultiple,t._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?_r(t,!!i.multiple,n,!1):e!==!!i.multiple&&(null!=i.defaultValue?_r(t,!!i.multiple,i.defaultValue,!0):_r(t,!!i.multiple,i.multiple?[]:"",!1))}}function Kr(t,e,n,r,i){switch(e){case"iframe":case"object":On("load",t);break;case"video":case"audio":for(r=0;r<ht.length;r++)On(ht[r],t);break;case"source":On("error",t);break;case"img":case"image":case"link":On("error",t),On("load",t);break;case"form":On("reset",t),On("submit",t);break;case"details":On("toggle",t);break;case"input":Ie(t,n),On("invalid",t),Br(i,"onChange");break;case"select":wr(t,n),On("invalid",t),Br(i,"onChange");break;case"textarea":Tr(t,n),On("invalid",t),Br(i,"onChange")}for(var o in Fr(e,n,jr),r=null,n)if(n.hasOwnProperty(o)){var a=n[o];"children"===o?"string"==typeof a?t.textContent!==a&&(r=["children",a]):"number"==typeof a&&t.textContent!==""+a&&(r=["children",""+a]):_.hasOwnProperty(o)&&null!=a&&Br(i,o)}switch(e){case"input":re(t),Re(t,n,!0);break;case"textarea":re(t),xr(t);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(t.onclick=s)}return r}function Gr(t,e){return t.nodeValue!==e}var Qr={createElement:qr,createTextNode:Vr,setInitialProperties:Wr,diffProperties:Hr,updateProperties:zr,diffHydratedProperties:Kr,diffHydratedText:Gr,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(t,e,n){switch(e){case"input":if(Pe(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=z(r);i||h("90"),ie(r),Pe(r,i)}}}break;case"textarea":Cr(t,n);break;case"select":null!=(e=n.value)&&_r(t,!!n.multiple,e,!1)}}},Yr=null,Xr=null;function $r(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function Jr(t,e){return"textarea"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"==typeof e.dangerouslySetInnerHTML.__html}var Zr=er,ti=rr,ei=ir;function ni(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function ri(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}new Set;var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){ii[++oi]=t.current,t.current=e}var ci=ai(f),li=ai(!1),fi=f;function hi(t){return di(t)?fi:ci.current}function pi(t,e){var n=t.type.contextTypes;if(!n)return f;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function di(t){return 2===t.tag&&null!=t.type.childContextTypes}function vi(t){di(t)&&(si(li),si(ci))}function mi(t){si(li),si(ci)}function yi(t,e,n){ci.current!==f&&h("168"),ui(ci,e),ui(li,n)}function gi(t,e){var n=t.stateNode,r=t.type.childContextTypes;if("function"!=typeof n.getChildContext)return e;for(var i in n=n.getChildContext())i in r||h("108",be(t)||"Unknown",i);return a({},e,n)}function bi(t){if(!di(t))return!1;var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||f,fi=ci.current,ui(ci,e),ui(li,li.current),!0}function _i(t,e){var n=t.stateNode;if(n||h("169"),e){var r=gi(t,fi);n.__reactInternalMemoizedMergedChildContext=r,si(li),si(ci),ui(ci,r)}else si(li);ui(li,e)}function wi(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=e,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ei(t,e,n){var r=t.alternate;return null===r?((r=new wi(t.tag,e,t.key,t.mode)).type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ti(t,e,n){var r=t.type,i=t.key;if(t=t.props,"function"==typeof r)var o=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)o=5;else switch(r){case ce:return Ci(t.children,e,n,i);case de:o=11,e|=3;break;case le:o=11,e|=2;break;case fe:return(r=new wi(15,t,i,4|e)).type=fe,r.expirationTime=n,r;case me:o=16,e|=2;break;default:t:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case he:o=13;break t;case pe:o=12;break t;case ve:o=14;break t;default:h("130",null==r?r:typeof r,"")}o=void 0}}return(e=new wi(o,t,i,e)).type=r,e.expirationTime=n,e}function Ci(t,e,n,r){return(t=new wi(10,t,r,e)).expirationTime=n,t}function xi(t,e,n){return(t=new wi(6,t,null,e)).expirationTime=n,t}function Si(t,e,n){return(e=new wi(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ki(t,e,n){return t={current:e=new wi(3,null,null,e?3:0),containerInfo:t,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},e.stateNode=t}var Ni=null,Ai=null;function Ii(t){return function(e){try{return t(e)}catch(t){}}}function Oi(t){"function"==typeof Ni&&Ni(t)}function Pi(t){"function"==typeof Ai&&Ai(t)}var Ri=!1;function Di(t){return{expirationTime:0,baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Mi(t){return{expirationTime:t.expirationTime,baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Li(t){return{expirationTime:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Fi(t,e,n){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e),(0===t.expirationTime||t.expirationTime>n)&&(t.expirationTime=n)}function Ui(t,e,n){var r=t.alternate;if(null===r){var i=t.updateQueue,o=null;null===i&&(i=t.updateQueue=Di(t.memoizedState))}else i=t.updateQueue,o=r.updateQueue,null===i?null===o?(i=t.updateQueue=Di(t.memoizedState),o=r.updateQueue=Di(r.memoizedState)):i=t.updateQueue=Mi(o):null===o&&(o=r.updateQueue=Mi(i));null===o||i===o?Fi(i,e,n):null===i.lastUpdate||null===o.lastUpdate?(Fi(i,e,n),Fi(o,e,n)):(Fi(i,e,n),o.lastUpdate=e)}function ji(t,e,n){var r=t.updateQueue;null===(r=null===r?t.updateQueue=Di(t.memoizedState):Bi(t,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=e:(r.lastCapturedUpdate.next=e,r.lastCapturedUpdate=e),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Bi(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=Mi(e)),e}function qi(t,e,n,r,i,o){switch(n.tag){case 1:return"function"==typeof(t=n.payload)?t.call(o,r,i):t;case 3:t.effectTag=-1025&t.effectTag|64;case 0:if(null===(i="function"==typeof(t=n.payload)?t.call(o,r,i):t)||void 0===i)break;return a({},r,i);case 2:Ri=!0}return r}function Vi(t,e,n,r,i){if(Ri=!1,!(0===e.expirationTime||e.expirationTime>i)){for(var o=(e=Bi(t,e)).baseState,a=null,s=0,u=e.firstUpdate,c=o;null!==u;){var l=u.expirationTime;l>i?(null===a&&(a=u,o=c),(0===s||s>l)&&(s=l)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastEffect?e.firstEffect=e.lastEffect=u:(e.lastEffect.nextEffect=u,e.lastEffect=u))),u=u.next}for(l=null,u=e.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>i?(null===l&&(l=u,null===a&&(o=c)),(0===s||s>f)&&(s=f)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastCapturedEffect?e.firstCapturedEffect=e.lastCapturedEffect=u:(e.lastCapturedEffect.nextEffect=u,e.lastCapturedEffect=u))),u=u.next}null===a&&(e.lastUpdate=null),null===l?e.lastCapturedUpdate=null:t.effectTag|=32,null===a&&null===l&&(o=c),e.baseState=o,e.firstUpdate=a,e.firstCapturedUpdate=l,e.expirationTime=s,t.memoizedState=c}}function Wi(t,e){"function"!=typeof t&&h("191",t),t.call(e)}function Hi(t,e,n){for(null!==e.firstCapturedUpdate&&(null!==e.lastUpdate&&(e.lastUpdate.next=e.firstCapturedUpdate,e.lastUpdate=e.lastCapturedUpdate),e.firstCapturedUpdate=e.lastCapturedUpdate=null),t=e.firstEffect,e.firstEffect=e.lastEffect=null;null!==t;){var r=t.callback;null!==r&&(t.callback=null,Wi(r,n)),t=t.nextEffect}for(t=e.firstCapturedEffect,e.firstCapturedEffect=e.lastCapturedEffect=null;null!==t;)null!==(e=t.callback)&&(t.callback=null,Wi(e,n)),t=t.nextEffect}function zi(t,e){return{value:t,source:e,stack:_e(e)}}var Ki=ai(null),Gi=ai(null),Qi=ai(0);function Yi(t){var e=t.type._context;ui(Qi,e._changedBits),ui(Gi,e._currentValue),ui(Ki,t),e._currentValue=t.pendingProps.value,e._changedBits=t.stateNode}function Xi(t){var e=Qi.current,n=Gi.current;si(Ki),si(Gi),si(Qi),(t=t.type._context)._currentValue=n,t._changedBits=e}var $i={},Ji=ai($i),Zi=ai($i),to=ai($i);function eo(t){return t===$i&&h("174"),t}function no(t,e){ui(to,e),ui(Zi,t),ui(Ji,$i);var n=e.nodeType;switch(n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Nr(null,"");break;default:e=Nr(e=(n=8===n?e.parentNode:e).namespaceURI||null,n=n.tagName)}si(Ji),ui(Ji,e)}function ro(t){si(Ji),si(Zi),si(to)}function io(t){Zi.current===t&&(si(Ji),si(Zi))}function oo(t,e,n){var r=t.memoizedState;r=null===(e=e(n,r))||void 0===e?r:a({},r,e),t.memoizedState=r,null!==(t=t.updateQueue)&&0===t.expirationTime&&(t.baseState=r)}var ao={isMounted:function(t){return!!(t=t._reactInternalFiber)&&2===an(t)},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=ba(),r=Li(n=ya(n,t));r.tag=2,void 0!==e&&null!==e&&(r.callback=e),Ui(t,r,n),ga(t,n)}};function so(t,e,n,r,i,o){var a=t.stateNode;return t=t.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!c(e,n)||!c(r,i))}function uo(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&ao.enqueueReplaceState(e,e.state,null)}function co(t,e){var n=t.type,r=t.stateNode,i=t.pendingProps,o=hi(t);r.props=i,r.state=t.memoizedState,r.refs=f,r.context=pi(t,o),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState),"function"==typeof(o=t.type.getDerivedStateFromProps)&&(oo(t,o,i),r.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&ao.enqueueReplaceState(r,r.state,null),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState)),"function"==typeof r.componentDidMount&&(t.effectTag|=4)}var lo=Array.isArray;function fo(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&h("110"),r=n.stateNode),r||h("147",t);var i=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs===f?r.refs={}:r.refs;null===t?delete e[i]:e[i]=t})._stringRef=i,e)}"string"!=typeof t&&h("148"),n._owner||h("254",t)}return t}function ho(t,e){"textarea"!==t.type&&h("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function po(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e,n){return(t=Ei(t,e,n)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function a(e){return t&&null===e.alternate&&(e.effectTag=2),e}function s(t,e,n,r){return null===e||6!==e.tag?((e=xi(n,t.mode,r)).return=t,e):((e=i(e,n,r)).return=t,e)}function u(t,e,n,r){return null!==e&&e.type===n.type?((r=i(e,n.props,r)).ref=fo(t,e,n),r.return=t,r):((r=Ti(n,t.mode,r)).ref=fo(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Si(n,t.mode,r)).return=t,e):((e=i(e,n.children||[],r)).return=t,e)}function l(t,e,n,r,o){return null===e||10!==e.tag?((e=Ci(n,t.mode,r,o)).return=t,e):((e=i(e,n,r)).return=t,e)}function f(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=xi(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case se:return(n=Ti(e,t.mode,n)).ref=fo(t,null,e),n.return=t,n;case ue:return(e=Si(e,t.mode,n)).return=t,e}if(lo(e)||ge(e))return(e=Ci(e,t.mode,n,null)).return=t,e;ho(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case se:return n.key===i?n.type===ce?l(t,e,n.props.children,r,i):u(t,e,n,r):null;case ue:return n.key===i?c(t,e,n,r):null}if(lo(n)||ge(n))return null!==i?null:l(t,e,n,r,null);ho(t,n)}return null}function d(t,e,n,r,i){if("string"==typeof r||"number"==typeof r)return s(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case se:return t=t.get(null===r.key?n:r.key)||null,r.type===ce?l(e,t,r.props.children,i,r.key):u(e,t,r,i);case ue:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(lo(r)||ge(r))return l(e,t=t.get(n)||null,r,i,null);ho(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,h=a,v=a=0,m=null;null!==h&&v<s.length;v++){h.index>v?(m=h,h=null):m=h.sibling;var y=p(i,h,s[v],u);if(null===y){null===h&&(h=m);break}t&&h&&null===y.alternate&&e(i,h),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,h=m}if(v===s.length)return n(i,h),c;if(null===h){for(;v<s.length;v++)(h=f(i,s[v],u))&&(a=o(h,a,v),null===l?c=h:l.sibling=h,l=h);return c}for(h=r(i,h);v<s.length;v++)(m=d(h,i,v,s[v],u))&&(t&&null!==m.alternate&&h.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return t&&h.forEach(function(t){return e(i,t)}),c}function m(i,a,s,u){var c=ge(s);"function"!=typeof c&&h("150"),null==(s=c.call(s))&&h("151");for(var l=c=null,v=a,m=a=0,y=null,g=s.next();null!==v&&!g.done;m++,g=s.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(i,v,g.value,u);if(null===b){v||(v=y);break}t&&v&&null===b.alternate&&e(i,v),a=o(b,a,m),null===l?c=b:l.sibling=b,l=b,v=y}if(g.done)return n(i,v),c;if(null===v){for(;!g.done;m++,g=s.next())null!==(g=f(i,g.value,u))&&(a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return c}for(v=r(i,v);!g.done;m++,g=s.next())null!==(g=d(v,i,m,g.value,u))&&(t&&null!==g.alternate&&v.delete(null===g.key?m:g.key),a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return t&&v.forEach(function(t){return e(i,t)}),c}return function(t,r,o,s){var u="object"==typeof o&&null!==o&&o.type===ce&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case se:t:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(10===u.tag?o.type===ce:u.type===o.type){n(t,u.sibling),(r=i(u,o.type===ce?o.props.children:o.props,s)).ref=fo(t,u,o),r.return=t,t=r;break t}n(t,u);break}e(t,u),u=u.sibling}o.type===ce?((r=Ci(o.props.children,t.mode,s,o.key)).return=t,t=r):((s=Ti(o,t.mode,s)).ref=fo(t,r,o),s.return=t,t=s)}return a(t);case ue:t:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[],s)).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Si(o,t.mode,s)).return=t,t=r}return a(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o,s)).return=t,t=r):(n(t,r),(r=xi(o,t.mode,s)).return=t,t=r),a(t);if(lo(o))return v(t,r,o,s);if(ge(o))return m(t,r,o,s);if(c&&ho(t,o),void 0===o&&!u)switch(t.tag){case 2:case 1:h("152",(s=t.type).displayName||s.name||"Component")}return n(t,r)}}var vo=po(!0),mo=po(!1),yo=null,go=null,bo=!1;function _o(t,e){var n=new wi(5,null,null,0);n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function wo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function Eo(t){if(bo){var e=go;if(e){var n=e;if(!wo(t,e)){if(!(e=ni(n))||!wo(t,e))return t.effectTag|=2,bo=!1,void(yo=t);_o(yo,n)}yo=t,go=ri(e)}else t.effectTag|=2,bo=!1,yo=t}}function To(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag;)t=t.return;yo=t}function Co(t){if(t!==yo)return!1;if(!bo)return To(t),bo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!Jr(e,t.memoizedProps))for(e=go;e;)_o(t,e),e=ni(e);return To(t),go=yo?ni(t.stateNode):null,!0}function xo(){go=yo=null,bo=!1}function So(t,e,n){ko(t,e,n,e.expirationTime)}function ko(t,e,n,r){e.child=null===t?mo(e,null,n,r):vo(e,t.child,n,r)}function No(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Ao(t,e,n,r,i){No(t,e);var o=0!=(64&e.effectTag);if(!n&&!o)return r&&_i(e,!1),Po(t,e);n=e.stateNode,oe.current=e;var a=o?null:n.render();return e.effectTag|=1,o&&(ko(t,e,null,i),e.child=null),ko(t,e,a,i),e.memoizedState=n.state,e.memoizedProps=n.props,r&&_i(e,!0),e.child}function Io(t){var e=t.stateNode;e.pendingContext?yi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&yi(0,e.context,!1),no(t,e.containerInfo)}function Oo(t,e,n,r){var i=t.child;for(null!==i&&(i.return=t);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===e&&0!=(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===t.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===t){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Po(t,e){if(null!==t&&e.child!==t.child&&h("153"),null!==e.child){var n=Ei(t=e.child,t.pendingProps,t.expirationTime);for(e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ei(t,t.pendingProps,t.expirationTime)).return=e;n.sibling=null}return e.child}function Ro(t,e,n){if(0===e.expirationTime||e.expirationTime>n){switch(e.tag){case 3:Io(e);break;case 2:bi(e);break;case 4:no(e,e.stateNode.containerInfo);break;case 13:Yi(e)}return null}switch(e.tag){case 0:null!==t&&h("155");var r=e.type,i=e.pendingProps,o=hi(e);return r=r(i,o=pi(e,o)),e.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(o=e.type,e.tag=2,e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(o=o.getDerivedStateFromProps)&&oo(e,o,i),i=bi(e),r.updater=ao,e.stateNode=r,r._reactInternalFiber=e,co(e,n),t=Ao(t,e,!0,i,n)):(e.tag=1,So(t,e,r),e.memoizedProps=i,t=e.child),t;case 1:return i=e.type,n=e.pendingProps,li.current||e.memoizedProps!==n?(i=i(n,r=pi(e,r=hi(e))),e.effectTag|=1,So(t,e,i),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 2:if(i=bi(e),null===t)if(null===e.stateNode){var a=e.pendingProps,s=e.type;r=hi(e);var u=2===e.tag&&null!=e.type.contextTypes;a=new s(a,o=u?pi(e,r):f),e.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=ao,e.stateNode=a,a._reactInternalFiber=e,u&&((u=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,u.__reactInternalMemoizedMaskedChildContext=o),co(e,n),r=!0}else{s=e.type,r=e.stateNode,u=e.memoizedProps,o=e.pendingProps,r.props=u;var c=r.context;a=pi(e,a=hi(e));var l=s.getDerivedStateFromProps;(s="function"==typeof l||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(u!==o||c!==a)&&uo(e,r,o,a),Ri=!1;var p=e.memoizedState;c=r.state=p;var d=e.updateQueue;null!==d&&(Vi(e,d,o,r,n),c=e.memoizedState),u!==o||p!==c||li.current||Ri?("function"==typeof l&&(oo(e,l,o),c=e.memoizedState),(u=Ri||so(e,u,o,p,c,a))?(s||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(e.effectTag|=4)):("function"==typeof r.componentDidMount&&(e.effectTag|=4),e.memoizedProps=o,e.memoizedState=c),r.props=o,r.state=c,r.context=a,r=u):("function"==typeof r.componentDidMount&&(e.effectTag|=4),r=!1)}else s=e.type,r=e.stateNode,o=e.memoizedProps,u=e.pendingProps,r.props=o,c=r.context,a=pi(e,a=hi(e)),(s="function"==typeof(l=s.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(o!==u||c!==a)&&uo(e,r,u,a),Ri=!1,c=e.memoizedState,p=r.state=c,null!==(d=e.updateQueue)&&(Vi(e,d,u,r,n),p=e.memoizedState),o!==u||c!==p||li.current||Ri?("function"==typeof l&&(oo(e,l,u),p=e.memoizedState),(l=Ri||so(e,o,u,c,p,a))?(s||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(u,p,a),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(u,p,a)),"function"==typeof r.componentDidUpdate&&(e.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),e.memoizedProps=u,e.memoizedState=p),r.props=u,r.state=p,r.context=a,r=l):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),r=!1);return Ao(t,e,r,i,n);case 3:return Io(e),null!==(i=e.updateQueue)?(r=null!==(r=e.memoizedState)?r.element:null,Vi(e,i,e.pendingProps,null,n),(i=e.memoizedState.element)===r?(xo(),t=Po(t,e)):(r=e.stateNode,(r=(null===t||null===t.child)&&r.hydrate)&&(go=ri(e.stateNode.containerInfo),yo=e,r=bo=!0),r?(e.effectTag|=2,e.child=mo(e,null,i,n)):(xo(),So(t,e,i)),t=e.child)):(xo(),t=Po(t,e)),t;case 5:return eo(to.current),(i=eo(Ji.current))!==(r=Nr(i,e.type))&&(ui(Zi,e),ui(Ji,r)),null===t&&Eo(e),i=e.type,u=e.memoizedProps,r=e.pendingProps,o=null!==t?t.memoizedProps:null,li.current||u!==r||((u=1&e.mode&&!!r.hidden)&&(e.expirationTime=1073741823),u&&1073741823===n)?(u=r.children,Jr(i,r)?u=null:o&&Jr(i,o)&&(e.effectTag|=16),No(t,e),1073741823!==n&&1&e.mode&&r.hidden?(e.expirationTime=1073741823,e.memoizedProps=r,t=null):(So(t,e,u),e.memoizedProps=r,t=e.child)):t=Po(t,e),t;case 6:return null===t&&Eo(e),e.memoizedProps=e.pendingProps,null;case 16:return null;case 4:return no(e,e.stateNode.containerInfo),i=e.pendingProps,li.current||e.memoizedProps!==i?(null===t?e.child=vo(e,null,i,n):So(t,e,i),e.memoizedProps=i,t=e.child):t=Po(t,e),t;case 14:return i=e.type.render,n=e.pendingProps,r=e.ref,li.current||e.memoizedProps!==n||r!==(null!==t?t.ref:null)?(So(t,e,i=i(n,r)),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 10:return n=e.pendingProps,li.current||e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 11:return n=e.pendingProps.children,li.current||null!==n&&e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 15:return n=e.pendingProps,e.memoizedProps===n?t=Po(t,e):(So(t,e,n.children),e.memoizedProps=n,t=e.child),t;case 13:return function(t,e,n){var r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=!0;if(li.current)a=!1;else if(o===i)return e.stateNode=0,Yi(e),Po(t,e);var s=i.value;if(e.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else{var u=o.value;if(u===s&&(0!==u||1/u==1/s)||u!=u&&s!=s){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else if(s="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,s):1073741823,0==(s|=0)){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e)}else Oo(e,r,s,n)}return e.stateNode=s,Yi(e),So(t,e,i.children),e.child}(t,e,n);case 12:t:if(r=e.type,o=e.pendingProps,u=e.memoizedProps,i=r._currentValue,a=r._changedBits,li.current||0!==a||u!==o){if(e.memoizedProps=o,void 0!==(s=o.unstable_observedBits)&&null!==s||(s=1073741823),e.stateNode=s,0!=(a&s))Oo(e,r,a,n);else if(u===o){t=Po(t,e);break t}n=(n=o.children)(i),e.effectTag|=1,So(t,e,n),t=e.child}else t=Po(t,e);return t;default:h("156")}}function Do(t){t.effectTag|=4}var Mo=void 0,Lo=void 0,Fo=void 0;function Uo(t,e){var n=e.pendingProps;switch(e.tag){case 1:return null;case 2:return vi(e),null;case 3:ro(),mi();var r=e.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(Co(e),e.effectTag&=-3),Mo(e),null;case 5:io(e),r=eo(to.current);var i=e.type;if(null!==t&&null!=e.stateNode){var o=t.memoizedProps,a=e.stateNode,s=eo(Ji.current);a=Hr(a,i,o,n,r),Lo(t,e,a,i,o,n,r,s),t.ref!==e.ref&&(e.effectTag|=128)}else{if(!n)return null===e.stateNode&&h("166"),null;if(t=eo(Ji.current),Co(e))n=e.stateNode,i=e.type,o=e.memoizedProps,n[q]=e,n[V]=o,r=Kr(n,i,o,t,r),e.updateQueue=r,null!==r&&Do(e);else{(t=qr(i,n,r,t))[q]=e,t[V]=n;t:for(o=e.child;null!==o;){if(5===o.tag||6===o.tag)t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}Wr(t,i,n,r),$r(i,n)&&Do(e),e.stateNode=t}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Fo(t,e,t.memoizedProps,n);else{if("string"!=typeof n)return null===e.stateNode&&h("166"),null;r=eo(to.current),eo(Ji.current),Co(e)?(r=e.stateNode,n=e.memoizedProps,r[q]=e,Gr(r,n)&&Do(e)):((r=Vr(n,r))[q]=e,e.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return ro(),Mo(e),null;case 13:return Xi(e),null;case 12:return null;case 0:h("167");default:h("156")}}function jo(t,e){var n=e.source;null===e.stack&&null!==n&&_e(n),null!==n&&be(n),e=e.value,null!==t&&2===t.tag&&be(t);try{e&&e.suppressReactErrorLogging||console.error(e)}catch(t){t&&t.suppressReactErrorLogging||console.error(t)}}function Bo(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){va(t,e)}else e.current=null}function qo(t){switch(Pi(t),t.tag){case 2:Bo(t);var e=t.stateNode;if("function"==typeof e.componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){va(t,e)}break;case 5:Bo(t);break;case 4:Ho(t)}}function Vo(t){return 5===t.tag||3===t.tag||4===t.tag}function Wo(t){t:{for(var e=t.return;null!==e;){if(Vo(e)){var n=e;break t}e=e.return}h("160"),n=void 0}var r=e=void 0;switch(n.tag){case 5:e=n.stateNode,r=!1;break;case 3:case 4:e=n.stateNode.containerInfo,r=!0;break;default:h("161")}16&n.effectTag&&(Pr(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||Vo(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var i=t;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=e,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else e.insertBefore(i.stateNode,n);else r?(o=e,a=i.stateNode,8===o.nodeType?o.parentNode.insertBefore(a,o):o.appendChild(a)):e.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Ho(t){for(var e=t,n=!1,r=void 0,i=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&h("160"),n.tag){case 5:r=n.stateNode,i=!1;break t;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break t}n=n.return}n=!0}if(5===e.tag||6===e.tag){t:for(var o=e,a=o;;)if(qo(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=e.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(e.stateNode)}else if(4===e.tag?r=e.stateNode.containerInfo:qo(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;4===(e=e.return).tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function zo(t,e){switch(e.tag){case 2:break;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps;t=null!==t?t.memoizedProps:r;var i=e.type,o=e.updateQueue;e.updateQueue=null,null!==o&&(n[V]=r,zr(n,o,i,t,r))}break;case 6:null===e.stateNode&&h("162"),e.stateNode.nodeValue=e.memoizedProps;break;case 3:case 15:case 16:break;default:h("163")}}function Ko(t,e,n){(n=Li(n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ja(r),jo(t,e)},n}function Go(t,e,n){(n=Li(n)).tag=3;var r=t.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===la?la=new Set([this]):la.add(this);var n=e.value,r=e.stack;jo(t,e),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Qo(t,e,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=zi(r,n),t=e;do{switch(t.tag){case 3:return t.effectTag|=1024,void ji(t,r=Ko(t,r,o),o);case 2:if(e=r,n=t.stateNode,0==(64&t.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===la||!la.has(n)))return t.effectTag|=1024,void ji(t,r=Go(t,e,o),o)}t=t.return}while(null!==t)}function Yo(t){switch(t.tag){case 2:vi(t);var e=t.effectTag;return 1024&e?(t.effectTag=-1025&e|64,t):null;case 3:return ro(),mi(),1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 5:return io(t),null;case 16:return 1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 4:return ro(),null;case 13:return Xi(t),null;default:return null}}Mo=function(){},Lo=function(t,e,n){(e.updateQueue=n)&&Do(e)},Fo=function(t,e,n,r){n!==r&&Do(e)};var Xo=Zr(),$o=2,Jo=Xo,Zo=0,ta=0,ea=!1,na=null,ra=null,ia=0,oa=-1,aa=!1,sa=null,ua=!1,ca=!1,la=null;function fa(){if(null!==na)for(var t=na.return;null!==t;){var e=t;switch(e.tag){case 2:vi(e);break;case 3:ro(),mi();break;case 5:io(e);break;case 4:ro();break;case 13:Xi(e)}t=t.return}ra=null,ia=0,oa=-1,aa=!1,na=null,ca=!1}function ha(t){for(;;){var e=t.alternate,n=t.return,r=t.sibling;if(0==(512&t.effectTag)){e=Uo(e,t);var i=t;if(1073741823===ia||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==e)return e;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t)),null!==r)return r;if(null===n){ca=!0;break}t=n}else{if(null!==(t=Yo(t)))return t.effectTag&=511,t;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;t=n}}return null}function pa(t){var e=Ro(t.alternate,t,ia);return null===e&&(e=ha(t)),oe.current=null,e}function da(t,e,n){ea&&h("243"),ea=!0,e===ia&&t===ra&&null!==na||(fa(),ia=e,oa=-1,na=Ei((ra=t).current,null,ia),t.pendingCommitExpirationTime=0);var r=!1;for(aa=!n||ia<=$o;;){try{if(n)for(;null!==na&&!$a();)na=pa(na);else for(;null!==na;)na=pa(na)}catch(e){if(null===na)r=!0,Ja(e);else{null===na&&h("271");var i=(n=na).return;if(null===i){r=!0,Ja(e);break}Qo(t,i,n,e,0,ia),na=ha(n)}}break}if(ea=!1,r)return null;if(null===na){if(ca)return t.pendingCommitExpirationTime=e,t.current.alternate;aa&&h("262"),0<=oa&&setTimeout(function(){var e=t.current.expirationTime;0!==e&&(0===t.remainingExpirationTime||t.remainingExpirationTime<e)&&Va(t,e)},oa),function(t){null===ka&&h("246"),ka.remainingExpirationTime=t}(t.current.expirationTime)}return null}function va(t,e){var n;t:{for(ea&&!ua&&h("263"),n=t.return;null!==n;){switch(n.tag){case 2:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===la||!la.has(r))){Ui(n,t=Go(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}break;case 3:Ui(n,t=Ko(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}n=n.return}3===t.tag&&(Ui(t,n=Ko(t,n=zi(e,t),1),1),ga(t,1)),n=void 0}return n}function ma(){var t=2+25*(1+((ba()-2+500)/25|0));return t<=Zo&&(t=Zo+1),Zo=t}function ya(t,e){return t=0!==ta?ta:ea?ua?1:ia:1&e.mode?La?2+10*(1+((t-2+15)/10|0)):2+25*(1+((t-2+500)/25|0)):1,La&&(0===Aa||t>Aa)&&(Aa=t),t}function ga(t,e){for(;null!==t;){if((0===t.expirationTime||t.expirationTime>e)&&(t.expirationTime=e),null!==t.alternate&&(0===t.alternate.expirationTime||t.alternate.expirationTime>e)&&(t.alternate.expirationTime=e),null===t.return){if(3!==t.tag)break;var n=t.stateNode;!ea&&0!==ia&&e<ia&&fa();var r=n.current.expirationTime;ea&&!ua&&ra===n||Va(n,r),ja>Ua&&h("185")}t=t.return}}function ba(){return Jo=Zr()-Xo,$o=2+(Jo/10|0)}function _a(t){var e=ta;ta=2+25*(1+((ba()-2+500)/25|0));try{return t()}finally{ta=e}}function wa(t,e,n,r,i){var o=ta;ta=1;try{return t(e,n,r,i)}finally{ta=o}}var Ea=null,Ta=null,Ca=0,xa=void 0,Sa=!1,ka=null,Na=0,Aa=0,Ia=!1,Oa=!1,Pa=null,Ra=null,Da=!1,Ma=!1,La=!1,Fa=null,Ua=1e3,ja=0,Ba=1;function qa(t){if(0!==Ca){if(t>Ca)return;null!==xa&&ei(xa)}var e=Zr()-Xo;Ca=t,xa=ti(Ha,{timeout:10*(t-2)-e})}function Va(t,e){if(null===t.nextScheduledRoot)t.remainingExpirationTime=e,null===Ta?(Ea=Ta=t,t.nextScheduledRoot=t):(Ta=Ta.nextScheduledRoot=t).nextScheduledRoot=Ea;else{var n=t.remainingExpirationTime;(0===n||e<n)&&(t.remainingExpirationTime=e)}Sa||(Da?Ma&&(ka=t,Na=1,Ya(t,1,!1)):1===e?za():qa(e))}function Wa(){var t=0,e=null;if(null!==Ta)for(var n=Ta,r=Ea;null!==r;){var i=r.remainingExpirationTime;if(0===i){if((null===n||null===Ta)&&h("244"),r===r.nextScheduledRoot){Ea=Ta=r.nextScheduledRoot=null;break}if(r===Ea)Ea=i=r.nextScheduledRoot,Ta.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===Ta){(Ta=n).nextScheduledRoot=Ea,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===t||i<t)&&(t=i,e=r),r===Ta)break;n=r,r=r.nextScheduledRoot}}null!==(n=ka)&&n===e&&1===t?ja++:ja=0,ka=e,Na=t}function Ha(t){Ka(0,!0,t)}function za(){Ka(1,!1,null)}function Ka(t,e,n){if(Ra=n,Wa(),e)for(;null!==ka&&0!==Na&&(0===t||t>=Na)&&(!Ia||ba()>=Na);)ba(),Ya(ka,Na,!Ia),Wa();else for(;null!==ka&&0!==Na&&(0===t||t>=Na);)Ya(ka,Na,!1),Wa();null!==Ra&&(Ca=0,xa=null),0!==Na&&qa(Na),Ra=null,Ia=!1,Qa()}function Ga(t,e){Sa&&h("253"),ka=t,Na=e,Ya(t,e,!1),za(),Qa()}function Qa(){if(ja=0,null!==Fa){var t=Fa;Fa=null;for(var e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){Oa||(Oa=!0,Pa=t)}}}if(Oa)throw t=Pa,Pa=null,Oa=!1,t}function Ya(t,e,n){Sa&&h("245"),Sa=!0,n?null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!0))&&($a()?t.finishedWork=n:Xa(t,n,e)):null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!1))&&Xa(t,n,e),Sa=!1}function Xa(t,e,n){var r=t.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Fa?Fa=[r]:Fa.push(r),r._defer))return t.finishedWork=e,void(t.remainingExpirationTime=0);if(t.finishedWork=null,ua=ea=!0,(n=e.stateNode).current===e&&h("177"),0===(r=n.pendingCommitExpirationTime)&&h("261"),n.pendingCommitExpirationTime=0,ba(),oe.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var i=e.firstEffect}else i=e;else i=e.firstEffect;Yr=An;var o=u();if(Vn(o)){if("selectionStart"in o)var a={start:o.selectionStart,end:o.selectionEnd};else t:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){a=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch(t){a=null;break t}var p=0,d=-1,v=-1,m=0,y=0,g=o,b=null;e:for(;;){for(var _;g!==a||0!==c&&3!==g.nodeType||(d=p+c),g!==f||0!==s&&3!==g.nodeType||(v=p+s),3===g.nodeType&&(p+=g.nodeValue.length),null!==(_=g.firstChild);)b=g,g=_;for(;;){if(g===o)break e;if(b===a&&++m===c&&(d=p),b===f&&++y===s&&(v=p),null!==(_=g.nextSibling))break;b=(g=b).parentNode}g=_}a=-1===d||-1===v?null:{start:d,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xr={focusedElem:o,selectionRange:a},In(!1),sa=i;null!==sa;){o=!1,a=void 0;try{for(;null!==sa;){if(256&sa.effectTag){var w=sa.alternate;switch((c=sa).tag){case 2:if(256&c.effectTag&&null!==w){var E=w.memoizedProps,T=w.memoizedState,C=c.stateNode;C.props=c.memoizedProps,C.state=c.memoizedState;var x=C.getSnapshotBeforeUpdate(E,T);C.__reactInternalSnapshotBeforeUpdate=x}break;case 3:case 5:case 6:case 4:break;default:h("163")}}sa=sa.nextEffect}}catch(t){o=!0,a=t}o&&(null===sa&&h("178"),va(sa,a),null!==sa&&(sa=sa.nextEffect))}for(sa=i;null!==sa;){w=!1,E=void 0;try{for(;null!==sa;){var S=sa.effectTag;if(16&S&&Pr(sa.stateNode,""),128&S){var k=sa.alternate;if(null!==k){var N=k.ref;null!==N&&("function"==typeof N?N(null):N.current=null)}}switch(14&S){case 2:Wo(sa),sa.effectTag&=-3;break;case 6:Wo(sa),sa.effectTag&=-3,zo(sa.alternate,sa);break;case 4:zo(sa.alternate,sa);break;case 8:Ho(T=sa),T.return=null,T.child=null,T.alternate&&(T.alternate.child=null,T.alternate.return=null)}sa=sa.nextEffect}}catch(t){w=!0,E=t}w&&(null===sa&&h("178"),va(sa,E),null!==sa&&(sa=sa.nextEffect))}if(N=Xr,k=u(),S=N.focusedElem,w=N.selectionRange,k!==S&&l(document.documentElement,S)){null!==w&&Vn(S)&&(k=w.start,void 0===(N=w.end)&&(N=k),"selectionStart"in S?(S.selectionStart=k,S.selectionEnd=Math.min(N,S.value.length)):window.getSelection&&(k=window.getSelection(),E=S[dt()].length,N=Math.min(w.start,E),w=void 0===w.end?N:Math.min(w.end,E),!k.extend&&N>w&&(E=w,w=N,N=E),E=qn(S,N),T=qn(S,w),E&&T&&(1!==k.rangeCount||k.anchorNode!==E.node||k.anchorOffset!==E.offset||k.focusNode!==T.node||k.focusOffset!==T.offset)&&((C=document.createRange()).setStart(E.node,E.offset),k.removeAllRanges(),N>w?(k.addRange(C),k.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),k.addRange(C))))),k=[];for(N=S;N=N.parentNode;)1===N.nodeType&&k.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"==typeof S.focus&&S.focus(),S=0;S<k.length;S++)(N=k[S]).element.scrollLeft=N.left,N.element.scrollTop=N.top}for(Xr=null,In(Yr),Yr=null,n.current=e,sa=i;null!==sa;){i=!1,S=void 0;try{for(k=r;null!==sa;){var A=sa.effectTag;if(36&A){var I=sa.alternate;switch(w=k,(N=sa).tag){case 2:var O=N.stateNode;if(4&N.effectTag)if(null===I)O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidMount();else{var P=I.memoizedProps,R=I.memoizedState;O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidUpdate(P,R,O.__reactInternalSnapshotBeforeUpdate)}var D=N.updateQueue;null!==D&&(O.props=N.memoizedProps,O.state=N.memoizedState,Hi(N,D,O));break;case 3:var M=N.updateQueue;if(null!==M){if(E=null,null!==N.child)switch(N.child.tag){case 5:E=N.child.stateNode;break;case 2:E=N.child.stateNode}Hi(N,M,E)}break;case 5:var L=N.stateNode;null===I&&4&N.effectTag&&$r(N.type,N.memoizedProps)&&L.focus();break;case 6:case 4:case 15:case 16:break;default:h("163")}}if(128&A){N=void 0;var F=sa.ref;if(null!==F){var U=sa.stateNode;switch(sa.tag){case 5:N=U;break;default:N=U}"function"==typeof F?F(N):F.current=N}}var j=sa.nextEffect;sa.nextEffect=null,sa=j}}catch(t){i=!0,S=t}i&&(null===sa&&h("178"),va(sa,S),null!==sa&&(sa=sa.nextEffect))}ea=ua=!1,Oi(e.stateNode),0===(e=n.current.expirationTime)&&(la=null),t.remainingExpirationTime=e}function $a(){return!(null===Ra||Ra.timeRemaining()>Ba)&&(Ia=!0)}function Ja(t){null===ka&&h("246"),ka.remainingExpirationTime=0,Oa||(Oa=!0,Pa=t)}function Za(t,e){var n=Da;Da=!0;try{return t(e)}finally{(Da=n)||Sa||za()}}function ts(t,e){if(Da&&!Ma){Ma=!0;try{return t(e)}finally{Ma=!1}}return t(e)}function es(t,e){Sa&&h("187");var n=Da;Da=!0;try{return wa(t,e)}finally{Da=n,za()}}function ns(t,e,n){if(La)return t(e,n);Da||Sa||0===Aa||(Ka(Aa,!1,null),Aa=0);var r=La,i=Da;Da=La=!0;try{return t(e,n)}finally{La=r,(Da=i)||Sa||za()}}function rs(t){var e=Da;Da=!0;try{wa(t)}finally{(Da=e)||Sa||Ka(1,!1,null)}}function is(t,e,n,r,i){var o=e.current;if(n){var a;n=n._reactInternalFiber;t:{for(2===an(n)&&2===n.tag||h("170"),a=n;3!==a.tag;){if(di(a)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}(a=a.return)||h("171")}a=a.stateNode.context}n=di(n)?gi(n,a):a}else n=f;return null===e.context?e.context=n:e.pendingContext=n,e=i,(i=Li(r)).payload={element:t},null!==(e=void 0===e?null:e)&&(i.callback=e),Ui(o,i,r),ga(o,r),r}function os(t){var e=t._reactInternalFiber;return void 0===e&&("function"==typeof t.render?h("188"):h("268",Object.keys(t))),null===(t=cn(e))?null:t.stateNode}function as(t,e,n,r){var i=e.current;return is(t,e,n,i=ya(ba(),i),r)}function ss(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function us(t){var e=t.findFiberByHostInstance;return function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);Ni=Ii(function(t){return e.onCommitFiberRoot(n,t)}),Ai=Ii(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0}(a({},t,{findHostInstanceByFiber:function(t){return null===(t=cn(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}var cs=Za,ls=ns,fs=function(){Sa||0===Aa||(Ka(Aa,!1,null),Aa=0)};function hs(t){this._expirationTime=ma(),this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function ps(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ds(t,e,n){this._internalRoot=ki(t,e,n)}function vs(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function ms(t,e,n,r,i){vs(n)||h("200");var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var t=ss(o._internalRoot);a.call(t)}}null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ds(t,!1,e)}(n,r),"function"==typeof i){var s=i;i=function(){var t=ss(o._internalRoot);s.call(t)}}ts(function(){null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)})}return ss(o._internalRoot)}function ys(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return vs(e)||h("200"),function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ue,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}(t,e,null,n)}jt.injectFiberControlledHostComponent(Qr),hs.prototype.render=function(t){this._defer||h("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,r=new ps;return is(t,e,null,n,r._onCommit),r},hs.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},hs.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||h("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var r=null,i=e;i!==this;)r=i,i=i._next;null===r&&h("251"),r._next=i._next,this._next=e,t.firstBatch=this}this._defer=!1,Ga(t,n),e=this._next,this._next=null,null!==(e=t.firstBatch=e)&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},hs.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},ps.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},ps.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!=typeof n&&h("191",n),n()}}},ds.prototype.render=function(t,e){var n=this._internalRoot,r=new ps;return null!==(e=void 0===e?null:e)&&r.then(e),as(t,n,null,r._onCommit),r},ds.prototype.unmount=function(t){var e=this._internalRoot,n=new ps;return null!==(t=void 0===t?null:t)&&n.then(t),as(null,e,null,n._onCommit),n},ds.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var r=this._internalRoot,i=new ps;return null!==(n=void 0===n?null:n)&&i.then(n),as(e,r,t,i._onCommit),i},ds.prototype.createBatch=function(){var t=new hs(this),e=t._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=t,t._next=null;else{for(n=null;null!==r&&r._expirationTime<=e;)n=r,r=r._next;t._next=r,null!==n&&(n._next=t)}return t},Gt=cs,Qt=ls,Yt=fs;var gs={createPortal:ys,findDOMNode:function(t){return null==t?null:1===t.nodeType?t:os(t)},hydrate:function(t,e,n){return ms(null,t,e,!0,n)},render:function(t,e,n){return ms(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,r){return(null==t||void 0===t._reactInternalFiber)&&h("38"),ms(t,e,n,!1,r)},unmountComponentAtNode:function(t){return vs(t)||h("40"),!!t._reactRootContainer&&(ts(function(){ms(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return ys.apply(void 0,arguments)},unstable_batchedUpdates:Za,unstable_deferredUpdates:_a,unstable_interactiveUpdates:ns,flushSync:es,unstable_flushControlled:rs,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:j,EventPluginRegistry:C,EventPropagators:nt,ReactControlledComponent:Kt,ReactDOMComponentTree:K,ReactDOMEventListener:Mn},unstable_createRoot:function(t,e){return new ds(t,!0,null!=e&&!0===e.hydrate)}};us({findFiberByHostInstance:W,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});var bs={default:gs},_s=bs&&gs||bs;t.exports=_s.default?_s.default:_s},function(t,e,n){"use strict";
 
/** @license React v16.4.1
 
/** @license React v16.4.1
 
  * react.production.min.js
 
  * react.production.min.js
Line 113: Line 113:
 
  * This source code is licensed under the MIT license found in the
 
  * This source code is licensed under the MIT license found in the
 
  * LICENSE file in the root directory of this source tree.
 
  * LICENSE file in the root directory of this source tree.
  */var r=n(265),i=n(186),o=n(264),a=n(185),s="function"==typeof Symbol&&Symbol.for,u=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,l=s?Symbol.for("react.fragment"):60107,f=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,d=s?Symbol.for("react.context"):60110,v=s?Symbol.for("react.async_mode"):60111,m=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);i(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function _(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}function w(){}function E(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&g("85"),this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var T=E.prototype=new w;T.constructor=E,r(T,_.prototype),T.isPureReactComponent=!0;var C={current:null},x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,n){var r=void 0,i={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),e)x.call(e,r)&&!S.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:u,type:t,key:o,ref:a,props:i,_owner:C.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===u}var A=/\/+/g,I=[];function O(t,e,n,r){if(I.length){var i=I.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function P(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>I.length&&I.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var o=!1;if(null===t)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case u:case c:o=!0}}if(o)return n(r,t,""===e?"."+D(t,0):e),1;if(o=0,e=""===e?".":e+":",Array.isArray(t))for(var a=0;a<t.length;a++){var s=e+D(i=t[a],a);o+=R(i,s,n,r)}else if(null===t||void 0===t?s=null:s="function"==typeof(s=y&&t[y]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),a=0;!(i=t.next()).done;)o+=R(i=i.value,s=e+D(i,a++),n,r);else"object"===i&&g("31","[object Object]"===(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return o}function D(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function L(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,a.thatReturnsArgument):null!=t&&(N(t)&&(e=i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n,t={$$typeof:u,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}),r.push(t))}function F(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),e=O(e,o,r,i),null==t||R(t,"",L,e),P(e)}var U={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=O(null,null,e,n),null==t||R(t,"",M,e),P(e)},count:function(t){return null==t?0:R(t,"",a.thatReturnsNull,null)},toArray:function(t){var e=[];return F(t,e,null,a.thatReturnsArgument),e},only:function(t){return N(t)||g("143"),t}},createRef:function(){return{current:null}},Component:_,PureComponent:E,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:d,_calculateChangedBits:e,_defaultValue:t,_currentValue:t,_currentValue2:t,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:m,render:t}},Fragment:l,StrictMode:f,unstable_AsyncMode:v,unstable_Profiler:h,createElement:k,cloneElement:function(t,e,n){(null===t||void 0===t)&&g("267",t);var i=void 0,o=r({},t.props),a=t.key,s=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(s=e.ref,c=C.current),void 0!==e.key&&(a=""+e.key);var l=void 0;for(i in t.type&&t.type.defaultProps&&(l=t.type.defaultProps),e)x.call(e,i)&&!S.hasOwnProperty(i)&&(o[i]=void 0===e[i]&&void 0!==l?l[i]:e[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){l=Array(i);for(var f=0;f<i;f++)l[f]=arguments[f+2];o.children=l}return{$$typeof:u,type:t.type,key:a,ref:s,props:o,_owner:c}},createFactory:function(t){var e=k.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:r}},j={default:U},B=j&&U||j;t.exports=B.default?B.default:B},function(t,e,n){"use strict";var r=a(n(0)),i=a(n(83)),o=a(n(558));function a(t){return t&&t.__esModule?t:{default:t}}i.default.render(r.default.createElement(o.default,null),document.getElementById("index"))}]);
+
  */var r=n(266),i=n(186),o=n(265),a=n(185),s="function"==typeof Symbol&&Symbol.for,u=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,l=s?Symbol.for("react.fragment"):60107,f=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,d=s?Symbol.for("react.context"):60110,v=s?Symbol.for("react.async_mode"):60111,m=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);i(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function _(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}function w(){}function E(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&g("85"),this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var T=E.prototype=new w;T.constructor=E,r(T,_.prototype),T.isPureReactComponent=!0;var C={current:null},x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,n){var r=void 0,i={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),e)x.call(e,r)&&!S.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:u,type:t,key:o,ref:a,props:i,_owner:C.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===u}var A=/\/+/g,I=[];function O(t,e,n,r){if(I.length){var i=I.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function P(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>I.length&&I.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var o=!1;if(null===t)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case u:case c:o=!0}}if(o)return n(r,t,""===e?"."+D(t,0):e),1;if(o=0,e=""===e?".":e+":",Array.isArray(t))for(var a=0;a<t.length;a++){var s=e+D(i=t[a],a);o+=R(i,s,n,r)}else if(null===t||void 0===t?s=null:s="function"==typeof(s=y&&t[y]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),a=0;!(i=t.next()).done;)o+=R(i=i.value,s=e+D(i,a++),n,r);else"object"===i&&g("31","[object Object]"===(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return o}function D(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function L(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,a.thatReturnsArgument):null!=t&&(N(t)&&(e=i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n,t={$$typeof:u,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}),r.push(t))}function F(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),e=O(e,o,r,i),null==t||R(t,"",L,e),P(e)}var U={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=O(null,null,e,n),null==t||R(t,"",M,e),P(e)},count:function(t){return null==t?0:R(t,"",a.thatReturnsNull,null)},toArray:function(t){var e=[];return F(t,e,null,a.thatReturnsArgument),e},only:function(t){return N(t)||g("143"),t}},createRef:function(){return{current:null}},Component:_,PureComponent:E,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:d,_calculateChangedBits:e,_defaultValue:t,_currentValue:t,_currentValue2:t,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:m,render:t}},Fragment:l,StrictMode:f,unstable_AsyncMode:v,unstable_Profiler:h,createElement:k,cloneElement:function(t,e,n){(null===t||void 0===t)&&g("267",t);var i=void 0,o=r({},t.props),a=t.key,s=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(s=e.ref,c=C.current),void 0!==e.key&&(a=""+e.key);var l=void 0;for(i in t.type&&t.type.defaultProps&&(l=t.type.defaultProps),e)x.call(e,i)&&!S.hasOwnProperty(i)&&(o[i]=void 0===e[i]&&void 0!==l?l[i]:e[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){l=Array(i);for(var f=0;f<i;f++)l[f]=arguments[f+2];o.children=l}return{$$typeof:u,type:t.type,key:a,ref:s,props:o,_owner:c}},createFactory:function(t){var e=k.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:r}},j={default:U},B=j&&U||j;t.exports=B.default?B.default:B},function(t,e,n){"use strict";var r=a(n(0)),i=a(n(83)),o=a(n(558));function a(t){return t&&t.__esModule?t:{default:t}}i.default.render(r.default.createElement(o.default,null),document.getElementById("index"))}]);

Revision as of 15:32, 29 June 2018

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=566)}([function(t,e,n){"use strict";t.exports=n(565)},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(259);t.exports=function(t,e,n){return e in t?r(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(553);function i(){return t.exports=i=r||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(this,arguments)}t.exports=i},function(t,e,n){var r; /*!

 Copyright (c) 2017 Jed Watson.
 Licensed under the MIT License (MIT), see
 http://jedwatson.github.io/classnames
  • /

/*!

 Copyright (c) 2017 Jed Watson.
 Licensed under the MIT License (MIT), see
 http://jedwatson.github.io/classnames
  • /

!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&t.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}void 0!==t&&t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){t.exports=n(556)()},function(t,e,n){var r=n(50),i=n(1);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(490),i=n(53)(r);t.exports=i},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(259);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r(t,i.key,i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}},function(t,e,n){var r=n(526),i=n(254);function o(e){return t.exports=o=i?r:function(t){return t.__proto__||r(t)},o(e)}t.exports=o},function(t,e,n){var r=n(520),i=n(517);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=r(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},function(t,e,n){var r=n(245),i=n(244),o=n(243),a=n(2);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},s=o(n);"function"==typeof i&&(s=s.concat(i(n).filter(function(t){return r(n,t).enumerable}))),s.forEach(function(e){a(t,e,n[e])})}return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(82),i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o="[DEFAULT]",a=[],s=function(){function t(t,e,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(t),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(t){a.push(t),setTimeout(function(){return t(null)},0)},removeAuthTokenListener:function(t){a=a.filter(function(e){return e!==t})}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(t){this.checkDestroyed_(),this._automaticDataCollectionEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){t.firebase_.INTERNAL.removeApp(t.name_);var e=[];return Object.keys(t.services_).forEach(function(n){Object.keys(t.services_[n]).forEach(function(r){e.push(t.services_[n][r])})}),Promise.all(e.map(function(t){return t.INTERNAL.delete()}))}).then(function(){t.isDeleted_=!0,t.services_={}})},t.prototype._getService=function(t,e){if(void 0===e&&(e=o),this.checkDestroyed_(),this.services_[t]||(this.services_[t]={}),!this.services_[t][e]){var n=e!==o?e:void 0,r=this.firebase_.INTERNAL.factories[t](this,this.extendApp.bind(this),n);this.services_[t][e]=r}return this.services_[t][e]},t.prototype.extendApp=function(t){var e=this;r.deepExtend(this,t),t.INTERNAL&&t.INTERNAL.addAuthTokenListener&&(a.forEach(function(t){e.INTERNAL.addAuthTokenListener(t)}),a=[])},t.prototype.checkDestroyed_=function(){this.isDeleted_&&u("app-deleted",{name:this.name_})},t}();function u(t,e){throw c.create(t,e)}s.prototype.name&&s.prototype.options||s.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."}),l=function t(){var e={},n={},a={},c={__esModule:!0,initializeApp:function(t,n){if(void 0===n&&(n={}),"object"!=typeof n||null===n){var r=n;n={name:r}}var a=n;void 0===a.name&&(a.name=o);var l=a.name;"string"==typeof l&&l||u("bad-app-name",{name:l+""}),i(e,l)&&u("duplicate-app",{name:l});var f=new s(t,a,c);return e[l]=f,h(f,"create"),f},app:l,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(t,e,i,o,h){n[t]&&u("duplicate-service",{name:t}),n[t]=e,o&&(a[t]=o,f().forEach(function(t){o("create",t)}));var p=function(e){return void 0===e&&(e=l()),"function"!=typeof e[t]&&u("invalid-app-argument",{name:t}),e[t]()};return void 0!==i&&r.deepExtend(p,i),c[t]=p,s.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,h?e:[])},p},createFirebaseNamespace:t,extendNamespace:function(t){r.deepExtend(c,t)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(t){h(e[t],"delete"),delete e[t]},factories:n,useAsService:p,Promise:Promise,deepExtend:r.deepExtend}};function l(t){return i(e,t=t||o)||u("no-app",{name:t}),e[t]}function f(){return Object.keys(e).map(function(t){return e[t]})}function h(t,e){Object.keys(n).forEach(function(n){var r=p(t,n);null!==r&&a[r]&&a[r](e,t)})}function p(t,e){if("serverAuth"===e)return null;var n=e;return t.options,n}return r.patchProperty(c,"default",c),Object.defineProperty(c,"apps",{get:f}),r.patchProperty(l,"App",s),c}();e.firebase=l,e.default=l},function(t,e,n){var r=n(48),i=n(34),o=n(202),a=n(18);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(242),i=n(53),o=n(119),a=i(function(t,e){return o(t)?r(t,e):[]});t.exports=a},function(t,e,n){"use strict";for(var r=function(t){return null!==t&&!Array.isArray(t)&&"object"==typeof t},i={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},o=0;o<24;o+=1)i[112+o]="F"+(o+1);for(var a=0;a<26;a+=1){var s=a+65;i[s]=[String.fromCharCode(s+32),String.fromCharCode(s)]}var u={codes:i,getCode:function(t){return r(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var e=r(t),n=i[e?t.keyCode||t.which:t];return Array.isArray(n)&&(n=e?n[t.shiftKey?1:0]:n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};u.Spacebar=u[" "],u.Digit0=u[0],u.Digit1=u[1],u.Digit2=u[2],u.Digit3=u[3],u.Digit4=u[4],u.Digit5=u[5],u.Digit6=u[6],u.Digit7=u[7],u.Digit8=u[8],u.Digit9=u[9],u.Tilde=u["~"],u.GraveAccent=u["`"],u.ExclamationPoint=u["!"],u.AtSign=u["@"],u.PoundSign=u["#"],u.PercentSign=u["%"],u.Caret=u["^"],u.Ampersand=u["&"],u.PlusSign=u["+"],u.MinusSign=u["-"],u.EqualsSign=u["="],u.DivisionSign=u["/"],u.MultiplicationSign=u["*"],u.Comma=u[","],u.Decimal=u["."],u.Colon=u[":"],u.Semicolon=u[";"],u.Pipe=u["|"],u.BackSlash=u["\\"],u.QuestionMark=u["?"],u.SingleQuote=u["'"],u.DoubleQuote=u['"'],u.LeftCurlyBrace=u["{"],u.RightCurlyBrace=u["}"],u.LeftParenthesis=u["("],u.RightParenthesis=u[")"],u.LeftAngleBracket=u["<"],u.RightAngleBracket=u[">"],u.LeftSquareBracket=u["["],u.RightSquareBracket=u["]"],t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(121),i=n(38),o=n(96),a=n(46),s=n(72),u=Math.max;t.exports=function(t,e,n,c){t=i(t)?t:s(t),n=n&&!c?a(n):0;var l=t.length;return n<0&&(n=u(l+n,0)),o(t)?n<=l&&t.indexOf(e,n)>-1:!!l&&r(t,e,n)>-1}},function(t,e,n){var r=n(125);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e){t.exports={}},function(t,e,n){var r=n(436),i=n(435),o=n(424);t.exports=function(t){return r(t)||i(t)||o()}},function(t,e,n){var r=n(423),i=n(421);t.exports=function(t,e,n){return r(i,t,e,n)}},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],l=0;(u=new Error(e.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){var r=n(238),i=n(114),o=n(38);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(87),i=n(62),o=n(222),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(447),i=n(446),o=n(442);t.exports=function(t,e){return r(t)||i(t,e)||o()}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(252),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(467),i=n(454),o=n(47),a=n(18),s=n(452);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(516),i=n(253);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(23)("map",n(15));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"someByType",function(){return nt}),n.d(r,"findByType",function(){return rt}),n.d(r,"isNil",function(){return it});var i={};n.r(i),n.d(i,"COLORS",function(){return xe}),n.d(i,"FLOATS",function(){return Se}),n.d(i,"SIZES",function(){return ke}),n.d(i,"TEXT_ALIGNMENTS",function(){return Ne}),n.d(i,"VERTICAL_ALIGNMENTS",function(){return Ae}),n.d(i,"VISIBILITY",function(){return Ie}),n.d(i,"WIDTHS",function(){return Oe}),n.d(i,"DIRECTIONAL_TRANSITIONS",function(){return Pe}),n.d(i,"STATIC_TRANSITIONS",function(){return Re}),n.d(i,"TRANSITIONS",function(){return De}),n.d(i,"ACCESSIBILITY",function(){return Me}),n.d(i,"ARROWS",function(){return Le}),n.d(i,"AUDIO_VIDEO",function(){return Fe}),n.d(i,"BUSINESS",function(){return Ue}),n.d(i,"CHESS",function(){return je}),n.d(i,"CODE",function(){return Be}),n.d(i,"COMMUNICATION",function(){return qe}),n.d(i,"COMPUTERS",function(){return Ve}),n.d(i,"CURRENCY",function(){return We}),n.d(i,"DATE_TIME",function(){return He}),n.d(i,"DESIGN",function(){return ze}),n.d(i,"EDITORS",function(){return Ke}),n.d(i,"FILES",function(){return Ge}),n.d(i,"GENDERS",function(){return Qe}),n.d(i,"HANDS_GESTURES",function(){return Ye}),n.d(i,"HEALTH",function(){return Xe}),n.d(i,"IMAGES",function(){return $e}),n.d(i,"INTERFACES",function(){return Je}),n.d(i,"LOGISTICS",function(){return Ze}),n.d(i,"MAPS",function(){return tn}),n.d(i,"MEDICAL",function(){return en}),n.d(i,"OBJECTS",function(){return nn}),n.d(i,"PAYMENTS_SHOPPING",function(){return rn}),n.d(i,"SHAPES",function(){return on}),n.d(i,"SPINNERS",function(){return an}),n.d(i,"SPORTS",function(){return sn}),n.d(i,"STATUS",function(){return un}),n.d(i,"USERS_PEOPLE",function(){return cn}),n.d(i,"VEHICLES",function(){return ln}),n.d(i,"WRITING",function(){return fn}),n.d(i,"BRANDS",function(){return hn}),n.d(i,"ICONS",function(){return pn}),n.d(i,"ICON_ALIASES",function(){return dn}),n.d(i,"ICONS_AND_ALIASES",function(){return vn}),n.d(i,"COMPONENT_CONTEXT_SPECIFIC_ICONS",function(){return mn}),n.d(i,"ALL_ICONS_IN_ALL_CONTEXTS",function(){return yn});var o=n(3),a=n.n(o),s=n(8),u=n.n(s),c=n(9),l=n.n(c),f=n(6),h=n.n(f),p=n(10),d=n.n(p),v=n(11),m=n.n(v),y=n(1),g=n.n(y),b=n(2),_=n.n(b),w=n(35),E=n.n(w),T=n(7),C=n.n(T),x=(n(5),n(0)),S=n.n(x),k=n(12),N=n.n(k),A=n(99),I=n.n(A),O=n(32),P=n.n(O),R=(n(475),n(73)),D=n.n(R),M=n(45),L=n.n(M),F=n(28),U=n.n(F),j=(n(450),n(98)),B=n.n(j),q=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e[t];if(void 0!==o)return o;if(i){var a=e[(r=t,"default".concat(r[0].toUpperCase()+r.slice(1)))];if(void 0!==a)return a;if(n){var s=n[t];if(void 0!==s)return s}}return"checked"!==t&&("value"===t?e.multiple?[]:"":void 0)},V=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"trySetState",function(t,e){var r=n.constructor.autoControlledProps,i=Object.keys(t).reduce(function(e,i){return void 0!==n.props[i]?e:-1===r.indexOf(i)?e:(e[i]=t[i],e)},{});e&&(i=N()({},i,e)),Object.keys(i).length>0&&n.setState(i)});var a=n.constructor.autoControlledProps,s=C()(g()(g()(n)),"getInitialAutoControlledState",n.props)||{},c=a.reduce(function(t,e){return t[e]=q(e,n.props,s,!0),t},{});return n.state=N()({},s,c),n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.constructor.autoControlledProps.reduce(function(n,r){var i=P()(t[r]),o=!P()(e.props[r])&&i;return i?o&&(n[r]=q(r,t)):n[r]=t[r],n},{});Object.keys(n).length>0&&this.setState(n)}}]),e}(x.Component),W=n(31),H=n.n(W),z=n(29),K=n.n(z),G=n(296),Q=n.n(G),Y=function(t){return Q()(D()(x.Children.toArray(t),x.isValidElement),"key")},X=function(t,e,n){return E()(n,t)?n[t]:e[t]},$=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=function(t,e){var n={},r=[];return K()(U()(t),function(t){E()(e,t)?r.length&&(n[t]=r,r=[]):r.push(t)}),[n,r]}(t,e),i=H()(r,2),o=i[0],a=i[1];return K()(U()(e),function(r){E()(o,r)&&K()(o[r],function(r){n[r]=X(r,t,e)}),n[r]=X(r,t,e)}),K()(a,function(r){n[r]=X(r,t,e)}),n},J=n(143),Z=n.n(J),tt=n(59),et=n.n(tt),nt=function(t,e){return et()(x.Children.toArray(t),{type:e})},rt=function(t,e){return Z()(x.Children.toArray(t),{type:e})},it=function(t){return null===t||void 0===t||Array.isArray(t)&&0===t.length},ot=n(50),at=n.n(ot),st={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function ut(t){var e=at()(t);return"string"===e||"number"===e?st[t]||t:""}var ct=function(t,e){return t&&e},lt=function(t,e){return t&&!0!==t&&"".concat(t," ").concat(e)},ft=function(t,e){return t&&(!0===t?e:"".concat(t," ").concat(e))},ht=function(t,e){return t&&!0!==t?t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(t){return"".concat(t.replace("-"," ")," ").concat(e)}).join(" "):null},pt=function(t){return"justified"===t?"justified":lt(t,"aligned")},dt=function(t){return lt(t,"aligned")},vt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&"equal"===t)return"equal width";var n=at()(t);return"string"!==n&&"number"!==n||!e?ut(t):"".concat(ut(t)," ").concat(e)},mt=n(22),yt=n.n(mt),gt=(n(295),n(294),n(293),n(292),n(146),n(291),n(290),n(195),n(145),n(289),n(288),n(194),n(193),n(36)),bt=n.n(gt),_t=n(75),wt=n.n(_t),Et=(n(287),n(13)),Tt=n.n(Et),Ct="object"===("undefined"==typeof document?"undefined":at()(document))&&null!==document,xt="object"===("undefined"==typeof window?"undefined":at()(window))&&null!==window&&window.self===window,St=function t(){return Tt()(t.override)?Ct&&xt:t.override};St();var kt=function(){function t(e){u()(this,t),this.handlers=new Set(e)}return l()(t,[{key:"addHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t),n.add(t)}),new t(n)}},{key:"dispatchEvent",value:function(t,e){e?this.handlers.forEach(function(e){e(t)}):yt()(this.handlers).pop()(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e){var n=new Set(this.handlers);return e.forEach(function(t){n.delete(t)}),new t(n)}}]),t}(),Nt=function(){function t(e,n){u()(this,t),this.handlerSets=n,this.poolName=e}return l()(t,[{key:"addHandlers",value:function(e,n){var r=new Map(this.handlerSets);return r.has(e)?r.set(e,r.get(e).addHandlers(n)):r.set(e,new kt(n)),new t(this.poolName,r)}},{key:"dispatchEvent",value:function(t,e){var n=this.handlerSets.get(t);n&&n.dispatchEvent(e,"default"===this.poolName)}},{key:"hasHandlers",value:function(t){var e=this.handlerSets.get(t);return!!e&&e.hasHandlers()}},{key:"removeHandlers",value:function(e,n){var r=new Map(this.handlerSets);if(!r.has(e))return new t(this.poolName,r);var i=r.get(e).removeHandlers(n);return i.hasHandlers()?r.set(e,i):r.delete(e),new t(this.poolName,r)}}]),t}();_()(Nt,"createByType",function(t,e,n){var r=new Map;return r.set(e,new kt(n)),new Nt(t,r)});var At=function(){function t(e){u()(this,t),_()(this,"handlers",new Map),_()(this,"pools",new Map),_()(this,"createEmitter",function(t,e){return function(n){e.forEach(function(e){e.dispatchEvent(t,n)})}}),this.target=e}return l()(t,[{key:"addHandlers",value:function(t,e,n){this.removeTargetHandler(e),this.pools.has(t)?this.pools.set(t,this.pools.get(t).addHandlers(e,n)):this.pools.set(t,Nt.createByType(t,e,n)),this.addTargetHandler(e)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,e,n){var r=this.pools.get(t);if(r){var i=r.removeHandlers(e,n);i.hasHandlers(e)?(this.removeTargetHandler(e),this.pools.set(t,i)):(this.removeTargetHandler(e),this.pools.delete(t)),this.pools.size>0&&this.addTargetHandler(e)}}},{key:"addTargetHandler",value:function(t){var e=this.createEmitter(t,this.pools);this.handlers.set(t,e),this.target.addEventListener(t,e)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t)),this.handlers.delete(t))}}]),t}(),It=n(18),Ot=n.n(It),Pt=function(t){return Ot()(t)?t:[t]},Rt=function(t){return"document"===t?document:"window"===t?window:t||document},Dt=new(function(){function t(){var e=this;u()(this,t),_()(this,"targets",new Map),_()(this,"getTarget",function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Rt(t);if(e.targets.has(r))return e.targets.get(r);if(!n)return null;var i=new At(r);return e.targets.set(r,i),i}),_()(this,"removeTarget",function(t){e.targets.delete(Rt(t))})}return l()(t,[{key:"sub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o;this.getTarget(i).addHandlers(a,t,Pt(e))}}},{key:"unsub",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(St()){var r=n.target,i=void 0===r?document:r,o=n.pool,a=void 0===o?"default":o,s=this.getTarget(i,!1);s&&(s.removeHandlers(a,t,Pt(e)),s.hasHandlers()||this.removeTarget(i))}}}]),t}()),Mt=n(74),Lt=n.n(Mt),Ft=n(81),Ut=n.n(Ft),jt=n(44),Bt=n.n(jt),qt=n(60),Vt=n.n(qt),Wt=n(96),Ht=n.n(Wt),zt=n(286),Kt=n.n(zt),Gt=n(4),Qt=n.n(Gt);function Yt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthand() Component must be a string or function.");if(Tt()(n)||Kt()(n))return null;var i=Ht()(n),o=Vt()(n),a=Bt()(n),s=Object(x.isValidElement)(n),u=Ut()(n),c=i||o||Ot()(n);if(!(a||s||u||c))return null;var l=r.defaultProps,f=void 0===l?{}:l,h=s&&n.props||u&&n||c&&e(n),p=r.overrideProps,d=void 0===p?{}:p;d=Bt()(d)?d(N()({},f,h)):d;var v=N()({},f,h,d);if(f.className||d.className||h.className){var m=Qt()(f.className,d.className,h.className);v.className=Lt()(m.split(" ")).join(" ")}if((f.style||d.style||h.style)&&(v.style=N()({},f.style,h.style,d.style)),Tt()(v.key)){var y=v.childKey,g=r.autoGenerateKey,b=void 0===g||g;Tt()(y)?b&&(i||o)&&(v.key=n):(v.key="function"==typeof y?y(v):y,delete v.childKey)}return s?Object(x.cloneElement)(n,v):c||u?S.a.createElement(t,v):a?n(t,v,v.children):void 0}function Xt(t,e){if("function"!=typeof t&&"string"!=typeof t)throw new Error("createShorthandFactory() Component must be a string or function.");return function(n,r){return Yt(t,e,n,r)}}Yt.handledProps=[];var $t=Xt("div",function(t){return{children:t}}),Jt=Xt("iframe",function(t){return{src:t}}),Zt=Xt("img",function(t){return{src:t}}),te=Xt("input",function(t){return{type:t}}),ee=Xt("label",function(t){return{children:t}}),ne=Xt("p",function(t){return{children:t}}),re=function(t,e){var n=t.handledProps,r=void 0===n?[]:n;return Object.keys(e).reduce(function(t,n){return"childKey"===n?t:(-1===r.indexOf(n)&&(t[n]=e[n]),t)},{})};var ie=function(t,e,n){var r=t.defaultProps,i=void 0===r?{}:r;if(e.as&&e.as!==i.as)return e.as;if(n){var o=n();if(o)return o}return e.href?"a":i.as||"div"},oe=n(19),ae=n.n(oe),se=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","form","id","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","type","value"],ue=se.concat(["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]),ce=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.htmlProps,r=void 0===n?ue:n,i=e.includeAria,o=void 0===i||i,a={},s={};return K()(t,function(t,e){var n=o&&(/^aria-.*$/.test(e)||"role"===e);(ae()(r,e)||n?a:s)[e]=t}),[a,s]},le=n(100),fe=n.n(le),he=n(285),pe=n.n(he),de=function(t,e){if(et()([e,t],Tt.a))return!1;if(e.target&&(C()(e.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return C()(e.target,"removeAttribute","data-suir-click-target"),t.contains(e.target);var n=e.clientX,r=e.clientY;if(et()([n,r],Tt.a))return!1;var i=t.getClientRects();if(!(t.offsetWidth&&t.offsetHeight&&i&&i.length))return!1;var o=pe()(i),a=o.top,s=o.bottom,u=o.left,c=o.right;return!et()([a,s,u,c],Tt.a)&&fe()(r,a,s+.001)&&fe()(n,u,c+.001)},ve=function(t){return{active:!1,type:"ellipsisItem",value:t}},me=n(284),ye=n.n(me),ge=n(15),be=n.n(ge),_e=function(t,e,n){return be()(ye()(t,e+1),n)},we=function(t,e){var n=t.activePage,r=t.boundaryRange,i=t.siblingRange,o=t.totalPages,a=r,s=_e(1,a,e),u=o+1-r,c=_e(u,o,e),l=Math.min(Math.max(n-i,a+2),u-1-2*i-1),f=l+2*i,h=_e(l,f,e);return yt()(s).concat([function(t,e,n){var r=e-1;return(r!==t+1?ve:n)(r)}(a,l,e)],yt()(h),[function(t,e,n){var r=t+1;return(r!==e-1?ve:n)(r)}(f,u,e)],yt()(c)).filter(Boolean)},Ee=function(t){var e,n,r,i={activePage:+(e=t).activePage,boundaryRange:+e.boundaryRange,siblingRange:+e.siblingRange,totalPages:+e.totalPages},o=i.activePage,a=i.totalPages,s=function(t){return function(e){return{active:t===e,type:"pageItem",value:e}}}(o),u=(r=(n=i).boundaryRange,3+2*n.siblingRange+2*r>=n.totalPages?_e(1,a,s):we(i,s));return[{active:!1,type:"firstItem",value:1},function(t){return{active:!1,type:"prevItem",value:Math.max(1,t-1)}}(o)].concat(yt()(u),[function(t,e){return{active:!1,type:"nextItem",value:Math.min(t+1,e)}}(o,a),function(t){return{active:!1,type:"lastItem",value:t}}(a)])},Te=n(72),Ce=n.n(Te),xe=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],Se=["left","right"],ke=["mini","tiny","small","medium","large","big","huge","massive"],Ne=["left","center","right","justified"],Ae=["bottom","middle","top"],Ie=["mobile","tablet","computer","large screen","widescreen"],Oe=yt()(U()(st)).concat(yt()(U()(st).map(Number)),yt()(Ce()(st))),Pe=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"],Re=["jiggle","flash","shake","pulse","tada","bounce","glow"],De=Pe.concat(Re),Me=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"],Le=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign in alternate","sign out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload"],Fe=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"],Ue=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"],je=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"],Be=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"],qe=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"],Ve=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"],We=["dollar sign","euro sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"],He=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"],ze=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"],Ke=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"],Ge=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"],Qe=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"],Ye=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"],Xe=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"],$e=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"],Je=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign in alternate","sign out alternate","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"],Ze=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"],tn=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"],en=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"],nn=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"],rn=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"],on=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"],an=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"],sn=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"],un=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"],cn=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"],ln=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"],fn=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"],hn=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin in","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"],pn=Lt()(Me.concat(Le,Fe,Ue,je,Be,qe,Ve,We,He,ze,Ke,Ge,Qe,Ye,Xe,$e,Je,Ze,tn,en,nn,rn,on,an,sn,un,cn,ln,fn,hn)),dn=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","credit card amazon pay","credit card american express","credit card diners club","credit card discover","credit card jcb","credit card mastercard","credit card paypal","credit card stripe","credit card visa","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","american express card","american express","amex","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery medium","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","diners club card","diners club","discover card","discover","discussions","doctor","dollar","dont","dribble","drivers license","dropdown","eercast","emergency","envira gallery","erase","eur","euro","eyedropper","fa","factory","favorite","feed","female homosexual","file text","find","first aid","five hundred pixels","fork","game","gay","gbp","gittip","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","japan credit bureau card","japan credit bureau","jcb","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","mastercard card","mastercard","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","optinmonster","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","pocket","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme isle","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","visa card","visa","volume control phone","wait","warning circle","warning sign","warning","wechat","wi-fi","wikipedia","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yc","ycombinator","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"],vn=Lt()(yt()(pn).concat(dn)),mn=["left dropdown"],yn=Lt()(yt()(vn).concat(mn)),gn=function(t,e){return"number"==typeof t||"string"==typeof t?t:t[e]},bn=n(142),_n=n.n(bn),wn=(n(283),n(190)),En=n.n(wn).a,Tn=n(16),Cn=n.n(Tn);function xn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()(o,"icons",n),u=re(xn,t),c=ie(xn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}xn.handledProps=["as","children","className","content","size"],xn.propTypes={},xn.defaultProps={as:"i"};var Sn=xn,kn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"getIconAriaOptions",value:function(){var t={};return this.props["aria-label"]||(t["aria-hidden"]="true"),t}},{key:"render",value:function(){var t=this.props,n=t.bordered,r=t.circular,i=t.className,o=t.color,s=t.corner,u=t.disabled,c=t.fitted,l=t.flipped,f=t.inverted,h=t.link,p=t.loading,d=t.name,v=t.rotated,m=t.size,y=Qt()(o,d,m,ct(n,"bordered"),ct(r,"circular"),ct(s,"corner"),ct(u,"disabled"),ct(c,"fitted"),ct(f,"inverted"),ct(h,"link"),ct(p,"loading"),lt(l,"flipped"),lt(v,"rotated"),"icon",i),g=re(e,this.props),b=ie(e,this.props),_=this.getIconAriaOptions();return S.a.createElement(b,a()({},g,_,{className:y}))}}]),e}(x.Component);_()(kn,"defaultProps",{as:"i"}),_()(kn,"Group",Sn),_()(kn,"handledProps",["aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"]),kn.propTypes={},kn.create=Xt(kn,function(t){return{name:t}});var Nn=kn,An=n(17),In=n.n(An),On=n(83),Pn=n.n(On),Rn=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.innerRef;t&&t(Object(On.findDOMNode)(this))}},{key:"render",value:function(){var t=this.props.children;return x.Children.only(t)}}]),e}(x.Component);_()(Rn,"handledProps",["children","innerRef"]),Rn.propTypes={};var Dn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDocumentClick",function(t){var e=r.props,n=e.closeOnDocumentClick,i=e.closeOnRootNodeClick;if(r.rootNode&&r.portalNode&&!de(r.triggerNode,t)&&!de(r.portalNode,t)){var o=de(r.rootNode,t);(n&&!o||i&&o)&&r.close(t)}}),_()(g()(g()(r)),"handleEscape",function(t){r.props.closeOnEscape&&In.a.getCode(t)===In.a.Escape&&r.close(t)}),_()(g()(g()(r)),"handlePortalMouseLeave",function(t){var e=r.props,n=e.closeOnPortalMouseLeave,i=e.mouseLeaveDelay;n&&(r.mouseLeaveTimer=r.closeWithTimeout(t,i))}),_()(g()(g()(r)),"handlePortalMouseEnter",function(){r.props.closeOnPortalMouseLeave&&clearTimeout(r.mouseLeaveTimer)}),_()(g()(g()(r)),"handleTriggerBlur",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerBlur,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onBlur",t].concat(a));var u=C()(g()(g()(r)),"rootNode.contains",t.relatedTarget);i&&!u&&r.close(t)}),_()(g()(g()(r)),"handleTriggerClick",function(t){for(var e=r.props,n=e.trigger,i=e.closeOnTriggerClick,o=e.openOnTriggerClick,a=r.state.open,s=arguments.length,u=new Array(s>1?s-1:0),c=1;c<s;c++)u[c-1]=arguments[c];C.a.apply(void 0,[n,"props.onClick",t].concat(u)),a&&i?r.close(t):!a&&o&&r.open(t)}),_()(g()(g()(r)),"handleTriggerFocus",function(t){for(var e=r.props,n=e.trigger,i=e.openOnTriggerFocus,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];C.a.apply(void 0,[n,"props.onFocus",t].concat(a)),i&&r.open(t)}),_()(g()(g()(r)),"handleTriggerMouseLeave",function(t){clearTimeout(r.mouseEnterTimer);for(var e=r.props,n=e.trigger,i=e.closeOnTriggerMouseLeave,o=e.mouseLeaveDelay,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseLeave",t].concat(s)),i&&(r.mouseLeaveTimer=r.closeWithTimeout(t,o))}),_()(g()(g()(r)),"handleTriggerMouseEnter",function(t){clearTimeout(r.mouseLeaveTimer);for(var e=r.props,n=e.trigger,i=e.mouseEnterDelay,o=e.openOnTriggerMouseEnter,a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];C.a.apply(void 0,[n,"props.onMouseEnter",t].concat(s)),o&&(r.mouseEnterTimer=r.openWithTimeout(t,i))}),_()(g()(g()(r)),"open",function(t){var e=r.props.onOpen;e&&e(t,r.props),r.trySetState({open:!0})}),_()(g()(g()(r)),"openWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.open(n)},e||0)}),_()(g()(g()(r)),"close",function(t){var e=r.props.onClose;e&&e(t,r.props),r.trySetState({open:!1})}),_()(g()(g()(r)),"closeWithTimeout",function(t,e){var n=N()({},t);return setTimeout(function(){return r.close(n)},e||0)}),_()(g()(g()(r)),"attachRenderSubTreeSubscribers",function(t){if(!r.rootNode)return null;r.portalNode=r.rootNode.firstElementChild,Dt.sub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.sub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode})}),_()(g()(g()(r)),"mountPortal",function(){if(St()&&!r.rootNode){var t=r.props,e=t.eventPool,n=t.mountNode,i=void 0===n?St()?document.body:null:n,o=t.prepend;r.rootNode=document.createElement("div"),o?i.insertBefore(r.rootNode,i.firstElementChild):i.appendChild(r.rootNode),Dt.sub("click",r.handleDocumentClick,{pool:e}),Dt.sub("keydown",r.handleEscape,{pool:e}),C()(r.props,"onMount",null,r.props)}}),_()(g()(g()(r)),"unmountPortal",function(){if(St()&&r.rootNode){var t=r.props.eventPool;Pn.a.unmountComponentAtNode(r.rootNode),r.rootNode.parentNode.removeChild(r.rootNode),Dt.unsub("mouseleave",r.handlePortalMouseLeave,{pool:t,target:r.portalNode}),Dt.unsub("mouseenter",r.handlePortalMouseEnter,{pool:t,target:r.portalNode}),r.rootNode=null,r.portalNode=null,Dt.unsub("click",r.handleDocumentClick,{pool:t}),Dt.unsub("keydown",r.handleEscape,{pool:t}),C()(r.props,"onUnmount",null,r.props)}}),_()(g()(g()(r)),"handleRef",function(t){return r.triggerNode=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(t,e){this.renderPortal(),e.open&&!this.state.open&&this.unmountPortal()}},{key:"componentWillUnmount",value:function(){this.unmountPortal(),clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"renderPortal",value:function(){var t=this;if(this.state.open){var e=this.props,n=e.children,r=e.className,i=e.eventPool,o=e.style;if(this.mountPortal(),!St())return null;this.rootNode.className=r||"",this.rootNode.style=o||"",this.portalNode&&(Dt.unsub("mouseleave",this.handlePortalMouseLeave,{pool:i,target:this.portalNode}),Dt.unsub("mouseenter",this.handlePortalMouseEnter,{pool:i,target:this.portalNode})),Pn.a.unstable_renderSubtreeIntoContainer(this,x.Children.only(n),this.rootNode,function(){return t.attachRenderSubTreeSubscribers(i)})}}},{key:"render",value:function(){var t=this.props.trigger;return t?S.a.createElement(Rn,{innerRef:this.handleRef},Object(x.cloneElement)(t,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})):null}}]),e}(V);_()(Dn,"defaultProps",{closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0}),_()(Dn,"autoControlledProps",["open"]),_()(Dn,"handledProps",["children","className","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnRootNodeClick","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","prepend","style","trigger"]),Dn.propTypes={};var Mn=Dn;function Ln(t){var e=t.blurring,n=t.className,i=t.children,o=t.content,s=t.dimmed,u=Qt()(ct(e,"blurring"),ct(s,"dimmed"),"dimmable",n),c=re(Ln,t),l=ie(Ln,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(i)?o:i)}Ln.handledProps=["as","blurring","children","className","content","dimmed"],Ln.propTypes={};var Fn=Ln,Un=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){C()(r.props,"onClick",t,r.props),r.contentRef&&r.contentRef!==t.target&&de(r.contentRef,t)||C()(r.props,"onClickOutside",t,r.props)}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"handleContentRef",function(t){return r.contentRef=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.active;this.props.active!==e&&this.toggleStyles(e)}},{key:"componentDidMount",value:function(){var t=this.props.active;this.toggleStyles(t)}},{key:"toggleStyles",value:function(t){this.ref&&(t?this.ref.style.setProperty("display","flex","important"):this.ref.style.removeProperty("display"))}},{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.inverted,l=t.page,f=t.simple,h=t.verticalAlign,p=Qt()("ui",ct(n,"active transition visible"),ct(u,"disabled"),ct(c,"inverted"),ct(l,"page"),ct(f,"simple"),dt(h),"dimmer",o),d=re(e,this.props),v=ie(e,this.props),m=r.isNil(i)?s:i;return S.a.createElement(v,a()({},d,{className:p,onClick:this.handleClick,ref:this.handleRef}),m&&S.a.createElement("div",{className:"content",ref:this.handleContentRef},m))}}]),e}(x.Component);_()(Un,"handledProps",["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"]),Un.propTypes={};var jn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handlePortalMount",function(){St()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))}),_()(g()(g()(r)),"handlePortalUnmount",function(){St()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.page,i=re(e,this.props);return r?S.a.createElement(Mn,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:n,openOnTriggerClick:!1},S.a.createElement(Un,a()({},i,{active:n,page:r}))):S.a.createElement(Un,a()({},i,{active:n,page:r}))}}]),e}(x.Component);function Bn(t){var e=t.children,n=t.className,i=t.content,o=t.size,s=Qt()("ui",o,n,"images"),u=re(Bn,t),c=ie(Bn,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(jn,"Dimmable",Fn),_()(jn,"Inner",Un),_()(jn,"handledProps",["active","page"]),jn.propTypes={},jn.create=Xt(jn,function(t){return{content:t}}),Bn.handledProps=["as","children","className","content","size"],Bn.propTypes={};var qn=Bn,Vn=["alt","height","src","srcSet","width"];function Wn(t){var e=t.avatar,n=t.bordered,i=t.centered,o=t.children,s=t.circular,u=t.className,c=t.content,l=t.dimmer,f=t.disabled,h=t.floated,p=t.fluid,d=t.hidden,v=t.href,m=t.inline,y=t.label,g=t.rounded,b=t.size,_=t.spaced,w=t.verticalAlign,E=t.wrapped,T=t.ui,C=Qt()(ct(T,"ui"),b,ct(e,"avatar"),ct(n,"bordered"),ct(s,"circular"),ct(i,"centered"),ct(f,"disabled"),ct(p,"fluid"),ct(d,"hidden"),ct(m,"inline"),ct(g,"rounded"),ft(_,"spaced"),lt(h,"floated"),dt(w,"aligned"),"image",u),x=re(Wn,t),k=ce(x,{htmlProps:Vn}),N=H()(k,2),A=N[0],I=N[1],O=ie(Wn,t,function(){if(!(Tt()(l)&&Tt()(y)&&Tt()(E)&&r.isNil(o)))return"div"});return r.isNil(o)?r.isNil(c)?"img"===O?S.a.createElement(O,a()({},I,A,{className:C})):S.a.createElement(O,a()({},I,{className:C,href:v}),jn.create(l,{autoGenerateKey:!1}),Yn.create(y,{autoGenerateKey:!1}),S.a.createElement("img",A)):S.a.createElement(O,a()({},x,{className:C}),c):S.a.createElement(O,a()({},x,{className:C}),o)}Wn.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],Wn.Group=qn,Wn.propTypes={},Wn.defaultProps={as:"img",ui:!0},Wn.create=Xt(Wn,function(t){return{src:t}});var Hn=Wn;function zn(t){var e=t.children,n=t.className,i=t.content,o=Qt()("detail",n),s=re(zn,t),u=ie(zn,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}zn.handledProps=["as","children","className","content"],zn.propTypes={},zn.create=Xt(zn,function(t){return{content:t}});var Kn=zn;function Gn(t){var e=t.children,n=t.circular,i=t.className,o=t.color,s=t.content,u=t.size,c=t.tag,l=Qt()("ui",o,u,ct(n,"circular"),ct(c,"tag"),"labels",i),f=re(Gn,t),h=ie(Gn,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(e)?s:e)}Gn.handledProps=["as","children","circular","className","color","content","size","tag"],Gn.propTypes={};var Qn=Gn,Yn=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),C()(r.props,"onRemove",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.attached,o=t.basic,s=t.children,u=t.circular,c=t.className,l=t.color,f=t.content,h=t.corner,p=t.detail,d=t.empty,v=t.floating,m=t.horizontal,y=t.icon,g=t.image,b=t.onRemove,_=t.pointing,w=t.removeIcon,E=t.ribbon,T=t.size,C=t.tag,x=(!0===_?"pointing":("left"===_||"right"===_)&&"".concat(_," pointing"))||("above"===_||"below"===_)&&"pointing ".concat(_),k=Qt()("ui",l,x,T,ct(n,"active"),ct(o,"basic"),ct(u,"circular"),ct(d,"empty"),ct(v,"floating"),ct(m,"horizontal"),ct(!0===g,"image"),ct(C,"tag"),ft(h,"corner"),ft(E,"ribbon"),lt(i,"attached"),"label",c),N=re(e,this.props),A=ie(e,this.props);if(!r.isNil(s))return S.a.createElement(A,a()({},N,{className:k,onClick:this.handleClick}),s);var I=P()(w)?"delete":w;return S.a.createElement(A,a()({className:k,onClick:this.handleClick},N),Nn.create(y,{autoGenerateKey:!1}),"boolean"!=typeof g&&Hn.create(g,{autoGenerateKey:!1}),f,Kn.create(p,{autoGenerateKey:!1}),b&&Nn.create(I,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))}}]),e}(x.Component);function Xn(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()(ct(s,"visible"),ct(o,"hidden"),"content",n),c=re(Xn,t),l=ie(Xn,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}_()(Yn,"Detail",Kn),_()(Yn,"Group",Qn),_()(Yn,"handledProps",["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","removeIcon","ribbon","size","tag"]),Yn.propTypes={},Yn.create=Xt(Yn,function(t){return{content:t}}),Xn.handledProps=["as","children","className","content","hidden","visible"],Xn.propTypes={};var $n=Xn;function Jn(t){var e=t.attached,n=t.basic,i=t.buttons,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.content,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.labeled,m=t.negative,y=t.positive,g=t.primary,b=t.secondary,_=t.size,w=t.toggle,E=t.vertical,T=t.widths,C=Qt()("ui",u,_,ct(n,"basic"),ct(c,"compact"),ct(h,"fluid"),ct(p,"icon"),ct(d,"inverted"),ct(v,"labeled"),ct(m,"negative"),ct(y,"positive"),ct(g,"primary"),ct(b,"secondary"),ct(w,"toggle"),ct(E,"vertical"),ft(e,"attached"),lt(f,"floated"),vt(T),"buttons",s),x=re(Jn,t),k=ie(Jn,t);return Tt()(i)?S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?l:o):S.a.createElement(k,a()({},x,{className:C}),be()(i,function(t){return rr.create(t)}))}Jn.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],Jn.propTypes={};var Zn=Jn;function tr(t){var e=t.className,n=t.text,r=Qt()("or",e),i=re(tr,t),o=ie(tr,t);return S.a.createElement(o,a()({},i,{className:r,"data-text":n}))}tr.handledProps=["as","className","text"],tr.propTypes={};var er=tr,nr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"computeElementType",function(){var t=i.props,e=t.attached,n=t.label;if(!Tt()(e)||!Tt()(n))return"div"}),_()(g()(g()(i)),"computeTabIndex",function(t){var e=i.props,n=e.disabled,r=e.tabIndex;return Tt()(r)?n?-1:"div"===t?0:void 0:r}),_()(g()(g()(i)),"focus",function(){return C()(i.ref,"focus")}),_()(g()(g()(i)),"handleClick",function(t){i.props.disabled?t.preventDefault():C()(i.props,"onClick",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"hasIconClass",function(){var t=i.props,e=t.labelPosition,n=t.children,o=t.content,a=t.icon;return!0===a||a&&(e||r.isNil(n)&&Tt()(o))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.animated,o=t.attached,s=t.basic,u=t.children,c=t.circular,l=t.className,f=t.color,h=t.compact,p=t.content,d=t.disabled,v=t.floated,m=t.fluid,y=t.icon,g=t.inverted,b=t.label,_=t.labelPosition,w=t.loading,E=t.negative,T=t.positive,C=t.primary,x=t.secondary,k=t.role,N=t.size,A=t.toggle,I=Qt()(f,N,ct(n,"active"),ct(s,"basic"),ct(c,"circular"),ct(h,"compact"),ct(m,"fluid"),ct(this.hasIconClass(),"icon"),ct(g,"inverted"),ct(w,"loading"),ct(E,"negative"),ct(T,"positive"),ct(C,"primary"),ct(x,"secondary"),ct(A,"toggle"),ft(i,"animated"),ft(o,"attached")),O=Qt()(ft(_||!!b,"labeled")),P=Qt()(ct(d,"disabled"),lt(v,"floated")),R=re(e,this.props),D=ie(e,this.props,this.computeElementType),M=this.computeTabIndex(D);if(!Tt()(b)){var L=Qt()("ui",I,"button",l),F=Qt()("ui",O,"button",l,P),U=Yn.create(b,{defaultProps:{basic:!0,pointing:"left"===_?"right":"left"},autoGenerateKey:!1});return S.a.createElement(D,a()({},R,{className:F,onClick:this.handleClick}),"left"===_&&U,S.a.createElement("button",{className:L,disabled:d,ref:this.handleRef,tabIndex:M},Nn.create(y,{autoGenerateKey:!1})," ",p),("right"===_||!_)&&U)}var j=Qt()("ui",I,P,O,"button",l),B=!r.isNil(u);return S.a.createElement(D,a()({},R,{className:j,disabled:d&&"button"===D||void 0,onClick:this.handleClick,ref:this.handleRef,role:k,tabIndex:M}),B&&u,!B&&Nn.create(y,{autoGenerateKey:!1}),!B&&p)}}]),e}(x.Component);_()(nr,"defaultProps",{as:"button",role:"button"}),_()(nr,"Content",$n),_()(nr,"Group",Zn),_()(nr,"Or",er),_()(nr,"handledProps",["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle"]),nr.propTypes={},nr.create=Xt(nr,function(t){return{content:t}});var rr=nr,ir=n(97),or=n.n(ir),ar=n(58),sr=n.n(ar),ur=function(t){var e=t.node;if(St())return Tt()(e)?document.body:e},cr=n(282),lr=n.n(cr),fr=n(281),hr=n.n(fr),pr=n(280),dr=n.n(pr),vr=n(279),mr=n.n(vr),yr=n(278),gr=n.n(yr),br=n(277),_r=n.n(br),wr=wt()(_r.a,bt()("props.className"),gr()(mr()(/\s+/)),dr()(hr.a),lr.a),Er=function(t,e){return[I()(e,t),I()(t,e)]},Tr=new Map,Cr=function(t,e){var n=wr(e),r=Er(Tr.get(t),n),i=H()(r,2),o=i[0],a=i[1];K()(o,function(e){return t.classList.add(e)}),K()(a,function(e){return t.classList.remove(e)}),Tr.set(t,n)},xr=new function t(){var e=this;u()(this,t),_()(this,"add",function(t,n){e.nodes.has(t)?e.nodes.get(t).add(n):e.nodes.set(t,new Set([n]))}),_()(this,"del",function(t,n){if(e.nodes.has(t)){var r=e.nodes.get(t);1!==r.size?r.delete(n):e.nodes.delete(t)}}),_()(this,"emit",function(t,n){n(t,e.nodes.get(t))}),this.nodes=new Map},Sr=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return t.className!==this.props.className}},{key:"componentWillMount",value:function(){var t=ur(this.props);t&&(xr.add(t,this),xr.emit(t,Cr))}},{key:"componentDidUpdate",value:function(){var t=ur(this.props);t&&xr.emit(t,Cr)}},{key:"componentWillUnmount",value:function(){var t=ur(this.props);t&&(xr.del(t,this),xr.emit(t,Cr))}},{key:"render",value:function(){return null}}]),e}(x.Component);function kr(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"header"),s=re(kr,t),u=ie(kr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Sr,"handledProps",["className","node"]),Sr.propTypes={},kr.handledProps=["as","children","className","content"],kr.propTypes={},kr.create=Xt(kr,function(t){return{content:t}});var Nr=kr;function Ar(t){var e=t.children,n=t.className,i=t.content,o=t.image,s=t.scrolling,u=Qt()(n,ct(o,"image"),ct(s,"scrolling"),"content"),c=re(Ar,t),l=ie(Ar,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ar.handledProps=["as","children","className","content","image","scrolling"],Ar.propTypes={},Ar.create=Xt(Ar,function(t){return{content:t}});var Ir=Ar,Or=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleButtonOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onActionClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.actions,o=n.children,s=n.className,u=n.content,c=Qt()("actions",s),l=re(e,this.props),f=ie(e,this.props);return r.isNil(o)?r.isNil(u)?S.a.createElement(f,a()({},l,{className:c}),be()(i,function(e){return rr.create(e,{overrideProps:t.handleButtonOverrides})})):S.a.createElement(f,a()({},l,{className:c}),u):S.a.createElement(f,a()({},l,{className:c}),o)}}]),e}(x.Component);function Pr(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pr,t),u=ie(Pr,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(Or,"handledProps",["actions","as","children","className","content","onActionClick"]),Or.propTypes={},Or.create=Xt(Or,function(t){return{actions:t}}),Pr.handledProps=["as","children","className","content"],Pr.propTypes={};var Rr=Pr,Dr=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"getMountNode",function(){return St()?i.props.mountNode||document.body:null}),_()(g()(g()(i)),"handleActionsOverrides",function(t){return{onActionClick:function(e,n){C()(t,"onActionClick",e,n),C()(i.props,"onActionClick",e,i.props),i.handleClose(e)}}}),_()(g()(g()(i)),"handleClose",function(t){C()(i.props,"onClose",t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e),i.handleClose(e)}}}),_()(g()(g()(i)),"handleOpen",function(t){C()(i.props,"onOpen",t,i.props),i.trySetState({open:!0})}),_()(g()(g()(i)),"handlePortalMount",function(t){i.setState({scrolling:!1}),i.setPositionAndClassNames(),C()(i.props,"onMount",t,i.props)}),_()(g()(g()(i)),"handlePortalUnmount",function(t){cancelAnimationFrame(i.animationRequestId),C()(i.props,"onUnmount",t,i.props)}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"handlePortalRef",function(t){return i.portalRef=t}),_()(g()(g()(i)),"setRootNodeStyle",function(){i.portalRef&&i.portalRef&&i.portalRef.rootNode.style.setProperty("display","flex","important")}),_()(g()(g()(i)),"setPositionAndClassNames",function(){var t,e=i.props.dimmer;e&&(t="dimmable dimmed","blurring"===e&&(t+=" blurring"));var n={};if(i.ref){var r=i.ref.getBoundingClientRect().height>=window.innerHeight;null!==i.state.marginTop&&(n.marginTop=null),i.state.scrolling!==r&&(n.scrolling=r),r&&(t+=" scrolling")}i.state.mountClasses!==t&&(n.mountClasses=t),L()(n)||i.setState(n),i.animationRequestId=requestAnimationFrame(i.setPositionAndClassNames),i.setRootNodeStyle()}),_()(g()(g()(i)),"renderContent",function(t){var n=i.props,o=n.actions,s=n.basic,u=n.children,c=n.className,l=n.closeIcon,f=n.content,h=n.header,p=n.mountNode,d=n.size,v=n.style,m=i.state,y=m.marginTop,g=m.mountClasses,b=m.scrolling,_=Qt()("ui",d,ct(s,"basic"),ct(b,"scrolling"),"modal transition visible active",c),w=ie(e,i.props),E=!0===l?"close":l,T=Nn.create(E,{overrideProps:i.handleIconOverrides});return r.isNil(u)?S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,Nr.create(h,{autoGenerateKey:!1}),Ir.create(f,{autoGenerateKey:!1}),Or.create(o,{overrideProps:i.handleActionsOverrides}))):S.a.createElement(Rn,{innerRef:i.handleRef},S.a.createElement(w,a()({},t,{className:_,style:N()({marginTop:y},v)}),S.a.createElement(Sr,{className:g,node:p}),T,u))}),n))}return m()(e,t),l()(e,[{key:"componentWillUnmount",value:function(){this.handlePortalUnmount()}},{key:"render",value:function(){var t=this.state.open,n=this.props,r=n.centered,i=n.closeOnDimmerClick,o=n.closeOnDocumentClick,s=n.dimmer,u=n.eventPool,c=n.trigger,l=this.getMountNode();if(!St())return Object(x.isValidElement)(c)?c:null;var f=re(e,this.props),h=Mn.handledProps,p=sr()(f,function(t,e,n){return ae()(h,n)||(t[n]=e),t},{}),d=or()(f,h),v=s?Qt()("ui","inverted"===s&&"inverted",!r&&"top aligned","page modals dimmer transition visible active"):null;return S.a.createElement(Mn,a()({closeOnDocumentClick:o,closeOnRootNodeClick:i},d,{trigger:c,className:v,eventPool:u,mountNode:l,open:t,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,ref:this.handlePortalRef}),this.renderContent(p))}}]),e}(V);_()(Dr,"defaultProps",{centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"}),_()(Dr,"autoControlledProps",["open"]),_()(Dr,"Header",Nr),_()(Dr,"Content",Ir),_()(Dr,"Description",Rr),_()(Dr,"Actions",Or),_()(Dr,"handledProps",["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"]),Dr.propTypes={};var Mr=Dr,Lr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleCancel",function(t){C()(r.props,"onCancel",t,r.props)}),_()(g()(g()(r)),"handleCancelOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),r.handleCancel(e)}}}),_()(g()(g()(r)),"handleConfirmOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onConfirm",e,r.props)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.cancelButton,r=t.confirmButton,i=t.content,o=t.header,s=t.open,u=t.size,c=re(e,this.props),l={};return E()(this.props,"open")&&(l.open=s),S.a.createElement(Mr,a()({},c,l,{size:u,onClose:this.handleCancel}),Mr.Header.create(o,{autoGenerateKey:!1}),Mr.Content.create(i,{autoGenerateKey:!1}),S.a.createElement(Mr.Actions,null,rr.create(n,{autoGenerateKey:!1,overrideProps:this.handleCancelOverrides}),rr.create(r,{autoGenerateKey:!1,defaultProps:{primary:!0},overrideProps:this.handleConfirmOverrides})))}}]),e}(x.Component);_()(Lr,"defaultProps",{cancelButton:"Cancel",confirmButton:"OK",content:"Are you sure?",size:"small"}),_()(Lr,"handledProps",["cancelButton","confirmButton","content","header","onCancel","onConfirm","open","size"]),Lr.propTypes={};var Fr=Lr;function Ur(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ur,t),u=ie(Ur,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ur.handledProps=["as","children","className","content"],Ur.propTypes={};var jr=Ur,Br=n(276),qr=n.n(Br),Vr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.fitted,f=t.header,h=t.icon,p=t.link,d=t.name,v=t.onClick,m=t.position,y=Qt()(s,m,ct(n,"active"),ct(c,"disabled"),ct(!0===h||h&&!(d||u),"icon"),ct(f,"header"),ct(p,"link"),ft(l,"fitted"),"item",o),g=ie(e,this.props,function(){if(v)return"a"}),b=re(e,this.props);return r.isNil(i)?S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),r.isNil(u)?qr()(d):u):S.a.createElement(g,a()({},b,{className:y,onClick:this.handleClick}),i)}}]),e}(x.Component);function Wr(t){var e=t.children,n=t.className,i=t.content,o=t.position,s=Qt()(o,"menu",n),u=re(Wr,t),c=ie(Wr,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}_()(Vr,"handledProps",["active","as","children","className","color","content","disabled","fitted","header","icon","index","link","name","onClick","position"]),Vr.propTypes={},Vr.create=Xt(Vr,function(t){return{content:t,name:t}}),Wr.handledProps=["as","children","className","content","position"],Wr.propTypes={};var Hr=Wr,zr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){var i=n.index;r.trySetState({activeIndex:i}),C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"renderItems",value:function(){var t=this,e=this.props.items,n=this.state.activeIndex;return be()(e,function(e,r){return Vr.create(e,{defaultProps:{active:parseInt(n,10)===r,index:r},overrideProps:t.handleItemOverrides})})}},{key:"render",value:function(){var t=this.props,n=t.attached,i=t.borderless,o=t.children,s=t.className,u=t.color,c=t.compact,l=t.fixed,f=t.floated,h=t.fluid,p=t.icon,d=t.inverted,v=t.pagination,m=t.pointing,y=t.secondary,g=t.size,b=t.stackable,_=t.tabular,w=t.text,E=t.vertical,T=t.widths,C=Qt()("ui",u,g,ct(i,"borderless"),ct(c,"compact"),ct(h,"fluid"),ct(d,"inverted"),ct(v,"pagination"),ct(m,"pointing"),ct(y,"secondary"),ct(b,"stackable"),ct(w,"text"),ct(E,"vertical"),ft(n,"attached"),ft(f,"floated"),ft(p,"icon"),ft(_,"tabular"),lt(l,"fixed"),vt(T,"item"),s,"menu"),x=re(e,this.props),k=ie(e,this.props);return S.a.createElement(k,a()({},x,{className:C}),r.isNil(o)?this.renderItems():o)}}]),e}(V);_()(zr,"autoControlledProps",["activeIndex"]),_()(zr,"Header",jr),_()(zr,"Item",Vr),_()(zr,"Menu",Hr),_()(zr,"handledProps",["activeIndex","as","attached","borderless","children","className","color","compact","defaultActiveIndex","fixed","floated","fluid","icon","inverted","items","onItemClick","pagination","pointing","secondary","size","stackable","tabular","text","vertical","widths"]),zr.propTypes={},zr.create=Xt(zr,function(t){return{items:t}});var Kr=zr,Gr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){"ellipsisItem"!==r.props.type&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleKeyDown",function(t){C()(r.props,"onKeyDown",t,r.props),In.a.getCode(t)===In.a.Enter&&C()(r.props,"onClick",t,r.props)}),_()(g()(g()(r)),"handleOverrides",function(){return{onClick:r.handleClick,onKeyDown:r.handleKeyDown}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,e=t.active,n=t.type,r=this.props.disabled||"ellipsisItem"===n;return Vr.create(this.props,{defaultProps:{active:e,disabled:r,"aria-current":e,onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:r?-1:0},overrideProps:this.handleOverrides})}}]),e}(x.Component);_()(Gr,"handledProps",["active","disabled","onClick","onKeyDown","type"]),Gr.propTypes={},Gr.create=Xt(Gr,function(t){return{content:t}});var Qr=Gr,Yr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.value;+r.state.activePage!=+n&&(r.trySetState({activePage:n}),C()(r.props,"onPageChange",t,N()({},r.props,{activePage:n})))}),_()(g()(g()(r)),"handleItemOverrides",function(t,e,n){return function(i){return{active:t,type:e,key:"".concat(e,"-").concat(n),onClick:function(t,e){C()(i,"onClick",t,e),r.handleItemClick(t,e)}}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n["aria-label"],i=n.boundaryRange,o=n.siblingRange,s=n.totalPages,u=this.state.activePage,c=Ee({activePage:u,boundaryRange:i,siblingRange:o,totalPages:s}),l=re(e,this.props);return S.a.createElement(Kr,a()({},l,{"aria-label":r,pagination:!0,role:"navigation"}),be()(c,function(e){var n=e.active,r=e.type,i=e.value;return Qr.create(t.props[r],{defaultProps:{content:i,value:i},overrideProps:t.handleItemOverrides(n,r,i)})}))}}]),e}(V);_()(Yr,"autoControlledProps",["activePage"]),_()(Yr,"defaultProps",{"aria-label":"Pagination Navigation",boundaryRange:1,ellipsisItem:"...",firstItem:{"aria-label":"First item",content:"«"},lastItem:{"aria-label":"Last item",content:"»"},nextItem:{"aria-label":"Next item",content:"⟩"},pageItem:{},prevItem:{"aria-label":"Previous item",content:"⟨"},siblingRange:1}),_()(Yr,"Item",Qr),_()(Yr,"handledProps",["activePage","aria-label","boundaryRange","defaultActivePage","ellipsisItem","firstItem","lastItem","nextItem","onPageChange","pageItem","prevItem","siblingRange","totalPages"]),Yr.propTypes={};var Xr=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"canToggle",function(){var t=r.props,e=t.disabled,n=t.radio,i=t.readOnly,o=r.state.checked;return!(e||i||n&&o)}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(r)),"handleContainerClick",function(t){var e=r.props.id;Tt()(e)&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputClick",function(t){r.props.id&&r.handleClick(t)}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"handleClick",function(t){var e=r.state,n=e.checked,i=e.indeterminate;r.canToggle()&&(C()(r.props,"onClick",t,N()({},r.props,{checked:!n,indeterminate:!!i})),C()(r.props,"onChange",t,N()({},r.props,{checked:!n,indeterminate:!1})),r.trySetState({checked:!n,indeterminate:!1}))}),_()(g()(g()(r)),"handleMouseDown",function(t){var e=r.state,n=e.checked,i=e.indeterminate;C()(r.props,"onMouseDown",t,N()({},r.props,{checked:!!n,indeterminate:!!i})),C()(r.inputRef,"focus"),t.preventDefault()}),_()(g()(g()(r)),"setIndeterminate",function(){var t=r.state.indeterminate;r.inputRef&&(r.inputRef.indeterminate=!!t)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.setIndeterminate()}},{key:"componentDidUpdate",value:function(){this.setIndeterminate()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.disabled,i=t.label,o=t.id,s=t.name,u=t.radio,c=t.readOnly,l=t.slider,f=t.toggle,h=t.type,p=t.value,d=this.state,v=d.checked,m=d.indeterminate,y=Qt()("ui",ct(v,"checked"),ct(r,"disabled"),ct(m,"indeterminate"),ct(Tt()(i),"fitted"),ct(u,"radio"),ct(c,"read-only"),ct(l,"slider"),ct(f,"toggle"),"checkbox",n),g=re(e,this.props),b=ie(e,this.props),_=ce(g,{htmlProps:se}),w=H()(_,2),E=w[0],T=w[1];return S.a.createElement(b,a()({},T,{className:y,onClick:this.handleContainerClick,onChange:this.handleContainerClick,onMouseDown:this.handleMouseDown}),S.a.createElement("input",a()({},E,{checked:v,className:"hidden",disabled:r,id:o,name:s,onClick:this.handleInputClick,readOnly:!0,ref:this.handleInputRef,tabIndex:this.computeTabIndex(),type:h,value:p})),ee(i,{defaultProps:{htmlFor:o},autoGenerateKey:!1})||S.a.createElement("label",{htmlFor:o}))}}]),e}(V);function $r(t){var e=t.slider,n=t.toggle,r=t.type,i=re($r,t),o=!(e||n)||void 0;return S.a.createElement(Xr,a()({},i,{type:r,radio:o,slider:e,toggle:n}))}_()(Xr,"defaultProps",{type:"checkbox"}),_()(Xr,"autoControlledProps",["checked","indeterminate"]),_()(Xr,"handledProps",["as","checked","className","defaultChecked","defaultIndeterminate","disabled","fitted","id","indeterminate","label","name","onChange","onClick","onMouseDown","radio","readOnly","slider","tabIndex","toggle","type","value"]),Xr.propTypes={},$r.handledProps=["slider","toggle","type"],$r.propTypes={},$r.defaultProps={type:"radio"};var Jr=$r,Zr=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"fitsMaxWidth",function(){var t=n.props.maxWidth,e=n.state.width;return!!Tt()(t)||e<=t}),_()(g()(g()(n)),"fitsMinWidth",function(){var t=n.props.minWidth,e=n.state.width;return!!Tt()(t)||e>=t}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)}),_()(g()(g()(n)),"isVisible",function(){return n.fitsMinWidth()&&n.fitsMaxWidth()}),_()(g()(g()(n)),"handleResize",function(t){n.ticking||(n.ticking=!0,requestAnimationFrame(function(){return n.handleUpdate(t)}))}),_()(g()(g()(n)),"handleUpdate",function(t){n.ticking=!1;var e=C()(n.props,"getWidth");n.setSafeState({width:e}),C()(n.props,"onUpdate",t,N()({},n.props,{width:e}))}),n.state={width:C()(n.props,"getWidth")},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this.props.fireOnMount;this.mounted=!0,Dt.sub("resize",this.handleResize,{target:"window"}),t&&this.handleUpdate()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,Dt.unsub("resize",this.handleResize,{target:"window"})}},{key:"shouldComponentUpdate",value:function(t,e){return this.state.width!==e.width||!En(this.props,t)}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return this.isVisible()?S.a.createElement(n,r,t):null}}]),e}(x.Component);_()(Zr,"defaultProps",{getWidth:function(){return St()?window.innerWidth:0}}),_()(Zr,"onlyMobile",{minWidth:320,maxWidth:767}),_()(Zr,"onlyTablet",{minWidth:768,maxWidth:991}),_()(Zr,"onlyComputer",{minWidth:992}),_()(Zr,"onlyLargeScreen",{minWidth:1200,maxWidth:1919}),_()(Zr,"onlyWidescreen",{minWidth:1920}),_()(Zr,"handledProps",["as","children","fireOnMount","getWidth","maxWidth","minWidth","onUpdate"]),Zr.propTypes={};var ti=n(140),ei=n.n(ti),ni=n(188),ri=n.n(ni),ii=n(275),oi=n.n(ii),ai=n(189),si=n.n(ai),ui=n(274),ci=n.n(ui),li=n(141),fi=n.n(li),hi=n(273),pi=n.n(hi),di=n(192),vi=n.n(di),mi=n(191),yi=n.n(mi),gi=n(20),bi=n.n(gi);function _i(t){var e=t.className,n=Qt()("divider",e),r=re(_i,t),i=ie(_i,t);return S.a.createElement(i,a()({},r,{className:n}))}_i.handledProps=["as","className"],_i.propTypes={};var wi=_i,Ei=function(t){function e(){return u()(this,e),h()(this,d()(e).apply(this,arguments))}return m()(e,t),l()(e,[{key:"shouldComponentUpdate",value:function(t){return!En(this.props,t)}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.name,i=Qt()(r,"flag",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}))}}]),e}(x.Component);_()(Ei,"defaultProps",{as:"i"}),_()(Ei,"handledProps",["as","className","name"]),Ei.propTypes={},Ei.create=Xt(Ei,function(t){return{name:t}});var Ti=Ei,Ci=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.description,l=t.flag,f=t.icon,h=t.image,p=t.label,d=t.selected,v=t.text,m=Qt()(ct(n,"active"),ct(u,"disabled"),ct(d,"selected"),"item",o),y=Tt()(f)?r.someByType(i,"DropdownMenu")&&"dropdown":f,g=re(e,this.props),b=ie(e,this.props),_={role:"option","aria-disabled":u,"aria-checked":n,"aria-selected":d};if(!r.isNil(i))return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),i);var w=Ti.create(l,{autoGenerateKey:!1}),E=Nn.create(y,{autoGenerateKey:!1}),T=Hn.create(h,{autoGenerateKey:!1}),C=Yn.create(p,{autoGenerateKey:!1}),x=Yt("span",function(t){return{children:t}},c,{defaultProps:{className:"description"},autoGenerateKey:!1}),k=Yt("span",function(t){return{children:t}},r.isNil(s)?v:s,{defaultProps:{className:"text"},autoGenerateKey:!1});return S.a.createElement(b,a()({},g,_,{className:m,onClick:this.handleClick}),T,E,w,C,x,k)}}]),e}(x.Component);_()(Ci,"handledProps",["active","as","children","className","content","description","disabled","flag","icon","image","label","onClick","selected","text","value"]),Ci.propTypes={},Ci.create=Xt(Ci,function(t){return t});var xi=Ci;function Si(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("header",n),u=re(Si,t),c=ie(Si,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}Si.handledProps=["as","children","className","content","icon"],Si.propTypes={},Si.create=Xt(Si,function(t){return{content:t}});var ki=Si;function Ni(t){var e=t.children,n=t.className,i=t.content,o=t.direction,s=t.open,u=t.scrolling,c=Qt()(o,ct(s,"visible"),ct(u,"scrolling"),"menu transition",n),l=re(Ni,t),f=ie(Ni,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Ni.handledProps=["as","children","className","content","direction","open","scrolling"],Ni.propTypes={};var Ai=Ni,Ii=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleRef",function(t){return C()(r.props,"inputRef",t)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.autoComplete,r=t.className,i=t.tabIndex,o=t.type,s=t.value,u=Qt()("search",r),c=re(e,this.props);return S.a.createElement("input",a()({},c,{"aria-autocomplete":"list",autoComplete:n,className:u,onChange:this.handleChange,ref:this.handleRef,tabIndex:i,type:o,value:s}))}}]),e}(x.Component);_()(Ii,"defaultProps",{autoComplete:"off",type:"text"}),_()(Ii,"handledProps",["as","autoComplete","className","inputRef","tabIndex","type","value"]),Ii.propTypes={},Ii.create=Xt(Ii,function(t){return{type:t}});var Oi=Ii,Pi=function(t,e){return Tt()(t)?e:t},Ri=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(s))),_()(g()(g()(i)),"handleChange",function(t,e){C()(i.props,"onChange",t,N()({},i.props,{value:e}))}),_()(g()(g()(i)),"closeOnChange",function(t){var e=i.props,n=e.closeOnChange,r=e.multiple;(P()(n)?!r:n)&&i.close(t)}),_()(g()(g()(i)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),i.close())}),_()(g()(g()(i)),"moveSelectionOnKeyDown",function(t){var e,n=i.props,r=n.multiple,o=n.selectOnNavigation,a=(e={},_()(e,In.a.ArrowDown,1),_()(e,In.a.ArrowUp,-1),e)[In.a.getCode(t)];void 0!==a&&(t.preventDefault(),i.moveSelectionBy(a),!r&&o&&i.makeSelectedItemActive(t))}),_()(g()(g()(i)),"openOnSpace",function(t){In.a.getCode(t)===In.a.Spacebar&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"openOnArrow",function(t){var e=In.a.getCode(t);ae()([In.a.ArrowDown,In.a.ArrowUp],e)&&(i.state.open||(t.preventDefault(),i.open(t)))}),_()(g()(g()(i)),"makeSelectedItemActive",function(t){var e=i.state.open,n=i.props.multiple,r=i.getSelectedItem(),o=bi()(r,"value");if(!Tt()(o)&&e){var a=n?yi()(i.state.value,[o]):o;i.setValue(a),i.setSelectedIndex(a),i.handleChange(t,a),r["data-additional"]&&C()(i.props,"onAddItem",t,N()({},i.props,{value:o}))}}),_()(g()(g()(i)),"selectItemOnEnter",function(t){var e=i.props.search;if(In.a.getCode(t)===In.a.Enter){t.preventDefault();var n=vi()(i.getMenuOptions());e&&0===n||(i.makeSelectedItemActive(t),i.closeOnChange(t),i.clearSearchQuery(),e&&i.searchRef&&i.searchRef.focus())}}),_()(g()(g()(i)),"removeItemOnBackspace",function(t){var e=i.props,n=e.multiple,r=e.search,o=i.state,a=o.searchQuery,s=o.value;if(In.a.getCode(t)===In.a.Backspace&&!a&&r&&n&&!L()(s)){t.preventDefault();var u=pi()(s);i.setValue(u),i.setSelectedIndex(u),i.handleChange(t,u)}}),_()(g()(g()(i)),"closeOnDocumentClick",function(t){i.props.closeOnBlur&&(i.ref&&de(i.ref,t)||i.close())}),_()(g()(g()(i)),"attachHandlersOnOpen",function(){Dt.sub("keydown",[i.closeOnEscape,i.moveSelectionOnKeyDown,i.selectItemOnEnter,i.removeItemOnBackspace]),Dt.sub("click",i.closeOnDocumentClick),Dt.unsub("keydown",[i.openOnArrow,i.openOnSpace])}),_()(g()(g()(i)),"handleMouseDown",function(t){i.isMouseDown=!0,Dt.sub("mouseup",i.handleDocumentMouseUp),C()(i.props,"onMouseDown",t,i.props)}),_()(g()(g()(i)),"handleDocumentMouseUp",function(){i.isMouseDown=!1,Dt.unsub("mouseup",i.handleDocumentMouseUp)}),_()(g()(g()(i)),"handleClick",function(t){var e=i.props,n=e.minCharacters,r=e.search,o=i.state,a=o.open,s=o.searchQuery;if(C()(i.props,"onClick",t,i.props),t.stopPropagation(),!r)return i.toggle(t);a||(s.length>=n||1===n?i.open(t):i.searchRef&&i.searchRef.focus())}),_()(g()(g()(i)),"handleIconClick",function(t){C()(i.props,"onClick",t,i.props),t.stopPropagation(),i.toggle(t)}),_()(g()(g()(i)),"handleItemClick",function(t,e){var n=i.props,r=n.multiple,o=n.search,a=e.value;if(t.stopPropagation(),(r||e.disabled)&&t.nativeEvent.stopImmediatePropagation(),!e.disabled){var s=e["data-additional"],u=r?yi()(i.state.value,[a]):a;i.setValue(u),i.setSelectedIndex(a);var c=vi()(i.getMenuOptions());r&&!s&&1!==c||i.clearSearchQuery(),i.handleChange(t,u),i.closeOnChange(t),s&&C()(i.props,"onAddItem",t,N()({},i.props,{value:a})),r&&o&&i.searchRef&&i.searchRef.focus()}}),_()(g()(g()(i)),"handleFocus",function(t){i.state.focus||(C()(i.props,"onFocus",t,i.props),i.setState({focus:!0}))}),_()(g()(g()(i)),"handleBlur",function(t){var e=bi()(t,"currentTarget");if(!e||!e.contains(document.activeElement)){var n=i.props,r=n.closeOnBlur,o=n.multiple,a=n.onBlur,s=n.selectOnBlur;i.isMouseDown||(a&&a(t,i.props),s&&!o&&(i.makeSelectedItemActive(t),r&&i.close()),i.setState({focus:!1}),i.clearSearchQuery())}}),_()(g()(g()(i)),"handleSearchChange",function(t,e){var n=e.value;t.stopPropagation();var r=i.props.minCharacters,o=i.state.open,a=n;C()(i.props,"onSearchChange",t,N()({},i.props,{searchQuery:a})),i.trySetState({searchQuery:a},{selectedIndex:0}),!o&&a.length>=r?i.open():o&&1!==r&&a.length<r&&i.close()}),_()(g()(g()(i)),"getMenuOptions",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,n=i.props,r=n.additionLabel,o=n.additionPosition,a=n.allowAdditions,s=n.deburr,u=n.multiple,c=n.search,l=i.state.searchQuery,f=e;if(u&&(f=D()(f,function(e){return!ae()(t,e.value)})),c&&l)if(Bt()(c))f=c(f,l);else{var h=s?fi()(l):l,p=new RegExp(ci()(h),"i");f=D()(f,function(t){return p.test(s?fi()(t.text):t.text)})}if(a&&c&&l&&!et()(f,{text:l})){var d={key:"addition",text:[S.a.isValidElement(r)?S.a.cloneElement(r,{key:"addition-label"}):r||"",S.a.createElement("b",{key:"addition-query"},l)],value:l,className:"addition","data-additional":!0};"top"===o?f.unshift(d):f.push(d)}return f}),_()(g()(g()(i)),"getSelectedItem",function(){var t=i.state.selectedIndex,e=i.getMenuOptions();return bi()(e,"[".concat(t,"]"))}),_()(g()(g()(i)),"getEnabledIndices",function(t){var e=t||i.getMenuOptions();return sr()(e,function(t,e,n){return e.disabled||t.push(n),t},[])}),_()(g()(g()(i)),"getItemByValue",function(t){var e=i.props.options;return Z()(e,{value:t})}),_()(g()(g()(i)),"getMenuItemIndexByValue",function(t,e){var n=e||i.getMenuOptions();return si()(n,["value",t])}),_()(g()(g()(i)),"getDropdownAriaOptions",function(){var t=i.props,e=t.loading,n=t.disabled,r=t.search,o=t.multiple,a=i.state.open,s={role:r?"combobox":"listbox","aria-busy":e,"aria-disabled":n,"aria-expanded":!!a};return"listbox"===s.role&&(s["aria-multiselectable"]=o),s}),_()(g()(g()(i)),"clearSearchQuery",function(){i.trySetState({searchQuery:""})}),_()(g()(g()(i)),"setValue",function(t){i.trySetState({value:t})}),_()(g()(g()(i)),"setSelectedIndex",function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.state.value,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.props.options,r=i.props.multiple,o=i.state.selectedIndex,a=i.getMenuOptions(e,n),s=i.getEnabledIndices(a);if(!o||o<0){var u=s[0];t=r?u:i.getMenuItemIndexByValue(e,a)||s[0]}else if(r)o>=a.length-1&&(t=s[s.length-1]);else{var c=i.getMenuItemIndexByValue(e,a);t=ae()(s,c)?c:void 0}(!t||t<0)&&(t=s[0]),i.setState({selectedIndex:t})}),_()(g()(g()(i)),"handleLabelClick",function(t,e){t.stopPropagation(),i.setState({selectedLabel:e.value});var n=i.props.onLabelClick;n&&n(t,e)}),_()(g()(g()(i)),"handleLabelRemove",function(t,e){t.stopPropagation();var n=i.state.value,r=Cn()(n,e.value);i.setValue(r),i.setSelectedIndex(r),i.handleChange(t,r)}),_()(g()(g()(i)),"moveSelectionBy",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.state.selectedIndex,n=i.getMenuOptions();if(void 0!==n&&!oi()(n,"disabled")){var r=n.length-1,o=e+t;!i.props.wrapSelection&&(o>r||o<0)?o=e:o>r?o=0:o<0&&(o=r),n[o].disabled?i.moveSelectionBy(t,o):(i.setState({selectedIndex:o}),i.scrollSelectedItemIntoView())}}),_()(g()(g()(i)),"handleIconOverrides",function(t){return{onClick:function(e){C()(t,"onClick",e,t),i.handleIconClick(e)}}}),_()(g()(g()(i)),"handleSearchRef",function(t){return i.searchRef=t}),_()(g()(g()(i)),"handleSizerRef",function(t){return i.sizerRef=t}),_()(g()(g()(i)),"handleRef",function(t){return i.ref=t}),_()(g()(g()(i)),"computeSearchInputTabIndex",function(){var t=i.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:0:n}),_()(g()(g()(i)),"computeSearchInputWidth",function(){var t=i.state.searchQuery;if(i.sizerRef&&t){i.sizerRef.style.display="inline",i.sizerRef.textContent=t;var e=Math.ceil(i.sizerRef.getBoundingClientRect().width);return i.sizerRef.style.removeProperty("display"),e}}),_()(g()(g()(i)),"computeTabIndex",function(){var t=i.props,e=t.disabled,n=t.search,r=t.tabIndex;if(!n)return e?-1:Tt()(r)?0:r}),_()(g()(g()(i)),"scrollSelectedItemIntoView",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=t.querySelector(".item.selected");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}}),_()(g()(g()(i)),"setOpenDirection",function(){if(i.ref){var t=i.ref.querySelector(".menu.visible");if(t){var e=i.ref.getBoundingClientRect(),n=t.clientHeight,r=document.documentElement.clientHeight-e.y-e.height-n,o=e.y-n,a=r<0&&o>r;!a!=!i.state.upward&&i.trySetState({upward:a})}}}),_()(g()(g()(i)),"open",function(t){var e=i.props,n=e.disabled,r=e.onOpen,o=e.search;n||(o&&i.searchRef&&i.searchRef.focus(),r&&r(t,i.props),i.trySetState({open:!0}),i.scrollSelectedItemIntoView())}),_()(g()(g()(i)),"close",function(t){var e=i.props.onClose;e&&e(t,i.props),i.trySetState({open:!1})}),_()(g()(g()(i)),"handleClose",function(){var t=document.activeElement===i.searchRef,e=document.activeElement===i.ref,n=t||e;t||i.ref.blur(),i.setState({focus:n})}),_()(g()(g()(i)),"toggle",function(t){return i.state.open?i.close(t):i.open(t)}),_()(g()(g()(i)),"renderText",function(){var t=i.props,e=t.multiple,n=t.placeholder,r=t.search,o=t.text,a=i.state,s=a.searchQuery,u=a.value,c=a.open,l=e?!L()(u):!Tt()(u)&&""!==u,f=Qt()(n&&!l&&"default","text",r&&s&&"filtered"),h=n;return s?h=null:o?h=o:c&&!e?h=bi()(i.getSelectedItem(),"text"):l&&(h=bi()(i.getItemByValue(u),"text")),S.a.createElement("div",{className:f,role:"alert","aria-live":"polite"},h)}),_()(g()(g()(i)),"renderSearchInput",function(){var t=i.props,e=t.search,n=t.searchInput,r=i.state.searchQuery;return e?Oi.create(n,{defaultProps:{inputRef:i.handleSearchRef,onChange:i.handleSearchChange,style:{width:i.computeSearchInputWidth()},tabIndex:i.computeSearchInputTabIndex(),value:r}}):null}),_()(g()(g()(i)),"renderSearchSizer",function(){var t=i.props,e=t.search,n=t.multiple;return e&&n?S.a.createElement("span",{className:"sizer",ref:i.handleSizerRef}):null}),_()(g()(g()(i)),"renderLabels",function(){var t=i.props,e=t.multiple,n=t.renderLabel,r=i.state,o=r.selectedLabel,a=r.value;if(e&&!L()(a)){var s=be()(a,i.getItemByValue);return be()(ri()(s),function(t,e){var r={active:t.value===o,as:"a",key:Pi(t.key,t.value),onClick:i.handleLabelClick,onRemove:i.handleLabelRemove,value:t.value};return Yn.create(n(t,e,r),{defaultProps:r})})}}),_()(g()(g()(i)),"renderOptions",function(){var t=i.props,e=t.multiple,n=t.search,r=t.noResultsMessage,o=i.state,a=o.selectedIndex,s=o.value,u=i.getMenuOptions();if(null!==r&&n&&L()(u))return S.a.createElement("div",{className:"message"},r);var c=e?function(t){return ae()(s,t)}:function(t){return t===s};return be()(u,function(t,e){return xi.create(N()({active:c(t.value),onClick:i.handleItemClick,selected:a===e},t,{key:Pi(t.key,t.value),style:N()({},t.style,{pointerEvents:"all"})}))})}),_()(g()(g()(i)),"renderMenu",function(){var t=i.props,e=t.children,n=t.direction,o=t.header,s=i.state.open,u=i.getDropdownMenuAriaOptions();if(!r.isNil(e)){var c=x.Children.only(e),l=Qt()(n,ct(s,"visible"),c.props.className);return Object(x.cloneElement)(c,N()({className:l},u))}return S.a.createElement(Ai,a()({},u,{direction:n,open:s}),ki.create(o,{autoGenerateKey:!1}),i.renderOptions())}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{searchQuery:""}}},{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),this.setSelectedIndex(n),e&&(this.open(),this.attachHandlersOnOpen())}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||(this.setValue(t.value),this.setSelectedIndex(t.value)),_n()(t.options,this.props.options)||this.setSelectedIndex(void 0,t.options)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){if(!e.focus&&this.state.focus){if(!this.isMouseDown){var n=this.props,r=n.minCharacters,i=n.openOnFocus,o=n.search,a=!o||o&&1===r&&!this.state.open;i&&a&&this.open()}this.state.open?Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter]):Dt.sub("keydown",[this.openOnArrow,this.openOnSpace]),Dt.sub("keydown",this.removeItemOnBackspace)}else if(e.focus&&!this.state.focus){var s=this.props.closeOnBlur;!this.isMouseDown&&s&&this.close(),Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace])}!e.open&&this.state.open?(this.attachHandlersOnOpen(),this.setOpenDirection(),this.scrollSelectedItemIntoView()):e.open&&!this.state.open&&(this.handleClose(),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]),Dt.unsub("click",this.closeOnDocumentClick),this.state.focus||Dt.unsub("keydown",this.removeItemOnBackspace))}},{key:"componentWillUnmount",value:function(){Dt.unsub("keydown",[this.openOnArrow,this.openOnSpace,this.moveSelectionOnKeyDown,this.selectItemOnEnter,this.removeItemOnBackspace,this.closeOnEscape]),Dt.unsub("click",this.closeOnDocumentClick)}},{key:"getDropdownMenuAriaOptions",value:function(){var t=this.props,e=t.search,n=t.multiple,r={};return e&&(r["aria-multiselectable"]=n,r.role="listbox"),r}},{key:"render",value:function(){var t=this.props,n=t.basic,r=t.button,i=t.className,o=t.compact,s=t.disabled,u=t.error,c=t.fluid,l=t.floating,f=t.icon,h=t.inline,p=t.item,d=t.labeled,v=t.loading,m=t.multiple,y=t.pointing,g=t.search,b=t.selection,_=t.scrolling,w=t.simple,E=t.trigger,T=this.state,C=T.open,x=T.upward,k=Qt()("ui",ct(C,"active visible"),ct(s,"disabled"),ct(u,"error"),ct(v,"loading"),ct(n,"basic"),ct(r,"button"),ct(o,"compact"),ct(c,"fluid"),ct(l,"floating"),ct(h,"inline"),ct(d,"labeled"),ct(p,"item"),ct(m,"multiple"),ct(g,"search"),ct(b,"selection"),ct(w,"simple"),ct(_,"scrolling"),ct(x,"upward"),ft(y,"pointing"),"dropdown",i),N=re(e,this.props),A=ie(e,this.props),I=this.getDropdownAriaOptions(A,this.props);return S.a.createElement(A,a()({},N,I,{className:k,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex(),ref:this.handleRef}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),E||this.renderText(),Nn.create(f,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu())}}]),e}(V);function Di(t){return S.a.createElement(Ri,a()({},t,{selection:!0}))}_()(Ri,"defaultProps",{additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:function(t){return t.text},searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0}),_()(Ri,"autoControlledProps",["open","searchQuery","selectedLabel","value","upward"]),_()(Ri,"Divider",wi),_()(Ri,"Header",ki),_()(Ri,"Item",xi),_()(Ri,"Menu",Ai),_()(Ri,"SearchInput",Oi),_()(Ri,"handledProps",["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","closeOnBlur","closeOnChange","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"]),Ri.propTypes={},Di.handledProps=["options"],Di.propTypes={},Di.Divider=Ri.Divider,Di.Header=Ri.Header,Di.Item=Ri.Item,Di.Menu=Ri.Menu;var Mi=Di,Li=n(187),Fi=n.n(Li),Ui=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"focus",function(){return r.ref.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleInput",function(t){var e=bi()(t,"target.value");C()(r.props,"onInput",t,N()({},r.props,{value:e})),r.updateHeight()}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),_()(g()(g()(r)),"removeAutoHeightStyles",function(){r.ref.style.height=null,r.ref.style.resize=null}),_()(g()(g()(r)),"updateHeight",function(){var t=r.props.autoHeight;if(r.ref&&t){var e=window.getComputedStyle(r.ref),n=e.minHeight,i=e.borderBottomWidth,o=e.borderTopWidth,a=Fi()([i,o].map(function(t){return parseFloat(t)}));r.ref.style.height="auto",r.ref.style.overflowY="hidden",r.ref.style.height="".concat(Math.max(parseFloat(n),Math.ceil(r.ref.scrollHeight+a)),"px"),r.ref.style.overflowY=""}}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.updateHeight()}},{key:"componentDidUpdate",value:function(t){!this.props.autoHeight&&t.autoHeight&&this.removeAutoHeightStyles(),(this.props.autoHeight&&!t.autoHeight||t.value!==this.props.value)&&this.updateHeight()}},{key:"render",value:function(){var t=this.props,n=t.autoHeight,r=t.rows,i=t.style,o=t.value,s=re(e,this.props),u=ie(e,this.props),c=n?"none":"";return S.a.createElement(u,a()({},s,{onChange:this.handleChange,onInput:this.handleInput,ref:this.handleRef,rows:r,style:N()({resize:c},i),value:o}))}}]),e}(x.Component);_()(Ui,"defaultProps",{as:"textarea",rows:3}),_()(Ui,"handledProps",["as","autoHeight","onChange","onInput","rows","style","value"]),Ui.propTypes={};var ji=Ui,Bi=n(139),qi=n.n(Bi),Vi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(i))),_()(g()(g()(n)),"handleOnHide",function(t,e){var r=e.reactKey;n.setState(function(t){var e=N()({},t.children);return delete e[r],{children:e}})}),_()(g()(g()(n)),"wrapChild",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.props,i=r.animation,o=r.duration,a=t.key,s=e.visible,u=void 0===s||s,c=e.transitionOnMount,l=void 0!==c&&c;return S.a.createElement(Hi,{animation:i,duration:o,key:a,onHide:n.handleOnHide,reactKey:a,transitionOnMount:l,visible:u},t)});var a=n.props.children;return n.state={children:qi()(Y(a),function(t){return n.wrapChild(t)})},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=this,n=this.state.children,r=Y(t.children),i=$(n,r);K()(i,function(t,o){var a=E()(n,o),s=E()(r,o),u=n[o],c=!bi()(u,"props.visible");if(!s||a&&!c)if(s||!a||c){var l=u.props,f=l.visible,h=l.transitionOnMount;i[o]=e.wrapChild(t,{transitionOnMount:h,visible:f})}else i[o]=Object(x.cloneElement)(u,{visible:!1});else i[o]=e.wrapChild(t,{transitionOnMount:!0})}),this.setState({children:i})}},{key:"render",value:function(){var t=this.state.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,r,Ce()(t))}}]),e}(S.a.Component);_()(Vi,"defaultProps",{animation:"fade",duration:500}),_()(Vi,"handledProps",["animation","as","children","duration"]),Vi.propTypes={};var Wi={ENTERING:"show",EXITING:"hide"},Hi=function(t){function e(){var t,n;u()(this,e);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(n)),"handleStart",function(){var t=n.props.duration,e=n.nextStatus;n.nextStatus=null,n.setSafeState({status:e,animating:!0},function(){var r=Wi[e],i=gn(t,r);C()(n.props,"onStart",null,N()({},n.props,{status:e})),setTimeout(n.handleComplete,i)})}),_()(g()(g()(n)),"handleComplete",function(){var t=n.state.status;if(C()(n.props,"onComplete",null,N()({},n.props,{status:t})),n.nextStatus)n.handleStart();else{var r=n.computeCompletedStatus(),i=t===e.ENTERING?"onShow":"onHide";n.setSafeState({status:r,animating:!1},function(){C()(n.props,i,null,N()({},n.props,{status:r}))})}}),_()(g()(g()(n)),"updateStatus",function(){var t=n.state.animating;n.nextStatus&&(n.nextStatus=n.computeNextStatus(),t||n.handleStart())}),_()(g()(g()(n)),"computeClasses",function(){var t=n.props,r=t.animation,o=t.children,a=n.state,s=a.animating,u=a.status,c=bi()(o,"props.className");return ae()(i.DIRECTIONAL_TRANSITIONS,r)?Qt()(r,c,ct(s,"animating"),ct(u===e.ENTERING,"in"),ct(u===e.EXITING,"out"),ct(u===e.EXITED,"hidden"),ct(u!==e.EXITED,"visible"),"transition"):Qt()(r,c,ct(s,"animating transition"))}),_()(g()(g()(n)),"computeCompletedStatus",function(){var t=n.props.unmountOnHide;return n.state.status===e.ENTERING?e.ENTERED:t?e.UNMOUNTED:e.EXITED}),_()(g()(g()(n)),"computeInitialStatuses",function(){var t=n.props,r=t.visible,i=t.mountOnShow,o=t.transitionOnMount,a=t.unmountOnHide;return r?o?{initial:e.EXITED,next:e.ENTERING}:{initial:e.ENTERED}:i||a?{initial:e.UNMOUNTED}:{initial:e.EXITED}}),_()(g()(g()(n)),"computeNextStatus",function(){var t=n.state,r=t.animating,i=t.status;return r?i===e.ENTERING?e.EXITING:e.ENTERING:i===e.ENTERED?e.EXITING:e.ENTERING}),_()(g()(g()(n)),"computeStatuses",function(t){var r=n.state.status;return t.visible?{current:r===e.UNMOUNTED&&e.EXITED,next:r!==e.ENTERING&&r!==e.ENTERED&&e.ENTERING}:{next:(r===e.ENTERING||r===e.ENTERED)&&e.EXITING}}),_()(g()(g()(n)),"computeStyle",function(){var t=n.props,e=t.children,r=t.duration,i=n.state.status,o=bi()(e,"props.style"),a=Wi[i],s=a&&"".concat(gn(r,a),"ms");return N()({},o,{animationDuration:s})}),_()(g()(g()(n)),"setSafeState",function(){var t;return n.mounted&&(t=n).setState.apply(t,arguments)});var s=n.computeInitialStatuses(),c=s.initial,l=s.next;return n.nextStatus=l,n.state={status:c},n}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.updateStatus()}},{key:"componentWillReceiveProps",value:function(t){var e=this.computeStatuses(t),n=e.current,r=e.next;this.nextStatus=r,n&&this.setSafeState({status:n})}},{key:"componentDidUpdate",value:function(){this.updateStatus()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var t=this.props.children;return this.state.status===e.UNMOUNTED?null:Object(x.cloneElement)(t,{className:this.computeClasses(),style:this.computeStyle()})}}]),e}(x.Component);_()(Hi,"defaultProps",{animation:"fade",duration:500,visible:!0,mountOnShow:!0,transitionOnMount:!1,unmountOnHide:!1}),_()(Hi,"ENTERED","ENTERED"),_()(Hi,"ENTERING","ENTERING"),_()(Hi,"EXITED","EXITED"),_()(Hi,"EXITING","EXITING"),_()(Hi,"UNMOUNTED","UNMOUNTED"),_()(Hi,"Group",Vi),_()(Hi,"handledProps",["animation","children","duration","mountOnShow","onComplete","onHide","onShow","onStart","reactKey","transitionOnMount","unmountOnHide","visible"]),Hi.propTypes={};var zi=function(t){function e(t){var n;return u()(this,e),n=h()(this,d()(e).call(this,t)),_()(g()(g()(n)),"handlePortalClose",function(){n.setState({portalOpen:!1})}),_()(g()(g()(n)),"handlePortalOpen",function(){n.setState({portalOpen:!0})}),_()(g()(g()(n)),"handleTransitionHide",function(t,e){var r=n.state.portalOpen;n.setState({transitionVisible:!1}),C()(n.props,"onClose",null,N()({},e,{portalOpen:!1,transitionVisible:!1})),C()(n.props,"onHide",null,N()({},e,{portalOpen:r,transitionVisible:!1}))}),_()(g()(g()(n)),"handleTransitionStart",function(t,e){var r=n.state.portalOpen,i=e.status===Hi.ENTERING;C()(n.props,"onStart",null,N()({},e,{portalOpen:r,transitionVisible:i})),i&&(n.setState({transitionVisible:i}),C()(n.props,"onOpen",null,N()({},e,{transitionVisible:i,portalOpen:!0})))}),n.state={portalOpen:t.open},n}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.open;this.setState({portalOpen:e})}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.transition,i=this.state,o=i.portalOpen,s=i.transitionVisible,u=o||s,c=re(e,this.props);return S.a.createElement(Mn,a()({},c,{open:u,onOpen:this.handlePortalOpen,onClose:this.handlePortalClose}),S.a.createElement(Hi,a()({},r,{transitionOnMount:!0,onStart:this.handleTransitionStart,onHide:this.handleTransitionHide,visible:o}),n))}}]),e}(x.Component);_()(zi,"defaultProps",{transition:{animation:"scale",duration:400}}),_()(zi,"handledProps",["children","onClose","onHide","onOpen","onStart","open","transition"]),zi.propTypes={};var Ki=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"calculations",{bottomPassed:!1,bottomVisible:!1,fits:!1,passing:!1,offScreen:!1,onScreen:!1,topPassed:!1,topVisible:!1}),_()(g()(g()(r)),"firedCallbacks",[]),_()(g()(g()(r)),"fire",function(t,e){var n=t.callback,i=t.name,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=r.props,s=a.continuous,u=a.once,c=r.calculations[e]!==o,l=s||r.calculations[e]!==r.oldCalculations[e];c&&l&&r.execute(n,i),u||(r.firedCallbacks=Cn()(r.firedCallbacks,i))}),_()(g()(g()(r)),"handleUpdate",function(){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(r.update))}),_()(g()(g()(r)),"update",function(){if(r.mounted){r.ticking=!1,r.oldCalculations=r.calculations,r.calculations=r.computeCalculations(),r.pageYOffset=window.pageYOffset;var t=r.props,e=t.onBottomPassed,n=t.onBottomPassedReverse,i=t.onBottomVisible,o=t.onBottomVisibleReverse,a=t.onPassing,s=t.onPassingReverse,u=t.onTopPassed,c=t.onTopPassedReverse,l=t.onTopVisible,f=t.onTopVisibleReverse,h=t.onOffScreen,p=t.onOnScreen,d=t.updateOn,v={bottomPassed:{callback:e,name:"onBottomPassed"},bottomVisible:{callback:i,name:"onBottomVisible"},passing:{callback:a,name:"onPassing"},offScreen:{callback:h,name:"onOffScreen"},onScreen:{callback:p,name:"onOnScreen"},topPassed:{callback:u,name:"onTopPassed"},topVisible:{callback:l,name:"onTopVisible"}},m={bottomPassed:{callback:n,name:"onBottomPassedReverse"},bottomVisible:{callback:o,name:"onBottomVisibleReverse"},passing:{callback:s,name:"onPassingReverse"},topPassed:{callback:c,name:"onTopPassedReverse"},topVisible:{callback:f,name:"onTopVisibleReverse"}};C()(r.props,"onUpdate",null,N()({},r.props,{calculations:r.calculations})),r.fireOnPassed(),K()(m,function(t,e){return r.fire(t,e,!0)}),K()(v,function(t,e){return r.fire(t,e)}),"repaint"===d&&r.handleUpdate()}}),_()(g()(g()(r)),"handleRef",function(t){return r.ref=t}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.continuous,n=t.once,r=t.context,i=t.updateOn;(e!==this.props.continuous||n!==this.props.once||i!==this.props.updateOn)&&(this.firedCallbacks=[]),r===this.props.context&&i===this.props.updateOn||(this.unattachHandlers(this.props.context),this.attachHandlers(r,i))}},{key:"componentDidMount",value:function(){if(this.mounted=!0,St()){var t=this.props,e=t.context,n=t.fireOnMount,r=t.updateOn;this.pageYOffset=window.pageYOffset,this.attachHandlers(e,r),n&&this.update()}}},{key:"componentWillUnmount",value:function(){var t=this.props.context;this.unattachHandlers(t),this.mounted=!1}},{key:"attachHandlers",value:function(t,e){"events"!==e?this.handleUpdate():t&&(Dt.sub("resize",this.handleUpdate,{target:t}),Dt.sub("scroll",this.handleUpdate,{target:t}))}},{key:"unattachHandlers",value:function(t){t&&(Dt.unsub("resize",this.handleUpdate,{target:t}),Dt.unsub("scroll",this.handleUpdate,{target:t})),this.frameId&&cancelAnimationFrame(this.frameId)}},{key:"execute",value:function(t,e){var n=this.props.continuous;t&&(!n&&ae()(this.firedCallbacks,e)||(t(null,N()({},this.props,{calculations:this.calculations})),this.firedCallbacks.push(e)))}},{key:"fireOnPassed",value:function(){var t=this,e=this.calculations,n=e.percentagePassed,r=e.pixelsPassed,i=this.props.onPassed;K()(i,function(e,i){var o=Number(i);if(o&&r>=o)t.execute(e,i);else{var a="".concat(i).match(/^(\d+)%$/);if(a){var s=Number(a[1])/100;n>=s&&t.execute(e,i)}}})}},{key:"computeCalculations",value:function(){var t,e=this.props.offset,n=this.ref.getBoundingClientRect(),r=n.bottom,i=n.height,o=n.top,a=n.width,s="number"==typeof(t=e)||"string"==typeof t?[t,t]:t,u=H()(s,2),c=u[0],l=u[1],f=window.pageYOffset>this.pageYOffset?"down":"up",h=o<c,p=r<l,d=p?0:Math.max(-1*o,0),v=d/i,m=r>=l&&r<=window.innerHeight,y=o>=c&&o<=window.innerHeight,g=(y||h)&&!p;return{bottomPassed:p,bottomVisible:m,direction:f,fits:y&&m,height:i,passing:h&&!p,percentagePassed:v,pixelsPassed:d,offScreen:!g,onScreen:g,topPassed:h,topVisible:y,width:a}}},{key:"render",value:function(){var t=this.props.children,n=ie(e,this.props),r=re(e,this.props);return S.a.createElement(n,a()({},r,{ref:this.handleRef}),t)}}]),e}(x.Component);function Gi(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("divider",n),u=re(Gi,t),c=ie(Gi,t);return Tt()(o)?Tt()(i)?S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?"/":e):S.a.createElement(c,a()({},u,{className:s}),i):Nn.create(o,{defaultProps:N()({},u,{className:s}),autoGenerateKey:!1})}_()(Ki,"defaultProps",{context:St()?window:null,continuous:!1,offset:[0,0],once:!0,updateOn:"events"}),_()(Ki,"handledProps",["as","children","context","continuous","fireOnMount","offset","onBottomPassed","onBottomPassedReverse","onBottomVisible","onBottomVisibleReverse","onOffScreen","onOnScreen","onPassed","onPassing","onPassingReverse","onTopPassed","onTopPassedReverse","onTopVisible","onTopVisibleReverse","onUpdate","once","updateOn"]),Ki.propTypes={},Gi.handledProps=["as","children","className","content","icon"],Gi.propTypes={},Gi.create=Xt(Gi,function(t){return{icon:t}});var Qi=Gi,Yi=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){var t=r.props,e=t.link,n=t.onClick;if(e||n)return"a"}),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.href,c=Qt()(ct(n,"active"),"section",o),l=re(e,this.props),f=ie(e,this.props,this.computeElementType);return S.a.createElement(f,a()({},l,{className:c,href:u,onClick:this.handleClick}),r.isNil(i)?s:i)}}]),e}(x.Component);function Xi(t){var e=t.children,n=t.className,i=t.divider,o=t.icon,s=t.sections,u=t.size,c=Qt()("ui",u,"breadcrumb",n),l=re(Xi,t),f=ie(Xi,t);if(!r.isNil(e))return S.a.createElement(f,a()({},l,{className:c}),e);var h=[];return B()(s,function(t,e){var n=Yi.create(t);if(h.push(n),e!==s.length-1){var r="".concat(n.key,"_divider")||JSON.stringify(t);h.push(Qi.create({content:i,icon:o,key:r}))}}),S.a.createElement(f,a()({},l,{className:c}),h)}_()(Yi,"handledProps",["active","as","children","className","content","href","link","onClick"]),Yi.propTypes={},Yi.create=Xt(Yi,function(t){return{content:t,link:!0}}),Xi.handledProps=["as","children","className","divider","icon","sections","size"],Xi.propTypes={},Xi.Divider=Qi,Xi.Section=Yi;var $i=Xi;function Ji(t){var e=t.children,n=t.className,i=t.content,o=t.control,s=t.disabled,u=t.error,c=t.inline,l=t.label,f=t.required,h=t.type,p=t.width,d=Qt()(ct(s,"disabled"),ct(u,"error"),ct(c,"inline"),ct(f,"required"),vt(p,"wide"),"field",n),v=re(Ji,t),m=ie(Ji,t);if(Tt()(o))return Tt()(l)?S.a.createElement(m,a()({},v,{className:d}),r.isNil(e)?i:e):S.a.createElement(m,a()({},v,{className:d}),ee(l,{autoGenerateKey:!1}));var y=N()({},v,{content:i,children:e,disabled:s,required:f,type:h});return"input"!==o||"checkbox"!==h&&"radio"!==h?o===Xr||o===Jr?S.a.createElement(m,{className:d},Object(x.createElement)(o,N()({},y,{label:l}))):S.a.createElement(m,{className:d},ee(l,{defaultProps:{htmlFor:bi()(y,"id")},autoGenerateKey:!1}),Object(x.createElement)(o,y)):S.a.createElement(m,{className:d},S.a.createElement("label",null,Object(x.createElement)(o,y)," ",l))}Ji.handledProps=["as","children","className","content","control","disabled","error","inline","label","required","type","width"],Ji.propTypes={};var Zi=Ji;function to(t){var e=t.control,n=re(to,t),r=ie(to,t);return S.a.createElement(r,a()({},n,{control:e}))}to.handledProps=["as","control"],to.propTypes={},to.defaultProps={as:Zi,control:rr};var eo=to;function no(t){var e=t.control,n=re(no,t),r=ie(no,t);return S.a.createElement(r,a()({},n,{control:e}))}no.handledProps=["as","control"],no.propTypes={},no.defaultProps={as:Zi,control:Xr};var ro=no;function io(t){var e=t.control,n=re(io,t),r=ie(io,t);return S.a.createElement(r,a()({},n,{control:e}))}io.handledProps=["as","control"],io.propTypes={},io.defaultProps={as:Zi,control:Ri};var oo=io;function ao(t){var e=t.children,n=t.className,r=t.grouped,i=t.inline,o=t.unstackable,s=t.widths,u=Qt()(ct(r,"grouped"),ct(i,"inline"),ct(o,"unstackable"),vt(s,null,!0),"fields",n),c=re(ao,t),l=ie(ao,t);return S.a.createElement(l,a()({},c,{className:u}),e)}ao.handledProps=["as","children","className","grouped","inline","unstackable","widths"],ao.propTypes={};var so=ao,uo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeIcon",function(){var t=r.props,e=t.loading,n=t.icon;return Tt()(n)?e?"spinner":void 0:n}),_()(g()(g()(r)),"computeTabIndex",function(){var t=r.props,e=t.disabled,n=t.tabIndex;return Tt()(n)?e?-1:void 0:n}),_()(g()(g()(r)),"focus",function(){return r.inputRef.focus()}),_()(g()(g()(r)),"handleChange",function(t){var e=bi()(t,"target.value");C()(r.props,"onChange",t,N()({},r.props,{value:e}))}),_()(g()(g()(r)),"handleChildOverrides",function(t,e){return N()({},e,t.props,{ref:function(e){C()(t,"ref",e),r.handleInputRef(e)}})}),_()(g()(g()(r)),"handleInputRef",function(t){return r.inputRef=t}),_()(g()(g()(r)),"partitionProps",function(){var t=r.props,n=t.disabled,i=t.type,o=r.computeTabIndex(),a=re(e,r.props),s=ce(a),u=H()(s,2),c=u[0],l=u[1];return[N()({},c,{disabled:n,type:i,tabIndex:o,onChange:r.handleChange,ref:r.handleInputRef}),l]}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.action,o=n.actionPosition,s=n.children,u=n.className,c=n.disabled,l=n.error,f=n.fluid,h=n.focus,p=n.icon,d=n.iconPosition,v=n.input,m=n.inverted,y=n.label,g=n.labelPosition,b=n.loading,_=n.size,w=n.transparent,E=n.type,T=Qt()("ui",_,ct(c,"disabled"),ct(l,"error"),ct(f,"fluid"),ct(h,"focus"),ct(m,"inverted"),ct(b,"loading"),ct(w,"transparent"),lt(o,"action")||ct(i,"action"),lt(d,"icon")||ct(p||b,"icon"),lt(g,"labeled")||ct(y,"labeled"),"input",u),C=ie(e,this.props),k=this.partitionProps(),N=H()(k,2),A=N[0],I=N[1];if(!r.isNil(s)){var O=be()(x.Children.toArray(s),function(e){return"input"!==e.type?e:Object(x.cloneElement)(e,t.handleChildOverrides(e,A))});return S.a.createElement(C,a()({},I,{className:T}),O)}var P=rr.create(i,{autoGenerateKey:!1}),R=Yn.create(y,{defaultProps:{className:Qt()("label",ae()(g,"corner")&&g)},autoGenerateKey:!1});return S.a.createElement(C,a()({},I,{className:T}),"left"===o&&P,"right"!==g&&R,te(v||E,{defaultProps:A,autoGenerateKey:!1}),"left"!==o&&P,Nn.create(this.computeIcon(),{autoGenerateKey:!1}),"right"===g&&R)}}]),e}(x.Component);_()(uo,"defaultProps",{type:"text"}),_()(uo,"handledProps",["action","actionPosition","as","children","className","disabled","error","fluid","focus","icon","iconPosition","input","inverted","label","labelPosition","loading","onChange","size","tabIndex","transparent","type"]),uo.propTypes={},uo.create=Xt(uo,function(t){return{type:t}});var co=uo;function lo(t){var e=t.control,n=re(lo,t),r=ie(lo,t);return S.a.createElement(r,a()({},n,{control:e}))}lo.handledProps=["as","control"],lo.propTypes={},lo.defaultProps={as:Zi,control:co};var fo=lo;function ho(t){var e=t.control,n=re(ho,t),r=ie(ho,t);return S.a.createElement(r,a()({},n,{control:e}))}ho.handledProps=["as","control"],ho.propTypes={},ho.defaultProps={as:Zi,control:Jr};var po=ho;function vo(t){var e=t.control,n=t.options,r=re(vo,t),i=ie(vo,t);return S.a.createElement(i,a()({},r,{control:e,options:n}))}vo.handledProps=["as","control","options"],vo.propTypes={},vo.defaultProps={as:Zi,control:Mi};var mo=vo;function yo(t){var e=t.control,n=re(yo,t),r=ie(yo,t);return S.a.createElement(r,a()({},n,{control:e}))}yo.handledProps=["as","control"],yo.propTypes={},yo.defaultProps={as:Zi,control:ji};var go=yo,bo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleSubmit",function(t){"string"!=typeof r.props.action&&C()(t,"preventDefault");for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];C.a.apply(void 0,[r.props,"onSubmit",t,r.props].concat(n))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.action,r=t.children,i=t.className,o=t.error,s=t.inverted,u=t.loading,c=t.reply,l=t.size,f=t.success,h=t.unstackable,p=t.warning,d=t.widths,v=Qt()("ui",l,ct(o,"error"),ct(s,"inverted"),ct(u,"loading"),ct(c,"reply"),ct(f,"success"),ct(h,"unstackable"),ct(p,"warning"),vt(d,null,!0),"form",i),m=re(e,this.props),y=ie(e,this.props);return S.a.createElement(y,a()({},m,{action:n,className:v,onSubmit:this.handleSubmit}),r)}}]),e}(x.Component);_()(bo,"defaultProps",{as:"form"}),_()(bo,"Field",Zi),_()(bo,"Button",eo),_()(bo,"Checkbox",ro),_()(bo,"Dropdown",oo),_()(bo,"Group",so),_()(bo,"Input",fo),_()(bo,"Radio",po),_()(bo,"Select",mo),_()(bo,"TextArea",go),_()(bo,"handledProps",["action","as","children","className","error","inverted","loading","onSubmit","reply","size","success","unstackable","warning","widths"]),bo.propTypes={};var _o=bo;function wo(t){var e=t.children,n=t.className,r=t.computer,i=t.color,o=t.floated,s=t.largeScreen,u=t.mobile,c=t.only,l=t.stretched,f=t.tablet,h=t.textAlign,p=t.verticalAlign,d=t.widescreen,v=t.width,m=Qt()(i,ct(l,"stretched"),ht(c,"only"),pt(h),lt(o,"floated"),dt(p),vt(r,"wide computer"),vt(s,"wide large screen"),vt(u,"wide mobile"),vt(f,"wide tablet"),vt(d,"wide widescreen"),vt(v,"wide"),"column",n),y=re(wo,t),g=ie(wo,t);return S.a.createElement(g,a()({},y,{className:m}),e)}wo.handledProps=["as","children","className","color","computer","floated","largeScreen","mobile","only","stretched","tablet","textAlign","verticalAlign","widescreen","width"],wo.propTypes={},wo.create=Xt(wo,function(t){return{children:t}});var Eo=wo;function To(t){var e=t.centered,n=t.children,r=t.className,i=t.color,o=t.columns,s=t.divided,u=t.only,c=t.reversed,l=t.stretched,f=t.textAlign,h=t.verticalAlign,p=Qt()(i,ct(e,"centered"),ct(s,"divided"),ct(l,"stretched"),ht(u,"only"),ht(c,"reversed"),pt(f),dt(h),vt(o,"column",!0),"row",r),d=re(To,t),v=ie(To,t);return S.a.createElement(v,a()({},d,{className:p}),n)}To.handledProps=["as","centered","children","className","color","columns","divided","only","reversed","stretched","textAlign","verticalAlign"],To.propTypes={};var Co=To;function xo(t){var e=t.celled,n=t.centered,r=t.children,i=t.className,o=t.columns,s=t.container,u=t.divided,c=t.doubling,l=t.inverted,f=t.padded,h=t.relaxed,p=t.reversed,d=t.stackable,v=t.stretched,m=t.textAlign,y=t.verticalAlign,g=Qt()("ui",ct(n,"centered"),ct(s,"container"),ct(c,"doubling"),ct(l,"inverted"),ct(d,"stackable"),ct(v,"stretched"),ft(e,"celled"),ft(u,"divided"),ft(f,"padded"),ft(h,"relaxed"),ht(p,"reversed"),pt(m),dt(y),vt(o,"column",!0),"grid",i),b=re(xo,t),_=ie(xo,t);return S.a.createElement(_,a()({},b,{className:g}),r)}xo.handledProps=["as","celled","centered","children","className","columns","container","divided","doubling","inverted","padded","relaxed","reversed","stackable","stretched","textAlign","verticalAlign"],xo.Column=Eo,xo.Row=Co,xo.propTypes={};var So=xo;function ko(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(ko,t),u=ie(ko,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ko.handledProps=["as","children","className","content"],ko.propTypes={};var No=ko;function Ao(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ao,t),u=ie(Ao,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ao.handledProps=["as","children","className","content"],Ao.propTypes={},Ao.create=Xt(Ao,function(t){return{content:t}});var Io=Ao;function Oo(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Oo,t),u=ie(Oo,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Oo.handledProps=["as","children","className","content"],Oo.propTypes={},Oo.defaultProps={as:"li"},Oo.create=Xt(Oo,function(t){return{content:t}});var Po=Oo;function Ro(t){var e=t.children,n=t.className,i=t.items,o=Qt()("list",n),s=re(Ro,t),u=ie(Ro,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?be()(i,Po.create):e)}Ro.handledProps=["as","children","className","items"],Ro.propTypes={},Ro.defaultProps={as:"ul"},Ro.create=Xt(Ro,function(t){return{items:t}});var Do=Ro,Mo=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleDismiss",function(t){var e=r.props.onDismiss;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.attached,i=t.children,o=t.className,s=t.color,u=t.compact,c=t.content,l=t.error,f=t.floating,h=t.header,p=t.hidden,d=t.icon,v=t.info,m=t.list,y=t.negative,g=t.onDismiss,b=t.positive,_=t.size,w=t.success,E=t.visible,T=t.warning,C=Qt()("ui",s,_,ct(u,"compact"),ct(l,"error"),ct(f,"floating"),ct(p,"hidden"),ct(d,"icon"),ct(v,"info"),ct(y,"negative"),ct(b,"positive"),ct(w,"success"),ct(E,"visible"),ct(T,"warning"),ft(n,"attached"),"message",o),x=g&&S.a.createElement(Nn,{name:"close",onClick:this.handleDismiss}),k=re(e,this.props),N=ie(e,this.props);return r.isNil(i)?S.a.createElement(N,a()({},k,{className:C}),x,Nn.create(d,{autoGenerateKey:!1}),(!Tt()(h)||!Tt()(c)||!Tt()(m))&&S.a.createElement(No,null,Io.create(h,{autoGenerateKey:!1}),Do.create(m,{autoGenerateKey:!1}),ne(c,{autoGenerateKey:!1}))):S.a.createElement(N,a()({},k,{className:C}),x,i)}}]),e}(x.Component);function Lo(t){var e=t.children,n=t.className,r=Qt()(n),i=re(Lo,t),o=ie(Lo,t);return S.a.createElement(o,a()({},i,{className:r}),e)}_()(Mo,"Content",No),_()(Mo,"Header",Io),_()(Mo,"List",Do),_()(Mo,"Item",Po),_()(Mo,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),Mo.propTypes={},Lo.handledProps=["as","children","className"],Lo.defaultProps={as:"tbody"},Lo.propTypes={};var Fo=Lo;function Uo(t){var e=t.active,n=t.children,i=t.className,o=t.collapsing,s=t.content,u=t.disabled,c=t.error,l=t.icon,f=t.negative,h=t.positive,p=t.selectable,d=t.singleLine,v=t.textAlign,m=t.verticalAlign,y=t.warning,g=t.width,b=Qt()(ct(e,"active"),ct(o,"collapsing"),ct(u,"disabled"),ct(c,"error"),ct(f,"negative"),ct(h,"positive"),ct(p,"selectable"),ct(d,"single line"),ct(y,"warning"),pt(v),dt(m),vt(g,"wide"),i),_=re(Uo,t),w=ie(Uo,t);return r.isNil(n)?S.a.createElement(w,a()({},_,{className:b}),Nn.create(l),s):S.a.createElement(w,a()({},_,{className:b}),n)}Uo.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],Uo.defaultProps={as:"td"},Uo.propTypes={},Uo.create=Xt(Uo,function(t){return{content:t}});var jo=Uo;function Bo(t){var e=t.children,n=t.className,i=t.content,o=t.fullWidth,s=Qt()(ct(o,"full-width"),n),u=re(Bo,t),c=ie(Bo,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bo.handledProps=["as","children","className","content","fullWidth"],Bo.defaultProps={as:"thead"},Bo.propTypes={};var qo=Bo;function Vo(t){var e=t.as,n=re(Vo,t);return S.a.createElement(qo,a()({},n,{as:e}))}Vo.handledProps=["as"],Vo.propTypes={},Vo.defaultProps={as:"tfoot"};var Wo=Vo;function Ho(t){var e=t.as,n=t.className,r=t.sorted,i=Qt()(lt(r,"sorted"),n),o=re(Ho,t);return S.a.createElement(jo,a()({},o,{as:e,className:i}))}Ho.handledProps=["as","className","sorted"],Ho.propTypes={},Ho.defaultProps={as:"th"};var zo=Ho;function Ko(t){var e=t.active,n=t.cellAs,i=t.cells,o=t.children,s=t.className,u=t.disabled,c=t.error,l=t.negative,f=t.positive,h=t.textAlign,p=t.verticalAlign,d=t.warning,v=Qt()(ct(e,"active"),ct(u,"disabled"),ct(c,"error"),ct(l,"negative"),ct(f,"positive"),ct(d,"warning"),pt(h),dt(p),s),m=re(Ko,t),y=ie(Ko,t);return r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(i,function(t){return jo.create(t,{defaultProps:{as:n}})})):S.a.createElement(y,a()({},m,{className:v}),o)}Ko.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],Ko.defaultProps={as:"tr",cellAs:"td"},Ko.propTypes={},Ko.create=Xt(Ko,function(t){return{cells:t}});var Go=Ko;function Qo(t){var e=t.attached,n=t.basic,i=t.celled,o=t.children,s=t.className,u=t.collapsing,c=t.color,l=t.columns,f=t.compact,h=t.definition,p=t.fixed,d=t.footerRow,v=t.headerRow,m=t.inverted,y=t.padded,g=t.renderBodyRow,b=t.selectable,_=t.singleLine,w=t.size,E=t.sortable,T=t.stackable,C=t.striped,x=t.structured,k=t.tableData,N=t.textAlign,A=t.unstackable,I=t.verticalAlign,O=Qt()("ui",c,w,ct(i,"celled"),ct(u,"collapsing"),ct(h,"definition"),ct(p,"fixed"),ct(m,"inverted"),ct(b,"selectable"),ct(_,"single line"),ct(E,"sortable"),ct(T,"stackable"),ct(C,"striped"),ct(x,"structured"),ct(A,"unstackable"),ft(e,"attached"),ft(n,"basic"),ft(f,"compact"),ft(y,"padded"),pt(N),dt(I),vt(l,"column"),"table",s),P=re(Qo,t),R=ie(Qo,t);return r.isNil(o)?S.a.createElement(R,a()({},P,{className:O}),v&&S.a.createElement(qo,null,Go.create(v,{defaultProps:{cellAs:"th"}})),S.a.createElement(Fo,null,g&&be()(k,function(t,e){return Go.create(g(t,e))})),d&&S.a.createElement(Wo,null,Go.create(d))):S.a.createElement(R,a()({},P,{className:O}),o)}Qo.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],Qo.defaultProps={as:"table"},Qo.propTypes={},Qo.Body=Fo,Qo.Cell=jo,Qo.Footer=Wo,Qo.Header=qo,Qo.HeaderCell=zo,Qo.Row=Go;var Yo=Qo;function Xo(t){var e=t.children,n=t.className,i=t.content,o=t.fluid,s=t.text,u=t.textAlign,c=Qt()("ui",ct(s,"text"),ct(o,"fluid"),pt(u),"container",n),l=re(Xo,t),f=ie(Xo,t);return S.a.createElement(f,a()({},l,{className:c}),r.isNil(e)?i:e)}Xo.handledProps=["as","children","className","content","fluid","text","textAlign"],Xo.propTypes={};var $o=Xo;function Jo(t){var e=t.children,n=t.className,i=t.clearing,o=t.content,s=t.fitted,u=t.hidden,c=t.horizontal,l=t.inverted,f=t.section,h=t.vertical,p=Qt()("ui",ct(i,"clearing"),ct(s,"fitted"),ct(u,"hidden"),ct(c,"horizontal"),ct(l,"inverted"),ct(f,"section"),ct(h,"vertical"),"divider",n),d=re(Jo,t),v=ie(Jo,t);return S.a.createElement(v,a()({},d,{className:p}),r.isNil(e)?o:e)}Jo.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],Jo.propTypes={};var Zo=Jo;function ta(t){var e=t.children,n=t.className,i=t.content,o=Qt()("sub header",n),s=re(ta,t),u=ie(ta,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ta.handledProps=["as","children","className","content"],ta.propTypes={},ta.create=Xt(ta,function(t){return{content:t}});var ea=ta;function na(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(na,t),u=ie(na,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}na.handledProps=["as","children","className","content"],na.propTypes={};var ra=na;function ia(t){var e=t.attached,n=t.block,i=t.children,o=t.className,s=t.color,u=t.content,c=t.disabled,l=t.dividing,f=t.floated,h=t.icon,p=t.image,d=t.inverted,v=t.size,m=t.sub,y=t.subheader,g=t.textAlign,b=Qt()("ui",s,v,ct(n,"block"),ct(c,"disabled"),ct(l,"dividing"),lt(f,"floated"),ct(!0===h,"icon"),ct(!0===p,"image"),ct(d,"inverted"),ct(m,"sub"),ft(e,"attached"),pt(g),"header",o),_=re(ia,t),w=ie(ia,t);if(!r.isNil(i))return S.a.createElement(w,a()({},_,{className:b}),i);var E=Nn.create(h,{autoGenerateKey:!1}),T=Hn.create(p,{autoGenerateKey:!1}),C=ea.create(y,{autoGenerateKey:!1});return E||T?S.a.createElement(w,a()({},_,{className:b}),E||T,(u||C)&&S.a.createElement(ra,null,u,C)):S.a.createElement(w,a()({},_,{className:b}),u,C)}ia.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],ia.propTypes={},ia.Content=ra,ia.Subheader=ea;var oa=ia;function aa(t){var e=t.children,n=t.className,i=t.content,o=Qt()(n,"description"),s=re(aa,t),u=ie(aa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}aa.handledProps=["as","children","className","content"],aa.propTypes={},aa.create=Xt(aa,function(t){return{content:t}});var sa=aa;function ua(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(ua,t),u=ie(ua,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}ua.handledProps=["as","children","className","content"],ua.propTypes={},ua.create=Xt(ua,function(t){return{content:t}});var ca=ua;function la(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.floated,u=t.header,c=t.verticalAlign,l=Qt()(lt(s,"floated"),dt(c),"content",n),f=re(la,t),h=ie(la,t);return r.isNil(e)?S.a.createElement(h,a()({},f,{className:l}),ca.create(u),sa.create(o),i):S.a.createElement(h,a()({},f,{className:l}),e)}la.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],la.propTypes={},la.create=Xt(la,function(t){return{content:t}});var fa=la;function ha(t){var e=t.className,n=t.verticalAlign,r=Qt()(dt(n),e),i=re(ha,t);return S.a.createElement(Nn,a()({},i,{className:r}))}ha.handledProps=["className","verticalAlign"],ha.propTypes={},ha.create=Xt(ha,function(t){return{name:t}});var pa=ha,da=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.content,u=t.description,c=t.disabled,l=t.header,f=t.icon,h=t.image,p=t.value,d=ie(e,this.props),v=Qt()(ct(n,"active"),ct(c,"disabled"),ct("li"!==d,"item"),o),m=re(e,this.props),y="li"===d?{value:p}:{"data-value":p};if(!r.isNil(i))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),i);var g=pa.create(f,{autoGenerateKey:!1}),b=Hn.create(h,{autoGenerateKey:!1});if(!Object(x.isValidElement)(s)&&Ut()(s))return S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,fa.create(s,{autoGenerateKey:!1,defaultProps:{header:l,description:u}}));var _=ca.create(l,{autoGenerateKey:!1}),w=sa.create(u,{autoGenerateKey:!1});return g||b?S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),g||b,(s||_||w)&&S.a.createElement(fa,null,_,w,s)):S.a.createElement(d,a()({},m,y,{role:"listitem",className:v,onClick:this.handleClick}),_,w,s)}}]),e}(x.Component);_()(da,"handledProps",["active","as","children","className","content","description","disabled","header","icon","image","onClick","value"]),da.propTypes={},da.create=Xt(da,function(t){return{content:t}});var va=da;function ma(t){var e=t.children,n=t.className,i=t.content,o=re(ma,t),s=ie(ma,t),u=Qt()(ct("ul"!==s&&"ol"!==s,"list"),n);return S.a.createElement(s,a()({},o,{className:u}),r.isNil(e)?i:e)}ma.handledProps=["as","children","className","content"],ma.propTypes={};var ya=ma,ga=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemOverrides",function(t){return{onClick:function(e,n){C()(t,"onClick",e,n),C()(r.props,"onItemClick",e,n)}}}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,i=n.animated,o=n.bulleted,s=n.celled,u=n.children,c=n.className,l=n.content,f=n.divided,h=n.floated,p=n.horizontal,d=n.inverted,v=n.items,m=n.link,y=n.ordered,g=n.relaxed,b=n.selection,_=n.size,w=n.verticalAlign,E=Qt()("ui",_,ct(i,"animated"),ct(o,"bulleted"),ct(s,"celled"),ct(f,"divided"),ct(p,"horizontal"),ct(d,"inverted"),ct(m,"link"),ct(y,"ordered"),ct(b,"selection"),ft(g,"relaxed"),lt(h,"floated"),dt(w),"list",c),T=re(e,this.props),C=ie(e,this.props);return r.isNil(u)?r.isNil(l)?S.a.createElement(C,a()({},T,{role:"list",className:E}),be()(v,function(e){return va.create(e,{overrideProps:t.handleItemOverrides})})):S.a.createElement(C,a()({},T,{role:"list",className:E}),l):S.a.createElement(C,a()({},T,{role:"list",className:E}),u)}}]),e}(x.Component);_()(ga,"Content",fa),_()(ga,"Description",sa),_()(ga,"Header",ca),_()(ga,"Icon",pa),_()(ga,"Item",va),_()(ga,"List",ya),_()(ga,"handledProps",["animated","as","bulleted","celled","children","className","content","divided","floated","horizontal","inverted","items","link","onItemClick","ordered","relaxed","selection","size","verticalAlign"]),ga.propTypes={};var ba=ga;function _a(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.disabled,u=t.indeterminate,c=t.inline,l=t.inverted,f=t.size,h=Qt()("ui",f,ct(e,"active"),ct(s,"disabled"),ct(u,"indeterminate"),ct(l,"inverted"),ct(n||o,"text"),ft(c,"inline"),"loader",i),p=re(_a,t),d=ie(_a,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?o:n)}_a.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"],_a.propTypes={};var wa=_a;function Ea(t){var e=t.attached,n=t.children,i=t.className,o=t.close,s=t.content,u=t.dividing,c=t.internal,l=t.position,f=t.size,h=Qt()("ui",l,f,ct(e,"attached"),ct(u,"dividing"),ct(c,"internal"),ft(o,"close"),"rail",i),p=re(Ea,t),d=ie(Ea,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(n)?s:n)}Ea.handledProps=["as","attached","children","className","close","content","dividing","internal","position","size"],Ea.propTypes={};var Ta=Ea;function Ca(t){var e=t.children,n=t.className,i=t.content,o=t.hidden,s=t.visible,u=Qt()("ui",ct(o,"hidden"),ct(s,"visible"),"content",n),c=re(Ca,t),l=ie(Ca,t);return S.a.createElement(l,a()({},c,{className:u}),r.isNil(e)?i:e)}Ca.handledProps=["as","children","className","content","hidden","visible"],Ca.propTypes={};var xa=Ca;function Sa(t){var e=t.active,n=t.animated,i=t.children,o=t.className,s=t.content,u=t.disabled,c=t.instant,l=Qt()("ui",n,ct(e,"active"),ct(u,"disabled"),ct(c,"instant"),"reveal",o),f=re(Sa,t),h=ie(Sa,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(i)?s:i)}Sa.handledProps=["active","animated","as","children","className","content","disabled","instant"],Sa.propTypes={},Sa.Content=xa;var ka=Sa;function Na(t){var e=t.children,n=t.className,i=t.compact,o=t.content,s=t.horizontal,u=t.piled,c=t.raised,l=t.size,f=t.stacked,h=Qt()("ui",l,ct(i,"compact"),ct(s,"horizontal"),ct(u,"piled"),ct(c,"raised"),ct(f,"stacked"),"segments",n),p=re(Na,t),d=ie(Na,t);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(e)?o:e)}Na.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],Na.propTypes={};var Aa=Na;function Ia(t){var e=t.attached,n=t.basic,i=t.children,o=t.circular,s=t.className,u=t.clearing,c=t.color,l=t.compact,f=t.content,h=t.disabled,p=t.floated,d=t.inverted,v=t.loading,m=t.padded,y=t.piled,g=t.raised,b=t.secondary,_=t.size,w=t.stacked,E=t.tertiary,T=t.textAlign,C=t.vertical,x=Qt()("ui",c,_,ct(n,"basic"),ct(o,"circular"),ct(u,"clearing"),ct(l,"compact"),ct(h,"disabled"),ct(d,"inverted"),ct(v,"loading"),ct(y,"piled"),ct(g,"raised"),ct(b,"secondary"),ct(w,"stacked"),ct(E,"tertiary"),ct(C,"vertical"),ft(e,"attached"),ft(m,"padded"),pt(T),lt(p,"floated"),"segment",s),k=re(Ia,t),N=ie(Ia,t);return S.a.createElement(N,a()({},k,{className:x}),r.isNil(i)?f:i)}Ia.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","raised","secondary","size","stacked","tertiary","textAlign","vertical"],Ia.Group=Aa,Ia.propTypes={};var Oa=Ia;function Pa(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Pa,t),u=ie(Pa,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Pa.handledProps=["as","children","className","content"],Pa.propTypes={},Pa.create=Xt(Pa,function(t){return{content:t}});var Ra=Pa;function Da(t){var e=t.children,n=t.className,i=t.content,o=Qt()("title",n),s=re(Da,t),u=ie(Da,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Da.handledProps=["as","children","className","content"],Da.propTypes={},Da.create=Xt(Da,function(t){return{content:t}});var Ma=Da;function La(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.title,u=Qt()("content",n),c=re(La,t),l=ie(La,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(l,a()({},c,{className:u}),Ma.create(s,{autoGenerateKey:!1}),Ra.create(o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),i):S.a.createElement(l,a()({},c,{className:u}),e)}La.handledProps=["as","children","className","content","description","title"],La.propTypes={},La.create=Xt(La,function(t){return{content:t}});var Fa=La,Ua=n(272);n.n(Ua)()(st,function(t,e){return e<=8});function ja(t){var e=t.attached,n=t.children,i=t.className,o=t.content,s=t.fluid,u=t.items,c=t.ordered,l=t.size,f=t.stackable,h=t.unstackable,p=t.vertical,d=t.widths,v=Qt()("ui",l,ct(s,"fluid"),ct(c,"ordered"),ct(h,"unstackable"),ct(p,"vertical"),ft(e,"attached"),lt(f,"stackable"),vt(d),"steps",i),m=re(ja,t),y=ie(ja,t);return r.isNil(n)?r.isNil(o)?S.a.createElement(y,a()({},m,{className:v}),be()(u,function(t){return Va.create(t)})):S.a.createElement(y,a()({},m,{className:v}),o):S.a.createElement(y,a()({},m,{className:v}),n)}ja.handledProps=["as","attached","children","className","content","fluid","items","ordered","size","stackable","unstackable","vertical","widths"],ja.propTypes={};var Ba=ja,qa=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeElementType",function(){if(r.props.onClick)return"a"}),_()(g()(g()(r)),"handleClick",function(t){r.props.disabled||C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,i=t.children,o=t.className,s=t.completed,u=t.content,c=t.description,l=t.disabled,f=t.href,h=t.icon,p=t.link,d=t.title,v=Qt()(ct(n,"active"),ct(s,"completed"),ct(l,"disabled"),ct(p,"link"),"step",o),m=re(e,this.props),y=ie(e,this.props,this.computeElementType);return r.isNil(i)?r.isNil(u)?S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),Nn.create(h,{autoGenerateKey:!1}),Fa.create({description:c,title:d},{autoGenerateKey:!1})):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),u):S.a.createElement(y,a()({},m,{className:v,href:f,onClick:this.handleClick}),i)}}]),e}(x.Component);_()(qa,"Content",Fa),_()(qa,"Description",Ra),_()(qa,"Group",Ba),_()(qa,"Title",Ma),_()(qa,"handledProps",["active","as","children","className","completed","content","description","disabled","href","icon","link","onClick","ordered","title"]),qa.propTypes={},qa.create=Xt(qa,function(t){return{content:t}});var Va=qa;function Wa(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=Qt()("content",ct(e,"active"),i),u=re(Wa,t),c=ie(Wa,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}Wa.handledProps=["active","as","children","className","content"],Wa.propTypes={},Wa.create=Xt(Wa,function(t){return{content:t}});var Ha=Wa,za=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){return C()(r.props,"onClick",t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.children,i=t.className,o=t.content,s=Qt()(ct(n,"active"),"title",i),u=re(e,this.props),c=ie(e,this.props);return Tt()(o)?S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),r):S.a.createElement(c,a()({},u,{className:s,onClick:this.handleClick}),S.a.createElement(Nn,{name:"dropdown"}),o)}}]),e}(x.Component);_()(za,"handledProps",["active","as","children","className","content","index","onClick"]),za.propTypes={},za.create=Xt(za,function(t){return{content:t}});var Ka=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"computeNewIndex",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?t===n?-1:t:ae()(n,t)?Cn()(n,t):yt()(n).concat([t])}),_()(g()(g()(r)),"handleTitleOverrides",function(t){return{onClick:function(e,n){var i=n.index,o=r.computeNewIndex(i);r.trySetState({activeIndex:o}),C()(t,"onClick",e,n),C()(r.props,"onTitleClick",e,n)}}}),_()(g()(g()(r)),"isIndexActive",function(t){var e=r.props.exclusive,n=r.state.activeIndex;return e?n===t:ae()(n,t)}),_()(g()(g()(r)),"renderPanels",function(){var t=[],e=r.props.panels;return B()(e,function(e,n){var i=e.content,o=e.title,a=r.isIndexActive(n);t.push(za.create(o,{defaultProps:{active:a,index:n},overrideProps:r.handleTitleOverrides})),t.push(Ha.create(i,{defaultProps:{active:a}}))}),t}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(t){return{activeIndex:t.exclusive?-1:[-1]}}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children,i=Qt()("accordion",n),o=re(e,this.props),s=ie(e,this.props);return S.a.createElement(s,a()({},o,{className:i}),Tt()(r)?this.renderPanels():r)}}]),e}(V);function Ga(t){var e=t.className,n=t.fluid,r=t.inverted,i=t.styled,o=Qt()("ui",ct(n,"fluid"),ct(r,"inverted"),ct(i,"styled"),e),s=re(Ga,t);return S.a.createElement(Ka,a()({},s,{className:o}))}_()(Ka,"defaultProps",{exclusive:!0}),_()(Ka,"autoControlledProps",["activeIndex"]),_()(Ka,"handledProps",["activeIndex","as","children","className","defaultActiveIndex","exclusive","onTitleClick","panels"]),Ka.propTypes={},Ka.create=Xt(Ka,function(t){return{content:t}}),Ga.handledProps=["className","fluid","inverted","styled"],Ga.propTypes={},Ga.Accordion=Ka,Ga.Content=Ha,Ga.Title=za;var Qa=Ga,Ya=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick,n=r.state.active;e&&e(t,N()({},r.props,{active:!0})),n||r.trySetState({active:!0})}),n))}return m()(e,t),l()(e,[{key:"getSrc",value:function(){var t=this.props,e=t.autoplay,n=void 0===e||e,r=t.brandedUI,i=void 0!==r&&r,o=t.color,a=void 0===o?"#444444":o,s=t.hd,u=void 0===s||s,c=t.id,l=t.source,f=t.url;return"youtube"===l?["//www.youtube.com/embed/".concat(c),"?autohide=true","&autoplay=".concat(n),"&color=".concat(encodeURIComponent(a)),"&hq=".concat(u),"&jsapi=false","&modestbranding=".concat(i),"&rel=".concat(i?0:1)].join(""):"vimeo"===l?["//player.vimeo.com/video/".concat(c),"?api=false","&autoplay=".concat(n),"&byline=false","&color=".concat(encodeURIComponent(a)),"&portrait=false","&title=false"].join(""):f}},{key:"render",value:function(){var t=this.props,n=t.aspectRatio,r=t.className,i=t.icon,o=t.placeholder,s=this.state.active,u=Qt()("ui",n,ct(s,"active"),"embed",r),c=re(e,this.props),l=ie(e,this.props),f=void 0!==i?i:"video play";return S.a.createElement(l,a()({},c,{className:u,onClick:this.handleClick}),Nn.create(f,{autoGenerateKey:!1}),o&&S.a.createElement("img",{className:"placeholder",src:o}),this.renderEmbed())}},{key:"renderEmbed",value:function(){var t=this.props,e=t.children,n=t.content,i=t.iframe,o=t.source;return this.state.active?r.isNil(e)?r.isNil(n)?S.a.createElement("div",{className:"embed"},Jt(r.isNil(i)?this.getSrc():i,{defaultProps:{allowFullScreen:!1,frameBorder:0,height:"100%",scrolling:"no",src:this.getSrc(),title:"Embedded content from ".concat(o,"."),width:"100%"},autoGenerateKey:!1})):S.a.createElement("div",{className:"embed"},n):S.a.createElement("div",{className:"embed"},e):null}}]),e}(V);_()(Ya,"autoControlledProps",["active"]),_()(Ya,"handledProps",["active","as","aspectRatio","autoplay","brandedUI","children","className","color","content","defaultActive","hd","icon","id","iframe","onClick","placeholder","source","url"]),Ya.propTypes={};var Xa=n(271),$a=n.n(Xa);function Ja(t){var e=t.children,n=t.className,i=t.content,o=Qt()("content",n),s=re(Ja,t),u=ie(Ja,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}function Za(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Za,t),u=ie(Za,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ja.handledProps=["as","children","className","content"],Ja.propTypes={},Ja.create=Xt(Ja,function(t){return{children:t}}),Za.handledProps=["as","children","className","content"],Za.propTypes={},Za.create=Xt(Za,function(t){return{children:t}});var ts=["top left","top right","bottom right","bottom left","right center","left center","top center","bottom center"],es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{}),_()(g()(g()(r)),"hideOnScroll",function(t){r.setState({closed:!0}),Dt.unsub("scroll",r.hideOnScroll,{target:window}),setTimeout(function(){r.mounted&&r.setState({closed:!1})},50),r.handleClose(t)}),_()(g()(g()(r)),"handleClose",function(t){C()(r.props,"onClose",t,r.props)}),_()(g()(g()(r)),"handleOpen",function(t){r.coords=t.currentTarget.getBoundingClientRect();var e=r.props.onOpen;e&&e(t,r.props)}),_()(g()(g()(r)),"handlePortalMount",function(t){r.props.hideOnScroll&&Dt.sub("scroll",r.hideOnScroll,{target:window}),r.setPosition(),C()(r.props,"onMount",t,r.props)}),_()(g()(g()(r)),"handlePortalUnmount",function(t){var e=r.props.hideOnScroll;cancelAnimationFrame(r.animationRequestId),e&&Dt.unsub("scroll",r.hideOnScroll,{target:window}),C()(r.props,"onUnmount",t,r.props)}),_()(g()(g()(r)),"handlePopupRef",function(t){r.popupCoords=t?t.getBoundingClientRect():null,r.setPopupStyle()}),_()(g()(g()(r)),"handleTriggerRef",function(t){t&&(r.triggerRef=t)}),_()(g()(g()(r)),"setPosition",function(){r.triggerRef&&r.setPopupStyle(r.props.position),r.animationRequestId=requestAnimationFrame(r.setPosition)}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"computePopupStyle",value:function(t){var e={position:"absolute"};if(!St())return e;var n=this.props,r=n.horizontalOffset,i=n.verticalOffset,o=window,a=o.pageYOffset,s=o.pageXOffset,u=document.documentElement,c=u.clientWidth,l=u.clientHeight,f=this.coords||this.triggerRef.getBoundingClientRect();if(ae()(t,"right"))e.right=Math.round(c-(f.right+s)),e.left="auto";else if(ae()(t,"left"))e.left=Math.round(f.left+s),e.right="auto";else{var h=(f.width-this.popupCoords.width)/2;e.left=Math.round(f.left+h+s),e.right="auto"}if(ae()(t,"top"))e.bottom=Math.round(l-(f.top+a)),e.top="auto";else if(ae()(t,"bottom"))e.top=Math.round(f.bottom+a),e.bottom="auto";else{var p=(f.height+this.popupCoords.height)/2;e.top=Math.round(f.bottom+a-p),e.bottom="auto";var d=this.popupCoords.width+8;ae()(t,"right")?e.right-=d:e.left-=d}return r&&(Vt()(e.right)?e.right-=r:e.left-=r),i&&(Vt()(e.top)?e.top+=i:e.bottom+=i),e}},{key:"isStyleInViewport",value:function(t){var e=window,n=e.pageYOffset,r=e.pageXOffset,i=document.documentElement,o=i.clientWidth,a=i.clientHeight,s={top:t.top,left:t.left,width:this.popupCoords.width,height:this.popupCoords.height};return Vt()(t.right)&&(s.left=o-t.right-s.width),Vt()(t.bottom)&&(s.top=a-t.bottom-s.height),!(s.top<n)&&(!(s.top+s.height>n+a)&&(!(s.left<r)&&!(s.left+s.width>r+o)))}},{key:"setPopupStyle",value:function(){if((this.coords||this.triggerRef)&&this.popupCoords){var t=this.props.position,e=this.computePopupStyle(t);if(this.props.keepInViewPort)for(var n=Cn()(ts,t).concat([t]),r=0;!this.isStyleInViewport(e)&&r<n.length;r+=1)e=this.computePopupStyle(n[r]),t=n[r];e=qi()(e,function(t){return Vt()(t)?"".concat(t,"px"):t}),this.setState({style:e,position:t})}}},{key:"getPortalProps",value:function(){var t={},e=this.props,n=e.on,r=e.hoverable,i=Ot()(n)?n:[n];return r&&(t.closeOnPortalMouseLeave=!0,t.mouseLeaveDelay=300),ae()(i,"click")&&(t.openOnTriggerClick=!0,t.closeOnTriggerClick=!0,t.closeOnDocumentClick=!0),ae()(i,"focus")&&(t.openOnTriggerFocus=!0,t.closeOnTriggerBlur=!0),ae()(i,"hover")&&(t.openOnTriggerMouseEnter=!0,t.closeOnTriggerMouseLeave=!0,t.mouseLeaveDelay=70,t.mouseEnterDelay=50),t}},{key:"render",value:function(){var t=this.props,n=t.basic,i=t.children,o=t.className,s=t.content,u=t.flowing,c=t.header,l=t.inverted,f=t.size,h=t.trigger,p=t.wide,d=this.state,v=d.position,m=d.closed,y=$a()({},this.state.style,this.props.style),g=Qt()("ui",v,f,ft(p,"wide"),ct(n,"basic"),ct(u,"flowing"),ct(l,"inverted"),"popup transition visible",o);if(m)return h;var b=re(e,this.props),_=Mn.handledProps,w=sr()(b,function(t,e,n){return ae()(_,n)||(t[n]=e),t},{}),E=or()(b,_),T=ie(e,this.props),C=S.a.createElement(T,a()({},w,{className:g,style:y,ref:this.handlePopupRef}),i,r.isNil(i)&&Za.create(c,{autoGenerateKey:!1}),r.isNil(i)&&Ja.create(s,{autoGenerateKey:!1})),x=N()({},this.getPortalProps(),E);return S.a.createElement(Rn,{innerRef:this.handleTriggerRef},S.a.createElement(Mn,a()({},x,{trigger:h,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),C))}}]),e}(x.Component);_()(es,"defaultProps",{position:"top left",on:"hover",keepInViewPort:!0}),_()(es,"Content",Ja),_()(es,"Header",Za),_()(es,"handledProps",["as","basic","children","className","content","flowing","header","hideOnScroll","horizontalOffset","hoverable","inverted","keepInViewPort","on","onClose","onMount","onOpen","onUnmount","position","size","style","trigger","verticalOffset","wide"]),es.propTypes={};var ns=n(270),rs=n.n(ns),is=n(269),os=n.n(is),as=function(t){function e(){var t,n,i;u()(this,e);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return h()(i,(n=i=h()(this,(t=d()(e)).call.apply(t,[this].concat(a))),_()(g()(g()(i)),"calculatePercent",function(){var t=i.props,e=t.percent,n=t.total,r=t.value;return P()(e)?P()(n)||P()(r)?void 0:r/n*100:e}),_()(g()(g()(i)),"computeValueText",function(t){var e=i.props,n=e.progress,r=e.total,o=e.value;return"value"===n?o:"ratio"===n?"".concat(o,"/").concat(r):"".concat(t,"%")}),_()(g()(g()(i)),"getPercent",function(){var t=i.props,e=t.precision,n=t.progress,r=t.total,o=t.value,a=os()(i.calculatePercent(),0,100);return P()(r)||P()(o)||"value"!==n?"value"===n?o:P()(e)?a:rs()(a,e):o/r*100}),_()(g()(g()(i)),"isAutoSuccess",function(){var t=i.props,e=t.autoSuccess,n=t.percent,r=t.total,o=t.value;return e&&(n>=100||o>=r)}),_()(g()(g()(i)),"renderLabel",function(){var t=i.props,e=t.children,n=t.content,o=t.label;return r.isNil(e)?r.isNil(n)?$t(o,{autoGenerateKey:!1,defaultProps:{className:"label"}}):S.a.createElement("div",{className:"label"},n):S.a.createElement("div",{className:"label"},e)}),_()(g()(g()(i)),"renderProgress",function(t){var e=i.props,n=e.precision;if(e.progress||!P()(n))return S.a.createElement("div",{className:"progress"},i.computeValueText(t))}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.attached,i=t.className,o=t.color,s=t.disabled,u=t.error,c=t.indicating,l=t.inverted,f=t.size,h=t.success,p=t.warning,d=Qt()("ui",o,f,ct(n||c,"active"),ct(s,"disabled"),ct(u,"error"),ct(c,"indicating"),ct(l,"inverted"),ct(h||this.isAutoSuccess(),"success"),ct(p,"warning"),lt(r,"attached"),"progress",i),v=re(e,this.props),m=ie(e,this.props),y=this.getPercent()||0;return S.a.createElement(m,a()({},v,{className:d,"data-percent":Math.floor(y)}),S.a.createElement("div",{className:"bar",style:{width:"".concat(y,"%")}},this.renderProgress(y)),this.renderLabel())}}]),e}(x.Component);_()(as,"handledProps",["active","as","attached","autoSuccess","children","className","color","content","disabled","error","indicating","inverted","label","percent","precision","progress","size","success","total","value","warning"]),as.propTypes={};var ss=as,us=n(268),cs=n.n(us),ls=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),_()(g()(g()(r)),"handleKeyUp",function(t){var e=r.props,n=e.onClick,i=e.onKeyUp;if(i&&i(t,r.props),n)switch(In.a.getCode(t)){case In.a.Enter:case In.a.Spacebar:t.preventDefault(),n(t,r.props)}}),_()(g()(g()(r)),"handleMouseEnter",function(t){var e=r.props.onMouseEnter;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.selected,o=Qt()(ct(n,"active"),ct(i,"selected"),"icon",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick,onKeyUp:this.handleKeyUp,onMouseEnter:this.handleMouseEnter,tabIndex:0,role:"radio"}))}}]),e}(x.Component);_()(ls,"defaultProps",{as:"i"}),_()(ls,"handledProps",["active","as","className","index","onClick","onKeyUp","onMouseEnter","selected"]),ls.propTypes={};var fs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleIconClick",function(t,e){var n=e.index,i=r.props,o=i.clearable,a=i.disabled,s=i.maxRating,u=i.onRate,c=r.state.rating;if(!a){var l=n+1;"auto"===o&&1===s?l=+!c:!0===o&&l===c&&(l=0),r.trySetState({rating:l},{isSelecting:!1}),u&&u(t,N()({},r.props,{rating:l}))}}),_()(g()(g()(r)),"handleIconMouseEnter",function(t,e){var n=e.index;r.props.disabled||r.setState({selectedIndex:n,isSelecting:!0})}),_()(g()(g()(r)),"handleMouseLeave",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];C.a.apply(void 0,[r.props,"onMouseLeave"].concat(e)),r.props.disabled||r.setState({selectedIndex:-1,isSelecting:!1})}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this,n=this.props,r=n.className,i=n.disabled,o=n.icon,s=n.maxRating,u=n.size,c=this.state,l=c.rating,f=c.selectedIndex,h=c.isSelecting,p=Qt()("ui",o,u,ct(i,"disabled"),ct(h&&!i&&f>=0,"selected"),"rating",r),d=re(e,this.props),v=ie(e,this.props);return S.a.createElement(v,a()({},d,{className:p,role:"radiogroup",onMouseLeave:this.handleMouseLeave}),cs()(s,function(e){return S.a.createElement(ls,{active:l>=e+1,"aria-checked":l===e+1,"aria-posinset":e+1,"aria-setsize":s,index:e,key:e,onClick:t.handleIconClick,onMouseEnter:t.handleIconMouseEnter,selected:f>=e&&h})}))}}]),e}(V);_()(fs,"autoControlledProps",["rating"]),_()(fs,"defaultProps",{clearable:"auto",maxRating:1}),_()(fs,"Icon",ls),_()(fs,"handledProps",["as","className","clearable","defaultRating","disabled","icon","maxRating","onRate","rating","size"]),fs.propTypes={};var hs=n(51),ps=n.n(hs),ds=n(267),vs=n.n(ds);function ms(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.renderer,u=Qt()(ct(e,"active"),"category",i),c=re(ms,t),l=ie(ms,t);return S.a.createElement(l,a()({},c,{className:u}),S.a.createElement("div",{className:"name"},s(t)),r.isNil(n)?o:n)}ms.handledProps=["active","as","children","className","content","name","renderer","results"],ms.defaultProps={renderer:function(t){return t.name}},ms.propTypes={};var ys=ms,gs=function(t){var e=t.image,n=t.price,r=t.title,i=t.description;return[e&&S.a.createElement("div",{key:"image",className:"image"},Zt(e,{autoGenerateKey:!1})),S.a.createElement("div",{key:"content",className:"content"},n&&S.a.createElement("div",{className:"price"},n),r&&S.a.createElement("div",{className:"title"},r),i&&S.a.createElement("div",{className:"description"},i))]};gs.handledProps=[];var bs=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.active,r=t.className,i=t.renderer,o=Qt()(ct(n,"active"),"result",r),s=re(e,this.props),u=ie(e,this.props);return S.a.createElement(u,a()({},s,{className:o,onClick:this.handleClick}),i(this.props))}}]),e}(x.Component);function _s(t){var e=t.children,n=t.className,i=t.content,o=Qt()("results transition",n),s=re(_s,t),u=ie(_s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}_()(bs,"defaultProps",{renderer:gs}),_()(bs,"handledProps",["active","as","className","content","description","id","image","onClick","price","renderer","title"]),bs.propTypes={},_s.handledProps=["as","children","className","content"],_s.propTypes={};var ws=_s,Es=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleResultSelect",function(t,e){C()(r.props,"onResultSelect",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"handleSelectionChange",function(t){var e=r.getSelectedResult();C()(r.props,"onSelectionChange",t,N()({},r.props,{result:e}))}),_()(g()(g()(r)),"closeOnEscape",function(t){In.a.getCode(t)===In.a.Escape&&(t.preventDefault(),r.close())}),_()(g()(g()(r)),"moveSelectionOnKeyDown",function(t){switch(In.a.getCode(t)){case In.a.ArrowDown:t.preventDefault(),r.moveSelectionBy(t,1);break;case In.a.ArrowUp:t.preventDefault(),r.moveSelectionBy(t,-1)}}),_()(g()(g()(r)),"selectItemOnEnter",function(t){if(In.a.getCode(t)===In.a.Enter){var e=r.getSelectedResult();e&&(t.preventDefault(),r.setValue(e.title),r.handleResultSelect(t,e),r.close())}}),_()(g()(g()(r)),"closeOnDocumentClick",function(t){r.close()}),_()(g()(g()(r)),"handleMouseDown",function(t){r.isMouseDown=!0,C()(r.props,"onMouseDown",t,r.props),Dt.sub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleDocumentMouseUp",function(){r.isMouseDown=!1,Dt.unsub("mouseup",r.handleDocumentMouseUp)}),_()(g()(g()(r)),"handleInputClick",function(t){t.nativeEvent.stopImmediatePropagation(),r.tryOpen()}),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.id,i=r.getSelectedResult(n);t.nativeEvent.stopImmediatePropagation(),r.setValue(i.title),r.handleResultSelect(t,i),r.close()}),_()(g()(g()(r)),"handleFocus",function(t){var e=r.props.onFocus;e&&e(t,r.props),r.setState({focus:!0})}),_()(g()(g()(r)),"handleBlur",function(t){var e=r.props.onBlur;e&&e(t,r.props),r.setState({focus:!1})}),_()(g()(g()(r)),"handleSearchChange",function(t){t.stopPropagation();var e=r.props.minCharacters,n=r.state.open,i=t.target.value;C()(r.props,"onSearchChange",t,N()({},r.props,{value:i})),i.length<e?r.close():n||r.tryOpen(i),r.setValue(i)}),_()(g()(g()(r)),"getFlattenedResults",function(){var t=r.props,e=t.category,n=t.results;return e?sr()(n,function(t,e){return t.concat(e.results)},[]):n}),_()(g()(g()(r)),"getSelectedResult",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.selectedIndex,e=r.getFlattenedResults();return bi()(e,t)}),_()(g()(g()(r)),"setValue",function(t){var e=r.props.selectFirstResult;r.trySetState({value:t},{selectedIndex:e?0:-1})}),_()(g()(g()(r)),"moveSelectionBy",function(t,e){var n=r.state.selectedIndex,i=r.getFlattenedResults().length-1,o=n+e;o>i?o=0:o<0&&(o=i),r.setState({selectedIndex:o}),r.scrollSelectedItemIntoView(),r.handleSelectionChange(t)}),_()(g()(g()(r)),"scrollSelectedItemIntoView",function(){if(St()){var t=document.querySelector(".ui.search.active.visible .results.visible"),e=t.querySelector(".result.active");if(e){var n=e.offsetTop<t.scrollTop,r=e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;n?t.scrollTop=e.offsetTop:r&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}}}),_()(g()(g()(r)),"tryOpen",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.state.value,e=r.props.minCharacters;t.length<e||r.open()}),_()(g()(g()(r)),"open",function(){r.trySetState({open:!0})}),_()(g()(g()(r)),"close",function(){r.trySetState({open:!1})}),_()(g()(g()(r)),"renderSearchInput",function(t){var e=r.props,n=e.icon,i=e.input,o=r.state.value;return co.create(i,{autoGenerateKey:!1,defaultProps:N()({},t,{icon:n,input:{className:"prompt",tabIndex:"0",autoComplete:"off"},onChange:r.handleSearchChange,onClick:r.handleInputClick,value:o})})}),_()(g()(g()(r)),"renderNoResults",function(){var t=r.props,e=t.noResultsDescription,n=t.noResultsMessage;return S.a.createElement("div",{className:"message empty"},S.a.createElement("div",{className:"header"},n),e&&S.a.createElement("div",{className:"description"},e))}),_()(g()(g()(r)),"renderResult",function(t,e,n){var i=t.childKey,o=ps()(t,["childKey"]),s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=r.props.resultRenderer,c=r.state.selectedIndex,l=e+s;return S.a.createElement(bs,a()({key:i||o.title,active:c===l,onClick:r.handleItemClick,renderer:u},o,{id:l}))}),_()(g()(g()(r)),"renderResults",function(){var t=r.props.results;return be()(t,r.renderResult)}),_()(g()(g()(r)),"renderCategories",function(){var t=r.props,e=t.categoryRenderer,n=t.results,i=r.state.selectedIndex,o=0;return be()(n,function(t){var n=t.childKey,a=ps()(t,["childKey"]),s=N()({key:n||a.name,active:fe()(i,o,o+a.results.length),renderer:e},a),u=vs()(r.renderResult,o);return o+=a.results.length,S.a.createElement(ys,s,a.results.map(u))})}),_()(g()(g()(r)),"renderMenuContent",function(){var t=r.props,e=t.category,n=t.showNoResults,i=t.results;return L()(i)?n?r.renderNoResults():null:e?r.renderCategories():r.renderResults()}),_()(g()(g()(r)),"renderResultsMenu",function(){var t=r.state.open?"visible":"",e=r.renderMenuContent();if(e)return S.a.createElement(ws,{className:t},e)}),n))}return m()(e,t),l()(e,[{key:"componentWillMount",value:function(){var t=this.state,e=t.open,n=t.value;this.setValue(n),e&&this.open()}},{key:"componentWillReceiveProps",value:function(t){ei()(d()(e.prototype),"componentWillReceiveProps",this).call(this,t),En(t.value,this.props.value)||this.setValue(t.value)}},{key:"shouldComponentUpdate",value:function(t,e){return!En(t,this.props)||!En(e,this.state)}},{key:"componentDidUpdate",value:function(t,e){!e.focus&&this.state.focus?(this.isMouseDown||this.tryOpen(),this.state.open&&Dt.sub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.focus&&!this.state.focus&&(this.isMouseDown||this.close(),Dt.unsub("keydown",[this.moveSelectionOnKeyDown,this.selectItemOnEnter])),!e.open&&this.state.open?(this.open(),Dt.sub("click",this.closeOnDocumentClick),Dt.sub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])):e.open&&!this.state.open&&(this.close(),Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter]))}},{key:"componentWillUnmount",value:function(){Dt.unsub("click",this.closeOnDocumentClick),Dt.unsub("keydown",[this.closeOnEscape,this.moveSelectionOnKeyDown,this.selectItemOnEnter])}},{key:"render",value:function(){var t=this.state,n=t.searchClasses,r=t.focus,i=t.open,o=this.props,s=o.aligned,u=o.category,c=o.className,l=o.fluid,f=o.loading,h=o.size,p=Qt()("ui",i&&"active visible",h,n,ct(u,"category"),ct(r,"focus"),ct(l,"fluid"),ct(f,"loading"),lt(s,"aligned"),"search",c),d=re(e,this.props),v=ie(e,this.props),m=ce(d,{htmlProps:se}),y=H()(m,2),g=y[0],b=y[1];return S.a.createElement(v,a()({},b,{className:p,onBlur:this.handleBlur,onFocus:this.handleFocus,onMouseDown:this.handleMouseDown}),this.renderSearchInput(g),this.renderResultsMenu())}}]),e}(V);function Ts(t){var e=t.className,n=t.children,i=t.content,o=Qt()("pushable",e),s=re(Ts,t),u=ie(Ts,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}_()(Es,"defaultProps",{icon:"search",input:"text",minCharacters:1,noResultsMessage:"No results found.",showNoResults:!0}),_()(Es,"autoControlledProps",["open","value"]),_()(Es,"Category",ys),_()(Es,"Result",bs),_()(Es,"Results",ws),_()(Es,"handledProps",["aligned","as","category","categoryRenderer","className","defaultOpen","defaultValue","fluid","icon","input","loading","minCharacters","noResultsDescription","noResultsMessage","onBlur","onFocus","onMouseDown","onResultSelect","onSearchChange","onSelectionChange","open","resultRenderer","results","selectFirstResult","showNoResults","size","value"]),Es.propTypes={},Ts.handledProps=["as","children","className","content"],Ts.propTypes={};var Cs=Ts;function xs(t){var e=t.className,n=t.dimmed,i=t.children,o=t.content,s=Qt()("pusher",ct(n,"dimmed"),e),u=re(xs,t),c=ie(xs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}xs.handledProps=["as","children","className","content","dimmed"],xs.propTypes={};var Ss=xs,ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"startAnimating",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;clearTimeout(r.stopAnimatingTimer),r.setState({animating:!0}),r.stopAnimatingTimer=setTimeout(function(){return r.setState({animating:!1})},t)}),n))}return m()(e,t),l()(e,[{key:"componentWillReceiveProps",value:function(t){t.visible!==this.props.visible&&this.startAnimating()}},{key:"render",value:function(){var t=this.props,n=t.animation,i=t.className,o=t.children,s=t.content,u=t.direction,c=t.visible,l=t.width,f=this.state.animating,h=Qt()("ui",n,u,l,ct(f,"animating"),ct(c,"visible"),"sidebar",i),p=re(e,this.props),d=ie(e,this.props);return S.a.createElement(d,a()({},p,{className:h}),r.isNil(o)?s:o)}}]),e}(V);_()(ks,"defaultProps",{direction:"left"}),_()(ks,"autoControlledProps",["visible"]),_()(ks,"Pushable",Cs),_()(ks,"Pusher",Ss),_()(ks,"handledProps",["animation","as","children","className","content","defaultVisible","direction","visible","width"]),ks.propTypes={};var Ns=ks,As=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"state",{sticky:!1}),_()(g()(g()(r)),"addListeners",function(t){var e=t.scrollContext;e&&(Dt.sub("resize",r.handleUpdate,{target:e}),Dt.sub("scroll",r.handleUpdate,{target:e}))}),_()(g()(g()(r)),"removeListeners",function(){var t=r.props.scrollContext;t&&(Dt.unsub("resize",r.handleUpdate,{target:t}),Dt.unsub("scroll",r.handleUpdate,{target:t}))}),_()(g()(g()(r)),"update",function(t){var e=r.state.pushing;if(r.ticking=!1,r.assignRects(),e)return r.didReachStartingPoint()?r.stickToContextTop(t):r.didTouchScreenBottom()?r.stickToScreenBottom(t):r.stickToContextBottom(t);if(r.isOversized()){if(r.contextRect.top>0)return r.stickToContextTop(t);if(r.contextRect.bottom<window.innerHeight)return r.stickToContextBottom(t)}return r.didTouchScreenTop()?r.didReachContextBottom()?r.stickToContextBottom(t):r.stickToScreenTop(t):r.stickToContextTop(t)}),_()(g()(g()(r)),"handleUpdate",function(t){r.ticking||(r.ticking=!0,r.frameId=requestAnimationFrame(function(){return r.update(t)}))}),_()(g()(g()(r)),"assignRects",function(){var t=r.props.context;r.triggerRect=r.triggerRef.getBoundingClientRect(),r.contextRect=(t||document.body).getBoundingClientRect(),r.stickyRect=r.stickyRef.getBoundingClientRect()}),_()(g()(g()(r)),"didReachContextBottom",function(){var t=r.props.offset;return r.stickyRect.height+t>=r.contextRect.bottom}),_()(g()(g()(r)),"didReachStartingPoint",function(){return r.stickyRect.top<=r.triggerRect.top}),_()(g()(g()(r)),"didTouchScreenTop",function(){return r.triggerRect.top<r.props.offset}),_()(g()(g()(r)),"didTouchScreenBottom",function(){var t=r.props.bottomOffset;return r.contextRect.bottom+t>window.innerHeight}),_()(g()(g()(r)),"isOversized",function(){return r.stickyRect.height>window.innerHeight}),_()(g()(g()(r)),"pushing",function(t){r.props.pushing&&r.setState({pushing:t})}),_()(g()(g()(r)),"stick",function(t){r.setState({sticky:!0}),C()(r.props,"onStick",t,r.props)}),_()(g()(g()(r)),"unstick",function(t){r.setState({sticky:!1}),C()(r.props,"onUnstick",t,r.props)}),_()(g()(g()(r)),"stickToContextBottom",function(t){var e=r.contextRect.bottom-r.stickyRect.height;C()(r.props,"onBottom",t,r.props),r.stick(t),r.setState({top:e,bottom:null}),r.pushing(!0)}),_()(g()(g()(r)),"stickToContextTop",function(t){C()(r.props,"onTop",t,r.props),r.unstick(t),r.pushing(!1)}),_()(g()(g()(r)),"stickToScreenBottom",function(t){var e=r.props.bottomOffset;r.stick(t),r.setState({bottom:e,top:null})}),_()(g()(g()(r)),"stickToScreenTop",function(t){var e=r.props.offset;r.stick(t),r.setState({top:e,bottom:null})}),_()(g()(g()(r)),"handleStickyRef",function(t){return r.stickyRef=t}),_()(g()(g()(r)),"handleTriggerRef",function(t){return r.triggerRef=t}),n))}return m()(e,t),l()(e,[{key:"componentDidMount",value:function(){St()&&(this.props.active&&(this.handleUpdate(),this.addListeners(this.props)))}},{key:"componentWillReceiveProps",value:function(t){var e=this.props,n=e.active,r=e.scrollContext,i=t.active,o=t.scrollContext;if(n!==i){if(i)return this.handleUpdate(),void this.addListeners(t);this.removeListeners(),this.setState({sticky:!1})}else r!==o&&(this.removeListeners(),this.addListeners(t))}},{key:"componentWillUnmount",value:function(){St()&&(this.props.active&&(this.removeListeners(),cancelAnimationFrame(this.frameId)))}},{key:"computeStyle",value:function(){var t=this.state,e=t.bottom,n=t.sticky,r=t.top;return n?{bottom:e,top:r,position:"fixed",width:this.triggerRect.width}:{}}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.className,i=re(e,this.props),o=ie(e,this.props);return S.a.createElement(o,a()({},i,{className:r}),S.a.createElement("div",{ref:this.handleTriggerRef}),S.a.createElement("div",{ref:this.handleStickyRef,style:this.computeStyle()},n))}}]),e}(x.Component);function Is(t){var e=t.active,n=t.children,i=t.className,o=t.content,s=t.loading,u=Qt()(ct(e,"active"),ct(s,"loading"),"tab",i),c=re(Is,t),l=ie(Is,t),f={};return l===Oa&&(f.attached="bottom"),S.a.createElement(l,a()({},f,c,{className:u}),r.isNil(n)?o:n)}_()(As,"defaultProps",{active:!0,bottomOffset:0,offset:0,scrollContext:St()?window:null}),_()(As,"handledProps",["active","as","bottomOffset","children","className","context","offset","onBottom","onStick","onTop","onUnstick","pushing","scrollContext"]),As.propTypes={},Is.handledProps=["active","as","children","className","content","loading"],Is.defaultProps={as:Oa,active:!0},Is.propTypes={},Is.create=Xt(Is,function(t){return{content:t}});var Os=Is,Ps=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleItemClick",function(t,e){var n=e.index;C()(r.props,"onTabChange",t,N()({},r.props,{activeIndex:n})),r.trySetState({activeIndex:n})}),n))}return m()(e,t),l()(e,[{key:"getInitialAutoControlledState",value:function(){return{activeIndex:0}}},{key:"renderItems",value:function(){var t=this.props,e=t.panes,n=t.renderActiveOnly,r=this.state.activeIndex;return n?C()(bi()(e,"[".concat(r,"]")),"render",this.props):be()(e,function(t,e){var n=t.pane;return Os.create(n,{overrideProps:{active:e===r}})})}},{key:"renderMenu",value:function(){var t=this.props,e=t.menu,n=t.panes,r=t.menuPosition,i=this.state.activeIndex;return!0===e.tabular&&"right"===r&&(e.tabular="right"),Kr.create(e,{autoGenerateKey:!1,overrideProps:{items:be()(n,"menuItem"),onItemClick:this.handleItemClick,activeIndex:i}})}},{key:"renderVertical",value:function(t){var e=this.props,n=e.grid,r=e.menuPosition,i=n.paneWidth,o=n.tabWidth,a=ps()(n,["paneWidth","tabWidth"]),s=r||"right"===t.props.tabular&&"right"||"left";return S.a.createElement(So,a,"left"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}),Eo.create({width:i,children:this.renderItems(),stretched:!0},{autoGenerateKey:!1}),"right"===s&&Eo.create({width:o,children:t},{autoGenerateKey:!1}))}},{key:"render",value:function(){var t=this.renderMenu(),n=re(e,this.props),r=ie(e,this.props);return t.props.vertical?S.a.createElement(r,n,this.renderVertical(t)):S.a.createElement(r,n,"bottom"!==t.props.attached&&t,this.renderItems(),"bottom"===t.props.attached&&t)}}]),e}(V);_()(Ps,"autoControlledProps",["activeIndex"]),_()(Ps,"defaultProps",{grid:{paneWidth:12,tabWidth:4},menu:{attached:!0,tabular:!0},renderActiveOnly:!0}),_()(Ps,"Pane",Os),_()(Ps,"handledProps",["activeIndex","as","defaultActiveIndex","grid","menu","menuPosition","onTabChange","panes","renderActiveOnly"]),Ps.propTypes={};var Rs=Ps;function Ds(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.test,u=t.unit,c=Qt()("ui",u,ct(e,"centered"),ct(s,"test"),"ad",i),l=re(Ds,t),f=ie(Ds,t);return S.a.createElement(f,a()({},l,{className:c,"data-text":s}),r.isNil(n)?o:n)}Ds.handledProps=["as","centered","children","className","content","test","unit"],Ds.propTypes={};var Ms=Ds;function Ls(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"description",n),u=re(Ls,t),c=ie(Ls,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Ls.handledProps=["as","children","className","content","textAlign"],Ls.propTypes={};var Fs=Ls;function Us(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"header",n),u=re(Us,t),c=ie(Us,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Us.handledProps=["as","children","className","content","textAlign"],Us.propTypes={};var js=Us;function Bs(t){var e=t.children,n=t.className,i=t.content,o=t.textAlign,s=Qt()(pt(o),"meta",n),u=re(Bs,t),c=ie(Bs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}Bs.handledProps=["as","children","className","content","textAlign"],Bs.propTypes={};var qs=Bs;function Vs(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.textAlign,f=Qt()(ct(s,"extra"),pt(l),"content",n),h=re(Vs,t),p=ie(Vs,t);return r.isNil(e)?r.isNil(i)?S.a.createElement(p,a()({},h,{className:f}),Yt(js,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(qs,function(t){return{content:t}},c,{autoGenerateKey:!1}),Yt(Fs,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),i):S.a.createElement(p,a()({},h,{className:f}),e)}Vs.handledProps=["as","children","className","content","description","extra","header","meta","textAlign"],Vs.propTypes={};var Ws=Vs;function Hs(t){var e=t.centered,n=t.children,i=t.className,o=t.content,s=t.doubling,u=t.items,c=t.itemsPerRow,l=t.stackable,f=t.textAlign,h=Qt()("ui",ct(e,"centered"),ct(s,"doubling"),ct(l,"stackable"),pt(f),vt(c),"cards",i),p=re(Hs,t),d=ie(Hs,t);if(!r.isNil(n))return S.a.createElement(d,a()({},p,{className:h}),n);if(!r.isNil(o))return S.a.createElement(d,a()({},p,{className:h}),o);var v=be()(u,function(t){var e=t.key||[t.header,t.description].join("-");return S.a.createElement(Ks,a()({key:e},t))});return S.a.createElement(d,a()({},p,{className:h}),v)}Hs.handledProps=["as","centered","children","className","content","doubling","items","itemsPerRow","stackable","textAlign"],Hs.propTypes={};var zs=Hs,Ks=function(t){function e(){var t,n,r;u()(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return h()(r,(n=r=h()(this,(t=d()(e)).call.apply(t,[this].concat(o))),_()(g()(g()(r)),"handleClick",function(t){var e=r.props.onClick;e&&e(t,r.props)}),n))}return m()(e,t),l()(e,[{key:"render",value:function(){var t=this.props,n=t.centered,i=t.children,o=t.className,s=t.color,u=t.content,c=t.description,l=t.extra,f=t.fluid,h=t.header,p=t.href,d=t.image,v=t.link,m=t.meta,y=t.onClick,g=t.raised,b=Qt()("ui",s,ct(n,"centered"),ct(f,"fluid"),ct(v,"link"),ct(g,"raised"),"card",o),_=re(e,this.props),w=ie(e,this.props,function(){if(y)return"a"});return r.isNil(i)?r.isNil(u)?S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),Hn.create(d,{autoGenerateKey:!1}),(c||h||m)&&S.a.createElement(Ws,{description:c,header:h,meta:m}),l&&S.a.createElement(Ws,{extra:!0},l)):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),u):S.a.createElement(w,a()({},_,{className:b,href:p,onClick:this.handleClick}),i)}}]),e}(x.Component);function Gs(t){var e=t.active,n=t.className,i=t.children,o=t.content,s=Qt()(ct(e,"active"),n),u=re(Gs,t),c=ie(Gs,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(i)?o:i)}_()(Ks,"Content",Ws),_()(Ks,"Description",Fs),_()(Ks,"Group",zs),_()(Ks,"Header",js),_()(Ks,"Meta",qs),_()(Ks,"handledProps",["as","centered","children","className","color","content","description","extra","fluid","header","href","image","link","meta","onClick","raised"]),Ks.propTypes={},Gs.handledProps=["active","as","children","className","content"],Gs.defaultProps={as:"a"},Gs.propTypes={};var Qs=Gs;function Ys(t){var e=t.className,n=t.children,i=t.content,o=Qt()("actions",e),s=re(Ys,t),u=ie(Ys,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}Ys.handledProps=["as","children","className","content"],Ys.propTypes={};var Xs=Ys;function $s(t){var e=t.className,n=t.children,i=t.content,o=Qt()("author",e),s=re($s,t),u=ie($s,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}$s.handledProps=["as","children","className","content"],$s.propTypes={};var Js=$s;function Zs(t){var e=t.className,n=t.src,r=Qt()("avatar",e),i=re(Zs,t),o=ie(Zs,t);return S.a.createElement(o,a()({},i,{className:r}),Zt(n,{autoGenerateKey:!1}))}Zs.handledProps=["as","className","src"],Zs.propTypes={};var tu=Zs;function eu(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"content"),s=re(eu,t),u=ie(eu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}eu.handledProps=["as","children","className","content"],eu.propTypes={};var nu=eu;function ru(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=t.minimal,u=t.size,c=t.threaded,l=Qt()("ui",u,ct(i,"collapsed"),ct(s,"minimal"),ct(c,"threaded"),"comments",e),f=re(ru,t),h=ie(ru,t);return S.a.createElement(h,a()({},f,{className:l}),r.isNil(n)?o:n)}ru.handledProps=["as","children","className","collapsed","content","minimal","size","threaded"],ru.propTypes={};var iu=ru;function ou(t){var e=t.className,n=t.children,i=t.content,o=Qt()("metadata",e),s=re(ou,t),u=ie(ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}ou.handledProps=["as","children","className","content"],ou.propTypes={};var au=ou;function su(t){var e=t.className,n=t.children,i=t.content,o=Qt()(e,"text"),s=re(su,t),u=ie(su,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(n)?i:n)}su.handledProps=["as","children","className","content"],su.propTypes={};var uu=su;function cu(t){var e=t.className,n=t.children,i=t.collapsed,o=t.content,s=Qt()(ct(i,"collapsed"),"comment",e),u=re(cu,t),c=ie(cu,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(n)?o:n)}cu.handledProps=["as","children","className","collapsed","content"],cu.propTypes={},cu.Author=Js,cu.Action=Qs,cu.Actions=Xs,cu.Avatar=tu,cu.Content=nu,cu.Group=iu,cu.Metadata=au,cu.Text=uu;var lu=cu;function fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("date",n),s=re(fu,t),u=ie(fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}fu.handledProps=["as","children","className","content"],fu.propTypes={};var hu=fu;function pu(t){var e=t.children,n=t.className,i=t.content,o=t.images,s=t.text,u=Qt()(ct(o,"images"),ct(i||s,"text"),"extra",n),c=re(pu,t),l=ie(pu,t);if(!r.isNil(e))return S.a.createElement(l,a()({},c,{className:u}),e);var f=be()(o,function(t,e){var n=[e,t].join("-");return Zt(t,{key:n})});return S.a.createElement(l,a()({},c,{className:u}),i,f)}pu.handledProps=["as","children","className","content","images","text"],pu.propTypes={};var du=pu;function vu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=Qt()("like",n),u=re(vu,t),c=ie(vu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Nn.create(o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}vu.handledProps=["as","children","className","content","icon"],vu.defaultProps={as:"a"},vu.propTypes={};var mu=vu;function yu(t){var e=t.children,n=t.className,i=t.content,o=t.like,s=Qt()("meta",n),u=re(yu,t),c=ie(yu,t);return r.isNil(e)?S.a.createElement(c,a()({},u,{className:s}),Yt(mu,function(t){return{content:t}},o,{autoGenerateKey:!1}),i):S.a.createElement(c,a()({},u,{className:s}),e)}yu.handledProps=["as","children","className","content","like"],yu.propTypes={};var gu=yu;function bu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("user",n),s=re(bu,t),u=ie(bu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}bu.handledProps=["as","children","className","content"],bu.propTypes={},bu.defaultProps={as:"a"};var _u=bu;function wu(t){var e=t.children,n=t.className,i=t.content,o=t.date,s=t.user,u=Qt()("summary",n),c=re(wu,t),l=ie(wu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),Yt(_u,function(t){return{content:t}},s,{autoGenerateKey:!1}),i,Yt(hu,function(t){return{content:t}},o,{autoGenerateKey:!1})):S.a.createElement(l,a()({},c,{className:u}),e)}wu.handledProps=["as","children","className","content","date","user"],wu.propTypes={};var Eu=wu;function Tu(t){var e=t.children,n=t.className,i=t.content,o=t.extraImages,s=t.extraText,u=t.date,c=t.meta,l=t.summary,f=Qt()("content",n),h=re(Tu,t),p=ie(Tu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Yt(hu,function(t){return{content:t}},u,{autoGenerateKey:!1}),Yt(Eu,function(t){return{content:t}},l,{autoGenerateKey:!1}),i,Yt(du,function(t){return{text:!0,content:t}},s,{autoGenerateKey:!1}),Yt(du,function(t){return{images:t}},o,{autoGenerateKey:!1}),Yt(gu,function(t){return{content:t}},c,{autoGenerateKey:!1})):S.a.createElement(p,a()({},h,{className:f}),e)}Tu.handledProps=["as","children","className","content","date","extraImages","extraText","meta","summary"],Tu.propTypes={};var Cu=Tu;function xu(t){var e=t.children,n=t.className,i=t.content,o=t.icon,s=t.image,u=Qt()("label",n),c=re(xu,t),l=ie(xu,t);return r.isNil(e)?S.a.createElement(l,a()({},c,{className:u}),i,Nn.create(o,{autoGenerateKey:!1}),Zt(s)):S.a.createElement(l,a()({},c,{className:u}),e)}xu.handledProps=["as","children","className","content","icon","image"],xu.propTypes={};var Su=xu;function ku(t){var e=t.content,n=t.children,r=t.className,i=t.date,o=t.extraImages,s=t.extraText,u=t.image,c=t.icon,l=t.meta,f=t.summary,h=Qt()("event",r),p=re(ku,t),d=ie(ku,t),v=e||i||o||s||l||f,m={content:e,date:i,extraImages:o,extraText:s,meta:l,summary:f};return S.a.createElement(d,a()({},p,{className:h}),Yt(Su,function(t){return{icon:t}},c,{autoGenerateKey:!1}),Yt(Su,function(t){return{image:t}},u,{autoGenerateKey:!1}),v&&S.a.createElement(Cu,m),n)}ku.handledProps=["as","children","className","content","date","extraImages","extraText","icon","image","meta","summary"],ku.propTypes={};var Nu=ku;function Au(t){var e=t.children,n=t.className,i=t.events,o=t.size,s=Qt()("ui",o,"feed",n),u=re(Au,t),c=ie(Au,t);if(!r.isNil(e))return S.a.createElement(c,a()({},u,{className:s}),e);var l=be()(i,function(t){var e=t.childKey,n=t.date,r=t.meta,i=t.summary,o=ps()(t,["childKey","date","meta","summary"]),s=e||[n,r,i].join("-");return S.a.createElement(Nu,a()({date:n,key:s,meta:r,summary:i},o))});return S.a.createElement(c,a()({},u,{className:s}),l)}Au.handledProps=["as","children","className","events","size"],Au.propTypes={},Au.Content=Cu,Au.Date=hu,Au.Event=Nu,Au.Extra=du,Au.Label=Su,Au.Like=mu,Au.Meta=gu,Au.Summary=Eu,Au.User=_u;var Iu=Au;function Ou(t){var e=t.children,n=t.className,i=t.content,o=Qt()("header",n),s=re(Ou,t),u=ie(Ou,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ou.handledProps=["as","children","className","content"],Ou.propTypes={},Ou.create=Xt(Ou,function(t){return{content:t}});var Pu=Ou;function Ru(t){var e=t.children,n=t.className,i=t.content,o=Qt()("description",n),s=re(Ru,t),u=ie(Ru,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Ru.handledProps=["as","children","className","content"],Ru.propTypes={},Ru.create=Xt(Ru,function(t){return{content:t}});var Du=Ru;function Mu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("extra",n),s=re(Mu,t),u=ie(Mu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Mu.handledProps=["as","children","className","content"],Mu.propTypes={},Mu.create=Xt(Mu,function(t){return{content:t}});var Lu=Mu;function Fu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("meta",n),s=re(Fu,t),u=ie(Fu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Fu.handledProps=["as","children","className","content"],Fu.propTypes={},Fu.create=Xt(Fu,function(t){return{content:t}});var Uu=Fu;function ju(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.meta,l=t.verticalAlign,f=Qt()(dt(l),"content",n),h=re(ju,t),p=ie(ju,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Pu.create(u,{autoGenerateKey:!1}),Uu.create(c,{autoGenerateKey:!1}),Du.create(o,{autoGenerateKey:!1}),Lu.create(s,{autoGenerateKey:!1}),i):S.a.createElement(p,a()({},h,{className:f}),e)}ju.handledProps=["as","children","className","content","description","extra","header","meta","verticalAlign"],ju.propTypes={};var Bu=ju;function qu(t){var e=t.children,n=t.className,i=t.content,o=t.divided,s=t.items,u=t.link,c=t.relaxed,l=t.unstackable,f=Qt()("ui",ct(o,"divided"),ct(u,"link"),ct(l,"unstackable"),ft(c,"relaxed"),"items",n),h=re(qu,t),p=ie(qu,t);if(!r.isNil(e))return S.a.createElement(p,a()({},h,{className:f}),e);if(!r.isNil(i))return S.a.createElement(p,a()({},h,{className:f}),i);var d=be()(s,function(t){var e=t.childKey,n=ps()(t,["childKey"]),r=e||[n.content,n.description,n.header,n.meta].join("-");return S.a.createElement(Ku,a()({},n,{key:r}))});return S.a.createElement(p,a()({},h,{className:f}),d)}qu.handledProps=["as","children","className","content","divided","items","link","relaxed","unstackable"],qu.propTypes={};var Vu=qu;function Wu(t){var e=t.size,n=re(Wu,t);return S.a.createElement(Hn,a()({},n,{size:e,ui:!!e,wrapped:!0}))}Wu.handledProps=["size"],Wu.propTypes={},Wu.create=Xt(Wu,function(t){return{src:t}});var Hu=Wu;function zu(t){var e=t.children,n=t.className,i=t.content,o=t.description,s=t.extra,u=t.header,c=t.image,l=t.meta,f=Qt()("item",n),h=re(zu,t),p=ie(zu,t);return r.isNil(e)?S.a.createElement(p,a()({},h,{className:f}),Hu.create(c,{autoGenerateKey:!1}),S.a.createElement(Bu,{content:i,description:o,extra:s,header:u,meta:l})):S.a.createElement(p,a()({},h,{className:f}),e)}zu.handledProps=["as","children","className","content","description","extra","header","image","meta"],zu.Content=Bu,zu.Description=Du,zu.Extra=Lu,zu.Group=Vu,zu.Header=Pu,zu.Image=Hu,zu.Meta=Uu,zu.propTypes={};var Ku=zu;function Gu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.horizontal,u=t.inverted,c=t.items,l=t.size,f=t.widths,h=Qt()("ui",i,l,ct(s,"horizontal"),ct(u,"inverted"),vt(f),"statistics",n),p=re(Gu,t),d=ie(Gu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(d,a()({},p,{className:h}),be()(c,function(t){return tc.create(t)})):S.a.createElement(d,a()({},p,{className:h}),o):S.a.createElement(d,a()({},p,{className:h}),e)}Gu.handledProps=["as","children","className","color","content","horizontal","inverted","items","size","widths"],Gu.propTypes={};var Qu=Gu;function Yu(t){var e=t.children,n=t.className,i=t.content,o=Qt()("label",n),s=re(Yu,t),u=ie(Yu,t);return S.a.createElement(u,a()({},s,{className:o}),r.isNil(e)?i:e)}Yu.handledProps=["as","children","className","content"],Yu.propTypes={},Yu.create=Xt(Yu,function(t){return{content:t}});var Xu=Yu;function $u(t){var e=t.children,n=t.className,i=t.content,o=t.text,s=Qt()(ct(o,"text"),"value",n),u=re($u,t),c=ie($u,t);return S.a.createElement(c,a()({},u,{className:s}),r.isNil(e)?i:e)}$u.handledProps=["as","children","className","content","text"],$u.propTypes={},$u.create=Xt($u,function(t){return{content:t}});var Ju=$u;function Zu(t){var e=t.children,n=t.className,i=t.color,o=t.content,s=t.floated,u=t.horizontal,c=t.inverted,l=t.label,f=t.size,h=t.text,p=t.value,d=Qt()("ui",i,f,lt(s,"floated"),ct(u,"horizontal"),ct(c,"inverted"),"statistic",n),v=re(Zu,t),m=ie(Zu,t);return r.isNil(e)?r.isNil(o)?S.a.createElement(m,a()({},v,{className:d}),Ju.create(p,{defaultProps:{text:h},autoGenerateKey:!1}),Xu.create(l,{autoGenerateKey:!1})):S.a.createElement(m,a()({},v,{className:d}),o):S.a.createElement(m,a()({},v,{className:d}),e)}Zu.handledProps=["as","children","className","color","content","floated","horizontal","inverted","label","size","text","value"],Zu.propTypes={},Zu.Group=Qu,Zu.Label=Xu,Zu.Value=Ju,Zu.create=Xt(Zu,function(t){return{content:t}});var tc=Zu;n.d(e,"Confirm",function(){return Fr}),n.d(e,"MountNode",function(){return Sr}),n.d(e,"Pagination",function(){return Yr}),n.d(e,"PaginationItem",function(){return Qr}),n.d(e,"Portal",function(){return Mn}),n.d(e,"Radio",function(){return Jr}),n.d(e,"Ref",function(){return Rn}),n.d(e,"Responsive",function(){return Zr}),n.d(e,"Select",function(){return Mi}),n.d(e,"TextArea",function(){return ji}),n.d(e,"TransitionablePortal",function(){return zi}),n.d(e,"Visibility",function(){return Ki}),n.d(e,"Breadcrumb",function(){return $i}),n.d(e,"BreadcrumbDivider",function(){return Qi}),n.d(e,"BreadcrumbSection",function(){return Yi}),n.d(e,"Form",function(){return _o}),n.d(e,"FormButton",function(){return eo}),n.d(e,"FormCheckbox",function(){return ro}),n.d(e,"FormDropdown",function(){return oo}),n.d(e,"FormField",function(){return Zi}),n.d(e,"FormGroup",function(){return so}),n.d(e,"FormInput",function(){return fo}),n.d(e,"FormRadio",function(){return po}),n.d(e,"FormSelect",function(){return mo}),n.d(e,"FormTextArea",function(){return go}),n.d(e,"Grid",function(){return So}),n.d(e,"GridColumn",function(){return Eo}),n.d(e,"GridRow",function(){return Co}),n.d(e,"Menu",function(){return Kr}),n.d(e,"MenuHeader",function(){return jr}),n.d(e,"MenuItem",function(){return Vr}),n.d(e,"MenuMenu",function(){return Hr}),n.d(e,"Message",function(){return Mo}),n.d(e,"MessageContent",function(){return No}),n.d(e,"MessageHeader",function(){return Io}),n.d(e,"MessageItem",function(){return Po}),n.d(e,"MessageList",function(){return Do}),n.d(e,"Table",function(){return Yo}),n.d(e,"TableBody",function(){return Fo}),n.d(e,"TableCell",function(){return jo}),n.d(e,"TableFooter",function(){return Wo}),n.d(e,"TableHeader",function(){return qo}),n.d(e,"TableHeaderCell",function(){return zo}),n.d(e,"TableRow",function(){return Go}),n.d(e,"Button",function(){return rr}),n.d(e,"ButtonContent",function(){return $n}),n.d(e,"ButtonGroup",function(){return Zn}),n.d(e,"ButtonOr",function(){return er}),n.d(e,"Container",function(){return $o}),n.d(e,"Divider",function(){return Zo}),n.d(e,"Flag",function(){return Ti}),n.d(e,"Header",function(){return oa}),n.d(e,"HeaderContent",function(){return ra}),n.d(e,"HeaderSubheader",function(){return ea}),n.d(e,"Icon",function(){return Nn}),n.d(e,"IconGroup",function(){return Sn}),n.d(e,"Image",function(){return Hn}),n.d(e,"ImageGroup",function(){return qn}),n.d(e,"Input",function(){return co}),n.d(e,"Label",function(){return Yn}),n.d(e,"LabelDetail",function(){return Kn}),n.d(e,"LabelGroup",function(){return Qn}),n.d(e,"List",function(){return ba}),n.d(e,"ListContent",function(){return fa}),n.d(e,"ListDescription",function(){return sa}),n.d(e,"ListHeader",function(){return ca}),n.d(e,"ListIcon",function(){return pa}),n.d(e,"ListItem",function(){return va}),n.d(e,"ListList",function(){return ya}),n.d(e,"Loader",function(){return wa}),n.d(e,"Rail",function(){return Ta}),n.d(e,"Reveal",function(){return ka}),n.d(e,"RevealContent",function(){return xa}),n.d(e,"Segment",function(){return Oa}),n.d(e,"SegmentGroup",function(){return Aa}),n.d(e,"Step",function(){return Va}),n.d(e,"StepContent",function(){return Fa}),n.d(e,"StepDescription",function(){return Ra}),n.d(e,"StepGroup",function(){return Ba}),n.d(e,"StepTitle",function(){return Ma}),n.d(e,"Accordion",function(){return Qa}),n.d(e,"AccordionAccordion",function(){return Ka}),n.d(e,"AccordionContent",function(){return Ha}),n.d(e,"AccordionTitle",function(){return za}),n.d(e,"Checkbox",function(){return Xr}),n.d(e,"Dimmer",function(){return jn}),n.d(e,"DimmerDimmable",function(){return Fn}),n.d(e,"DimmerInner",function(){return Un}),n.d(e,"Dropdown",function(){return Ri}),n.d(e,"DropdownDivider",function(){return wi}),n.d(e,"DropdownHeader",function(){return ki}),n.d(e,"DropdownItem",function(){return xi}),n.d(e,"DropdownMenu",function(){return Ai}),n.d(e,"DropdownSearchInput",function(){return Oi}),n.d(e,"Embed",function(){return Ya}),n.d(e,"Modal",function(){return Mr}),n.d(e,"ModalActions",function(){return Or}),n.d(e,"ModalContent",function(){return Ir}),n.d(e,"ModalDescription",function(){return Rr}),n.d(e,"ModalHeader",function(){return Nr}),n.d(e,"Popup",function(){return es}),n.d(e,"PopupContent",function(){return Ja}),n.d(e,"PopupHeader",function(){return Za}),n.d(e,"Progress",function(){return ss}),n.d(e,"Rating",function(){return fs}),n.d(e,"RatingIcon",function(){return ls}),n.d(e,"Search",function(){return Es}),n.d(e,"SearchCategory",function(){return ys}),n.d(e,"SearchResult",function(){return bs}),n.d(e,"SearchResults",function(){return ws}),n.d(e,"Sidebar",function(){return Ns}),n.d(e,"SidebarPushable",function(){return Cs}),n.d(e,"SidebarPusher",function(){return Ss}),n.d(e,"Sticky",function(){return As}),n.d(e,"Tab",function(){return Rs}),n.d(e,"TabPane",function(){return Os}),n.d(e,"Transition",function(){return Hi}),n.d(e,"TransitionGroup",function(){return Vi}),n.d(e,"Advertisement",function(){return Ms}),n.d(e,"Card",function(){return Ks}),n.d(e,"CardContent",function(){return Ws}),n.d(e,"CardDescription",function(){return Fs}),n.d(e,"CardGroup",function(){return zs}),n.d(e,"CardHeader",function(){return js}),n.d(e,"CardMeta",function(){return qs}),n.d(e,"Comment",function(){return lu}),n.d(e,"CommentAction",function(){return Qs}),n.d(e,"CommentActions",function(){return Xs}),n.d(e,"CommentAuthor",function(){return Js}),n.d(e,"CommentAvatar",function(){return tu}),n.d(e,"CommentContent",function(){return nu}),n.d(e,"CommentGroup",function(){return iu}),n.d(e,"CommentMetadata",function(){return au}),n.d(e,"CommentText",function(){return uu}),n.d(e,"Feed",function(){return Iu}),n.d(e,"FeedContent",function(){return Cu}),n.d(e,"FeedDate",function(){return hu}),n.d(e,"FeedEvent",function(){return Nu}),n.d(e,"FeedExtra",function(){return du}),n.d(e,"FeedLabel",function(){return Su}),n.d(e,"FeedLike",function(){return mu}),n.d(e,"FeedMeta",function(){return gu}),n.d(e,"FeedSummary",function(){return Eu}),n.d(e,"FeedUser",function(){return _u}),n.d(e,"Item",function(){return Ku}),n.d(e,"ItemContent",function(){return Bu}),n.d(e,"ItemDescription",function(){return Du}),n.d(e,"ItemExtra",function(){return Lu}),n.d(e,"ItemGroup",function(){return Vu}),n.d(e,"ItemHeader",function(){return Pu}),n.d(e,"ItemImage",function(){return Hu}),n.d(e,"ItemMeta",function(){return Uu}),n.d(e,"Statistic",function(){return tc}),n.d(e,"StatisticGroup",function(){return Qu}),n.d(e,"StatisticLabel",function(){return Xu}),n.d(e,"StatisticValue",function(){return Ju})},function(t,e,n){var r=n(44),i=n(165);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){t.exports={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}},function(t,e,n){var r=n(67),i=n(515),o=n(514),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(178)("wks"),i=n(137),o=n(57).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(128);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(41),i=n(39),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==a||e==s||e==o||e==u}},function(t,e,n){var r=n(114),i=n(52),o=n(127),a=n(18),s=n(38),u=n(89),c=n(88),l=n(116),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||o(t)))return!t.length;var e=i(t);if(e==f||e==h)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},function(t,e,n){var r=n(161);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(57),i=n(26),o=n(184),a=n(80),s=n(54),u=function(t,e,n){var c,l,f,h=t&u.F,p=t&u.G,d=t&u.S,v=t&u.P,m=t&u.B,y=t&u.W,g=p?i:i[e]||(i[e]={}),b=g.prototype,_=p?r:d?r[e]:(r[e]||{}).prototype;for(c in p&&(n=e),n)(l=!h&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:n[c],g[c]=p&&"function"!=typeof _[c]?n[c]:m&&l?o(f,r):y&&_[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((g.virtual||(g.virtual={}))[c]=f,t&u.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(544),i=n(535);function o(t){return(o="function"==typeof i&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t})(t)}function a(e){return"function"==typeof i&&"symbol"===o(r)?t.exports=a=function(t){return o(t)}:t.exports=a=function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":o(t)},a(e)}t.exports=a},function(t,e,n){var r=n(244),i=n(243);t.exports=function(t,e){if(null==t)return{};var n,o,a={},s=i(t);for(o=0;o<s.length;o++)n=s[o],e.indexOf(n)>=0||(a[n]=t[n]);if(r){var u=r(t);for(o=0;o<u.length;o++)n=u[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}},function(t,e,n){var r=n(457),i=n(166),o=n(456),a=n(228),s=n(227),u=n(41),c=n(249),l=c(r),f=c(i),h=c(o),p=c(a),d=c(s),v=u;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,n){var r=n(47),i=n(248),o=n(164);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(71);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(55),i=n(264),o=n(183),a=Object.defineProperty;e.f=n(70)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(200),i=n(62),o=n(34),a=n(357),s=n(18);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e,n){var r=n(234),i=n(34),o=n(437),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&s(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r=n(41),i=n(30),o="[object Number]";t.exports=function(t){return"number"==typeof t||i(t)&&r(t)==o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"PageCard"]},o.default.createElement(s.Container,{style:this.props.containerStyle,className:a.default.container},this.props.children))}}]),e}();e.default=c},function(t,e,n){var r=n(160),i=n(468)(r);t.exports=i},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){var r=n(68),i=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e,n){var r=n(509),i=n(506);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(33).Symbol;t.exports=r},function(t,e,n){var r=n(41),i=n(30),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&r(t)==o}},function(t,e,n){var r=n(261),i=n(181);t.exports=function(t){return r(i(t))}},function(t,e,n){t.exports=!n(79)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(362),i=n(28);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(239),i=n(474),o=n(34),a=n(18);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(201);t.exports=function(t){return t&&t.length?r(t):[]}},function(t,e,n){var r=n(23)("flow",n(365));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(197))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(s.Container,{text:!0},o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageHeader},this.props.header),o.default.createElement(s.Header,{inverted:!0,as:"h1",className:a.default.pageSubHeader},this.props.subheader),o.default.createElement("div",{class:a.default.footer},o.default.createElement(s.Button,{className:a.default.pageDown,circular:!0,onClick:this.props.scrollTarget},"Scroll Down")))}}]),e}();e.default=c},function(t,e,n){var r=n(130),i=n(38),o=n(91),a=n(39);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(56),i=n(95);t.exports=n(70)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(41),i=n(107),o=n(30),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!o(t)||r(t)!=a)return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(325),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!=s){var l=a<<4&240|s>>2;if(r.push(l),64!=u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},c=function(t){try{return u.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function l(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=l(t[n],e[n]));return t}var f=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}(),h=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},p="FirebaseError",d=Error.captureStackTrace;var v=function(){return function(t,e){if(this.code=t,this.message=e,d)d(this,m.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=p,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.name=p;var m=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new v(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}();function y(t){return JSON.parse(t)}var g=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=y(c(o[0])||""),n=y(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}},b=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},_=function(t,e){return b(e,function(e,n){t[e]=n}),t},w=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},E=function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}return r.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},e}(function(){return function(){this.blockSize=-1}}());var T=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=C),void 0===r.error&&(r.error=C),void 0===r.complete&&(r.complete=C);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}}),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}();function C(){}function x(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}e.assert=o,e.assertionError=a,e.base64=u,e.base64Decode=c,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.CONSTANTS=i,e.deepCopy=function(t){return l(void 0,t)},e.deepExtend=l,e.patchProperty=function(t,e,n){t[e]=n},e.Deferred=f,e.getUA=h,e.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},e.ErrorFactory=m,e.FirebaseError=v,e.patchCapture=function(t){var e=d;return d=t,e},e.jsonEval=y,e.stringify=function(t){return JSON.stringify(t)},e.decode=g,e.isAdmin=function(t){var e=g(t).claims;return"object"==typeof e&&!0===e.admin},e.issuedAtTime=function(t){var e=g(t).claims;return"object"==typeof e&&e.hasOwnProperty("iat")?e.iat:null},e.isValidFormat=function(t){var e=g(t),n=e.claims;return!!e.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e,n,r=g(t).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?e=r.nbf:r.hasOwnProperty("iat")&&(e=r.iat),n=r.hasOwnProperty("exp")?r.exp:e+86400),i&&e&&n&&i>=e&&i<=n},e.clone=function(t){return _({},t)},e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.every=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0},e.extend=_,e.findKey=w,e.findValue=function(t,e,n){var r=w(t,e,n);return r&&t[r]},e.forEach=b,e.getAnyKey=function(t){for(var e in t)return e},e.getCount=function(t){var e=0;for(var n in t)e++;return e},e.getValues=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},e.isEmpty=function(t){for(var e in t)return!1;return!0},e.isNonNullObject=function(t){return"object"==typeof t&&null!==t},e.map=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},e.safeGet=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},e.querystring=function(t){var e=[];return b(t,function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e},e.Sha1=E,e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&&e(t)})}},e.createSubscribe=function(t,e){var n=new T(t,e);return n.subscribe.bind(n)},e.errorPrefix=x,e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(x(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(x(t,e,r)+"must be a valid context object.")},e.validateNamespace=function(t,e,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(x(t,e,r)+"must be a valid firebase namespace.")},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;o(++r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e}},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(564)},function(t,e,n){var r=n(108),i=n(112);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(39),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){(function(t){var r=n(33),i=n(471),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(117)(t))},function(t,e,n){var r=n(162),i=n(476);t.exports=function t(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?n:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(18),i=n(168),o=n(251),a=n(43);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,n){var r=n(181);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(262),i=n(177);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(41),i=n(18),o=n(30),a="[object String]";t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&r(t)==a}},function(t,e,n){var r=n(377),i=n(150)(function(t,e){return null==t?{}:r(t,e)});t.exports=i},function(t,e,n){t.exports=n(29)},function(t,e,n){var r=n(242),i=n(90),o=n(53),a=n(119),s=o(function(t,e){return a(t)?r(t,i(e,1,a,!0)):[]});t.exports=s},function(t,e,n){var r=n(361),i=n(161),o=n(118);t.exports=function(t,e,n){return e=i(e),void 0===n?(n=e,e=0):n=i(n),t=o(t),r(t,e,n)}},function(t,e,n){"use strict";n.r(e);var r=n(24),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),c=n(27),l=n.n(c),f=n(25),h=n.n(f);function p(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],i=t&&p(t),o=e&&p(e),a=i||o;if(t&&p(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var c=0,l=r.length;l>=0;l--){var f=r[l];"."===f?d(r,l):".."===f?(d(r,l),c++):c&&(d(r,l),c--)}if(!a)for(;c--;c)r.unshift("..");!a||""===r[0]||r[0]&&p(r[0])||r.unshift("");var h=r.join("/");return s&&"/"!==h.substr(-1)&&(h+="/"),h},m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var y=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var r=void 0===e?"undefined":m(e);if(r!==(void 0===n?"undefined":m(n)))return!1;if("object"===r){var i=e.valueOf(),o=n.valueOf();if(i!==e||o!==n)return t(i,o);var a=Object.keys(e),s=Object.keys(n);return a.length===s.length&&a.every(function(r){return t(e[r],n[r])})}return!1},g=function(t){return"/"===t.charAt(0)?t:"/"+t},b=function(t){return"/"===t.charAt(0)?t.substr(1):t},_=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},w=function(t,e){return _(t,e)?t.substr(e.length):t},E=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},T=function(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i},C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},x=function(t,e,n,r){var i=void 0;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=C({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=v(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},S=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&y(t.state,e.state)},k=function(){var t=null,e=[];return{setPrompt:function(e){return l()(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):(l()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}},N=!("undefined"==typeof window||!window.document||!window.document.createElement),A=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},I=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},O=function(t,e){return e(window.confirm(t))},P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},D=function(){try{return window.history.state||{}}catch(t){return{}}},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Browser history needs a DOM");var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t.forceRefresh,a=void 0!==o&&o,s=t.getUserConfirmation,u=void 0===s?O:s,c=t.keyLength,f=void 0===c?6:c,p=t.basename?E(g(t.basename)):"",d=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return l()(!p||_(o,p),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+p+'".'),p&&(o=w(o,p)),x(o,r,n)},v=function(){return Math.random().toString(36).substr(2,f)},m=k(),y=function(t){R(H,t),H.length=n.length,m.notifyListeners(H.location,H.action)},b=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||M(d(t.state))},C=function(){M(d(D()))},S=!1,M=function(t){S?(S=!1,y()):m.confirmTransitionTo(t,"POP",u,function(e){e?y({action:"POP",location:t}):L(t)})},L=function(t){var e=H.location,n=U.indexOf(e.key);-1===n&&(n=0);var r=U.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(S=!0,B(i))},F=d(D()),U=[F.key],j=function(t){return p+T(t)},B=function(t){n.go(t)},q=0,V=function(t){1===(q+=t)?(A(window,"popstate",b),i&&A(window,"hashchange",C)):0===q&&(I(window,"popstate",b),i&&I(window,"hashchange",C))},W=!1,H={length:n.length,action:"POP",location:F,createHref:j,push:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"PUSH",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.pushState({key:o,state:s},null,e),a)window.location.href=e;else{var u=U.indexOf(H.location.key),c=U.slice(0,-1===u?0:u+1);c.push(i.key),U=c,y({action:"PUSH",location:i})}else l()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){l()(!("object"===(void 0===t?"undefined":P(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=x(t,e,v(),H.location);m.confirmTransitionTo(i,"REPLACE",u,function(t){if(t){var e=j(i),o=i.key,s=i.state;if(r)if(n.replaceState({key:o,state:s},null,e),a)window.location.replace(e);else{var u=U.indexOf(H.location.key);-1!==u&&(U[u]=i.key),y({action:"REPLACE",location:i})}else l()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:B,goBack:function(){return B(-1)},goForward:function(){return B(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=m.setPrompt(t);return W||(V(1),W=!0),function(){return W&&(W=!1,V(-1)),e()}},listen:function(t){var e=m.appendListener(t);return V(1),function(){V(-1),e()}}};return H},L=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},F={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+b(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:b,decodePath:g},slash:{encodePath:g,decodePath:g}},U=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},j=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h()(N,"Hash history needs a DOM");var e=window.history,n=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?O:r,o=t.hashType,a=void 0===o?"slash":o,s=t.basename?E(g(t.basename)):"",u=F[a],c=u.encodePath,f=u.decodePath,p=function(){var t=f(U());return l()(!s||_(t,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+s+'".'),s&&(t=w(t,s)),x(t)},d=k(),v=function(t){L(z,t),z.length=e.length,d.notifyListeners(z.location,z.action)},m=!1,y=null,b=function(){var t=U(),e=c(t);if(t!==e)j(e);else{var n=p(),r=z.location;if(!m&&S(r,n))return;if(y===T(n))return;y=null,C(n)}},C=function(t){m?(m=!1,v()):d.confirmTransitionTo(t,"POP",i,function(e){e?v({action:"POP",location:t}):P(t)})},P=function(t){var e=z.location,n=B.lastIndexOf(T(e));-1===n&&(n=0);var r=B.lastIndexOf(T(t));-1===r&&(r=0);var i=n-r;i&&(m=!0,q(i))},R=U(),D=c(R);R!==D&&j(D);var M=p(),B=[T(M)],q=function(t){l()(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},V=0,W=function(t){1===(V+=t)?A(window,"hashchange",b):0===V&&I(window,"hashchange",b)},H=!1,z={length:e.length,action:"POP",location:M,createHref:function(t){return"#"+c(s+T(t))},push:function(t,e){l()(void 0===e,"Hash history cannot push state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"PUSH",i,function(t){if(t){var e=T(n),r=c(s+e);if(U()!==r){y=e,function(t){window.location.hash=t}(r);var i=B.lastIndexOf(T(z.location)),o=B.slice(0,-1===i?0:i+1);o.push(e),B=o,v({action:"PUSH",location:n})}else l()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),v()}})},replace:function(t,e){l()(void 0===e,"Hash history cannot replace state; it is ignored");var n=x(t,void 0,void 0,z.location);d.confirmTransitionTo(n,"REPLACE",i,function(t){if(t){var e=T(n),r=c(s+e);U()!==r&&(y=e,j(r));var i=B.indexOf(T(z.location));-1!==i&&(B[i]=e),v({action:"REPLACE",location:n})}})},go:q,goBack:function(){return q(-1)},goForward:function(){return q(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=d.setPrompt(t);return H||(W(1),H=!0),function(){return H&&(H=!1,W(-1)),e()}},listen:function(t){var e=d.appendListener(t);return W(1),function(){W(-1),e()}}};return z},q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},W=function(t,e,n){return Math.min(Math.max(t,e),n)},H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,o=void 0===i?0:i,a=t.keyLength,s=void 0===a?6:a,u=k(),c=function(t){V(m,t),m.length=m.entries.length,u.notifyListeners(m.location,m.action)},f=function(){return Math.random().toString(36).substr(2,s)},h=W(o,0,r.length-1),p=r.map(function(t){return x(t,void 0,"string"==typeof t?f():t.key||f())}),d=T,v=function(t){var n=W(m.index+t,0,m.entries.length-1),r=m.entries[n];u.confirmTransitionTo(r,"POP",e,function(t){t?c({action:"POP",location:r,index:n}):c()})},m={length:p.length,action:"POP",location:p[h],index:h,entries:p,createHref:d,push:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),c({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,n){l()(!("object"===(void 0===t?"undefined":q(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,f(),m.location);u.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(m.entries[m.index]=r,c({action:"REPLACE",location:r}))})},go:v,goBack:function(){return v(-1)},goForward:function(){return v(1)},canGo:function(t){var e=m.index+t;return e>=0&&e<m.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.setPrompt(t)},listen:function(t){return u.appendListener(t)}};return m},z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function K(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var G=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=K(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props.history.location.pathname)},K(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:z({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},e.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.children,r=e.history;h()(null==n||1===a.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){i()(this.props.history===t.history,"You cannot change <Router history>")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?a.a.Children.only(t):null},e}(a.a.Component);G.propTypes={history:u.a.object.isRequired,children:u.a.node},G.contextTypes={router:u.a.object},G.childContextTypes={router:u.a.object.isRequired};var Q=G,Y=Q;function X(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var $=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=X(this,t.call.apply(t,[this].concat(o))),r.history=M(r.props),X(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<BrowserRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);$.propTypes={basename:u.a.string,forceRefresh:u.a.bool,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var J=$;function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var tt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Z(this,t.call.apply(t,[this].concat(o))),r.history=B(r.props),Z(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<HashRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Y,{history:this.history,children:this.props.children})},e}(a.a.Component);tt.propTypes={basename:u.a.string,getUserConfirmation:u.a.func,hashType:u.a.oneOf(["hashbang","noslash","slash"]),children:u.a.node};var et=tt,nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function rt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var it=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},ot=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=rt(this,t.call.apply(t,[this].concat(o))),r.handleClick=function(t){if(r.props.onClick&&r.props.onClick(t),!t.defaultPrevented&&0===t.button&&!r.props.target&&!it(t)){t.preventDefault();var e=r.context.router.history,n=r.props,i=n.replace,o=n.to;i?e.replace(o):e.push(o)}},rt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this.props,e=(t.replace,t.to),n=t.innerRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["replace","to","innerRef"]);h()(this.context.router,"You should not use <Link> outside a <Router>"),h()(void 0!==e,'You must specify the "to" property');var i=this.context.router.history,o="string"==typeof e?x(e,null,null,i.location):e,s=i.createHref(o);return a.a.createElement("a",nt({},r,{onClick:this.handleClick,href:s,ref:n}))},e}(a.a.Component);ot.propTypes={onClick:u.a.func,target:u.a.string,replace:u.a.bool,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired,innerRef:u.a.oneOfType([u.a.string,u.a.func])},ot.defaultProps={replace:!1},ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired,createHref:u.a.func.isRequired}).isRequired}).isRequired};var at=ot;function st(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var ut=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=st(this,t.call.apply(t,[this].concat(o))),r.history=H(r.props),st(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){i()(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return a.a.createElement(Q,{history:this.history,children:this.props.children})},e}(a.a.Component);ut.propTypes={initialEntries:u.a.array,initialIndex:u.a.number,getUserConfirmation:u.a.func,keyLength:u.a.number,children:u.a.node};var ct=ut,lt=n(144),ft=n.n(lt),ht={},pt=0,dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var r=e,i=r.path,o=r.exact,a=void 0!==o&&o,s=r.strict,u=void 0!==s&&s,c=r.sensitive,l=void 0!==c&&c;if(null==i)return n;var f=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=ht[n]||(ht[n]={});if(r[t])return r[t];var i=[],o={re:ft()(t,i,e),keys:i};return pt<1e4&&(r[t]=o,pt++),o}(i,{end:a,strict:u,sensitive:l}),h=f.re,p=f.keys,d=h.exec(t);if(!d)return null;var v=d[0],m=d.slice(1),y=t===v;return a&&!y?null:{path:i,url:"/"===i&&""===v?"/":v,isExact:y,params:p.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var yt=function(t){return 0===a.a.Children.count(t)},gt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=mt(this,t.call.apply(t,[this].concat(o))),r.state={match:r.computeMatch(r.props,r.context.router)},mt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:vt({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},e.prototype.computeMatch=function(t,e){var n=t.computedMatch,r=t.location,i=t.path,o=t.strict,a=t.exact,s=t.sensitive;if(n)return n;h()(e,"You should not use <Route> or withRouter() outside a <Router>");var u=e.route,c=(r||u.location).pathname;return dt(c,{path:i,strict:o,exact:a,sensitive:s},u.match)},e.prototype.componentWillMount=function(){i()(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),i()(!(this.props.component&&this.props.children&&!yt(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),i()(!(this.props.render&&this.props.children&&!yt(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){i()(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,r=e.component,i=e.render,o=this.context.router,s=o.history,u=o.route,c=o.staticContext,l={match:t,location:this.props.location||u.location,history:s,staticContext:c};return r?t?a.a.createElement(r,l):null:i?t?i(l):null:"function"==typeof n?n(l):n&&!yt(n)?a.a.Children.only(n):null},e}(a.a.Component);gt.propTypes={computedMatch:u.a.object,path:u.a.string,exact:u.a.bool,strict:u.a.bool,sensitive:u.a.bool,component:u.a.func,render:u.a.func,children:u.a.oneOfType([u.a.func,u.a.node]),location:u.a.object},gt.contextTypes={router:u.a.shape({history:u.a.object.isRequired,route:u.a.object.isRequired,staticContext:u.a.object})},gt.childContextTypes={router:u.a.object.isRequired};var bt=gt,_t=bt,wt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var Tt=function(t){var e=t.to,n=t.exact,r=t.strict,i=t.location,o=t.activeClassName,s=t.className,u=t.activeStyle,c=t.style,l=t.isActive,f=t["aria-current"],h=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),p="object"===(void 0===e?"undefined":Et(e))?e.pathname:e,d=p&&p.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return a.a.createElement(_t,{path:d,exact:n,strict:r,location:i,children:function(t){var n=t.location,r=t.match,i=!!(l?l(r,n):r);return a.a.createElement(at,wt({to:e,className:i?[s,o].filter(function(t){return t}).join(" "):s,style:i?wt({},c,u):c,"aria-current":i&&f||null},h))}})};Tt.propTypes={to:at.propTypes.to,exact:u.a.bool,strict:u.a.bool,location:u.a.object,activeClassName:u.a.string,className:u.a.string,activeStyle:u.a.object,style:u.a.object,isActive:u.a.func,"aria-current":u.a.oneOf(["page","step","location","date","time","true"])},Tt.defaultProps={activeClassName:"active","aria-current":"page"};var Ct=Tt;var xt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(a.a.Component);xt.propTypes={when:u.a.bool,message:u.a.oneOfType([u.a.func,u.a.string]).isRequired},xt.defaultProps={when:!0},xt.contextTypes={router:u.a.shape({history:u.a.shape({block:u.a.func.isRequired}).isRequired}).isRequired};var St=xt,kt={},Nt=0,At=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=kt[e]||(kt[e]={});if(n[t])return n[t];var r=ft.a.compile(t);return Nt<1e4&&(n[t]=r,Nt++),r}(t)(e,{pretty:!0})},It=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Ot=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=x(t.to),n=x(this.props.to);S(e,n)?i()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?At(n,e.params):It({},n,{pathname:At(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(a.a.Component);Ot.propTypes={computedMatch:u.a.object,push:u.a.bool,from:u.a.string,to:u.a.oneOfType([u.a.string,u.a.object]).isRequired},Ot.defaultProps={push:!1},Ot.contextTypes={router:u.a.shape({history:u.a.shape({push:u.a.func.isRequired,replace:u.a.func.isRequired}).isRequired,staticContext:u.a.object}).isRequired};var Pt=Ot,Rt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function Dt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Mt=function(t){return"/"===t.charAt(0)?t:"/"+t},Lt=function(t,e){return t?Rt({},e,{pathname:Mt(t)+e.pathname}):e},Ft=function(t){return"string"==typeof t?t:T(t)},Ut=function(t){return function(){h()(!1,"You cannot %s with <StaticRouter>",t)}},jt=function(){},Bt=function(t){function e(){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=Dt(this,t.call.apply(t,[this].concat(o))),r.createHref=function(t){return Mt(r.props.basename+Ft(t))},r.handlePush=function(t){var e=r.props,n=e.basename,i=e.context;i.action="PUSH",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,i=e.context;i.action="REPLACE",i.location=Lt(n,x(t)),i.url=Ft(i.location)},r.handleListen=function(){return jt},r.handleBlock=function(){return jt},Dt(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},e.prototype.componentWillMount=function(){i()(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Mt(t);return 0!==e.pathname.indexOf(n)?e:Rt({},e,{pathname:e.pathname.substr(n.length)})}(e,x(n)),push:this.handlePush,replace:this.handleReplace,go:Ut("go"),goBack:Ut("goBack"),goForward:Ut("goForward"),listen:this.handleListen,block:this.handleBlock};return a.a.createElement(Q,Rt({},r,{history:i}))},e}(a.a.Component);Bt.propTypes={basename:u.a.string,context:u.a.object.isRequired,location:u.a.oneOfType([u.a.string,u.a.object])},Bt.defaultProps={basename:"",location:"/"},Bt.childContextTypes={router:u.a.object.isRequired};var qt=Bt;var Vt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){h()(this.context.router,"You should not use <Switch> outside a <Router>")},e.prototype.componentWillReceiveProps=function(t){i()(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,r=void 0,i=void 0;return a.a.Children.forEach(e,function(e){if(null==r&&a.a.isValidElement(e)){var o=e.props,s=o.path,u=o.exact,c=o.strict,l=o.sensitive,f=o.from,h=s||f;i=e,r=dt(n.pathname,{path:h,exact:u,strict:c,sensitive:l},t.match)}}),r?a.a.cloneElement(i,{location:n,computedMatch:r}):null},e}(a.a.Component);Vt.contextTypes={router:u.a.shape({route:u.a.object.isRequired}).isRequired},Vt.propTypes={children:u.a.node,location:u.a.object};var Wt=Vt,Ht=At,zt=dt,Kt=n(297),Gt=n.n(Kt),Qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var Yt=function(t){var e=function(e){var n=e.wrappedComponentRef,r=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["wrappedComponentRef"]);return a.a.createElement(bt,{children:function(e){return a.a.createElement(t,Qt({},r,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:u.a.func},Gt()(e,t)};n.d(e,"BrowserRouter",function(){return J}),n.d(e,"HashRouter",function(){return et}),n.d(e,"Link",function(){return at}),n.d(e,"MemoryRouter",function(){return ct}),n.d(e,"NavLink",function(){return Ct}),n.d(e,"Prompt",function(){return St}),n.d(e,"Redirect",function(){return Pt}),n.d(e,"Route",function(){return _t}),n.d(e,"Router",function(){return Y}),n.d(e,"StaticRouter",function(){return qt}),n.d(e,"Switch",function(){return Wt}),n.d(e,"generatePath",function(){return Ht}),n.d(e,"matchPath",function(){return zt}),n.d(e,"withRouter",function(){return Yt})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=u(n(309)),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement("div",{style:this.props.style,className:a.default[this.props.color+"Jumbotron"]},o.default.createElement(s.Container,null,this.props.children))}}]),e}();e.default=c},function(t,e,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),u=null,c=0,l=[],f=n(314);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(g(r.parts[a],e))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(g(r.parts[a],e));o[r.id]={id:r.id,refs:1,parts:s}}}}function p(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),d(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;n=u||(u=m(e)),r=w.bind(null,n,a,!1),i=w.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),d(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return h(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}t&&h(p(t,e),e);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}};var b,_=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=null,t,"");for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e,n){var r=n(379),i=n(105),o=n(378);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(236)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(112),i=n(130),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e){var n="__lodash_placeholder__";t.exports=function(t,e){for(var r=-1,i=t.length,o=0,a=[];++r<i;){var s=t[r];s!==e&&s!==n||(t[r]=n,a[o++]=r)}return a}},function(t,e,n){var r=n(86),i=n(39);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=r(t.prototype),o=t.apply(n,e);return i(o)?o:n}}},function(t,e,n){var r=n(219),i=n(419),o=n(418),a=n(217),s=n(409),u=n(154),c=n(408),l=n(210),f=n(209),h=n(46),p="Expected a function",d=1,v=2,m=8,y=16,g=32,b=64,_=Math.max;t.exports=function(t,e,n,w,E,T,C,x){var S=e&v;if(!S&&"function"!=typeof t)throw new TypeError(p);var k=w?w.length:0;if(k||(e&=~(g|b),w=E=void 0),C=void 0===C?C:_(h(C),0),x=void 0===x?x:h(x),k-=E?E.length:0,e&b){var N=w,A=E;w=E=void 0}var I=S?void 0:u(t),O=[t,e,n,w,E,N,A,T,C,x];if(I&&c(O,I),t=O[0],e=O[1],n=O[2],w=O[3],E=O[4],!(x=O[9]=void 0===O[9]?S?0:t.length:_(O[9]-k,0))&&e&(m|y)&&(e&=~(m|y)),e&&e!=d)P=e==m||e==y?o(t,e,x):e!=g&&e!=(d|g)||E.length?a.apply(void 0,O):s(t,e,n,w);else var P=i(t,e,n);return f((I?r:l)(P,O),t,e)}},function(t,e,n){var r=n(247);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(88),i=n(469),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){(function(t){var r=n(252),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(117)(t))},function(t,e,n){var r=n(470),i=n(63),o=n(115),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(39),i=n(68),o=NaN,a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return o;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=u.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):s.test(t)?o:+t}},function(t,e,n){var r=n(38),i=n(30);t.exports=function(t){return i(t)&&r(t)}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(241),i=n(478),o=n(477);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e,n){var r=n(121);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(167),i=n(480),o=n(479);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}},function(t,e,n){var r=n(92),i=n(64);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(491),i=n(30),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(67),i=n(48),o=n(18),a=n(68),s=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e,n){var r=n(495);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(130);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(501),i=n(500),o=n(499),a=n(498),s=n(497);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(65)(Object,"create");t.exports=r},function(t,e,n){var r=n(136),i=n(95),o=n(69),a=n(183),s=n(54),u=n(264),c=Object.getOwnPropertyDescriptor;e.f=n(70)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r=n(542)(!0);n(258)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(112),i=n(160),o=n(34);t.exports=function(t,e){var n={};return e=o(e,3),i(t,function(t,i,o){r(n,i,e(t,i,o))}),n}},function(t,e,n){var r=n(245),i=n(341),o=(n(10),n(338));function a(e,n,s){return"undefined"!=typeof Reflect&&i?t.exports=a=i:t.exports=a=function(t,e,n){var i=o(t,e);if(i){var a=r(i,e);return a.get?a.get.call(n):a.value}},a(e,n,s||e)}t.exports=a},function(t,e,n){var r=n(349),i=n(43),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(o,r).replace(a,"")}},function(t,e,n){var r=n(158);t.exports=function(t,e){return r(t,e)}},function(t,e,n){var r=n(438)(n(189));t.exports=r},function(t,e,n){var r=n(554);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e))},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],p=n.index;if(s+=t.slice(a,p),a=p+f.length,h)s+=h[1];else{var d=t[a],v=n[2],m=n[3],y=n[4],g=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,C=n[2]||l,x=y||g;r.push({name:m||o++,prefix:v||"",delimiter:C,optional:T,repeat:E,partial:w,asterisk:!!_,pattern:x?c(x):_?".*":"[^"+u(C)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function s(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,i){for(var o="",s=n||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!=typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=u(h[p]),!e[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):u(h),!e[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"==typeof c)a+=u(c);else{var h=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){var r=n(23)("isNil",n(13),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("keys",n(28),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){(function(t,r){var i; /**

* @license
* Lodash <https://lodash.com/>
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",l=500,f="__lodash_placeholder__",h=1,p=2,d=4,v=1,m=2,y=1,g=2,b=4,_=8,w=16,E=32,T=64,C=128,x=256,S=512,k=30,N="...",A=800,I=16,O=1,P=2,R=1/0,D=9007199254740991,M=1.7976931348623157e308,L=NaN,F=4294967295,U=F-1,j=F>>>1,B=[["ary",C],["bind",y],["bindKey",g],["curry",_],["curryRight",w],["flip",S],["partial",E],["partialRight",T],["rearg",x]],q="[object Arguments]",V="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",z="[object Date]",K="[object DOMException]",G="[object Error]",Q="[object Function]",Y="[object GeneratorFunction]",X="[object Map]",$="[object Number]",J="[object Null]",Z="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",lt="[object Float32Array]",ft="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",dt="[object Int32Array]",vt="[object Uint8Array]",mt="[object Uint8ClampedArray]",yt="[object Uint16Array]",gt="[object Uint32Array]",bt=/\b__p \+= ;/g,_t=/\b(__p \+=)  \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n;/g,Et=/&(?:amp|lt|gt|quot|#39);/g,Tt=/[&<>"']/g,Ct=RegExp(Et.source),xt=RegExp(Tt.source),St=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Nt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(Pt.source),Dt=/^\s+|\s+$/g,Mt=/^\s+/,Lt=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qt=/\\(\\)?/g,Vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,Ht=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Gt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Zt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Zt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",he="(?:"+oe+"|"+ae+")",pe="(?:"+fe+"|"+ae+")",de="(?:"+ne+"|"+se+")"+"?",ve="[\\ufe0e\\ufe0f]?"+de+("(?:\\u200d(?:"+[ue,ce,le].join("|")+")[\\ufe0e\\ufe0f]?"+de+")*"),me="(?:"+[ie,ce,le].join("|")+")"+ve,ye="(?:"+[ue+ne+"?",ne,ce,le,te].join("|")+")",ge=RegExp("['’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ye+ve,"g"),we=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+he,"$"].join("|")+")",fe+"?"+he+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,me].join("|"),"g"),Ee=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),Te=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ce=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xe=-1,Se={};Se[lt]=Se[ft]=Se[ht]=Se[pt]=Se[dt]=Se[vt]=Se[mt]=Se[yt]=Se[gt]=!0,Se[q]=Se[V]=Se[ut]=Se[H]=Se[ct]=Se[z]=Se[G]=Se[Q]=Se[X]=Se[$]=Se[Z]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var ke={};ke[q]=ke[V]=ke[ut]=ke[ct]=ke[H]=ke[z]=ke[lt]=ke[ft]=ke[ht]=ke[pt]=ke[dt]=ke[X]=ke[$]=ke[Z]=ke[et]=ke[nt]=ke[rt]=ke[it]=ke[vt]=ke[mt]=ke[yt]=ke[gt]=!0,ke[G]=ke[Q]=ke[at]=!1;var Ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ae=parseFloat,Ie=parseInt,Oe="object"==typeof t&&t&&t.Object===Object&&t,Pe="object"==typeof self&&self&&self.Object===Object&&self,Re=Oe||Pe||Function("return this")(),De="object"==typeof e&&e&&!e.nodeType&&e,Me=De&&"object"==typeof r&&r&&!r.nodeType&&r,Le=Me&&Me.exports===De,Fe=Le&&Oe.process,Ue=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch(t){}}(),je=Ue&&Ue.isArrayBuffer,Be=Ue&&Ue.isDate,qe=Ue&&Ue.isMap,Ve=Ue&&Ue.isRegExp,We=Ue&&Ue.isSet,He=Ue&&Ue.isTypedArray;function ze(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Ge(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Qe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Xe(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function $e(t,e){return!!(null==t?0:t.length)&&un(t,e,0)>-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ze(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=hn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function un(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function cn(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function fn(t,e){var n=null==t?0:t.length;return n?vn(t,e)/n:L}function hn(t){return function(e){return null==e?o:e[t]}}function pn(t){return function(e){return null==t?o:t[e]}}function dn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function vn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function mn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function yn(t){return function(e){return t(e)}}function gn(t,e){return Ze(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&un(e,t[n],0)>-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var En=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Tn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Cn(t){return"\\"+Ne[t]}function xn(t){return Ee.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function kn(t,e){return function(n){return t(e(n))}}function Nn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==f||(t[n]=f,o[i++]=n)}return o}function An(t,e){return"__proto__"==e?o:t[e]}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function On(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Pn(t){return xn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function Rn(t){return xn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var Dn=pn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Mn=function t(e){var n,r=(e=null==e?Re:Mn.defaults(Re.Object(),e,Mn.pick(Re,Ce))).Array,i=e.Date,Jt=e.Error,Zt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=Zt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],ce=ae.toString,le=se.hasOwnProperty,fe=0,he=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,de=ce.call(ee),ve=Re._,me=ne("^"+ce.call(le).replace(Pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=Le?e.Buffer:o,_e=e.Symbol,Ee=e.Uint8Array,Ne=ye?ye.allocUnsafe:o,Oe=kn(ee.getPrototypeOf,ee),Pe=ee.create,De=se.propertyIsEnumerable,Me=oe.splice,Fe=_e?_e.isConcatSpreadable:o,Ue=_e?_e.iterator:o,on=_e?_e.toStringTag:o,pn=function(){try{var t=Bo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ln=e.clearTimeout!==Re.clearTimeout&&e.clearTimeout,Fn=i&&i.now!==Re.Date.now&&i.now,Un=e.setTimeout!==Re.setTimeout&&e.setTimeout,jn=te.ceil,Bn=te.floor,qn=ee.getOwnPropertySymbols,Vn=ye?ye.isBuffer:o,Wn=e.isFinite,Hn=oe.join,zn=kn(ee.keys,ee),Kn=te.max,Gn=te.min,Qn=i.now,Yn=e.parseInt,Xn=te.random,$n=oe.reverse,Jn=Bo(e,"DataView"),Zn=Bo(e,"Map"),tr=Bo(e,"Promise"),er=Bo(e,"Set"),nr=Bo(e,"WeakMap"),rr=Bo(ee,"create"),ir=nr&&new nr,or={},ar=fa(Jn),sr=fa(Zn),ur=fa(tr),cr=fa(er),lr=fa(nr),fr=_e?_e.prototype:o,hr=fr?fr.valueOf:o,pr=fr?fr.toString:o;function dr(t){if(Ns(t)&&!ys(t)&&!(t instanceof gr)){if(t instanceof yr)return t;if(le.call(t,"__wrapped__"))return ha(t)}return new yr(t)}var vr=function(){function t(){}return function(e){if(!ks(e))return{};if(Pe)return Pe(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function mr(){}function yr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Er(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new wr;++e<n;)this.add(t[e])}function Tr(t){var e=this.__data__=new _r(t);this.size=e.size}function Cr(t,e){var n=ys(t),r=!n&&ms(t),i=!n&&!r&&ws(t),o=!n&&!r&&!i&&Ls(t),a=n||r||i||o,s=a?mn(t.length,re):[],u=s.length;for(var c in t)!e&&!le.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Go(c,u))||s.push(c);return s}function xr(t){var e=t.length;return e?t[Ei(0,e-1)]:o}function Sr(t,e){return ua(ro(t),Mr(e,0,t.length))}function kr(t){return ua(ro(t))}function Nr(t,e,n){(n===o||ps(t[e],n))&&(n!==o||e in t)||Rr(t,e,n)}function Ar(t,e,n){var r=t[e];le.call(t,e)&&ps(r,n)&&(n!==o||e in t)||Rr(t,e,n)}function Ir(t,e){for(var n=t.length;n--;)if(ps(t[n][0],e))return n;return-1}function Or(t,e,n,r){return Br(t,function(t,i,o){e(r,t,n(t),o)}),r}function Pr(t,e){return t&&io(e,iu(e),t)}function Rr(t,e,n){"__proto__"==e&&pn?pn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Dr(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Zs(t,e[n]);return a}function Mr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Lr(t,e,n,r,i,a){var s,u=e&h,c=e&p,l=e&d;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ks(t))return t;var f=ys(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return ro(t,s)}else{var v=Wo(t),m=v==Q||v==Y;if(ws(t))return $i(t,u);if(v==Z||v==q||m&&!i){if(s=c||m?{}:zo(t),!u)return c?function(t,e){return io(t,Vo(t),e)}(t,function(t,e){return t&&io(e,ou(e),t)}(s,t)):function(t,e){return io(t,qo(t),e)}(t,Pr(s,t))}else{if(!ke[v])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ut:return Ji(t);case H:case z:return new a(+t);case ct:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ft:case ht:case pt:case dt:case vt:case mt:case yt:case gt:return Zi(t,n);case X:return new a;case $:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,Wt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,hr?ee(hr.call(r)):{}}}(t,v,u)}}a||(a=new Tr);var y=a.get(t);if(y)return y;if(a.set(t,s),Rs(t))return t.forEach(function(r){s.add(Lr(r,e,n,r,t,a))}),s;if(As(t))return t.forEach(function(r,i){s.set(i,Lr(r,e,n,i,t,a))}),s;var g=f?o:(l?c?Ro:Po:c?ou:iu)(t);return Ge(g||t,function(r,i){g&&(r=t[i=r]),Ar(s,i,Lr(r,e,n,i,t,a))}),s}function Fr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Ur(t,e,n){if("function"!=typeof t)throw new ie(u);return ia(function(){t.apply(o,n)},e)}function jr(t,e,n,r){var i=-1,o=$e,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;n&&(e=Ze(e,yn(n))),r?(o=Je,s=!1):e.length>=a&&(o=bn,s=!1,e=new Er(e));t:for(;++i<u;){var f=t[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h==h){for(var p=l;p--;)if(e[p]===h)continue t;c.push(f)}else o(e,h,r)||c.push(f)}return c}dr.templateSettings={escape:St,evaluate:kt,interpolate:Nt,variable:"",imports:{_:dr}},dr.prototype=mr.prototype,dr.prototype.constructor=dr,yr.prototype=vr(mr.prototype),yr.prototype.constructor=yr,gr.prototype=vr(mr.prototype),gr.prototype.constructor=gr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===c?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?c:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Ir(e,t);return!(n<0||(n==e.length-1?e.pop():Me.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Ir(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Ir(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new(Zn||_r),string:new br}},wr.prototype.delete=function(t){var e=Uo(this,t).delete(t);return this.size-=e?1:0,e},wr.prototype.get=function(t){return Uo(this,t).get(t)},wr.prototype.has=function(t){return Uo(this,t).has(t)},wr.prototype.set=function(t,e){var n=Uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Er.prototype.add=Er.prototype.push=function(t){return this.__data__.set(t,c),this},Er.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.clear=function(){this.__data__=new _r,this.size=0},Tr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Tr.prototype.get=function(t){return this.__data__.get(t)},Tr.prototype.has=function(t){return this.__data__.has(t)},Tr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!Zn||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new wr(r)}return n.set(t,e),this.size=n.size,this};var Br=so(Qr),qr=so(Yr,!0);function Vr(t,e){var n=!0;return Br(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Wr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s==s&&!Ms(s):n(s,u)))var u=s,c=a}return c}function Hr(t,e){var n=[];return Br(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function zr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Ko),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?zr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Kr=uo(),Gr=uo(!0);function Qr(t,e){return t&&Kr(t,e,iu)}function Yr(t,e){return t&&Gr(t,e,iu)}function Xr(t,e){return Xe(e,function(e){return Cs(t[e])})}function $r(t,e){for(var n=0,r=(e=Gi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Jr(t,e,n){var r=e(t);return ys(t)?r:tn(r,n(t))}function Zr(t){return null==t?t===o?ot:J:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=pe.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return pe.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Je:$e,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ze(h,yn(e))),l=Gn(h.length,l),c[u]=!n&&(e||a>=120&&h.length>=120)?new Er(u&&h):o}h=t[0];var p=-1,d=c[0];t:for(;++p<a&&f.length<l;){var v=h[p],m=e?e(v):v;if(v=n||0!==v?v:0,!(d?bn(d,m):i(f,m,n))){for(u=s;--u;){var y=c[u];if(!(y?bn(y,m):i(t[u],m,n)))continue t}d&&d.push(m),f.push(v)}}return f}function ii(t,e,n){var r=null==(t=na(t,e=Gi(e,t)))?t:t[la(Ta(e))];return null==r?o:ze(r,t,n)}function oi(t){return Ns(t)&&Zr(t)==q}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Ns(t)&&!Ns(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=ys(t),u=ys(e),c=s?V:Wo(t),l=u?V:Wo(e),f=(c=c==q?Z:c)==Z,h=(l=l==q?Z:l)==Z,p=c==l;if(p&&ws(t)){if(!ws(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Tr),s||Ls(t)?Io(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ct:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ut:return!(t.byteLength!=e.byteLength||!o(new Ee(t),new Ee(e)));case H:case z:case $:return ps(+t,+e);case G:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case X:var s=Sn;case nt:var u=r&v;if(s||(s=In),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=m,a.set(t,e);var l=Io(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(hr)return hr.call(t)==hr.call(e)}return!1}(t,e,c,n,r,i,a);if(!(n&v)){var d=f&&le.call(t,"__wrapped__"),y=h&&le.call(e,"__wrapped__");if(d||y){var g=d?t.value():t,b=y?e.value():e;return a||(a=new Tr),i(g,b,n,r,a)}}return!!p&&(a||(a=new Tr),function(t,e,n,r,i,a){var s=n&v,u=Po(t),c=u.length,l=Po(e).length;if(c!=l&&!s)return!1;for(var f=c;f--;){var h=u[f];if(!(s?h in e:le.call(e,h)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var d=!0;a.set(t,e),a.set(e,t);for(var m=s;++f<c;){h=u[f];var y=t[h],g=e[h];if(r)var b=s?r(g,y,h,e,t,a):r(y,g,h,t,e,a);if(!(b===o?y===g||i(y,g,n,r,a):b)){d=!1;break}m||(m="constructor"==h)}if(d&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var c=(u=n[i])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in t))return!1}else{var h=new Tr;if(r)var p=r(l,f,c,t,e,h);if(!(p===o?ai(f,l,v|m,r,h):p))return!1}}return!0}function ui(t){return!(!ks(t)||he&&he in t)&&(Cs(t)?me:Kt).test(fa(t))}function ci(t){return"function"==typeof t?t:null==t?Iu:"object"==typeof t?ys(t)?vi(t[0],t[1]):di(t):ju(t)}function li(t){if(!Jo(t))return zn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fi(t){if(!ks(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Jo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function hi(t,e){return t<e}function pi(t,e){var n=-1,i=bs(t)?r(t.length):[];return Br(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function di(t){var e=jo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function vi(t,e){return Yo(t)&&Zo(e)?ta(la(t),e):function(n){var r=Zs(n,t);return r===o&&r===e?tu(n,t):ai(e,r,v|m)}}function mi(t,e,n,r,i){t!==e&&Kr(e,function(a,s){if(ks(a))i||(i=new Tr),function(t,e,n,r,i,a,s){var u=An(t,n),c=An(e,n),l=s.get(c);if(l)Nr(t,n,l);else{var f=a?a(u,c,n+"",t,e,s):o,h=f===o;if(h){var p=ys(c),d=!p&&ws(c),v=!p&&!d&&Ls(c);f=c,p||d||v?ys(u)?f=u:_s(u)?f=ro(u):d?(h=!1,f=$i(c,!0)):v?(h=!1,f=Zi(c,!0)):f=[]:Os(c)||ms(c)?(f=u,ms(u)?f=Hs(u):(!ks(u)||r&&Cs(u))&&(f=zo(c))):h=!1}h&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Nr(t,n,f)}}(t,e,s,n,mi,r,i);else{var u=r?r(An(t,s),a,s+"",t,e,i):o;u===o&&(u=a),Nr(t,s,u)}},ou)}function yi(t,e){var n=t.length;if(n)return Go(e+=e<0?n:0,n)?t[e]:o}function gi(t,e,n){var r=-1;return e=Ze(e.length?e:[Iu],yn(Fo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(pi(t,function(t,n,i){return{criteria:Ze(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=to(i[r],o[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=$r(t,a);n(s,a)&&ki(o,Gi(a,t),s)}return o}function _i(t,e,n,r){var i=r?cn:un,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=Ze(t,yn(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Me.call(s,u,1),Me.call(t,u,1);return t}function wi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Go(i)?Me.call(t,i,1):ji(t,i)}}return t}function Ei(t,e){return t+Bn(Xn()*(e-t+1))}function Ti(t,e){var n="";if(!t||e<1||e>D)return n;do{e%2&&(n+=t),(e=Bn(e/2))&&(t+=t)}while(e);return n}function Ci(t,e){return oa(ea(t,e,Iu),t+"")}function xi(t){return xr(pu(t))}function Si(t,e){var n=pu(t);return ua(n,Mr(e,0,n.length))}function ki(t,e,n,r){if(!ks(t))return t;for(var i=-1,a=(e=Gi(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var c=la(e[i]),l=n;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ks(f)?f:Go(e[i+1])?[]:{})}Ar(u,c,l),u=u[c]}return t}var Ni=ir?function(t,e){return ir.set(t,e),t}:Iu,Ai=pn?function(t,e){return pn(t,"toString",{configurable:!0,enumerable:!1,value:ku(e),writable:!0})}:Iu;function Ii(t){return ua(pu(t))}function Oi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Pi(t,e){var n;return Br(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Ri(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=j){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ms(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Di(t,e,Iu,n)}function Di(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,u=null===e,c=Ms(e),l=e===o;i<a;){var f=Bn((i+a)/2),h=n(t[f]),p=h!==o,d=null===h,v=h==h,m=Ms(h);if(s)var y=r||v;else y=l?v&&(r||p):u?v&&p&&(r||!d):c?v&&p&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);y?i=f+1:a=f}return Gn(a,U)}function Mi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ps(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Li(t){return"number"==typeof t?t:Ms(t)?L:+t}function Fi(t){if("string"==typeof t)return t;if(ys(t))return Ze(t,Fi)+"";if(Ms(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-R?"-0":e}function Ui(t,e,n){var r=-1,i=$e,o=t.length,s=!0,u=[],c=u;if(n)s=!1,i=Je;else if(o>=a){var l=e?null:Co(t);if(l)return In(l);s=!1,i=bn,c=new Er}else c=e?[]:u;t:for(;++r<o;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue t;e&&c.push(h),u.push(f)}else i(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function ji(t,e){return null==(t=na(t,e=Gi(e,t)))||delete t[la(Ta(e))]}function Bi(t,e,n,r){return ki(t,e,n($r(t,e)),r)}function qi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Oi(t,r?0:o,r?o+1:i):Oi(t,r?o+1:0,r?i:o)}function Vi(t,e){var n=t;return n instanceof gr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function Wi(t,e,n){var i=t.length;if(i<2)return i?Ui(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=jr(a[o]||s,t[u],e,n));return Ui(zr(a,1),e,n)}function Hi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function zi(t){return _s(t)?t:[]}function Ki(t){return"function"==typeof t?t:Iu}function Gi(t,e){return ys(t)?t:Yo(t,e)?[t]:ca(zs(t))}var Qi=Ci;function Yi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Oi(t,e,n)}var Xi=Ln||function(t){return Re.clearTimeout(t)};function $i(t,e){if(e)return t.slice();var n=t.length,r=Ne?Ne(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new Ee(e).set(new Ee(t)),e}function Zi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ms(t),s=e!==o,u=null===e,c=e==e,l=Ms(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=Kn(a-s,0),f=r(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=Kn(a-u,0),h=r(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+n[s]]=t[o++]);return h}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):o;c===o&&(c=t[u]),i?Rr(n,u,c):Ar(n,u,c)}return n}function oo(t,e){return function(n,r){var i=ys(n)?Ke:Or,o=e?e():{};return i(n,t,Fo(r,2),o)}}function ao(t){return Ci(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Qo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function uo(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function co(t){return function(e){var n=xn(e=zs(e))?Rn(e):o,r=n?n[0]:e.charAt(0),i=n?Yi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Cu(mu(e).replace(ge,"")),t,"")}}function fo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=vr(t.prototype),r=t.apply(n,e);return ks(r)?r:n}}function ho(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Fo(n,3);e=iu(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function po(t){return Oo(function(e){var n=e.length,r=n,i=yr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(u);if(i&&!s&&"wrapper"==Mo(a))var s=new yr([],!0)}for(r=s?r:n;++r<n;){var c=Mo(a=e[r]),l="wrapper"==c?Do(a):o;s=l&&Xo(l[0])&&l[1]==(C|_|E|x)&&!l[4].length&&1==l[9]?s[Mo(l[0])].apply(s,l[3]):1==a.length&&Xo(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&ys(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function vo(t,e,n,i,a,s,u,c,l,f){var h=e&C,p=e&y,d=e&g,v=e&(_|w),m=e&S,b=d?o:fo(t);return function y(){for(var g=arguments.length,_=r(g),w=g;w--;)_[w]=arguments[w];if(v)var E=Lo(y),T=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,E);if(i&&(_=eo(_,i,a,v)),s&&(_=no(_,s,u,v)),g-=T,v&&g<f){var C=Nn(_,E);return Eo(t,e,vo,y.placeholder,n,_,C,c,l,f-g)}var x=p?n:this,S=d?x[t]:t;return g=_.length,c?_=function(t,e){for(var n=t.length,r=Gn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=Go(a,n)?i[a]:o}return t}(_,c):m&&g>1&&_.reverse(),h&&l<g&&(_.length=l),this&&this!==Re&&this instanceof y&&(S=b||fo(S)),S.apply(x,_)}}function mo(t,e){return function(n,r){return function(t,e,n,r){return Qr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function yo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Fi(n),r=Fi(r)):(n=Li(n),r=Li(r)),i=t(n,r)}return i}}function go(t){return Oo(function(e){return e=Ze(e,yn(Fo())),Ci(function(n){var r=this;return t(e,function(t){return ze(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Fi(e)).length;if(n<2)return n?Ti(e,t):e;var r=Ti(e,jn(t/Pn(e)));return xn(e)?Yi(Rn(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Qo(e,n,i)&&(n=i=o),e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n,i){for(var o=-1,a=Kn(jn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:Bs(i),t)}}function wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ws(e),n=Ws(n)),t(e,n)}}function Eo(t,e,n,r,i,a,s,u,c,l){var f=e&_;e|=f?E:T,(e&=~(f?T:E))&b||(e&=~(y|g));var h=[t,e,i,f?a:o,f?s:o,f?o:a,f?o:s,u,c,l],p=n.apply(o,h);return Xo(t)&&ra(p,h),p.placeholder=r,aa(p,t,e)}function To(t){var e=te[t];return function(t,n){if(t=Ws(t),n=null==n?0:Gn(qs(n),292)){var r=(zs(t)+"e").split("e");return+((r=(zs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Co=er&&1/In(new er([,-0]))[1]==R?function(t){return new er(t)}:Mu;function xo(t){return function(e){var n=Wo(e);return n==X?Sn(e):n==nt?On(e):function(t,e){return Ze(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,c,l){var h=e&g;if(!h&&"function"!=typeof t)throw new ie(u);var p=i?i.length:0;if(p||(e&=~(E|T),i=a=o),c=c===o?c:Kn(qs(c),0),l=l===o?l:qs(l),p-=a?a.length:0,e&T){var d=i,v=a;i=a=o}var m=h?o:Do(t),S=[t,e,n,i,a,d,v,s,c,l];if(m&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(y|g|C),a=r==C&&n==_||r==C&&n==x&&t[7].length<=e[8]||r==(C|x)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&y&&(t[2]=e[2],i|=n&y?0:b);var s=e[3];if(s){var u=t[3];t[3]=u?eo(u,s,e[4]):s,t[4]=u?Nn(t[3],f):e[4]}(s=e[5])&&(u=t[5],t[5]=u?no(u,s,e[6]):s,t[6]=u?Nn(t[5],f):e[6]),(s=e[7])&&(t[7]=s),r&C&&(t[8]=null==t[8]?e[8]:Gn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,m),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?h?0:t.length:Kn(S[9]-p,0))&&e&(_|w)&&(e&=~(_|w)),e&&e!=y)k=e==_||e==w?function(t,e,n){var i=fo(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=Lo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:Nn(u,l);return(s-=f.length)<n?Eo(t,e,vo,a.placeholder,o,u,f,o,o,n-s):ze(this&&this!==Re&&this instanceof a?i:t,this,u)}}(t,e,l):e!=E&&e!=(y|E)||a.length?vo.apply(o,S):function(t,e,n,i){var o=e&y,a=fo(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),h=this&&this!==Re&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return ze(h,o?n:this,f)}}(t,e,n,i);else var k=function(t,e,n){var r=e&y,i=fo(t);return function e(){return(this&&this!==Re&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((m?Ni:ra)(k,S),t,e)}function ko(t,e,n,r){return t===o||ps(t,se[n])&&!le.call(r,n)?e:t}function No(t,e,n,r,i,a){return ks(t)&&ks(e)&&(a.set(e,t),mi(t,e,o,No,a),a.delete(e)),t}function Ao(t){return Os(t)?o:t}function Io(t,e,n,r,i,a){var s=n&v,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,h=!0,p=n&m?new Er:o;for(a.set(t,e),a.set(e,t);++f<u;){var d=t[f],y=e[f];if(r)var g=s?r(y,d,f,e,t,a):r(d,y,f,t,e,a);if(g!==o){if(g)continue;h=!1;break}if(p){if(!rn(e,function(t,e){if(!bn(p,e)&&(d===t||i(d,t,n,r,a)))return p.push(e)})){h=!1;break}}else if(d!==y&&!i(d,y,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Oo(t){return oa(ea(t,o,ga),t+"")}function Po(t){return Jr(t,iu,qo)}function Ro(t){return Jr(t,ou,Vo)}var Do=ir?function(t){return ir.get(t)}:Mu;function Mo(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Lo(t){return(le.call(dr,"placeholder")?dr:t).placeholder}function Fo(){var t=dr.iteratee||Ou;return t=t===Ou?ci:t,arguments.length?t(arguments[0],arguments[1]):t}function Uo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function jo(t){for(var e=iu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Zo(i)]}return e}function Bo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ui(n)?n:o}var qo=qn?function(t){return null==t?[]:(t=ee(t),Xe(qn(t),function(e){return De.call(t,e)}))}:Vu,Vo=qn?function(t){for(var e=[];t;)tn(e,qo(t)),t=Oe(t);return e}:Vu,Wo=Zr;function Ho(t,e,n){for(var r=-1,i=(e=Gi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&Go(a,i)&&(ys(t)||ms(t))}function zo(t){return"function"!=typeof t.constructor||Jo(t)?{}:vr(Oe(t))}function Ko(t){return ys(t)||ms(t)||!!(Fe&&t&&t[Fe])}function Go(t,e){var n=typeof t;return!!(e=null==e?D:e)&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t<e}function Qo(t,e,n){if(!ks(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&Go(e,n.length):"string"==r&&e in n)&&ps(n[e],t)}function Yo(t,e){if(ys(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ms(t))||It.test(t)||!At.test(t)||null!=e&&t in ee(e)}function Xo(t){var e=Mo(t),n=dr[e];if("function"!=typeof n||!(e in gr.prototype))return!1;if(t===n)return!0;var r=Do(n);return!!r&&t===r[0]}(Jn&&Wo(new Jn(new ArrayBuffer(1)))!=ct||Zn&&Wo(new Zn)!=X||tr&&"[object Promise]"!=Wo(tr.resolve())||er&&Wo(new er)!=nt||nr&&Wo(new nr)!=at)&&(Wo=function(t){var e=Zr(t),n=e==Z?t.constructor:o,r=n?fa(n):"";if(r)switch(r){case ar:return ct;case sr:return X;case ur:return"[object Promise]";case cr:return nt;case lr:return at}return e});var $o=ue?Cs:Wu;function Jo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function Zo(t){return t==t&&!ks(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Kn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Kn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),ze(t,this,u)}}function na(t,e){return e.length<2?t:$r(t,Oi(e,0,-1))}var ra=sa(Ni),ia=Un||function(t,e){return Re.setTimeout(t,e)},oa=sa(Ai);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ft,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ge(B,function(n){var r="_."+n[0];e&n[1]&&!$e(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ut);return e?e[1].split(jt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Qn(),i=I-(r-n);if(n=r,i>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ua(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Ei(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ca=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,function(t,n,r,i){e.push(r?i.replace(qt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ms(t))return t;var e=t+"";return"0"==e&&1/t==-R?"-0":e}function fa(t){if(null!=t){try{return ce.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ha(t){if(t instanceof gr)return t.clone();var e=new yr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var pa=Ci(function(t,e){return _s(t)?jr(t,zr(e,1,_s,!0)):[]}),da=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),Fo(n,2)):[]}),va=Ci(function(t,e){var n=Ta(e);return _s(n)&&(n=o),_s(t)?jr(t,zr(e,1,_s,!0),o,n):[]});function ma(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),sn(t,Fo(e,3),i)}function ya(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=qs(n),i=n<0?Kn(r+i,0):Gn(i,r-1)),sn(t,Fo(e,3),i,!0)}function ga(t){return null!=t&&t.length?zr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ci(function(t){var e=Ze(t,zi);return e.length&&e[0]===t[0]?ri(e):[]}),wa=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return e===Ta(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Fo(e,2)):[]}),Ea=Ci(function(t){var e=Ta(t),n=Ze(t,zi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ta(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ca=Ci(xa);function xa(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Oo(function(t,e){var n=null==t?0:t.length,r=Dr(t,e);return wi(t,Ze(e,function(t){return Go(t,n)?+t:t}).sort(to)),r});function ka(t){return null==t?t:$n.call(t)}var Na=Ci(function(t){return Ui(zr(t,1,_s,!0))}),Aa=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Ui(zr(t,1,_s,!0),Fo(e,2))}),Ia=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Ui(zr(t,1,_s,!0),o,e)});function Oa(t){if(!t||!t.length)return[];var e=0;return t=Xe(t,function(t){if(_s(t))return e=Kn(t.length,e),!0}),mn(e,function(e){return Ze(t,hn(e))})}function Pa(t,e){if(!t||!t.length)return[];var n=Oa(t);return null==e?n:Ze(n,function(t){return ze(e,o,t)})}var Ra=Ci(function(t,e){return _s(t)?jr(t,e):[]}),Da=Ci(function(t){return Wi(Xe(t,_s))}),Ma=Ci(function(t){var e=Ta(t);return _s(e)&&(e=o),Wi(Xe(t,_s),Fo(e,2))}),La=Ci(function(t){var e=Ta(t);return e="function"==typeof e?e:o,Wi(Xe(t,_s),o,e)}),Fa=Ci(Oa);var Ua=Ci(function(t){var e=t.length,n=e>1?t[e-1]:o;return Pa(t,n="function"==typeof n?(t.pop(),n):o)});function ja(t){var e=dr(t);return e.__chain__=!0,e}function Ba(t,e){return e(t)}var qa=Oo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Dr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof gr&&Go(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Ba,args:[i],thisArg:o}),new yr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Va=oo(function(t,e,n){le.call(t,n)?++t[n]:Rr(t,n,1)});var Wa=ho(ma),Ha=ho(ya);function za(t,e){return(ys(t)?Ge:Br)(t,Fo(e,3))}function Ka(t,e){return(ys(t)?Qe:qr)(t,Fo(e,3))}var Ga=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Rr(t,n,[e])});var Qa=Ci(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return Br(t,function(t){a[++i]=o?ze(e,t,n):ii(t,e,n)}),a}),Ya=oo(function(t,e,n){Rr(t,n,e)});function Xa(t,e){return(ys(t)?Ze:pi)(t,Fo(e,3))}var $a=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Ja=Ci(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Qo(t,e[0],e[1])?e=[]:n>2&&Qo(e[0],e[1],e[2])&&(e=[e[0]]),gi(t,zr(e,1),[])}),Za=Fn||function(){return Re.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,C,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ci(function(t,e,n){var r=y;if(n.length){var i=Nn(n,Lo(ns));r|=E}return So(t,r,e,n,i)}),rs=Ci(function(t,e,n){var r=y|g;if(n.length){var i=Nn(n,Lo(rs));r|=E}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,c,l,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new ie(u);function v(e){var n=r,a=i;return r=i=o,f=e,s=t.apply(a,n)}function m(t){var n=t-l;return l===o||n>=e||n<0||p&&t-f>=a}function y(){var t=Za();if(m(t))return g(t);c=ia(y,function(t){var n=e-(t-l);return p?Gn(n,a-(t-f)):n}(t))}function g(t){return c=o,d&&r?v(t):(r=i=o,s)}function b(){var t=Za(),n=m(t);if(r=arguments,i=this,l=t,n){if(c===o)return function(t){return f=t,c=ia(y,e),h?v(t):s}(l);if(p)return c=ia(y,e),v(l)}return c===o&&(c=ia(y,e)),s}return e=Ws(e)||0,ks(n)&&(h=!!n.leading,a=(p="maxWait"in n)?Kn(Ws(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){c!==o&&Xi(c),f=0,r=l=i=c=o},b.flush=function(){return c===o?s:g(Za())},b}var os=Ci(function(t,e){return Ur(t,1,e)}),as=Ci(function(t,e,n){return Ur(t,Ws(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||wr),n}function us(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=wr;var cs=Qi(function(t,e){var n=(e=1==e.length&&ys(e[0])?Ze(e[0],yn(Fo())):Ze(zr(e,1),yn(Fo()))).length;return Ci(function(r){for(var i=-1,o=Gn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ze(t,this,r)})}),ls=Ci(function(t,e){var n=Nn(e,Lo(ls));return So(t,E,o,e,n)}),fs=Ci(function(t,e){var n=Nn(e,Lo(fs));return So(t,T,o,e,n)}),hs=Oo(function(t,e){return So(t,x,o,o,o,e)});function ps(t,e){return t===e||t!=t&&e!=e}var ds=wo(ti),vs=wo(function(t,e){return t>=e}),ms=oi(function(){return arguments}())?oi:function(t){return Ns(t)&&le.call(t,"callee")&&!De.call(t,"callee")},ys=r.isArray,gs=je?yn(je):function(t){return Ns(t)&&Zr(t)==ut};function bs(t){return null!=t&&Ss(t.length)&&!Cs(t)}function _s(t){return Ns(t)&&bs(t)}var ws=Vn||Wu,Es=Be?yn(Be):function(t){return Ns(t)&&Zr(t)==z};function Ts(t){if(!Ns(t))return!1;var e=Zr(t);return e==G||e==K||"string"==typeof t.message&&"string"==typeof t.name&&!Os(t)}function Cs(t){if(!ks(t))return!1;var e=Zr(t);return e==Q||e==Y||e==W||e==tt}function xs(t){return"number"==typeof t&&t==qs(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=D}function ks(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ns(t){return null!=t&&"object"==typeof t}var As=qe?yn(qe):function(t){return Ns(t)&&Wo(t)==X};function Is(t){return"number"==typeof t||Ns(t)&&Zr(t)==$}function Os(t){if(!Ns(t)||Zr(t)!=Z)return!1;var e=Oe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ce.call(n)==de}var Ps=Ve?yn(Ve):function(t){return Ns(t)&&Zr(t)==et};var Rs=We?yn(We):function(t){return Ns(t)&&Wo(t)==nt};function Ds(t){return"string"==typeof t||!ys(t)&&Ns(t)&&Zr(t)==rt}function Ms(t){return"symbol"==typeof t||Ns(t)&&Zr(t)==it}var Ls=He?yn(He):function(t){return Ns(t)&&Ss(t.length)&&!!Se[Zr(t)]};var Fs=wo(hi),Us=wo(function(t,e){return t<=e});function js(t){if(!t)return[];if(bs(t))return Ds(t)?Rn(t):ro(t);if(Ue&&t[Ue])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ue]());var e=Wo(t);return(e==X?Sn:e==nt?In:pu)(t)}function Bs(t){return t?(t=Ws(t))===R||t===-R?(t<0?-1:1)*M:t==t?t:0:0===t?t:0}function qs(t){var e=Bs(t),n=e%1;return e==e?n?e-n:e:0}function Vs(t){return t?Mr(qs(t),0,F):0}function Ws(t){if("number"==typeof t)return t;if(Ms(t))return L;if(ks(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ks(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Dt,"");var n=zt.test(t);return n||Gt.test(t)?Ie(t.slice(2),n?2:8):Ht.test(t)?L:+t}function Hs(t){return io(t,ou(t))}function zs(t){return null==t?"":Fi(t)}var Ks=ao(function(t,e){if(Jo(e)||bs(e))io(e,iu(e),t);else for(var n in e)le.call(e,n)&&Ar(t,n,e[n])}),Gs=ao(function(t,e){io(e,ou(e),t)}),Qs=ao(function(t,e,n,r){io(e,ou(e),t,r)}),Ys=ao(function(t,e,n,r){io(e,iu(e),t,r)}),Xs=Oo(Dr);var $s=Ci(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Qo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=ou(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===o||ps(f,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Js=Ci(function(t){return t.push(o,No),ze(su,o,t)});function Zs(t,e,n){var r=null==t?o:$r(t,e);return r===o?n:r}function tu(t,e){return null!=t&&Ho(t,e,ni)}var eu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=n},ku(Iu)),nu=mo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Fo),ru=Ci(ii);function iu(t){return bs(t)?Cr(t):li(t)}function ou(t){return bs(t)?Cr(t,!0):fi(t)}var au=ao(function(t,e,n){mi(t,e,n)}),su=ao(function(t,e,n,r){mi(t,e,n,r)}),uu=Oo(function(t,e){var n={};if(null==t)return n;var r=!1;e=Ze(e,function(e){return e=Gi(e,t),r||(r=e.length>1),e}),io(t,Ro(t),n),r&&(n=Lr(n,h|p|d,Ao));for(var i=e.length;i--;)ji(n,e[i]);return n});var cu=Oo(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tu(t,n)})}(t,e)});function lu(t,e){if(null==t)return{};var n=Ze(Ro(t),function(t){return[t]});return e=Fo(e),bi(t,n,function(t,n){return e(t,n[0])})}var fu=xo(iu),hu=xo(ou);function pu(t){return null==t?[]:gn(t,iu(t))}var du=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?vu(e):e)});function vu(t){return Tu(zs(t).toLowerCase())}function mu(t){return(t=zs(t))&&t.replace(Yt,En).replace(be,"")}var yu=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),gu=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bu=co("toLowerCase");var _u=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var wu=lo(function(t,e,n){return t+(n?" ":"")+Tu(e)});var Eu=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Tu=co("toUpperCase");function Cu(t,e,n){return t=zs(t),(e=n?o:e)===o?function(t){return Te.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Bt)||[]}(t):t.match(e)||[]}var xu=Ci(function(t,e){try{return ze(t,o,e)}catch(t){return Ts(t)?t:new Jt(t)}}),Su=Oo(function(t,e){return Ge(e,function(e){e=la(e),Rr(t,e,ns(t[e],t))}),t});function ku(t){return function(){return t}}var Nu=po(),Au=po(!0);function Iu(t){return t}function Ou(t){return ci("function"==typeof t?t:Lr(t,h))}var Pu=Ci(function(t,e){return function(n){return ii(n,t,e)}}),Ru=Ci(function(t,e){return function(n){return ii(t,n,e)}});function Du(t,e,n){var r=iu(e),i=Xr(e,r);null!=n||ks(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Xr(e,iu(e)));var o=!(ks(n)&&"chain"in n&&!n.chain),a=Cs(t);return Ge(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Mu(){}var Lu=go(Ze),Fu=go(Ye),Uu=go(rn);function ju(t){return Yo(t)?hn(la(t)):function(t){return function(e){return $r(e,t)}}(t)}var Bu=_o(),qu=_o(!0);function Vu(){return[]}function Wu(){return!1}var Hu=yo(function(t,e){return t+e},0),zu=To("ceil"),Ku=yo(function(t,e){return t/e},1),Gu=To("floor");var Qu,Yu=yo(function(t,e){return t*e},1),Xu=To("round"),$u=yo(function(t,e){return t-e},0);return dr.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=qs(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=ts,dr.assign=Ks,dr.assignIn=Gs,dr.assignInWith=Qs,dr.assignWith=Ys,dr.at=Xs,dr.before=es,dr.bind=ns,dr.bindAll=Su,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ys(t)?t:[t]},dr.chain=ja,dr.chunk=function(t,e,n){e=(n?Qo(t,e,n):e===o)?1:Kn(qs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(jn(i/e));a<i;)u[s++]=Oi(t,a,a+=e);return u},dr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},dr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(ys(n)?ro(n):[n],zr(e,1))},dr.cond=function(t){var e=null==t?0:t.length,n=Fo();return t=e?Ze(t,function(t){if("function"!=typeof t[1])throw new ie(u);return[n(t[0]),t[1]]}):[],Ci(function(n){for(var r=-1;++r<e;){var i=t[r];if(ze(i[0],this,n))return ze(i[1],this,n)}})},dr.conforms=function(t){return function(t){var e=iu(t);return function(n){return Fr(n,t,e)}}(Lr(t,h))},dr.constant=ku,dr.countBy=Va,dr.create=function(t,e){var n=vr(t);return null==e?n:Pr(n,e)},dr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.curryRight=function t(e,n,r){var i=So(e,w,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},dr.debounce=is,dr.defaults=$s,dr.defaultsDeep=Js,dr.defer=os,dr.delay=as,dr.difference=pa,dr.differenceBy=da,dr.differenceWith=va,dr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=n||e===o?1:qs(e))<0?0:e,r):[]},dr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,0,(e=r-(e=n||e===o?1:qs(e)))<0?0:e):[]},dr.dropRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0,!0):[]},dr.dropWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!0):[]},dr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Qo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=qs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:qs(r))<0&&(r+=i),r=n>r?0:Vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},dr.filter=function(t,e){return(ys(t)?Xe:Hr)(t,Fo(e,3))},dr.flatMap=function(t,e){return zr(Xa(t,e),1)},dr.flatMapDeep=function(t,e){return zr(Xa(t,e),R)},dr.flatMapDepth=function(t,e,n){return n=n===o?1:qs(n),zr(Xa(t,e),n)},dr.flatten=ga,dr.flattenDeep=function(t){return null!=t&&t.length?zr(t,R):[]},dr.flattenDepth=function(t,e){return null!=t&&t.length?zr(t,e=e===o?1:qs(e)):[]},dr.flip=function(t){return So(t,S)},dr.flow=Nu,dr.flowRight=Au,dr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},dr.functions=function(t){return null==t?[]:Xr(t,iu(t))},dr.functionsIn=function(t){return null==t?[]:Xr(t,ou(t))},dr.groupBy=Ga,dr.initial=function(t){return null!=t&&t.length?Oi(t,0,-1):[]},dr.intersection=_a,dr.intersectionBy=wa,dr.intersectionWith=Ea,dr.invert=eu,dr.invertBy=nu,dr.invokeMap=Qa,dr.iteratee=Ou,dr.keyBy=Ya,dr.keys=iu,dr.keysIn=ou,dr.map=Xa,dr.mapKeys=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,e(t,r,i),t)}),n},dr.mapValues=function(t,e){var n={};return e=Fo(e,3),Qr(t,function(t,r,i){Rr(n,r,e(t,r,i))}),n},dr.matches=function(t){return di(Lr(t,h))},dr.matchesProperty=function(t,e){return vi(t,Lr(e,h))},dr.memoize=ss,dr.merge=au,dr.mergeWith=su,dr.method=Pu,dr.methodOf=Ru,dr.mixin=Du,dr.negate=us,dr.nthArg=function(t){return t=qs(t),Ci(function(e){return yi(e,t)})},dr.omit=uu,dr.omitBy=function(t,e){return lu(t,us(Fo(e)))},dr.once=function(t){return es(2,t)},dr.orderBy=function(t,e,n,r){return null==t?[]:(ys(e)||(e=null==e?[]:[e]),ys(n=r?o:n)||(n=null==n?[]:[n]),gi(t,e,n))},dr.over=Lu,dr.overArgs=cs,dr.overEvery=Fu,dr.overSome=Uu,dr.partial=ls,dr.partialRight=fs,dr.partition=$a,dr.pick=cu,dr.pickBy=lu,dr.property=ju,dr.propertyOf=function(t){return function(e){return null==t?o:$r(t,e)}},dr.pull=Ca,dr.pullAll=xa,dr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Fo(n,2)):t},dr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},dr.pullAt=Sa,dr.range=Bu,dr.rangeRight=qu,dr.rearg=hs,dr.reject=function(t,e){return(ys(t)?Xe:Hr)(t,us(Fo(e,3)))},dr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Fo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return wi(t,i),n},dr.rest=function(t,e){if("function"!=typeof t)throw new ie(u);return Ci(t,e=e===o?e:qs(e))},dr.reverse=ka,dr.sampleSize=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),(ys(t)?Sr:Si)(t,e)},dr.set=function(t,e,n){return null==t?t:ki(t,e,n)},dr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:ki(t,e,n,r)},dr.shuffle=function(t){return(ys(t)?kr:Ii)(t)},dr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Qo(t,e,n)?(e=0,n=r):(e=null==e?0:qs(e),n=n===o?r:qs(n)),Oi(t,e,n)):[]},dr.sortBy=Ja,dr.sortedUniq=function(t){return t&&t.length?Mi(t):[]},dr.sortedUniqBy=function(t,e){return t&&t.length?Mi(t,Fo(e,2)):[]},dr.split=function(t,e,n){return n&&"number"!=typeof n&&Qo(t,e,n)&&(e=n=o),(n=n===o?F:n>>>0)?(t=zs(t))&&("string"==typeof e||null!=e&&!Ps(e))&&!(e=Fi(e))&&xn(t)?Yi(Rn(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:Kn(qs(e),0),Ci(function(n){var r=n[e],i=Yi(n,0,e);return r&&tn(i,r),ze(t,this,i)})},dr.tail=function(t){var e=null==t?0:t.length;return e?Oi(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Oi(t,0,(e=n||e===o?1:qs(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Oi(t,(e=r-(e=n||e===o?1:qs(e)))<0?0:e,r):[]},dr.takeRightWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?qi(t,Fo(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(u);return ks(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Ba,dr.toArray=js,dr.toPairs=fu,dr.toPairsIn=hu,dr.toPath=function(t){return ys(t)?Ze(t,la):Ms(t)?[t]:ro(ca(zs(t)))},dr.toPlainObject=Hs,dr.transform=function(t,e,n){var r=ys(t),i=r||ws(t)||Ls(t);if(e=Fo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ks(t)&&Cs(o)?vr(Oe(t)):{}}return(i?Ge:Qr)(t,function(t,r,i){return e(n,t,r,i)}),n},dr.unary=function(t){return ts(t,1)},dr.union=Na,dr.unionBy=Aa,dr.unionWith=Ia,dr.uniq=function(t){return t&&t.length?Ui(t):[]},dr.uniqBy=function(t,e){return t&&t.length?Ui(t,Fo(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Ui(t,o,e):[]},dr.unset=function(t,e){return null==t||ji(t,e)},dr.unzip=Oa,dr.unzipWith=Pa,dr.update=function(t,e,n){return null==t?t:Bi(t,e,Ki(n))},dr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Bi(t,e,Ki(n),r)},dr.values=pu,dr.valuesIn=function(t){return null==t?[]:gn(t,ou(t))},dr.without=Ra,dr.words=Cu,dr.wrap=function(t,e){return ls(Ki(e),t)},dr.xor=Da,dr.xorBy=Ma,dr.xorWith=La,dr.zip=Fa,dr.zipObject=function(t,e){return Hi(t||[],e||[],Ar)},dr.zipObjectDeep=function(t,e){return Hi(t||[],e||[],ki)},dr.zipWith=Ua,dr.entries=fu,dr.entriesIn=hu,dr.extend=Gs,dr.extendWith=Qs,Du(dr,dr),dr.add=Hu,dr.attempt=xu,dr.camelCase=du,dr.capitalize=vu,dr.ceil=zu,dr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=Ws(n))==n?n:0),e!==o&&(e=(e=Ws(e))==e?e:0),Mr(Ws(t),e,n)},dr.clone=function(t){return Lr(t,d)},dr.cloneDeep=function(t){return Lr(t,h|d)},dr.cloneDeepWith=function(t,e){return Lr(t,h|d,e="function"==typeof e?e:o)},dr.cloneWith=function(t,e){return Lr(t,d,e="function"==typeof e?e:o)},dr.conformsTo=function(t,e){return null==e||Fr(t,e,iu(e))},dr.deburr=mu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Ku,dr.endsWith=function(t,e,n){t=zs(t),e=Fi(e);var r=t.length,i=n=n===o?r:Mr(qs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},dr.eq=ps,dr.escape=function(t){return(t=zs(t))&&xt.test(t)?t.replace(Tt,Tn):t},dr.escapeRegExp=function(t){return(t=zs(t))&&Rt.test(t)?t.replace(Pt,"\\$&"):t},dr.every=function(t,e,n){var r=ys(t)?Ye:Vr;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.find=Wa,dr.findIndex=ma,dr.findKey=function(t,e){return an(t,Fo(e,3),Qr)},dr.findLast=Ha,dr.findLastIndex=ya,dr.findLastKey=function(t,e){return an(t,Fo(e,3),Yr)},dr.floor=Gu,dr.forEach=za,dr.forEachRight=Ka,dr.forIn=function(t,e){return null==t?t:Kr(t,Fo(e,3),ou)},dr.forInRight=function(t,e){return null==t?t:Gr(t,Fo(e,3),ou)},dr.forOwn=function(t,e){return t&&Qr(t,Fo(e,3))},dr.forOwnRight=function(t,e){return t&&Yr(t,Fo(e,3))},dr.get=Zs,dr.gt=ds,dr.gte=vs,dr.has=function(t,e){return null!=t&&Ho(t,e,ei)},dr.hasIn=tu,dr.head=ba,dr.identity=Iu,dr.includes=function(t,e,n,r){t=bs(t)?t:pu(t),n=n&&!r?qs(n):0;var i=t.length;return n<0&&(n=Kn(i+n,0)),Ds(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:qs(n);return i<0&&(i=Kn(r+i,0)),un(t,e,i)},dr.inRange=function(t,e,n){return e=Bs(e),n===o?(n=e,e=0):n=Bs(n),function(t,e,n){return t>=Gn(e,n)&&t<Kn(e,n)}(t=Ws(t),e,n)},dr.invoke=ru,dr.isArguments=ms,dr.isArray=ys,dr.isArrayBuffer=gs,dr.isArrayLike=bs,dr.isArrayLikeObject=_s,dr.isBoolean=function(t){return!0===t||!1===t||Ns(t)&&Zr(t)==H},dr.isBuffer=ws,dr.isDate=Es,dr.isElement=function(t){return Ns(t)&&1===t.nodeType&&!Os(t)},dr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(ys(t)||"string"==typeof t||"function"==typeof t.splice||ws(t)||Ls(t)||ms(t)))return!t.length;var e=Wo(t);if(e==X||e==nt)return!t.size;if(Jo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},dr.isEqual=function(t,e){return ai(t,e)},dr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},dr.isError=Ts,dr.isFinite=function(t){return"number"==typeof t&&Wn(t)},dr.isFunction=Cs,dr.isInteger=xs,dr.isLength=Ss,dr.isMap=As,dr.isMatch=function(t,e){return t===e||si(t,e,jo(e))},dr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,jo(e),n)},dr.isNaN=function(t){return Is(t)&&t!=+t},dr.isNative=function(t){if($o(t))throw new Jt(s);return ui(t)},dr.isNil=function(t){return null==t},dr.isNull=function(t){return null===t},dr.isNumber=Is,dr.isObject=ks,dr.isObjectLike=Ns,dr.isPlainObject=Os,dr.isRegExp=Ps,dr.isSafeInteger=function(t){return xs(t)&&t>=-D&&t<=D},dr.isSet=Rs,dr.isString=Ds,dr.isSymbol=Ms,dr.isTypedArray=Ls,dr.isUndefined=function(t){return t===o},dr.isWeakMap=function(t){return Ns(t)&&Wo(t)==at},dr.isWeakSet=function(t){return Ns(t)&&Zr(t)==st},dr.join=function(t,e){return null==t?"":Hn.call(t,e)},dr.kebabCase=yu,dr.last=Ta,dr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=qs(n))<0?Kn(r+i,0):Gn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},dr.lowerCase=gu,dr.lowerFirst=bu,dr.lt=Fs,dr.lte=Us,dr.max=function(t){return t&&t.length?Wr(t,Iu,ti):o},dr.maxBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),ti):o},dr.mean=function(t){return fn(t,Iu)},dr.meanBy=function(t,e){return fn(t,Fo(e,2))},dr.min=function(t){return t&&t.length?Wr(t,Iu,hi):o},dr.minBy=function(t,e){return t&&t.length?Wr(t,Fo(e,2),hi):o},dr.stubArray=Vu,dr.stubFalse=Wu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=Yu,dr.nth=function(t,e){return t&&t.length?yi(t,qs(e)):o},dr.noConflict=function(){return Re._===this&&(Re._=ve),this},dr.noop=Mu,dr.now=Za,dr.pad=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(Bn(i),n)+t+bo(jn(i),n)},dr.padEnd=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?t+bo(e-r,n):t},dr.padStart=function(t,e,n){t=zs(t);var r=(e=qs(e))?Pn(t):0;return e&&r<e?bo(e-r,n)+t:t},dr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Yn(zs(t).replace(Mt,""),e||0)},dr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Qo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Bs(t),e===o?(e=t,t=0):e=Bs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Xn();return Gn(t+i*(e-t+Ae("1e-"+((i+"").length-1))),e)}return Ei(t,e)},dr.reduce=function(t,e,n){var r=ys(t)?en:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,Br)},dr.reduceRight=function(t,e,n){var r=ys(t)?nn:dn,i=arguments.length<3;return r(t,Fo(e,4),n,i,qr)},dr.repeat=function(t,e,n){return e=(n?Qo(t,e,n):e===o)?1:qs(e),Ti(zs(t),e)},dr.replace=function(){var t=arguments,e=zs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var r=-1,i=(e=Gi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Cs(a)?a.call(t):a}return t},dr.round=Xu,dr.runInContext=t,dr.sample=function(t){return(ys(t)?xr:xi)(t)},dr.size=function(t){if(null==t)return 0;if(bs(t))return Ds(t)?Pn(t):t.length;var e=Wo(t);return e==X||e==nt?t.size:li(t).length},dr.snakeCase=_u,dr.some=function(t,e,n){var r=ys(t)?rn:Pi;return n&&Qo(t,e,n)&&(e=o),r(t,Fo(e,3))},dr.sortedIndex=function(t,e){return Ri(t,e)},dr.sortedIndexBy=function(t,e,n){return Di(t,e,Fo(n,2))},dr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Ri(t,e);if(r<n&&ps(t[r],e))return r}return-1},dr.sortedLastIndex=function(t,e){return Ri(t,e,!0)},dr.sortedLastIndexBy=function(t,e,n){return Di(t,e,Fo(n,2),!0)},dr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Ri(t,e,!0)-1;if(ps(t[n],e))return n}return-1},dr.startCase=wu,dr.startsWith=function(t,e,n){return t=zs(t),n=null==n?0:Mr(qs(n),0,t.length),e=Fi(e),t.slice(n,n+e.length)==e},dr.subtract=$u,dr.sum=function(t){return t&&t.length?vn(t,Iu):0},dr.sumBy=function(t,e){return t&&t.length?vn(t,Fo(e,2)):0},dr.template=function(t,e,n){var r=dr.templateSettings;n&&Qo(t,e,n)&&(e=o),t=zs(t),e=Qs({},e,r,ko);var i,a,s=Qs({},e.imports,r.imports,ko),u=iu(s),c=gn(s,u),l=0,f=e.interpolate||Xt,h="__p += '",p=ne((e.escape||Xt).source+"|"+f.source+"|"+(f===Nt?Vt:Xt).source+"|"+(e.evaluate||Xt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++xe+"]")+"\n";t.replace(p,function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(l,u).replace($t,Cn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ?  : __t) +\n'"),l=u+e.length,e}),h+="';\n";var v=e.variable;v||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(bt,""):h).replace(_t,"$1").replace(wt,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = "+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, ) }\n":";\n")+h+"return __p\n}";var m=xu(function(){return Zt(u,d+"return "+h).apply(o,c)});if(m.source=h,Ts(m))throw m;return m},dr.times=function(t,e){if((t=qs(t))<1||t>D)return[];var n=F,r=Gn(t,F);e=Fo(e),t-=F;for(var i=mn(r,e);++n<t;)e(n);return i},dr.toFinite=Bs,dr.toInteger=qs,dr.toLength=Vs,dr.toLower=function(t){return zs(t).toLowerCase()},dr.toNumber=Ws,dr.toSafeInteger=function(t){return t?Mr(qs(t),-D,D):0===t?t:0},dr.toString=zs,dr.toUpper=function(t){return zs(t).toUpperCase()},dr.trim=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t),i=Rn(e);return Yi(r,_n(r,i),wn(r,i)+1).join("")},dr.trimEnd=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Lt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,0,wn(r,Rn(e))+1).join("")},dr.trimStart=function(t,e,n){if((t=zs(t))&&(n||e===o))return t.replace(Mt,"");if(!t||!(e=Fi(e)))return t;var r=Rn(t);return Yi(r,_n(r,Rn(e))).join("")},dr.truncate=function(t,e){var n=k,r=N;if(ks(e)){var i="separator"in e?e.separator:i;n="length"in e?qs(e.length):n,r="omission"in e?Fi(e.omission):r}var a=(t=zs(t)).length;if(xn(t)){var s=Rn(t);a=s.length}if(n>=a)return t;var u=n-Pn(r);if(u<1)return r;var c=s?Yi(s,0,u).join(""):t.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),Ps(i)){if(t.slice(u).search(i)){var l,f=c;for(i.global||(i=ne(i.source,zs(Wt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===o?u:h)}}else if(t.indexOf(Fi(i),u)!=u){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+r},dr.unescape=function(t){return(t=zs(t))&&Ct.test(t)?t.replace(Et,Dn):t},dr.uniqueId=function(t){var e=++fe;return zs(t)+e},dr.upperCase=Eu,dr.upperFirst=Tu,dr.each=za,dr.eachRight=Ka,dr.first=ba,Du(dr,(Qu={},Qr(dr,function(t,e){le.call(dr.prototype,e)||(Qu[e]=t)}),Qu),{chain:!1}),dr.VERSION="4.17.10",Ge(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dr[t].placeholder=dr}),Ge(["drop","take"],function(t,e){gr.prototype[t]=function(n){n=n===o?1:Kn(qs(n),0);var r=this.__filtered__&&!e?new gr(this):this.clone();return r.__filtered__?r.__takeCount__=Gn(n,r.__takeCount__):r.__views__.push({size:Gn(n,F),type:t+(r.__dir__<0?"Right":"")}),r},gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ge(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==O||3==n;gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Fo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ge(["head","last"],function(t,e){var n="take"+(e?"Right":"");gr.prototype[t]=function(){return this[n](1).value()[0]}}),Ge(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");gr.prototype[t]=function(){return this.__filtered__?new gr(this):this[n](1)}}),gr.prototype.compact=function(){return this.filter(Iu)},gr.prototype.find=function(t){return this.filter(t).head()},gr.prototype.findLast=function(t){return this.reverse().find(t)},gr.prototype.invokeMap=Ci(function(t,e){return"function"==typeof t?new gr(this):this.map(function(n){return ii(n,t,e)})}),gr.prototype.reject=function(t){return this.filter(us(Fo(t)))},gr.prototype.slice=function(t,e){t=qs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new gr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=qs(e))<0?n.dropRight(-e):n.take(e-t)),n)},gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},gr.prototype.toArray=function(){return this.take(F)},Qr(gr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=dr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof gr,c=s[0],l=u||ys(e),f=function(t){var e=i.apply(dr,tn([t],s));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,p=!!this.__actions__.length,d=a&&!h,v=u&&!p;if(!a&&l){e=v?e:new gr(this);var m=t.apply(e,s);return m.__actions__.push({func:Ba,args:[f],thisArg:o}),new yr(m,h)}return d&&v?t.apply(this,s):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})}),Ge(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ys(i)?i:[],t)}return this[n](function(n){return e.apply(ys(n)?n:[],t)})}}),Qr(gr.prototype,function(t,e){var n=dr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[vo(o,g).name]=[{name:"wrapper",func:o}],gr.prototype.clone=function(){var t=new gr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},gr.prototype.reverse=function(){if(this.__filtered__){var t=new gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ys(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Gn(e,t+a);break;case"takeRight":t=Kn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,p=Gn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return Vi(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var v=-1,m=t[c+=e];++v<f;){var y=l[v],g=y.iteratee,b=y.type,_=g(m);if(b==P)m=_;else if(!_){if(b==O)continue t;break t}}d[h++]=m}return d},dr.prototype.at=qa,dr.prototype.chain=function(){return ja(this)},dr.prototype.commit=function(){return new yr(this.value(),this.__chain__)},dr.prototype.next=function(){this.__values__===o&&(this.__values__=js(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof mr;){var r=ha(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gr){var e=t;return this.__actions__.length&&(e=new gr(this)),(e=e.reverse()).__actions__.push({func:Ba,args:[ka],thisArg:o}),new yr(e,this.__chain__)}return this.thru(ka)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return Vi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,Ue&&(dr.prototype[Ue]=function(){return this}),dr}();Re._=Mn,(i=function(){return Mn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(66),n(117)(t))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(124);t.exports=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:r(t,e,n)}},function(t,e,n){var r=n(384),i=n(248),o=n(164);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(233);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return t.placeholder}},function(t,e,n){var r=n(86),i=n(155);function o(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,t.exports=o},function(t,e,n){var r=n(218),i=n(212),o=r?function(t){return r.get(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(86),i=n(155),o=4294967295;function a(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}a.prototype=r(i.prototype),a.prototype.constructor=a,t.exports=a},function(t,e,n){var r=n(239),i=n(229),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},function(t,e,n){var r=n(460),i=n(30);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},function(t,e,n){var r=n(132),i=n(465),o=n(464),a=n(463),s=n(462),u=n(461);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(473),i=n(28);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(118),i=1/0,o=1.7976931348623157e308;t.exports=function(t){return t?(t=r(t))===i||t===-i?(t<0?-1:1)*o:t==t?t:0:0===t?t:0}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(487),i=n(246)(r);t.exports=i},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(65)(n(33),"Map");t.exports=r},function(t,e,n){var r=n(512),i=n(496),o=n(494),a=n(493),s=n(492);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(18),i=n(68),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(49),i=n(26),o=n(79);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(57),i=n(26),o=n(138),a=n(171),s=n(56).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(42)},function(t,e,n){n(538);for(var r=n(57),i=n(80),o=n(78),a=n(42)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){var r=n(54),i=n(93),o=n(179)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(56).f,i=n(54),o=n(42)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(55),i=n(540),o=n(177),a=n(179)("IE_PROTO"),s=function(){},u=function(){var t,e=n(263)("iframe"),r=o.length;for(e.style.display="none",n(539).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(26),i=n(57),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(138)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(178)("keys"),i=n(137);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(71);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(550);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,a,s,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,a,s,u],f=0;(c=new Error(e.replace(/%s/g,function(){return l[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(369),i=n(47);t.exports=function(t){return t&&t.length?r(t,i):0}},function(t,e){t.exports=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}},function(t,e,n){var r=n(241),i=n(34),o=n(46),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}t.exports=function(t,e){if(i(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(e,n[a])||!i(t[n[a]],e[n[a]]))return!1;return!0}},function(t,e,n){var r=n(90),i=n(53),o=n(201),a=n(119),s=i(function(t){return o(r(t,1,a,!0))});t.exports=s},function(t,e,n){var r=n(114),i=n(52),o=n(38),a=n(96),s=n(335),u="[object Map]",c="[object Set]";t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return e==u||e==c?t.size:r(t).length}},function(t,e,n){var r=n(23)("min",n(368),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sum",n(187),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("compact",n(188),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,s=o.left,u=a,c=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o};function l(t,e){return[t,e]}var f=function(t,e,n){var r,i,o,a,s=t.length,u=e.length,c=new Array(s*u);for(null==n&&(n=l),r=o=0;r<s;++r)for(a=t[r],i=0;i<u;++i,++o)c[o]=n(a,e[i]);return c},h=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},p=function(t){return null===t?NaN:+t},d=function(t,e){var n,r,i=t.length,o=0,a=-1,s=0,u=0;if(null==e)for(;++a<i;)isNaN(n=p(t[a]))||(u+=(r=n-s)*(n-(s+=r/++o)));else for(;++a<i;)isNaN(n=p(e(t[a],a,t)))||(u+=(r=n-s)*(n-(s+=r/++o)));if(o>1)return u/(o-1)},v=function(t,e){var n=d(t,e);return n?Math.sqrt(n):n},m=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},y=Array.prototype,g=y.slice,b=y.map,_=function(t){return function(){return t}},w=function(t){return t},E=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o},T=Math.sqrt(50),C=Math.sqrt(10),x=Math.sqrt(2),S=function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=k(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o};function k(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T?10:o>=C?5:o>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T?10:o>=C?5:o>=x?2:1)}function N(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T?i*=10:o>=C?i*=5:o>=x&&(i*=2),e<t?-i:i}var A=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},I=function(){var t=w,e=m,n=A;function r(r){var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],f=c[1],h=n(s,l,f);Array.isArray(h)||(h=N(l,f,h),h=E(Math.ceil(l/h)*h,Math.floor(f/h)*h,h));for(var p=h.length;h[0]<=l;)h.shift(),--p;for(;h[p-1]>f;)h.pop(),--p;var d,v=new Array(p+1);for(i=0;i<=p;++i)(d=v[i]=[]).x0=i>0?h[i-1]:l,d.x1=i<p?h[i]:f;for(i=0;i<a;++i)l<=(o=s[i])&&o<=f&&v[u(h,o,0,p)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?_(g.call(t)):_(t),r):n},r},O=function(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},P=function(t,e,n){return t=b.call(t,p).sort(r),Math.ceil((n-e)/(2*(O(t,.75)-O(t,.25))*Math.pow(t.length,-1/3)))},R=function(t,e,n){return Math.ceil((n-e)/(3.5*v(t)*Math.pow(t.length,-1/3)))},D=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},M=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=p(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=p(e(t[o],o,t)))?--i:a+=n;if(i)return a/i},L=function(t,e){var n,i=t.length,o=-1,a=[];if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||a.push(n);else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||a.push(n);return O(a.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},U=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},B=function(t,e){if(n=t.length){var n,i,o=0,a=0,s=t[a];for(null==e&&(e=r);++o<n;)(e(i=t[o],s)<0||0!==e(s,s))&&(s=i,a=o);return 0===e(s,s)?a:void 0}},q=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},V=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o},W=function(t){if(!(i=t.length))return[];for(var e=-1,n=U(t,H),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r};function H(t){return t.length}var z=function(){return W(arguments)},K=Array.prototype.slice,G=function(t){return t},Q=1,Y=2,X=3,$=4,J=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function tt(t){return"translate(0,"+(t+.5)+")"}function et(){return!this.__axis}function nt(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=t===Q||t===$?-1:1,c=t===$||t===Y?"x":"y",l=t===Q||t===X?Z:tt;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,d=Math.max(o,0)+s,v=e.range(),m=+v[0]+.5,y=+v[v.length-1]+.5,g=(e.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}:function(t){return function(e){return+t(e)}})(e.copy()),b=f.selection?f.selection():f,_=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(h,e).order(),E=w.exit(),T=w.enter().append("g").attr("class","tick"),C=w.select("line"),x=w.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),w=w.merge(T),C=C.merge(T.append("line").attr("stroke","#000").attr(c+"2",u*o)),x=x.merge(T.append("text").attr("fill","#000").attr(c,u*d).attr("dy",t===Q?"0em":t===X?"0.71em":"0.32em")),f!==b&&(_=_.transition(f),w=w.transition(f),C=C.transition(f),x=x.transition(f),E=E.transition(f).attr("opacity",J).attr("transform",function(t){return isFinite(t=g(t))?l(t):this.getAttribute("transform")}),T.attr("opacity",J).attr("transform",function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:g(t))})),E.remove(),_.attr("d",t===$||t==Y?"M"+u*a+","+m+"H0.5V"+y+"H"+u*a:"M"+m+","+u*a+"V0.5H"+y+"V"+u*a),w.attr("opacity",1).attr("transform",function(t){return l(g(t))}),C.attr(c+"2",u*o),x.attr(c,u*d).text(p),b.filter(et).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Y?"start":t===$?"end":"middle"),b.each(function(){this.__axis=g})}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=K.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:K.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:K.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function rt(t){return nt(Q,t)}function it(t){return nt(Y,t)}function ot(t){return nt(X,t)}function at(t){return nt($,t)}var st={value:function(){}};function ut(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ft(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=st,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=ut.prototype={constructor:ct,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=ft(i[n],t.name,e);else if(null==e)for(n in i)i[n]=ft(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=lt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var ht=ut,pt="http://www.w3.org/1999/xhtml",dt={svg:"http://www.w3.org/2000/svg",xhtml:pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},vt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),dt.hasOwnProperty(e)?{space:dt[e],local:t}:t};var mt=function(t){var e=vt(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===pt&&e.documentElement.namespaceURI===pt?e.createElement(t):e.createElementNS(n,t)}})(e)};function yt(){}var gt=function(t){return null==t?yt:function(){return this.querySelector(t)}};function bt(){return[]}var _t=function(t){return null==t?bt:function(){return this.querySelectorAll(t)}},wt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Et=document.documentElement;if(!Et.matches){var Tt=Et.webkitMatchesSelector||Et.msMatchesSelector||Et.mozMatchesSelector||Et.oMatchesSelector;wt=function(t){return function(){return Tt.call(this,t)}}}}var Ct=wt,xt=function(t){return new Array(t.length)};function St(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}St.prototype={constructor:St,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Nt(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new St(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function At(t,e,n,r,i,o,a){var s,u,c,l={},f=e.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(p[s]=c=kt+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c=kt+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new St(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&l[p[s]]===u&&(i[s]=u)}function It(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function Rt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new Mt(t)}function Mt(t){this._node=t,this._names=Rt(t.getAttribute("class")||"")}function Lt(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ft(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}Mt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ut(){this.textContent=""}function jt(){this.innerHTML=""}function Bt(){this.nextSibling&&this.parentNode.appendChild(this)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vt(){return null}function Wt(){var t=this.parentNode;t&&t.removeChild(this)}function Ht(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function zt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Kt={},Gt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Kt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Qt(t,e,n){return t=Yt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Yt(t,e,n){return function(r){var i=Gt;Gt=r;try{t.call(this,this.__data__,e,n)}finally{Gt=i}}}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function $t(t,e,n){var r=Kt.hasOwnProperty(t.type)?Qt:Yt;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,f=u.length;l<f;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function Jt(t,e,n,r){var i=Gt;t.sourceEvent=Gt,Gt=t;try{return e.apply(n,r)}finally{Gt=i}}function Zt(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}function ne(){return new ee(document.documentElement,te)}ee.prototype=ne.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new ee(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=_t(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ee(r,i)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new ee(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each(function(t){d[++l]=t}),d;var n,r=e?At:Nt,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),c=new Array(a),l=0;l<a;++l){var f=i[l],h=o[l],p=h.length,d=t.call(f,f&&f.__data__,l,i),v=d.length,m=u[l]=new Array(v),y=s[l]=new Array(v);r(f,h,m,y,c[l]=new Array(p),d,e);for(var g,b,_=0,w=0;_<v;++_)if(g=m[_]){for(_>=w&&(w=_+1);!(b=y[w])&&++w<v;);g._next=b||null}}return(s=new ee(s,i))._enter=u,s._exit=c,s},enter:function(){return new ee(this._enter||this._groups.map(xt),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(xt),this._parents)},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=It);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new ee(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=vt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):Pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=Rt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Lt:Ft)(this,t)}}:e?function(t){return function(){Lt(this,t)}}:function(t){return function(){Ft(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?Ut:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Bt)},lower:function(){return this.each(qt)},append:function(t){var e="function"==typeof t?t:mt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:mt(t),r=null==e?Vt:"function"==typeof e?e:gt(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Wt)},clone:function(t){return this.select(t?zt:Ht)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?$t:Xt,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return Zt(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return Zt(this,t,e)}})(t,e))}};var re=ne,ie=function(t){return"string"==typeof t?new ee(document.querySelector(t),[document.documentElement]):new ee(t,te)},oe=function(t){return ie(mt(t).call(document.documentElement))},ae=0;function se(){return new ue}function ue(){this._="@"+(++ae).toString(36)}ue.prototype=se.prototype={constructor:ue,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var ce=function(){for(var t,e=Gt;t=e.sourceEvent;)e=t;return e},le=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},fe=function(t){var e=ce();return e.changedTouches&&(e=e.changedTouches[0]),le(t,e)},he=function(t){return"string"==typeof t?new ee([document.querySelectorAll(t)],[document.documentElement]):new ee([null==t?[]:t],te)},pe=function(t,e,n){arguments.length<3&&(n=e,e=ce().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return le(t,r);return null},de=function(t,e){null==e&&(e=ce().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=le(t,e[n]);return i};function ve(){Gt.stopImmediatePropagation()}var me=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},ye=function(t){var e=t.document.documentElement,n=ie(t).on("dragstart.drag",me,!0);"onselectstart"in e?n.on("selectstart.drag",me,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function ge(t,e){var n=t.document.documentElement,r=ie(t).on("dragstart.drag",null);e&&(r.on("click.drag",me,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var be=function(t){return function(){return t}};function _e(t,e,n,r,i,o,a,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=c}function we(){return!Gt.button}function Ee(){return this.parentNode}function Te(t){return null==t?{x:Gt.x,y:Gt.y}:t}function Ce(){return"ontouchstart"in this}_e.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var xe=function(){var t,e,n,r,i=we,o=Ee,a=Te,s=Ce,u={},c=ht("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",p).filter(s).on("touchstart.drag",m).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=b("mouse",o.apply(this,arguments),fe,this,arguments);a&&(ie(Gt.view).on("mousemove.drag",d,!0).on("mouseup.drag",v,!0),ye(Gt.view),ve(),n=!1,t=Gt.clientX,e=Gt.clientY,a("start"))}}function d(){if(me(),!n){var r=Gt.clientX-t,i=Gt.clientY-e;n=r*r+i*i>f}u.mouse("drag")}function v(){ie(Gt.view).on("mousemove.drag mouseup.drag",null),ge(Gt.view,n),me(),u.mouse("end")}function m(){if(i.apply(this,arguments)){var t,e,n=Gt.changedTouches,r=o.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=b(n[t].identifier,r,pe,this,arguments))&&(ve(),e("start"))}}function y(){var t,e,n=Gt.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(me(),e("drag"))}function g(){var t,e,n=Gt.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<i;++t)(e=u[n[t].identifier])&&(ve(),e("end"))}function b(t,e,n,r,i){var o,s,f,p=n(e,t),d=c.copy();if(Jt(new _e(h,"beforestart",o,t,l,p[0],p[1],0,0,d),function(){return null!=(Gt.subject=o=a.apply(r,i))&&(s=o.x-p[0]||0,f=o.y-p[1]||0,!0)}))return function a(c){var v,m=p;switch(c){case"start":u[t]=a,v=l++;break;case"end":delete u[t],--l;case"drag":p=n(e,t),v=l}Jt(new _e(h,c,o,t,v,p[0]+s,p[1]+f,p[0]-m[0],p[1]-m[1],d),d.apply,d,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:be(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:be(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:be(t),h):a},h.touchable=function(t){return arguments.length?(s="function"==typeof t?t:be(!!t),h):s},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h},Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ne(){}var Ae="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pe=/^#([0-9a-f]{3})$/,Re=/^#([0-9a-f]{6})$/,De=new RegExp("^rgb\\("+[Ae,Ae,Ae]+"\\)$"),Me=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Le=new RegExp("^rgba\\("+[Ae,Ae,Ae,Ie]+"\\)$"),Fe=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^hsl\\("+[Ie,Oe,Oe]+"\\)$"),je=new RegExp("^hsla\\("+[Ie,Oe,Oe,Ie]+"\\)$"),Be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function qe(t){var e;return t=(t+"").trim().toLowerCase(),(e=Pe.exec(t))?new Ke((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=Re.exec(t))?Ve(parseInt(e[1],16)):(e=De.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Me.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ue.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Be.hasOwnProperty(t)?Ve(Be[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ve(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function He(t){return t instanceof Ne||(t=qe(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function ze(t,e,n,r){return 1===arguments.length?He(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Xe(t,e,n,r)}function Ye(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);if(t instanceof Ne||(t=qe(t)),!t)return new Xe;if(t instanceof Xe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xe(a,s,u,t.opacity)}(t):new Xe(t,e,n,null==r?1:r)}function Xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Se(Ne,qe,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Se(Ke,ze,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Se(Xe,Ye,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke($e(t>=240?t-240:t+120,i,r),$e(t,i,r),$e(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Je=Math.PI/180,Ze=180/Math.PI,tn=.96422,en=1,nn=.82521,rn=4/29,on=6/29,an=3*on*on,sn=on*on*on;function un(t){if(t instanceof fn)return new fn(t.l,t.a,t.b,t.opacity);if(t instanceof bn){if(isNaN(t.h))return new fn(t.l,0,0,t.opacity);var e=t.h*Je;return new fn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Ke||(t=He(t));var n,r,i=vn(t.r),o=vn(t.g),a=vn(t.b),s=hn((.2225045*i+.7168786*o+.0606169*a)/en);return i===o&&o===a?n=r=s:(n=hn((.4360747*i+.3850649*o+.1430804*a)/tn),r=hn((.0139322*i+.0971045*o+.7141733*a)/nn)),new fn(116*s-16,500*(n-s),200*(s-r),t.opacity)}function cn(t,e){return new fn(t,0,0,null==e?1:e)}function ln(t,e,n,r){return 1===arguments.length?un(t):new fn(t,e,n,null==r?1:r)}function fn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function hn(t){return t>sn?Math.pow(t,1/3):t/an+rn}function pn(t){return t>on?t*t*t:an*(t-rn)}function dn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mn(t){if(t instanceof bn)return new bn(t.h,t.c,t.l,t.opacity);if(t instanceof fn||(t=un(t)),0===t.a&&0===t.b)return new bn(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ze;return new bn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function yn(t,e,n,r){return 1===arguments.length?mn(t):new bn(n,e,t,null==r?1:r)}function gn(t,e,n,r){return 1===arguments.length?mn(t):new bn(t,e,n,null==r?1:r)}function bn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}Se(fn,ln,ke(Ne,{brighter:function(t){return new fn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new fn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(dn(3.1338561*(e=tn*pn(e))-1.6168667*(t=en*pn(t))-.4906146*(n=nn*pn(n))),dn(-.9787684*e+1.9161415*t+.033454*n),dn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(bn,gn,ke(Ne,{brighter:function(t){return new bn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new bn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return un(this).rgb()}}));var _n=-.29227,wn=-.90649,En=1.97294,Tn=En*wn,Cn=1.78277*En,xn=1.78277*_n- -.14861*wn;function Sn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof kn)return new kn(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=He(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(xn*r+Tn*e-Cn*n)/(xn+Tn-Cn),o=r-i,a=(En*(n-i)-_n*o)/wn,s=Math.sqrt(a*a+o*o)/(En*i*(1-i)),u=s?Math.atan2(a,o)*Ze-120:NaN;return new kn(u<0?u+360:u,s,i,t.opacity)}(t):new kn(t,e,n,null==r?1:r)}function kn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Nn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Se(kn,Sn,ke(Ne,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Je,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(_n*r+wn*i)),255*(e+n*(En*r)),this.opacity)}}));var An=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Nn((n-r/e)*e,a,i,o,s)}},In=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Nn((n-r/e)*e,i,o,a,s)}},On=function(t){return function(){return t}};function Pn(t,e){return function(n){return t+n*e}}function Rn(t,e){var n=e-t;return n?Pn(t,n>180||n<-180?n-360*Math.round(n/360):n):On(isNaN(t)?e:t)}function Dn(t){return 1==(t=+t)?Mn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):On(isNaN(e)?n:e)}}function Mn(t,e){var n=e-t;return n?Pn(t,n):On(isNaN(t)?e:t)}var Ln=function t(e){var n=Dn(e);function r(t,e){var r=n((t=ze(t)).r,(e=ze(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Mn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Fn(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ze(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}var Un=Fn(An),jn=Fn(In),Bn=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=$n(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}},qn=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Vn=function(t,e){return e-=t=+t,function(n){return t+e*n}},Wn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=$n(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Hn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zn=new RegExp(Hn.source,"g");var Kn,Gn,Qn,Yn,Xn=function(t,e){var n,r,i,o=Hn.lastIndex=zn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Hn.exec(t))&&(r=zn.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Vn(n,r)})),o=zn.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},$n=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?On(e):("number"===r?Vn:"string"===r?(n=qe(e))?(e=n,Ln):Xn:e instanceof qe?Ln:e instanceof Date?qn:Array.isArray(e)?Bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Wn:Vn)(t,e)},Jn=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},Zn=180/Math.PI,tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},er=function(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Zn,skewX:Math.atan(u)*Zn,scaleX:a,scaleY:s}};function nr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Vn(t,i)},{i:u-2,x:Vn(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Vn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Vn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Vn(t,n)},{i:s-2,x:Vn(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var rr=nr(function(t){return"none"===t?tr:(Kn||(Kn=document.createElement("DIV"),Gn=document.documentElement,Qn=document.defaultView),Kn.style.transform=t,t=Qn.getComputedStyle(Gn.appendChild(Kn),null).getPropertyValue("transform"),Gn.removeChild(Kn),t=t.slice(7,-1).split(","),er(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),ir=nr(function(t){return null==t?tr:(Yn||(Yn=document.createElementNS("http://www.w3.org/2000/svg","g")),Yn.setAttribute("transform",t),(t=Yn.transform.baseVal.consolidate())?(t=t.matrix,er(t.a,t.b,t.c,t.d,t.e,t.f)):tr)},", ",")",")"),or=Math.SQRT2;function ar(t){return((t=Math.exp(t))+1/t)/2}var sr=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],c=e[2],l=s-i,f=u-o,h=l*l+f*f;if(h<1e-12)r=Math.log(c/a)/or,n=function(t){return[i+t*l,o+t*f,a*Math.exp(or*t*r)]};else{var p=Math.sqrt(h),d=(c*c-a*a+4*h)/(2*a*2*p),v=(c*c-a*a-4*h)/(2*c*2*p),m=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-m)/or,n=function(t){var e,n=t*r,s=ar(m),u=a/(2*p)*(s*(e=or*n+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[i+u*l,o+u*f,a*s/ar(or*n+m)]}}return n.duration=1e3*r,n};function ur(t){return function(e,n){var r=t((e=Ye(e)).h,(n=Ye(n)).h),i=Mn(e.s,n.s),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var cr=ur(Rn),lr=ur(Mn);function fr(t,e){var n=Mn((t=ln(t)).l,(e=ln(e)).l),r=Mn(t.a,e.a),i=Mn(t.b,e.b),o=Mn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function hr(t){return function(e,n){var r=t((e=gn(e)).h,(n=gn(n)).h),i=Mn(e.c,n.c),o=Mn(e.l,n.l),a=Mn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var pr=hr(Rn),dr=hr(Mn);function vr(t){return function e(n){function r(e,r){var i=t((e=Sn(e)).h,(r=Sn(r)).h),o=Mn(e.s,r.s),a=Mn(e.l,r.l),s=Mn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var mr=vr(Rn),yr=vr(Mn);function gr(t,e){for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}}var br,_r,wr=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Er=0,Tr=0,Cr=0,xr=1e3,Sr=0,kr=0,Nr=0,Ar="object"==typeof performance&&performance.now?performance:Date,Ir="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Or(){return kr||(Ir(Pr),kr=Ar.now()+Nr)}function Pr(){kr=0}function Rr(){this._call=this._time=this._next=null}function Dr(t,e,n){var r=new Rr;return r.restart(t,e,n),r}function Mr(){Or(),++Er;for(var t,e=br;e;)(t=kr-e._time)>=0&&e._call.call(null,t),e=e._next;--Er}function Lr(){kr=(Sr=Ar.now())+Nr,Er=Tr=0;try{Mr()}finally{Er=0,function(){var t,e,n=br,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:br=e);_r=t,Ur(r)}(),kr=0}}function Fr(){var t=Ar.now(),e=t-Sr;e>xr&&(Nr-=e,Sr=t)}function Ur(t){Er||(Tr&&(Tr=clearTimeout(Tr)),t-kr>24?(t<1/0&&(Tr=setTimeout(Lr,t-Ar.now()-Nr)),Cr&&(Cr=clearInterval(Cr))):(Cr||(Sr=Ar.now(),Cr=setInterval(Fr,xr)),Er=1,Ir(Lr)))}Rr.prototype=Dr.prototype={constructor:Rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Or():+n)+(null==e?0:+e),this._next||_r===this||(_r?_r._next=this:br=this,_r=this),this._call=t,this._time=n,Ur()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ur())}};var jr=function(t,e,n){var r=new Rr;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Br=function(t,e,n){var r=new Rr,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?Or():+n,r.restart(function o(a){a+=i,r.restart(o,i+=e,n),t(a)},e,n),r)},qr=ht("start","end","interrupt"),Vr=[],Wr=0,Hr=1,zr=2,Kr=3,Gr=4,Qr=5,Yr=6,Xr=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var c,l,f,h;if(n.state!==Hr)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===Kr)return jr(o);h.state===Gr?(h.state=Yr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=Yr,h.timer.stop(),delete i[c])}if(jr(function(){n.state===Kr&&(n.state=Gr,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=zr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===zr){for(n.state=Kr,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=Qr,1),o=-1,a=r.length;++o<a;)r[o].call(null,i);n.state===Qr&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=Yr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Dr(function(t){n.state=Hr,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:qr,tween:Vr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Wr})};function $r(t,e){var n=Zr(t,e);if(n.state>Wr)throw new Error("too late; already scheduled");return n}function Jr(t,e){var n=Zr(t,e);if(n.state>zr)throw new Error("too late; already started");return n}function Zr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var ti=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>zr&&n.state<Qr,n.state=Yr,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}};function ei(t,e,n){var r=t._id;return t.each(function(){var t=Jr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Zr(t,r).value[e]}}var ni=function(t,e){var n;return("number"==typeof e?Vn:e instanceof qe?Ln:(n=qe(e))?(e=n,Ln):Xn)(t,e)};var ri=re.prototype.constructor;var ii=0;function oi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ai(t){return re().transition(t)}function si(){return++ii}var ui=re.prototype;function ci(t){return+t}function li(t){return t*t}function fi(t){return t*(2-t)}function hi(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function pi(t){return t*t*t}function di(t){return--t*t*t+1}function vi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}oi.prototype=ai.prototype={constructor:oi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,f=o[a]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Xr(f[h],e,n,h,f,Zr(s,n)));return new oi(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_t(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,f=0;f<l;++f)if(u=c[f]){for(var h,p=t.call(u,u.__data__,f,c),d=Zr(u,n),v=0,m=p.length;v<m;++v)(h=p[v])&&Xr(h,e,n,v,p,d);o.push(p),a.push(u)}return new oi(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Ct(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new oi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],f=c.length,h=a[s]=new Array(f),p=0;p<f;++p)(u=c[p]||l[p])&&(h[p]=u);for(;s<r;++s)a[s]=e[s];return new oi(a,this._parents,this._name,this._id)},selection:function(){return new ri(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=si(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=Zr(a,e);Xr(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new oi(r,this._parents,t,n)},call:ui.call,nodes:ui.nodes,node:ui.node,size:ui.size,empty:ui.empty,each:ui.each,on:function(t,e){var n=this._id;return arguments.length<2?Zr(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?$r:Jr;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=vt(t),r="transform"===n?ir:ni;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,o;return function(){var a,s=n(this);if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}})(n,r,ei(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}:function(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}})(n,r,e+""))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=vt(t);return this.tween(n,(r.local?function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}:function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n})(r,e))},style:function(t,e,n){var r="transform"==(t+="")?rr:ni;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Pt(this,t),a=(this.style.removeProperty(t),Pt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof e?function(t,e,n){var r,i,o;return function(){var a=Pt(this,t),s=n(this);return null==s&&(this.style.removeProperty(t),s=Pt(this,t)),a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,r,ei(this,"style."+t,e)):function(t,e,n){var r,i;return function(){var o=Pt(this,t);return o===n?null:o===r?i:i=e(r=o,n)}}(t,r,e+""),n)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Zr(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=Jr(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Jr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){$r(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){$r(this,t).delay=e}})(e,t)):Zr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){Jr(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){Jr(this,t).duration=e}})(e,t)):Zr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Jr(this,t).ease=e}}(e,t)):Zr(this.node(),e).ease}};var mi=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),yi=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),gi=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),bi=Math.PI,_i=bi/2;function wi(t){return 1-Math.cos(t*_i)}function Ei(t){return Math.sin(t*_i)}function Ti(t){return(1-Math.cos(bi*t))/2}function Ci(t){return Math.pow(2,10*t-10)}function xi(t){return 1-Math.pow(2,-10*t)}function Si(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function ki(t){return 1-Math.sqrt(1-t*t)}function Ni(t){return Math.sqrt(1- --t*t)}function Ai(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ii=4/11,Oi=6/11,Pi=8/11,Ri=.75,Di=9/11,Mi=10/11,Li=.9375,Fi=21/22,Ui=63/64,ji=1/Ii/Ii;function Bi(t){return 1-qi(1-t)}function qi(t){return(t=+t)<Ii?ji*t*t:t<Pi?ji*(t-=Oi)*t+Ri:t<Mi?ji*(t-=Di)*t+Li:ji*(t-=Fi)*t+Ui}function Vi(t){return((t*=2)<=1?1-qi(1-t):qi(t-1)+1)/2}var Wi=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Hi=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),zi=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Ki=2*Math.PI,Gi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Qi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Yi=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ki);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Ki)},i.period=function(n){return t(e,n)},i}(1,.3),Xi={time:null,delay:0,duration:250,ease:vi};function $i(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Xi.time=Or(),Xi;return n}re.prototype.interrupt=function(t){return this.each(function(){ti(this,t)})},re.prototype.transition=function(t){var e,n;t instanceof oi?(e=t._id,t=t._name):(e=si(),(n=Xi).time=Or(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)(a=s[c])&&Xr(a,t,e,c,s,n||$i(a,e));return new oi(r,this._parents,t,e)};var Ji=[null],Zi=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>Hr&&n.name===e)return new oi(t,Ji,e,+r);return null},to=function(t){return function(){return t}},eo=function(t,e,n){this.target=t,this.type=e,this.selection=n};function no(){Gt.stopImmediatePropagation()}var ro=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()},io={name:"drag"},oo={name:"space"},ao={name:"handle"},so={name:"center"},uo={name:"x",handles:["e","w"].map(yo),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},co={name:"y",handles:["n","s"].map(yo),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},lo={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(yo),input:function(t){return t},output:function(t){return t}},fo={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ho={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},po={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vo={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},mo={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function yo(t){return{type:t}}function go(){return!Gt.button}function bo(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function _o(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function wo(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Eo(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function To(){return So(uo)}function Co(){return So(co)}var xo=function(){return So(lo)};function So(t){var e,n=bo,r=go,i=ht(a,"start","brush","end"),o=6;function a(e){var n=e.property("__brush",f).selectAll(".overlay").data([yo("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",fo.overlay).merge(n).each(function(){var t=_o(this).extent;ie(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([yo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",fo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return fo[t.type]}),e.each(s).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function s(){var t=ie(this),e=_o(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-o/2:e[0][0]-o/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-o/2:e[0][1]-o/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+o:o}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+o:o})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e){return t.__brush.emitter||new c(t,e)}function c(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function l(){if(Gt.touches){if(Gt.changedTouches.length<Gt.touches.length)return ro()}else if(e)return;if(r.apply(this,arguments)){var n,i,o,a,c,l,f,h,p,d,v,m,y,g=this,b=Gt.target.__data__.type,_="selection"===(Gt.metaKey?b="overlay":b)?io:Gt.altKey?so:ao,w=t===co?null:vo[b],E=t===uo?null:mo[b],T=_o(g),C=T.extent,x=T.selection,S=C[0][0],k=C[0][1],N=C[1][0],A=C[1][1],I=w&&E&&Gt.shiftKey,O=fe(g),P=O,R=u(g,arguments).beforestart();"overlay"===b?T.selection=x=[[n=t===co?S:O[0],o=t===uo?k:O[1]],[c=t===co?N:n,f=t===uo?A:o]]:(n=x[0][0],o=x[0][1],c=x[1][0],f=x[1][1]),i=n,a=o,l=c,h=f;var D=ie(g).attr("pointer-events","none"),M=D.selectAll(".overlay").attr("cursor",fo[b]);if(Gt.touches)D.on("touchmove.brush",F,!0).on("touchend.brush touchcancel.brush",j,!0);else{var L=ie(Gt.view).on("keydown.brush",function(){switch(Gt.keyCode){case 16:I=w&&E;break;case 18:_===ao&&(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so,U());break;case 32:_!==ao&&_!==so||(w<0?c=l-p:w>0&&(n=i-p),E<0?f=h-d:E>0&&(o=a-d),_=oo,M.attr("cursor",fo.selection),U());break;default:return}ro()},!0).on("keyup.brush",function(){switch(Gt.keyCode){case 16:I&&(m=y=I=!1,U());break;case 18:_===so&&(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao,U());break;case 32:_===oo&&(Gt.altKey?(w&&(c=l-p*w,n=i+p*w),E&&(f=h-d*E,o=a+d*E),_=so):(w<0?c=l:w>0&&(n=i),E<0?f=h:E>0&&(o=a),_=ao),M.attr("cursor",fo[b]),U());break;default:return}ro()},!0).on("mousemove.brush",F,!0).on("mouseup.brush",j,!0);ye(Gt.view)}no(),ti(g),s.call(g),R.start()}function F(){var t=fe(g);!I||m||y||(Math.abs(t[0]-P[0])>Math.abs(t[1]-P[1])?y=!0:m=!0),P=t,v=!0,ro(),U()}function U(){var t;switch(p=P[0]-O[0],d=P[1]-O[1],_){case oo:case io:w&&(p=Math.max(S-n,Math.min(N-c,p)),i=n+p,l=c+p),E&&(d=Math.max(k-o,Math.min(A-f,d)),a=o+d,h=f+d);break;case ao:w<0?(p=Math.max(S-n,Math.min(N-n,p)),i=n+p,l=c):w>0&&(p=Math.max(S-c,Math.min(N-c,p)),i=n,l=c+p),E<0?(d=Math.max(k-o,Math.min(A-o,d)),a=o+d,h=f):E>0&&(d=Math.max(k-f,Math.min(A-f,d)),a=o,h=f+d);break;case so:w&&(i=Math.max(S,Math.min(N,n-p*w)),l=Math.max(S,Math.min(N,c+p*w))),E&&(a=Math.max(k,Math.min(A,o-d*E)),h=Math.max(k,Math.min(A,f+d*E)))}l<i&&(w*=-1,t=n,n=c,c=t,t=i,i=l,l=t,b in ho&&M.attr("cursor",fo[b=ho[b]])),h<a&&(E*=-1,t=o,o=f,f=t,t=a,a=h,h=t,b in po&&M.attr("cursor",fo[b=po[b]])),T.selection&&(x=T.selection),m&&(i=x[0][0],l=x[1][0]),y&&(a=x[0][1],h=x[1][1]),x[0][0]===i&&x[0][1]===a&&x[1][0]===l&&x[1][1]===h||(T.selection=[[i,a],[l,h]],s.call(g),R.brush())}function j(){if(no(),Gt.touches){if(Gt.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500),D.on("touchmove.brush touchend.brush touchcancel.brush",null)}else ge(Gt.view,v),L.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),M.attr("cursor",fo.overlay),T.selection&&(x=T.selection),wo(x)&&(T.selection=null,s.call(g)),R.end()}}function f(){var e=this.__brush||{selection:null};return e.extent=n.apply(this,arguments),e.dim=t,e}return a.move=function(e,n){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var e=this,r=e.__brush,i=u(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),c=$n(o,a);function l(t){r.selection=1===t&&wo(a)?null:c(t),s.call(e),i.brush()}return o&&a?l:l(1)}):e.each(function(){var e=arguments,r=this.__brush,i=t.input("function"==typeof n?n.apply(this,e):n,r.extent),o=u(this,e).beforestart();ti(this),r.selection=null==i||wo(i)?null:i,s.call(this),o.start().brush().end()})},c.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){Jt(new eo(a,e,t.output(this.state.selection)),i.apply,i,[e,this.that,this.args])}},a.extent=function(t){return arguments.length?(n="function"==typeof t?t:to([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),a):n},a.filter=function(t){return arguments.length?(r="function"==typeof t?t:to(!!t),a):r},a.handleSize=function(t){return arguments.length?(o=+t,a):o},a.on=function(){var t=i.on.apply(i,arguments);return t===i?a:t},a}var ko=Math.cos,No=Math.sin,Ao=Math.PI,Io=Ao/2,Oo=2*Ao,Po=Math.max;var Ro=function(){var t=0,e=null,n=null,r=null;function i(i){var o,a,s,u,c,l,f=i.length,h=[],p=E(f),d=[],v=[],m=v.groups=new Array(f),y=new Array(f*f);for(o=0,c=-1;++c<f;){for(a=0,l=-1;++l<f;)a+=i[c][l];h.push(a),d.push(E(f)),o+=a}for(e&&p.sort(function(t,n){return e(h[t],h[n])}),n&&d.forEach(function(t,e){t.sort(function(t,r){return n(i[e][t],i[e][r])})}),u=(o=Po(0,Oo-t*f)/o)?t:Oo/f,a=0,c=-1;++c<f;){for(s=a,l=-1;++l<f;){var g=p[c],b=d[g][l],_=i[g][b],w=a,T=a+=_*o;y[b*f+g]={index:g,subindex:b,startAngle:w,endAngle:T,value:_}}m[g]={index:g,startAngle:s,endAngle:a,value:h[g]},a+=u}for(c=-1;++c<f;)for(l=c-1;++l<f;){var C=y[l*f+c],x=y[c*f+l];(C.value||x.value)&&v.push(C.value<x.value?{source:x,target:C}:{source:C,target:x})}return r?v.sort(r):v}return i.padAngle=function(e){return arguments.length?(t=Po(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(e=t,r=function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)})._=t,i):r&&r._;var e},i},Do=Array.prototype.slice,Mo=function(t){return function(){return t}},Lo=Math.PI,Fo=2*Lo,Uo=Fo-1e-6;function jo(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Bo(){return new jo}jo.prototype=Bo.prototype={constructor:jo,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,c=o-t,l=a-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-o,p=r-a,d=s*s+u*u,v=h*h+p*p,m=Math.sqrt(d),y=Math.sqrt(f),g=i*Math.tan((Lo-Math.acos((d+f-v)/(2*m*y)))/2),b=g/y,_=g/m;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*p)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,c=e+s,l=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Fo+Fo),f>Uo?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Lo)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var qo=Bo;function Vo(t){return t.source}function Wo(t){return t.target}function Ho(t){return t.radius}function zo(t){return t.startAngle}function Ko(t){return t.endAngle}var Go=function(){var t=Vo,e=Wo,n=Ho,r=zo,i=Ko,o=null;function a(){var a,s=Do.call(arguments),u=t.apply(this,s),c=e.apply(this,s),l=+n.apply(this,(s[0]=u,s)),f=r.apply(this,s)-Io,h=i.apply(this,s)-Io,p=l*ko(f),d=l*No(f),v=+n.apply(this,(s[0]=c,s)),m=r.apply(this,s)-Io,y=i.apply(this,s)-Io;if(o||(o=a=qo()),o.moveTo(p,d),o.arc(0,0,l,f,h),f===m&&h===y||(o.quadraticCurveTo(0,0,v*ko(m),v*No(m)),o.arc(0,0,v,m,y)),o.quadraticCurveTo(0,0,p,d),o.closePath(),a)return o=null,a+""||null}return a.radius=function(t){return arguments.length?(n="function"==typeof t?t:Mo(+t),a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Mo(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Mo(+t),a):i},a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(t){return arguments.length?(e=t,a):e},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a};function Qo(){}function Yo(t,e){var n=new Qo;if(t instanceof Qo)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Qo.prototype=Yo.prototype={constructor:Qo,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Xo=Yo,$o=function(){var t,e,n,r=[],i=[];function o(n,i,a,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,c,l,f=-1,h=n.length,p=r[i++],d=Xo(),v=a();++f<h;)(l=d.get(u=p(c=n[f])+""))?l.push(c):d.set(u,[c]);return d.each(function(t,e){s(v,e,o(t,i,a,s))}),v}return n={object:function(t){return o(t,0,Jo,Zo)},map:function(t){return o(t,0,ta,ea)},entries:function(t){return function t(n,o){if(++o>r.length)return n;var a,s=i[o-1];return null!=e&&o>=r.length?a=n.entries():(a=[],n.each(function(e,n){a.push({key:n,values:t(e,o)})})),null!=s?a.sort(function(t,e){return s(t.key,e.key)}):a}(o(t,0,ta,ea),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Jo(){return{}}function Zo(t,e,n){t[e]=n}function ta(){return Xo()}function ea(t,e,n){t.set(e,n)}function na(){}var ra=Xo.prototype;function ia(t,e){var n=new na;if(t instanceof na)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}na.prototype=ia.prototype={constructor:na,has:ra.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ra.remove,clear:ra.clear,values:ra.keys,size:ra.size,empty:ra.empty,each:ra.each};var oa=ia,aa=function(t){var e=[];for(var n in t)e.push(n);return e},sa=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ca=Array.prototype.slice,la=function(t,e){return t-e},fa=function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r},ha=function(t){return function(){return t}},pa=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=da(t,e[r]))return n;return 0};function da(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],f=t[s],h=f[0],p=f[1];if(va(u,f,e))return 0;l>r!=p>r&&n<(h-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function va(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}var ma=function(){},ya=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],ga=function(){var t=1,e=1,n=A,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(la);else{var r=m(t),i=r[0],a=r[1];e=N(i,a,e),e=E(Math.floor(i/e)*e,Math.floor(a/e)*e,e)}return e.map(function(e){return o(t,e)})}function o(n,i){var o=[],s=[];return function(n,r,i){var o,s,u,c,l,f,h=new Array,p=new Array;o=s=-1,c=n[0]>=r,ya[c<<1].forEach(d);for(;++o<t-1;)u=c,c=n[o+1]>=r,ya[u|c<<1].forEach(d);ya[c<<0].forEach(d);for(;++s<e-1;){for(o=-1,c=n[s*t+t]>=r,l=n[s*t]>=r,ya[c<<1|l<<2].forEach(d);++o<t-1;)u=c,c=n[s*t+t+o+1]>=r,f=l,l=n[s*t+o+1]>=r,ya[u|c<<1|l<<2|f<<3].forEach(d);ya[c|l<<3].forEach(d)}o=-1,l=n[s*t]>=r,ya[l<<2].forEach(d);for(;++o<t-1;)f=l,l=n[s*t+o+1]>=r,ya[l<<2|f<<3].forEach(d);function d(t){var e,n,r=[t[0][0]+o,t[0][1]+s],u=[t[1][0]+o,t[1][1]+s],c=a(r),l=a(u);(e=p[c])?(n=h[l])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(u),p[e.end=l]=e):(e=h[l])?(n=p[c])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=c]=e):h[c]=p[l]={start:c,end:l,ring:[r,u]}}ya[l<<3].forEach(d)}(n,i,function(t){r(t,n,i),fa(t)>0?o.push([t]):s.push(t)}),s.forEach(function(t){for(var e,n=0,r=o.length;n<r;++n)if(-1!==pa((e=o[n])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:i,coordinates:o}}function a(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach(function(n){var o,a=n[0],s=n[1],u=0|a,c=0|s,l=r[c*t+u];a>0&&a<t&&u===a&&(o=r[c*t+u-1],n[0]=a+(i-o)/(l-o)-.5),s>0&&s<e&&c===s&&(o=r[(c-1)*t+u],n[1]=s+(i-o)/(l-o)-.5)})}return i.contour=o,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),o=Math.ceil(n[1]);if(!(r>0&&o>0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:ma,i):r===s},i};function ba(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<i;++a)for(var s=0,u=0;s<r+n;++s)s<r&&(u+=t.data[s+a*r]),s>=n&&(s>=o&&(u-=t.data[s-o+a*r]),e.data[s-n+a*r]=u/Math.min(s+1,r-1+o-s,o))}function _a(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<r;++a)for(var s=0,u=0;s<i+n;++s)s<i&&(u+=t.data[a+s*r]),s>=n&&(s>=o&&(u-=t.data[a+(s-o)*r]),e.data[a+(s-n)*r]=u/Math.min(s+1,i-1+o-s,o))}function wa(t){return t[0]}function Ea(t){return t[1]}var Ta=function(){var t=wa,e=Ea,n=960,r=500,i=20,o=2,a=3*i,s=n+2*a>>o,u=r+2*a>>o,c=ha(20);function l(n){var r=new Float32Array(s*u),l=new Float32Array(s*u);n.forEach(function(n,i,c){var l=t(n,i,c)+a>>o,f=e(n,i,c)+a>>o;l>=0&&l<s&&f>=0&&f<u&&++r[l+f*s]}),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o),ba({width:s,height:u,data:r},{width:s,height:u,data:l},i>>o),_a({width:s,height:u,data:l},{width:s,height:u,data:r},i>>o);var h=c(r);if(!Array.isArray(h)){var p=D(r);h=N(0,p,h),(h=E(0,Math.floor(p/h)*h,h)).shift()}return ga().thresholds(h).size([s,u])(r).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(h),t}function h(t){t.forEach(p)}function p(t){t.forEach(d)}function d(t){t[0]=t[0]*Math.pow(2,o)-a,t[1]=t[1]*Math.pow(2,o)-a}function v(){return s=n+2*(a=3*i)>>o,u=r+2*a>>o,l}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:ha(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:ha(+t),l):e},l.size=function(t){if(!arguments.length)return[n,r];var e=Math.ceil(t[0]),i=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return n=e,r=i,v()},l.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),v()},l.thresholds=function(t){return arguments.length?(c="function"==typeof t?t:Array.isArray(t)?ha(ca.call(t)):ha(t),l):c},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(i*(i+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return i=Math.round((Math.sqrt(4*t*t+1)-1)/2),v()},l},Ca={},xa={},Sa=34,ka=10,Na=13;function Aa(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}var Ia=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,c=!1;function l(){if(u)return xa;if(c)return c=!1,Ca;var e,r,i=a;if(t.charCodeAt(i)===Sa){for(;a++<o&&t.charCodeAt(a)!==Sa||t.charCodeAt(++a)===Sa;);return(e=a)>=o?u=!0:(r=t.charCodeAt(a++))===ka?c=!0:r===Na&&(c=!0,t.charCodeAt(a)===ka&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if((r=t.charCodeAt(e=a++))===ka)c=!0;else if(r===Na)c=!0,t.charCodeAt(a)===ka&&++a;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===ka&&--o,t.charCodeAt(o-1)===Na&&--o;(r=l())!==xa;){for(var f=[];r!==Ca&&r!==xa;)f.push(r),r=l();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e){return e.map(o).join(t)}function o(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Aa(t);return function(r,i){return e(n(r),i,t)}}(t,e):Aa(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=function(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}(e)),[n.map(o).join(t)].concat(e.map(function(e){return n.map(function(t){return o(e[t])}).join(t)})).join("\n")},formatRows:function(t){return t.map(i).join("\n")}}},Oa=Ia(","),Pa=Oa.parse,Ra=Oa.parseRows,Da=Oa.format,Ma=Oa.formatRows,La=Ia("\t"),Fa=La.parse,Ua=La.parseRows,ja=La.format,Ba=La.formatRows;function qa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var Va=function(t,e){return fetch(t,e).then(qa)};function Wa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var Ha=function(t,e){return fetch(t,e).then(Wa)};function za(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Ka=function(t,e){return fetch(t,e).then(za)};function Ga(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Ka(e,n).then(function(e){return t(e,r)})}}function Qa(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Ia(t);return Ka(e,n).then(function(t){return i.parse(t,r)})}var Ya=Ga(Pa),Xa=Ga(Fa),$a=function(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})};function Ja(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var Za=function(t,e){return fetch(t,e).then(Ja)};function ts(t){return function(e,n){return Ka(e,n).then(function(e){return(new DOMParser).parseFromString(e,t)})}}var es=ts("application/xml"),ns=ts("text/html"),rs=ts("image/svg+xml"),is=function(t,e){var n;function r(){var r,i,o=n.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=n[r]).x,s+=i.y;for(a=a/o-t,s=s/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},os=function(t){return function(){return t}},as=function(){return 1e-6*(Math.random()-.5)};function ss(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,c,l,f,h,p=t._root,d={data:r},v=t._x0,m=t._y0,y=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a,i=p,!(p=p[f=l<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===s&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(o=(v+y)/2))?v=o:y=o,(l=n>=(a=(m+g)/2))?m=a:g=a}while((f=l<<1|c)==(h=(u>=a)<<1|s>=o));return i[h]=p,i[f]=d,t}var us=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function cs(t){return t[0]}function ls(t){return t[1]}function fs(t,e,n){var r=new hs(null==e?cs:e,null==n?ls:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function hs(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ps(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ds=fs.prototype=hs.prototype;function vs(t){return t.x+t.vx}function ms(t){return t.y+t.vy}ds.copy=function(){var t,e,n=new hs(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ps(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ps(e));return n},ds.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ss(this.cover(e,n),e,n,t)},ds.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,s[n]=i,r<u&&(u=r),r>l&&(l=r),i<c&&(c=i),i>f&&(f=i));for(l<u&&(u=this._x0,l=this._x1),f<c&&(c=this._y0,f=this._y1),this.cover(u,c).cover(l,f),n=0;n<o;++n)ss(this,a[n],s[n],t[n]);return this},ds.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>o))return this;var a,s,u=i-n,c=this._root;switch(s=(e<(r+o)/2)<<1|t<(n+i)/2){case 0:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),t>(i=n+u)||e>o);break;case 1:do{(a=new Array(4))[s]=c,c=a}while(o=r+(u*=2),(n=i-u)>t||e>o);break;case 2:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),t>(i=n+u)||r>e);break;case 3:do{(a=new Array(4))[s]=c,c=a}while(r=o-(u*=2),(n=i-u)>t||r>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},ds.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},ds.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ds.find=function(t,e,n){var r,i,o,a,s,u,c,l=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new us(v,l,f,h,p)),null==n?n=1/0:(l=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(v=u.node)||(i=u.x0)>h||(o=u.y0)>p||(a=u.x1)<l||(s=u.y1)<f))if(v.length){var m=(i+a)/2,y=(o+s)/2;d.push(new us(v[3],m,y,a,s),new us(v[2],i,y,m,s),new us(v[1],m,o,a,y),new us(v[0],i,o,m,y)),(c=(e>=y)<<1|t>=m)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}else{var g=t-+this._x.call(null,v.data),b=e-+this._y.call(null,v.data),_=g*g+b*b;if(_<n){var w=Math.sqrt(n=_);l=t-w,f=e-w,h=t+w,p=e+w,r=v.data}}return r},ds.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,c,l,f,h,p=this._root,d=this._x0,v=this._y0,m=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(s=(d+m)/2))?d=s:m=s,(l=a>=(u=(v+y)/2))?v=u:y=u,e=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},ds.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ds.root=function(){return this._root},ds.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},ds.visit=function(t){var e,n,r,i,o,a,s=[],u=this._root;for(u&&s.push(new us(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&u.length){var c=(r+o)/2,l=(i+a)/2;(n=u[3])&&s.push(new us(n,c,l,o,a)),(n=u[2])&&s.push(new us(n,r,l,c,a)),(n=u[1])&&s.push(new us(n,c,i,o,l)),(n=u[0])&&s.push(new us(n,r,i,c,l))}return this},ds.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new us(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,u=e.x1,c=e.y1,l=(a+u)/2,f=(s+c)/2;(o=i[0])&&n.push(new us(o,a,s,l,f)),(o=i[1])&&n.push(new us(o,l,s,u,f)),(o=i[2])&&n.push(new us(o,a,f,l,c)),(o=i[3])&&n.push(new us(o,l,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ds.x=function(t){return arguments.length?(this._x=t,this):this._x},ds.y=function(t){return arguments.length?(this._y=t,this):this._y};var ys=function(t){var e,n,r=1,i=1;function o(){for(var t,o,s,u,c,l,f,h=e.length,p=0;p<i;++p)for(o=fs(e,vs,ms).visitAfter(a),t=0;t<h;++t)s=e[t],l=n[s.index],f=l*l,u=s.x+s.vx,c=s.y+s.vy,o.visit(d);function d(t,e,n,i,o){var a=t.data,h=t.r,p=l+h;if(!a)return e>u+p||i<u-p||n>c+p||o<c-p;if(a.index>s.index){var d=u-a.x-a.vx,v=c-a.y-a.vy,m=d*d+v*v;m<p*p&&(0===d&&(m+=(d=as())*d),0===v&&(m+=(v=as())*v),m=(p-(m=Math.sqrt(m)))/m*r,s.vx+=(d*=m)*(p=(h*=h)/(f+h)),s.vy+=(v*=m)*p,a.vx-=d*(p=1-p),a.vy-=v*p)}}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=os(null==t?1:+t)),o.initialize=function(t){e=t,s()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),s(),o):t},o};function gs(t){return t.index}function bs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var _s=function(t){var e,n,r,i,o,a=gs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=os(30),c=1;function l(r){for(var i=0,a=t.length;i<c;++i)for(var s,u,l,f,h,p,d,v=0;v<a;++v)u=(s=t[v]).source,f=(l=s.target).x+l.vx-u.x-u.vx||as(),h=l.y+l.vy-u.y-u.vy||as(),f*=p=((p=Math.sqrt(f*f+h*h))-n[v])/p*r*e[v],h*=p,l.vx-=f*(d=o[v]),l.vy-=h*d,u.vx+=f*(d=1-d),u.vy+=h*d}function f(){if(r){var s,u,c=r.length,l=t.length,f=Xo(r,a);for(s=0,i=new Array(c);s<l;++s)(u=t[s]).index=s,"object"!=typeof u.source&&(u.source=bs(f,u.source)),"object"!=typeof u.target&&(u.target=bs(f,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(s=0,o=new Array(l);s<l;++s)u=t[s],o[s]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);e=new Array(l),h(),n=new Array(l),p()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function p(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,f()},l.links=function(e){return arguments.length?(t=e,f(),l):t},l.id=function(t){return arguments.length?(a=t,l):a},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:os(+t),h(),l):s},l.distance=function(t){return arguments.length?(u="function"==typeof t?t:os(+t),p(),l):u},l};function ws(t){return t.x}function Es(t){return t.y}var Ts=10,Cs=Math.PI*(3-Math.sqrt(5)),xs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=Xo(),u=Dr(l),c=ht("tick","end");function l(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(){var e,r,u=t.length;for(n+=(o-n)*i,s.each(function(t){t(n)}),e=0;e<u;++e)null==(r=t[e]).fx?r.x+=r.vx*=a:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=a:(r.y=r.fy,r.vy=0)}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,isNaN(e.x)||isNaN(e.y)){var i=Ts*Math.sqrt(n),o=n*Cs;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return u.restart(l),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),s.each(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)(a=(i=e-(s=t[c]).x)*i+(o=n-s.y)*o)<r&&(u=s,r=a);return u},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}},Ss=function(){var t,e,n,r,i=os(-30),o=1,a=1/0,s=.81;function u(r){var i,o=t.length,a=fs(t,ws,Es).visitAfter(l);for(n=r,i=0;i<o;++i)e=t[i],a.visit(f)}function c(){if(t){var e,n,o=t.length;for(r=new Array(o),e=0;e<o;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,o,a,s=0,u=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,i+=n*e.x,o+=n*e.y);t.x=i/u,t.y=o/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function f(t,i,u,c){if(!t.value)return!0;var l=t.x-e.x,f=t.y-e.y,h=c-i,p=l*l+f*f;if(h*h/s<p)return p<a&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)),e.vx+=l*t.value*n/p,e.vy+=f*t.value*n/p),!0;if(!(t.length||p>=a)){(t.data!==e||t.next)&&(0===l&&(p+=(l=as())*l),0===f&&(p+=(f=as())*f),p<o&&(p=Math.sqrt(o*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=l*h,e.vy+=f*h)}while(t=t.next)}}return u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),c(),u):i},u.distanceMin=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u},ks=function(t,e,n){var r,i,o,a=os(.1);function s(t){for(var a=0,s=r.length;a<s;++a){var u=r[a],c=u.x-e||1e-6,l=u.y-n||1e-6,f=Math.sqrt(c*c+l*l),h=(o[a]-f)*i[a]*t/f;u.vx+=c*h,u.vy+=l*h}}function u(){if(r){var e,n=r.length;for(i=new Array(n),o=new Array(n),e=0;e<n;++e)o[e]=+t(r[e],e,r),i[e]=isNaN(o[e])?0:+a(r[e],e,r)}}return"function"!=typeof t&&(t=os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,u()},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:os(+t),u(),s):a},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),u(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ns=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},As=function(t){var e,n,r,i=os(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=os(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:os(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:os(+e),a(),o):t},o},Is=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},Os=function(t){return(t=Is(Math.abs(t)))?t[1]:NaN},Ps=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rs(t){return new Ds(t)}function Ds(t){if(!(e=Ps.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}Rs.prototype=Ds.prototype,Ds.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ms,Ls,Fs,Us,js=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Bs=function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},qs={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Bs(100*t,e)},r:Bs,s:function(t,e){var n=Is(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ms=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Is(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Vs=function(t){return t},Ws=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Hs=function(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}):Vs,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):Vs,s=t.percent||"%";function u(t){var e=(t=Rs(t)).fill,n=t.align,u=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,p=t.precision,d=t.trim,v=t.type;"n"===v?(h=!0,v="g"):qs[v]||(null==p&&(p=12),d=!0,v="g"),(l||"0"===e&&"="===n)&&(l=!0,e="0",n="=");var m="$"===c?i[0]:"#"===c&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===c?i[1]:/[%p]/.test(v)?s:"",g=qs[v],b=/[defgprs%]/.test(v);function _(t){var i,s,c,_=m,w=y;if("c"===v)w=g(t)+w,t="";else{var E=(t=+t)<0;if(t=g(Math.abs(t),p),d&&(t=js(t)),E&&0==+t&&(E=!1),_=(E?"("===u?u:"-":"-"===u||"("===u?"":u)+_,w=("s"===v?Ws[8+Ms/3]:"")+w+(E&&"("===u?")":""),b)for(i=-1,s=t.length;++i<s;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var T=_.length+t.length+w.length,C=T<f?new Array(f-T+1).join(e):"";switch(h&&l&&(t=r(C+t,C.length?f-w.length:1/0),C=""),n){case"<":t=_+t+w+C;break;case"=":t=_+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+_+t+w+C.slice(T);break;default:t=C+_+t+w}return a(t)}return p=null==p?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var n=u(((t=Rs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3))),i=Math.pow(10,-r),o=Ws[8+r/3];return function(t){return n(i*t)+o}}}};function zs(t){return Ls=Hs(t),Fs=Ls.format,Us=Ls.formatPrefix,Ls}zs({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ks=function(t){return Math.max(0,-Os(Math.abs(t)))},Gs=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Os(e)/3)))-Os(Math.abs(t)))},Qs=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Os(e)-Os(t))+1},Ys=function(){return new Xs};function Xs(){this.reset()}Xs.prototype={constructor:Xs,reset:function(){this.s=this.t=0},add:function(t){Js($s,t,this.t),Js(this,$s.s,this.s),this.s?this.t+=$s.t:this.s=$s.t},valueOf:function(){return this.s}};var $s=new Xs;function Js(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var Zs=1e-6,tu=Math.PI,eu=tu/2,nu=tu/4,ru=2*tu,iu=180/tu,ou=tu/180,au=Math.abs,su=Math.atan,uu=Math.atan2,cu=Math.cos,lu=Math.ceil,fu=Math.exp,hu=(Math.floor,Math.log),pu=Math.pow,du=Math.sin,vu=Math.sign||function(t){return t>0?1:t<0?-1:0},mu=Math.sqrt,yu=Math.tan;function gu(t){return t>1?0:t<-1?tu:Math.acos(t)}function bu(t){return t>1?eu:t<-1?-eu:Math.asin(t)}function _u(t){return(t=du(t/2))*t}function wu(){}function Eu(t,e){t&&Cu.hasOwnProperty(t.type)&&Cu[t.type](t,e)}var Tu={Feature:function(t,e){Eu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Eu(n[r].geometry,e)}},Cu={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){xu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xu(n[r],e,0)},Polygon:function(t,e){Su(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Su(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Eu(n[r],e)}};function xu(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Su(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)xu(t[n],e,1);e.polygonEnd()}var ku,Nu,Au,Iu,Ou,Pu=function(t,e){t&&Tu.hasOwnProperty(t.type)?Tu[t.type](t,e):Eu(t,e)},Ru=Ys(),Du=Ys(),Mu={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Ru.reset(),Mu.lineStart=Lu,Mu.lineEnd=Fu},polygonEnd:function(){var t=+Ru;Du.add(t<0?ru+t:t),this.lineStart=this.lineEnd=this.point=wu},sphere:function(){Du.add(ru)}};function Lu(){Mu.point=Uu}function Fu(){ju(ku,Nu)}function Uu(t,e){Mu.point=ju,ku=t,Nu=e,Au=t*=ou,Iu=cu(e=(e*=ou)/2+nu),Ou=du(e)}function ju(t,e){e=(e*=ou)/2+nu;var n=(t*=ou)-Au,r=n>=0?1:-1,i=r*n,o=cu(e),a=du(e),s=Ou*a,u=Iu*o+s*cu(i),c=s*r*du(i);Ru.add(uu(c,u)),Au=t,Iu=o,Ou=a}var Bu=function(t){return Du.reset(),Pu(t,Mu),2*Du};function qu(t){return[uu(t[1],t[0]),bu(t[2])]}function Vu(t){var e=t[0],n=t[1],r=cu(n);return[r*cu(e),r*du(e),du(n)]}function Wu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ku(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Gu(t){var e=mu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Qu,Yu,Xu,$u,Ju,Zu,tc,ec,nc,rc,ic=Ys(),oc={point:ac,lineStart:uc,lineEnd:cc,polygonStart:function(){oc.point=lc,oc.lineStart=fc,oc.lineEnd=hc,ic.reset(),Mu.polygonStart()},polygonEnd:function(){Mu.polygonEnd(),oc.point=ac,oc.lineStart=uc,oc.lineEnd=cc,Ru<0?(Qu=-(Xu=180),Yu=-($u=90)):ic>Zs?$u=90:ic<-Zs&&(Yu=-90),rc[0]=Qu,rc[1]=Xu}};function ac(t,e){nc.push(rc=[Qu=t,Xu=t]),e<Yu&&(Yu=e),e>$u&&($u=e)}function sc(t,e){var n=Vu([t*ou,e*ou]);if(ec){var r=Hu(ec,n),i=Hu([r[1],-r[0],0],r);Gu(i),i=qu(i);var o,a=t-Ju,s=a>0?1:-1,u=i[0]*iu*s,c=au(a)>180;c^(s*Ju<u&&u<s*t)?(o=i[1]*iu)>$u&&($u=o):c^(s*Ju<(u=(u+360)%360-180)&&u<s*t)?(o=-i[1]*iu)<Yu&&(Yu=o):(e<Yu&&(Yu=e),e>$u&&($u=e)),c?t<Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t):Xu>=Qu?(t<Qu&&(Qu=t),t>Xu&&(Xu=t)):t>Ju?pc(Qu,t)>pc(Qu,Xu)&&(Xu=t):pc(t,Xu)>pc(Qu,Xu)&&(Qu=t)}else nc.push(rc=[Qu=t,Xu=t]);e<Yu&&(Yu=e),e>$u&&($u=e),ec=n,Ju=t}function uc(){oc.point=sc}function cc(){rc[0]=Qu,rc[1]=Xu,oc.point=ac,ec=null}function lc(t,e){if(ec){var n=t-Ju;ic.add(au(n)>180?n+(n>0?360:-360):n)}else Zu=t,tc=e;Mu.point(t,e),sc(t,e)}function fc(){Mu.lineStart()}function hc(){lc(Zu,tc),Mu.lineEnd(),au(ic)>Zs&&(Qu=-(Xu=180)),rc[0]=Qu,rc[1]=Xu,ec=null}function pc(t,e){return(e-=t)<0?e+360:e}function dc(t,e){return t[0]-e[0]}function vc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var mc,yc,gc,bc,_c,wc,Ec,Tc,Cc,xc,Sc,kc,Nc,Ac,Ic,Oc,Pc=function(t){var e,n,r,i,o,a,s;if($u=Xu=-(Qu=Yu=1/0),nc=[],Pu(t,oc),n=nc.length){for(nc.sort(dc),e=1,o=[r=nc[0]];e<n;++e)vc(r,(i=nc[e])[0])||vc(r,i[1])?(pc(r[0],i[1])>pc(r[0],r[1])&&(r[1]=i[1]),pc(i[0],r[1])>pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=pc(r[1],i[0]))>a&&(a=s,Qu=i[0],Xu=r[1])}return nc=rc=null,Qu===1/0||Yu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Qu,Yu],[Xu,$u]]},Rc={sphere:wu,point:Dc,lineStart:Lc,lineEnd:jc,polygonStart:function(){Rc.lineStart=Bc,Rc.lineEnd=qc},polygonEnd:function(){Rc.lineStart=Lc,Rc.lineEnd=jc}};function Dc(t,e){t*=ou;var n=cu(e*=ou);Mc(n*cu(t),n*du(t),du(e))}function Mc(t,e,n){gc+=(t-gc)/++mc,bc+=(e-bc)/mc,_c+=(n-_c)/mc}function Lc(){Rc.point=Fc}function Fc(t,e){t*=ou;var n=cu(e*=ou);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Rc.point=Uc,Mc(Ac,Ic,Oc)}function Uc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=uu(mu((a=Ic*o-Oc*i)*a+(a=Oc*r-Ac*o)*a+(a=Ac*i-Ic*r)*a),Ac*r+Ic*i+Oc*o);yc+=a,wc+=a*(Ac+(Ac=r)),Ec+=a*(Ic+(Ic=i)),Tc+=a*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}function jc(){Rc.point=Dc}function Bc(){Rc.point=Vc}function qc(){Wc(kc,Nc),Rc.point=Dc}function Vc(t,e){kc=t,Nc=e,t*=ou,e*=ou,Rc.point=Wc;var n=cu(e);Ac=n*cu(t),Ic=n*du(t),Oc=du(e),Mc(Ac,Ic,Oc)}function Wc(t,e){t*=ou;var n=cu(e*=ou),r=n*cu(t),i=n*du(t),o=du(e),a=Ic*o-Oc*i,s=Oc*r-Ac*o,u=Ac*i-Ic*r,c=mu(a*a+s*s+u*u),l=bu(c),f=c&&-l/c;Cc+=f*a,xc+=f*s,Sc+=f*u,yc+=l,wc+=l*(Ac+(Ac=r)),Ec+=l*(Ic+(Ic=i)),Tc+=l*(Oc+(Oc=o)),Mc(Ac,Ic,Oc)}var Hc=function(t){mc=yc=gc=bc=_c=wc=Ec=Tc=Cc=xc=Sc=0,Pu(t,Rc);var e=Cc,n=xc,r=Sc,i=e*e+n*n+r*r;return i<1e-12&&(e=wc,n=Ec,r=Tc,yc<Zs&&(e=gc,n=bc,r=_c),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[uu(n,e)*iu,bu(r/mu(i))*iu]},zc=function(t){return function(){return t}},Kc=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function Gc(t,e){return[t>tu?t-ru:t<-tu?t+ru:t,e]}function Qc(t,e,n){return(t%=ru)?e||n?Kc(Xc(t),$c(e,n)):Xc(t):e||n?$c(e,n):Gc}function Yc(t){return function(e,n){return[(e+=t)>tu?e-ru:e<-tu?e+ru:e,n]}}function Xc(t){var e=Yc(t);return e.invert=Yc(-t),e}function $c(t,e){var n=cu(t),r=du(t),i=cu(e),o=du(e);function a(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*n+s*r;return[uu(u*i-l*o,s*n-c*r),bu(l*i+u*o)]}return a.invert=function(t,e){var a=cu(e),s=cu(t)*a,u=du(t)*a,c=du(e),l=c*i-u*o;return[uu(u*i+c*o,s*n+l*r),bu(l*n-s*r)]},a}Gc.invert=Gc;var Jc=function(t){function e(e){return(e=t(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e}return t=Qc(t[0]*ou,t[1]*ou,t.length>2?t[2]*ou:0),e.invert=function(e){return(e=t.invert(e[0]*ou,e[1]*ou))[0]*=iu,e[1]*=iu,e},e};function Zc(t,e,n,r,i,o){if(n){var a=cu(e),s=du(e),u=r*n;null==i?(i=e+r*ru,o=e-u/2):(i=tl(a,i),o=tl(a,o),(r>0?i<o:i>o)&&(i+=r*ru));for(var c,l=i;r>0?l>o:l<o;l-=u)c=qu([a,-s*cu(l),-s*du(l)]),t.point(c[0],c[1])}}function tl(t,e){(e=Vu(e))[0]-=t,Gu(e);var n=gu(-e[1]);return((-e[2]<0?-n:n)+ru-Zs)%ru}var el=function(){var t,e,n=zc([0,0]),r=zc(90),i=zc(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=iu,n[1]*=iu}};function a(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*ou,u=i.apply(this,arguments)*ou;return t=[],e=Qc(-a[0]*ou,-a[1]*ou,0).invert,Zc(o,s,u,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:zc([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:zc(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:zc(+t),a):i},a},nl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:wu,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},rl=function(t,e){return au(t[0]-e[0])<Zs&&au(t[1]-e[1])<Zs};function il(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var ol=function(t,e,n,r,i){var o,a,s=[],u=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rl(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else s.push(n=new il(r,t,null,!0)),u.push(n.o=new il(r,null,n,!1)),s.push(n=new il(a,t,null,!1)),u.push(n.o=new il(a,null,n,!0))}}),s.length){for(u.sort(e),al(s),al(u),o=0,a=u.length;o<a;++o)u[o].e=n=!n;for(var c,l,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=c.length;o<a;++o)i.point((l=c[o])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((l=c[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function al(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var sl=Ys(),ul=function(t,e){var n=e[0],r=e[1],i=du(r),o=[du(n),-cu(n),0],a=0,s=0;sl.reset(),1===i?r=eu+Zs:-1===i&&(r=-eu-Zs);for(var u=0,c=t.length;u<c;++u)if(f=(l=t[u]).length)for(var l,f,h=l[f-1],p=h[0],d=h[1]/2+nu,v=du(d),m=cu(d),y=0;y<f;++y,p=b,v=w,m=E,h=g){var g=l[y],b=g[0],_=g[1]/2+nu,w=du(_),E=cu(_),T=b-p,C=T>=0?1:-1,x=C*T,S=x>tu,k=v*w;if(sl.add(uu(k*C*du(x),m*E+k*cu(x))),a+=S?T+C*ru:T,S^p>=n^b>=n){var N=Hu(Vu(h),Vu(g));Gu(N);var A=Hu(o,N);Gu(A);var I=(S^T>=0?-1:1)*bu(A[2]);(r>I||r===I&&(N[0]||N[1]))&&(s+=S^T>=0?1:-1)}}return(a<-Zs||a<Zs&&sl<-Zs)^1&s},cl=function(t,e,n,r){return function(i){var o,a,s,u=e(i),c=nl(),l=e(c),f=!1,h={point:p,lineStart:v,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=g,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=v,h.lineEnd=m,a=F(a);var t=ul(o,r);a.length?(f||(i.polygonStart(),f=!0),ol(a,fl,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function v(){h.point=d,u.lineStart()}function m(){h.point=p,u.lineEnd()}function y(t,e){s.push([t,e]),l.point(t,e)}function g(){l.lineStart(),s=[]}function b(){y(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,u=l.clean(),h=c.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ll))}return h}};function ll(t){return t.length>1}function fl(t,e){return((t=t.x)[0]<0?t[1]-eu-Zs:eu-t[1])-((e=e.x)[0]<0?e[1]-eu-Zs:eu-e[1])}var hl=cl(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?tu:-tu,u=au(o-n);au(u-tu)<Zs?(t.point(n,r=(r+a)/2>0?eu:-eu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=tu&&(au(n-i)<Zs&&(n-=i*Zs),au(o-s)<Zs&&(o-=s*Zs),r=function(t,e,n,r){var i,o,a=du(t-n);return au(a)>Zs?su((du(e)*(o=cu(r))*du(n)-du(r)*(i=cu(e))*du(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eu,r.point(-tu,i),r.point(0,i),r.point(tu,i),r.point(tu,0),r.point(tu,-i),r.point(0,-i),r.point(-tu,-i),r.point(-tu,0),r.point(-tu,i);else if(au(t[0]-e[0])>Zs){var o=t[0]<e[0]?tu:-tu;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-tu,-eu]);var pl=function(t){var e=cu(t),n=6*ou,r=e>0,i=au(e)>Zs;function o(t,n){return cu(t)*cu(n)>e}function a(t,n,r){var i=[1,0,0],o=Hu(Vu(t),Vu(n)),a=Wu(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var c=e*a/u,l=-e*s/u,f=Hu(i,o),h=Ku(i,c);zu(h,Ku(o,l));var p=f,d=Wu(h,p),v=Wu(p,p),m=d*d-v*(Wu(h,h)-1);if(!(m<0)){var y=mu(m),g=Ku(p,(-d-y)/v);if(zu(g,h),g=qu(g),!r)return g;var b,_=t[0],w=n[0],E=t[1],T=n[1];w<_&&(b=_,_=w,w=b);var C=w-_,x=au(C-tu)<Zs;if(!x&&T<E&&(b=E,E=T,T=b),x||C<Zs?x?E+T>0^g[1]<(au(g[0]-_)<Zs?E:T):E<=g[1]&&g[1]<=T:C>tu^(_<=g[0]&&g[0]<=w)){var S=Ku(p,(-d+y)/v);return zu(S,h),[g,qu(S)]}}}function s(e,n){var i=r?t:tu-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return cl(o,function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,h){var p,d=[f,h],v=o(f,h),m=r?v?0:s(f,h):v?s(f+(f<0?tu:-tu),h):0;if(!e&&(c=u=v)&&t.lineStart(),v!==u&&(!(p=a(e,d))||rl(e,p)||rl(d,p))&&(d[0]+=Zs,d[1]+=Zs,v=o(d[0],d[1])),v!==u)l=0,v?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^v){var y;m&n||!(y=a(d,e,!0))||(l=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||e&&rl(e,d)||t.point(d[0],d[1]),e=d,u=v,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}},function(e,r,i,o){Zc(o,t,n,i,e,r)},r?[0,-t]:[-tu,t-tu])},dl=function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=0,l=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a<c)return;a<l&&(l=a)}else if(f>0){if(a>l)return;a>c&&(c=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>l)return;a>c&&(c=a)}else if(f>0){if(a<c)return;a<l&&(l=a)}if(a=r-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<l&&(l=a)}else if(h>0){if(a>l)return;a>c&&(c=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<l&&(l=a)}return c>0&&(t[0]=s+c*f,t[1]=u+c*h),l<1&&(e[0]=s+l*f,e[1]=u+l*h),!0}}}}},vl=1e9,ml=-vl;function yl(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,c){var l=0,f=0;if(null==i||(l=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else c.point(o[0],o[1])}function a(r,i){return au(r[0]-t)<Zs?i>0?0:3:au(r[0]-n)<Zs?i>0?2:1:au(r[1]-e)<Zs?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,c,l,f,h,p,d,v,m,y,g,b=a,_=nl(),w={point:E,lineStart:function(){w.point=T,c&&c.push(l=[]);y=!0,m=!1,d=v=NaN},lineEnd:function(){u&&(T(f,h),p&&m&&_.rejoin(),u.push(_.result()));w.point=E,m&&b.lineEnd()},polygonStart:function(){b=_,u=[],c=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],u=1,l=s.length,f=s[0],h=f[0],p=f[1];u<l;++u)o=h,a=p,f=s[u],h=f[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=g&&e,i=(u=F(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ol(u,s,e,o,a),a.polygonEnd());b=a,u=c=l=null}};function E(t,e){i(t,e)&&b.point(t,e)}function T(o,a){var s=i(o,a);if(c&&l.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&m)b.point(o,a);else{var u=[d=Math.max(ml,Math.min(vl,d)),v=Math.max(ml,Math.min(vl,v))],_=[o=Math.max(ml,Math.min(vl,o)),a=Math.max(ml,Math.min(vl,a))];dl(u,_,t,e,n,r)?(m||(b.lineStart(),b.point(u[0],u[1])),b.point(_[0],_[1]),s||b.lineEnd(),g=!1):s&&(b.lineStart(),b.point(o,a),g=!1)}d=o,v=a,m=s}return w}}var gl,bl,_l,wl=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=yl(r,i,o,a)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,n):[[r,i],[o,a]]}}},El=Ys(),Tl={sphere:wu,point:wu,lineStart:function(){Tl.point=xl,Tl.lineEnd=Cl},lineEnd:wu,polygonStart:wu,polygonEnd:wu};function Cl(){Tl.point=Tl.lineEnd=wu}function xl(t,e){gl=t*=ou,bl=du(e*=ou),_l=cu(e),Tl.point=Sl}function Sl(t,e){t*=ou;var n=du(e*=ou),r=cu(e),i=au(t-gl),o=cu(i),a=r*du(i),s=_l*n-bl*r*o,u=bl*n+_l*r*o;El.add(uu(mu(a*a+s*s),u)),gl=t,bl=n,_l=r}var kl=function(t){return El.reset(),Pu(t,Tl),+El},Nl=[null,null],Al={type:"LineString",coordinates:Nl},Il=function(t,e){return Nl[0]=t,Nl[1]=e,kl(Al)},Ol={Feature:function(t,e){return Rl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rl(n[r].geometry,e))return!0;return!1}},Pl={Sphere:function(){return!0},Point:function(t,e){return Dl(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Dl(n[r],e))return!0;return!1},LineString:function(t,e){return Ml(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ml(n[r],e))return!0;return!1},Polygon:function(t,e){return Ll(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ll(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rl(n[r],e))return!0;return!1}};function Rl(t,e){return!(!t||!Pl.hasOwnProperty(t.type))&&Pl[t.type](t,e)}function Dl(t,e){return 0===Il(t,e)}function Ml(t,e){var n=Il(t[0],t[1]);return Il(t[0],e)+Il(e,t[1])<=n+Zs}function Ll(t,e){return!!ul(t.map(Fl),Ul(e))}function Fl(t){return(t=t.map(Ul)).pop(),t}function Ul(t){return[t[0]*ou,t[1]*ou]}var jl=function(t,e){return(t&&Ol.hasOwnProperty(t.type)?Ol[t.type]:Rl)(t,e)};function Bl(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function ql(t,e,n){var r=E(t,e-Zs,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Vl(){var t,e,n,r,i,o,a,s,u,c,l,f,h=10,p=h,d=90,v=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:g()}}function g(){return E(lu(r/d)*d,n,d).map(l).concat(E(lu(s/v)*v,a,v).map(f)).concat(E(lu(e/h)*h,t,h).filter(function(t){return au(t%d)>Zs}).map(u)).concat(E(lu(o/p)*p,i,p).filter(function(t){return au(t%v)>Zs}).map(c))}return y.lines=function(){return g().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(a).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(m)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],y):[d,v]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(m=+h,u=Bl(o,i,90),c=ql(e,t,m),l=Bl(s,a,90),f=ql(r,n,m),y):m},y.extentMajor([[-180,-90+Zs],[180,90-Zs]]).extentMinor([[-180,-80-Zs],[180,80+Zs]])}function Wl(){return Vl()()}var Hl,zl,Kl,Gl,Ql=function(t,e){var n=t[0]*ou,r=t[1]*ou,i=e[0]*ou,o=e[1]*ou,a=cu(r),s=du(r),u=cu(o),c=du(o),l=a*cu(n),f=a*du(n),h=u*cu(i),p=u*du(i),d=2*bu(mu(_u(o-r)+a*u*_u(i-n))),v=du(d),m=d?function(t){var e=du(t*=d)/v,n=du(d-t)/v,r=n*l+e*h,i=n*f+e*p,o=n*s+e*c;return[uu(i,r)*iu,uu(o,mu(r*r+i*i))*iu]}:function(){return[n*iu,r*iu]};return m.distance=d,m},Yl=function(t){return t},Xl=Ys(),$l=Ys(),Jl={point:wu,lineStart:wu,lineEnd:wu,polygonStart:function(){Jl.lineStart=Zl,Jl.lineEnd=nf},polygonEnd:function(){Jl.lineStart=Jl.lineEnd=Jl.point=wu,Xl.add(au($l)),$l.reset()},result:function(){var t=Xl/2;return Xl.reset(),t}};function Zl(){Jl.point=tf}function tf(t,e){Jl.point=ef,Hl=Kl=t,zl=Gl=e}function ef(t,e){$l.add(Gl*t-Kl*e),Kl=t,Gl=e}function nf(){ef(Hl,zl)}var rf=Jl,of=1/0,af=of,sf=-of,uf=sf;var cf,lf,ff,hf,pf={point:function(t,e){t<of&&(of=t);t>sf&&(sf=t);e<af&&(af=e);e>uf&&(uf=e)},lineStart:wu,lineEnd:wu,polygonStart:wu,polygonEnd:wu,result:function(){var t=[[of,af],[sf,uf]];return sf=uf=-(af=of=1/0),t}},df=0,vf=0,mf=0,yf=0,gf=0,bf=0,_f=0,wf=0,Ef=0,Tf={point:Cf,lineStart:xf,lineEnd:Nf,polygonStart:function(){Tf.lineStart=Af,Tf.lineEnd=If},polygonEnd:function(){Tf.point=Cf,Tf.lineStart=xf,Tf.lineEnd=Nf},result:function(){var t=Ef?[_f/Ef,wf/Ef]:bf?[yf/bf,gf/bf]:mf?[df/mf,vf/mf]:[NaN,NaN];return df=vf=mf=yf=gf=bf=_f=wf=Ef=0,t}};function Cf(t,e){df+=t,vf+=e,++mf}function xf(){Tf.point=Sf}function Sf(t,e){Tf.point=kf,Cf(ff=t,hf=e)}function kf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,Cf(ff=t,hf=e)}function Nf(){Tf.point=Cf}function Af(){Tf.point=Of}function If(){Pf(cf,lf)}function Of(t,e){Tf.point=Pf,Cf(cf=ff=t,lf=hf=e)}function Pf(t,e){var n=t-ff,r=e-hf,i=mu(n*n+r*r);yf+=i*(ff+t)/2,gf+=i*(hf+e)/2,bf+=i,_f+=(i=hf*t-ff*e)*(ff+t),wf+=i*(hf+e),Ef+=3*i,Cf(ff=t,hf=e)}var Rf=Tf;function Df(t){this._context=t}Df.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ru)}},result:wu};var Mf,Lf,Ff,Uf,jf,Bf=Ys(),qf={point:wu,lineStart:function(){qf.point=Vf},lineEnd:function(){Mf&&Wf(Lf,Ff),qf.point=wu},polygonStart:function(){Mf=!0},polygonEnd:function(){Mf=null},result:function(){var t=+Bf;return Bf.reset(),t}};function Vf(t,e){qf.point=Wf,Lf=Uf=t,Ff=jf=e}function Wf(t,e){Uf-=t,jf-=e,Bf.add(mu(Uf*Uf+jf*jf)),Uf=t,jf=e}var Hf=qf;function zf(){this._string=[]}function Kf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}zf.prototype={_radius:4.5,_circle:Kf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Kf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Gf=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Pu(t,n(r))),r.result()}return o.area=function(t){return Pu(t,n(rf)),rf.result()},o.measure=function(t){return Pu(t,n(Hf)),Hf.result()},o.bounds=function(t){return Pu(t,n(pf)),pf.result()},o.centroid=function(t){return Pu(t,n(Rf)),Rf.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,Yl):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new zf):new Df(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},Qf=function(t){return{stream:Yf(t)}};function Yf(t){return function(e){var n=new Xf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Xf(){}function $f(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Pu(n,t.stream(pf)),e(pf.result()),null!=r&&t.clipExtent(r),t}function Jf(t,e,n){return $f(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])},n)}function Zf(t,e,n){return Jf(t,[[0,0],e],n)}function th(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function eh(t,e,n){return $f(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}Xf.prototype={constructor:Xf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var nh=16,rh=cu(30*ou),ih=function(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,c,l,f,h,p,d,v,m){var y=c-r,g=l-i,b=y*y+g*g;if(b>4*e&&v--){var _=a+h,w=s+p,E=u+d,T=mu(_*_+w*w+E*E),C=bu(E/=T),x=au(au(E)-1)<Zs||au(o-f)<Zs?(o+f)/2:uu(w,_),S=t(x,C),k=S[0],N=S[1],A=k-r,I=N-i,O=g*A-y*I;(O*O/b>e||au((y*A+g*I)/b-.5)>.3||a*h+s*p+u*d<rh)&&(n(r,i,o,a,s,u,k,N,x,_/=T,w/=T,E,v,m),m.point(k,N),n(k,N,x,_,w,E,c,l,f,h,p,d,v,m))}}return function(e){var r,i,o,a,s,u,c,l,f,h,p,d,v={point:m,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),v.lineStart=_},polygonEnd:function(){e.polygonEnd(),v.lineStart=y}};function m(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){l=NaN,v.point=g,e.lineStart()}function g(r,i){var o=Vu([r,i]),a=t(r,i);n(l,f,c,h,p,d,l=a[0],f=a[1],c=r,h=o[0],p=o[1],d=o[2],nh,e),e.point(l,f)}function b(){v.point=m,e.lineEnd()}function _(){y(),v.point=w,v.lineEnd=E}function w(t,e){g(r=t,e),i=l,o=f,a=h,s=p,u=d,v.point=g}function E(){n(l,f,c,h,p,d,i,o,r,a,s,u,nh,e),v.lineEnd=b,b()}return v}}(t,e):function(t){return Yf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var oh=Yf({point:function(t,e){this.stream.point(t*ou,e*ou)}});function ah(t,e,n,r){var i=cu(r),o=du(r),a=i*t,s=o*t,u=i/t,c=o/t,l=(o*n-i*e)/t,f=(o*e+i*n)/t;function h(t,r){return[a*t-s*r+e,n-s*t-a*r]}return h.invert=function(t,e){return[u*t-c*e+l,f-c*t-u*e]},h}function sh(t){return uh(function(){return t})()}function uh(t){var e,n,r,i,o,a,s,u,c,l,f=150,h=480,p=250,d=0,v=0,m=0,y=0,g=0,b=0,_=null,w=hl,E=null,T=Yl,C=.5;function x(t){return u(t[0]*ou,t[1]*ou)}function S(t){return(t=u.invert(t[0],t[1]))&&[t[0]*iu,t[1]*iu]}function k(){var t=ah(f,0,0,b).apply(null,e(d,v)),r=(b?ah:function(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r})(f,h-t[0],p-t[1],b);return n=Qc(m,y,g),s=Kc(e,r),u=Kc(n,s),a=ih(s,C),N()}function N(){return c=l=null,x}return x.stream=function(t){return c&&l===t?c:c=oh(function(t){return Yf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(T(l=t)))))},x.preclip=function(t){return arguments.length?(w=t,_=void 0,N()):w},x.postclip=function(t){return arguments.length?(T=t,E=r=i=o=null,N()):T},x.clipAngle=function(t){return arguments.length?(w=+t?pl(_=t*ou):(_=null,hl),N()):_*iu},x.clipExtent=function(t){return arguments.length?(T=null==t?(E=r=i=o=null,Yl):yl(E=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),N()):null==E?null:[[E,r],[i,o]]},x.scale=function(t){return arguments.length?(f=+t,k()):f},x.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],k()):[h,p]},x.center=function(t){return arguments.length?(d=t[0]%360*ou,v=t[1]%360*ou,k()):[d*iu,v*iu]},x.rotate=function(t){return arguments.length?(m=t[0]%360*ou,y=t[1]%360*ou,g=t.length>2?t[2]%360*ou:0,k()):[m*iu,y*iu,g*iu]},x.angle=function(t){return arguments.length?(b=t%360*ou,k()):b*iu},x.precision=function(t){return arguments.length?(a=ih(s,C=t*t),N()):mu(C)},x.fitExtent=function(t,e){return Jf(x,t,e)},x.fitSize=function(t,e){return Zf(x,t,e)},x.fitWidth=function(t,e){return th(x,t,e)},x.fitHeight=function(t,e){return eh(x,t,e)},function(){return e=t.apply(this,arguments),x.invert=e.invert&&S,k()}}function ch(t){var e=0,n=tu/3,r=uh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*ou,n=t[1]*ou):[e*iu,n*iu]},i}function lh(t,e){var n=du(t),r=(n+du(e))/2;if(au(r)<Zs)return function(t){var e=cu(t);function n(t,n){return[t*e,du(n)/e]}return n.invert=function(t,n){return[t/e,bu(n*e)]},n}(t);var i=1+n*(2*r-n),o=mu(i)/r;function a(t,e){var n=mu(i-2*r*du(e))/r;return[n*du(t*=r),o-n*cu(t)]}return a.invert=function(t,e){var n=o-e;return[uu(t,au(n))/r*vu(n),bu((i-(t*t+n*n)*r*r)/(2*r))]},a}var fh=function(){return ch(lh).scale(155.424).center([0,33.6442])},hh=function(){return fh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var ph=function(){var t,e,n,r,i,o,a=hh(),s=fh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=fh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,l}return l.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:a).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[a.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),u.precision(t),f()):a.precision()},l.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),u.scale(t),l.translate(a.translate())):a.scale()},l.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],l=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,l-.238*e],[o+.455*e,l+.238*e]]).stream(c),r=s.translate([o-.307*e,l+.201*e]).clipExtent([[o-.425*e+Zs,l+.12*e+Zs],[o-.214*e-Zs,l+.234*e-Zs]]).stream(c),i=u.translate([o-.205*e,l+.212*e]).clipExtent([[o-.214*e+Zs,l+.166*e+Zs],[o-.115*e-Zs,l+.234*e-Zs]]).stream(c),f()},l.fitExtent=function(t,e){return Jf(l,t,e)},l.fitSize=function(t,e){return Zf(l,t,e)},l.fitWidth=function(t,e){return th(l,t,e)},l.fitHeight=function(t,e){return eh(l,t,e)},l.scale(1070)};function dh(t){return function(e,n){var r=cu(e),i=cu(n),o=t(r*i);return[o*i*du(e),o*du(n)]}}function vh(t){return function(e,n){var r=mu(e*e+n*n),i=t(r),o=du(i),a=cu(i);return[uu(e*o,r*a),bu(r&&n*o/r)]}}var mh=dh(function(t){return mu(2/(1+t))});mh.invert=vh(function(t){return 2*bu(t/2)});var yh=function(){return sh(mh).scale(124.75).clipAngle(179.999)},gh=dh(function(t){return(t=gu(t))&&t/du(t)});gh.invert=vh(function(t){return t});var bh=function(){return sh(gh).scale(79.4188).clipAngle(179.999)};function _h(t,e){return[t,hu(yu((eu+e)/2))]}_h.invert=function(t,e){return[t,2*su(fu(e))-eu]};var wh=function(){return Eh(_h).scale(961/ru)};function Eh(t){var e,n,r,i=sh(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,c=null;function l(){var o=tu*a(),s=i(Jc(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===_h?[[Math.max(s[0]-o,c),e],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),l()):a()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(o(t),l()):o()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==c?null:[[c,e],[n,r]]},l()}function Th(t){return yu((eu+t)/2)}function Ch(t,e){var n=cu(t),r=t===e?du(t):hu(n/cu(e))/hu(Th(e)/Th(t)),i=n*pu(Th(t),r)/r;if(!r)return _h;function o(t,e){i>0?e<-eu+Zs&&(e=-eu+Zs):e>eu-Zs&&(e=eu-Zs);var n=i/pu(Th(e),r);return[n*du(r*t),i-n*cu(r*t)]}return o.invert=function(t,e){var n=i-e,o=vu(r)*mu(t*t+n*n);return[uu(t,au(n))/r*vu(n),2*su(pu(i/o,1/r))-eu]},o}var xh=function(){return ch(Ch).scale(109.5).parallels([30,30])};function Sh(t,e){return[t,e]}Sh.invert=Sh;var kh=function(){return sh(Sh).scale(152.63)};function Nh(t,e){var n=cu(t),r=t===e?du(t):(n-cu(e))/(e-t),i=n/r+t;if(au(r)<Zs)return Sh;function o(t,e){var n=i-e,o=r*t;return[n*du(o),i-n*cu(o)]}return o.invert=function(t,e){var n=i-e;return[uu(t,au(n))/r*vu(n),i-vu(r)*mu(t*t+n*n)]},o}var Ah=function(){return ch(Nh).scale(131.154).center([0,13.9389])};function Ih(t,e){var n=cu(e),r=cu(t)*n;return[n*du(t)/r,du(e)/r]}Ih.invert=vh(su);var Oh=function(){return sh(Ih).scale(144.049).clipAngle(60)};function Ph(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?Yl:Yf({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}var Rh=function(){var t,e,n,r,i,o,a=1,s=0,u=0,c=1,l=1,f=Yl,h=null,p=Yl;function d(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=f(p(i=t))},postclip:function(r){return arguments.length?(p=r,h=t=e=n=null,d()):p},clipExtent:function(r){return arguments.length?(p=null==r?(h=t=e=n=null,Yl):yl(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),d()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(f=Ph((a=+t)*c,a*l,s,u),d()):a},translate:function(t){return arguments.length?(f=Ph(a*c,a*l,s=+t[0],u=+t[1]),d()):[s,u]},reflectX:function(t){return arguments.length?(f=Ph(a*(c=t?-1:1),a*l,s,u),d()):c<0},reflectY:function(t){return arguments.length?(f=Ph(a*c,a*(l=t?-1:1),s,u),d()):l<0},fitExtent:function(t,e){return Jf(o,t,e)},fitSize:function(t,e){return Zf(o,t,e)},fitWidth:function(t,e){return th(o,t,e)},fitHeight:function(t,e){return eh(o,t,e)}}};function Dh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Dh.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(au(n)>Zs&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Mh=function(){return sh(Dh).scale(175.295)};function Lh(t,e){return[cu(e)*du(t),du(e)]}Lh.invert=vh(bu);var Fh=function(){return sh(Lh).scale(249.5).clipAngle(90+Zs)};function Uh(t,e){var n=cu(e),r=1+cu(t)*n;return[n*du(t)/r,du(e)/r]}Uh.invert=vh(function(t){return 2*su(t)});var jh=function(){return sh(Uh).scale(250).clipAngle(142)};function Bh(t,e){return[hu(yu((eu+e)/2)),-t]}Bh.invert=function(t,e){return[-e,2*su(fu(t))-eu]};var qh=function(){var t=Eh(Bh),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function Vh(t,e){return t.parent===e.parent?1:2}function Wh(t,e){return t+e.x}function Hh(t,e){return Math.max(t,e.y)}var zh=function(){var t=Vh,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Wh,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Hh,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,l=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(l-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function Kh(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Gh(t,e){var n,r,i,o,a,s=new $h(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Qh);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new $h(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Xh)}function Qh(t){return t.children}function Yh(t){t.data=t.data.data}function Xh(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function $h(t){this.data=t,this.depth=this.height=0,this.parent=null}$h.prototype=Gh.prototype={constructor:$h,count:function(){return this.eachAfter(Kh)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return Gh(this).eachBefore(Yh)}};var Jh=Array.prototype.slice;var Zh=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Jh.call(t))).length,o=[];r<i;)e=t[r],n&&np(n,e)?++r:(n=ip(o=tp(o,e)),r=0);return n};function tp(t,e){var n,r;if(rp(e,t))return[e];for(n=0;n<t.length;++n)if(ep(e,t[n])&&rp(op(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(ep(op(t[n],t[r]),e)&&ep(op(t[n],e),t[r])&&ep(op(t[r],e),t[n])&&rp(ap(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function ep(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function np(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function rp(t,e){for(var n=0;n<e.length;++n)if(!np(t,e[n]))return!1;return!0}function ip(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return op(t[0],t[1]);case 3:return ap(t[0],t[1],t[2])}var e}function op(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,f=Math.sqrt(u*u+c*c);return{x:(n+o+u/f*l)/2,y:(r+a+c/f*l)/2,r:(f+i+s)/2}}function ap(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,f=n.r,h=r-a,p=r-c,d=i-s,v=i-l,m=u-o,y=f-o,g=r*r+i*i-o*o,b=g-a*a-s*s+u*u,_=g-c*c-l*l+f*f,w=p*d-h*v,E=(d*_-v*b)/(2*w)-r,T=(v*m-d*y)/w,C=(p*b-h*_)/(2*w)-i,x=(h*y-p*m)/w,S=T*T+x*x-1,k=2*(o+E*T+C*x),N=E*E+C*C-o*o,A=-(S?(k+Math.sqrt(k*k-4*S*N))/(2*S):N/k);return{x:r+E+T*A,y:i+C+x*A,r:A}}function sp(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,c=s*s+u*u;c?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function up(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function cp(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function lp(t){this._=t,this.next=null,this.previous=null}function fp(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,c,l,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;sp(n,e,r=t[2]),e=new lp(e),n=new lp(n),r=new lp(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){sp(e._,n._,r=t[s]),r=new lp(r),u=n.next,c=e.previous,l=n._.r,f=e._.r;do{if(l<=f){if(up(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}l+=u._.r,u=u.next}else{if(up(c._,r._)){(e=c).next=n,n.previous=e,--s;continue t}f+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=cp(e);(r=r.next)!==n;)(a=cp(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Zh(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var hp=function(t){return fp(t),t};function pp(t){if("function"!=typeof t)throw new Error;return t}function dp(){return 0}var vp=function(t){return function(){return t}};function mp(t){return Math.sqrt(t.value)}var yp=function(){var t=null,e=1,n=1,r=dp;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(gp(t)).eachAfter(bp(r,.5)).eachBefore(_p(1)):i.eachBefore(gp(mp)).eachAfter(bp(dp,1)).eachAfter(bp(r,i.r/Math.min(e,n))).eachBefore(_p(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=null==(n=e)?null:pp(n),i):t;var n},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:vp(+t),i):r},i};function gp(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function bp(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=fp(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function _p(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var wp=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Ep=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c},Tp=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&Ep(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(e,o)),r&&i.eachBefore(wp),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},Cp="$",xp={depth:-1},Sp={};function kp(t){return t.id}function Np(t){return t.parentId}var Ap=function(){var t=kp,e=Np;function n(n){var r,i,o,a,s,u,c,l=n.length,f=new Array(l),h={};for(i=0;i<l;++i)r=n[i],s=f[i]=new $h(r),null!=(u=t(r,i,n))&&(u+="")&&(h[c=Cp+(s.id=u)]=c in h?Sp:s);for(i=0;i<l;++i)if(s=f[i],null!=(u=e(n[i],i,n))&&(u+="")){if(!(a=h[Cp+u]))throw new Error("missing: "+u);if(a===Sp)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=xp,o.eachBefore(function(t){t.depth=t.parent.depth+1,--l}).eachBefore(Xh),o.parent=null,l>0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=pp(e),n):t},n.parentId=function(t){return arguments.length?(e=pp(t),n):e},n};function Ip(t,e){return t.parent===e.parent?1:2}function Op(t){var e=t.children;return e?e[0]:t.t}function Pp(t){var e=t.children;return e?e[e.length-1]:t.t}function Rp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Dp(t,e,n){return t.a.parent===e.parent?t.a:n}function Mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Mp.prototype=Object.create($h.prototype);var Lp=function(){var t=Ip,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Mp(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Mp(r[i],i)),n.parent=e;return(a.parent=new Mp(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var c=i,l=i,f=i;i.eachBefore(function(t){t.x<c.x&&(c=t),t.x>l.x&&(l=t),t.depth>f.depth&&(f=t)});var h=c===l?1:t(c,l)/2,p=h-c.x,d=e/(l.x+h+p),v=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],c=o.m,l=a.m,f=s.m,h=u.m;s=Pp(s),o=Op(o),s&&o;)u=Op(u),(a=Pp(a)).a=e,(i=s.z+f-o.z-c+t(s._,o._))>0&&(Rp(Dp(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=o.m,h+=u.m,l+=a.m;s&&!Pp(a)&&(a.t=s,a.m+=f-l),o&&!Op(u)&&(u.t=o,u.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Fp=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c},Up=(1+Math.sqrt(5))/2;function jp(t,e,n,r,i,o){for(var a,s,u,c,l,f,h,p,d,v,m,y=[],g=e.children,b=0,_=0,w=g.length,E=e.value;b<w;){u=i-n,c=o-r;do{l=g[_++].value}while(!l&&_<w);for(f=h=l,m=l*l*(v=Math.max(c/u,u/c)/(E*t)),d=Math.max(h/m,m/f);_<w;++_){if(l+=s=g[_].value,s<f&&(f=s),s>h&&(h=s),m=l*l*v,(p=Math.max(h/m,m/f))>d){l-=s;break}d=p}y.push(a={value:l,dice:u<c,children:g.slice(b,_)}),a.dice?Ep(a,n,r,i,E?r+=c*l/E:o):Fp(a,n,r,E?n+=u*l/E:i,o),E-=l,b=_}return y}var Bp=function t(e){function n(t,n,r,i,o){jp(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),qp=function(){var t=Bp,e=!1,n=1,r=1,i=[0],o=dp,a=dp,s=dp,u=dp,c=dp;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wp),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,f-=s(e)-n,h-=u(e)-n,f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=pp(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:vp(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:vp(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:vp(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:vp(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:vp(+t),l):c},l},Vp=function(t,e,n,r,i){var o,a,s=t.children,u=s.length,c=new Array(u+1);for(c[0]=a=o=0;o<u;++o)c[o+1]=a+=s[o].value;!function t(e,n,r,i,o,a,u){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=o,l.x1=a,void(l.y1=u)}var f=c[e],h=r/2+f,p=e+1,d=n-1;for(;p<d;){var v=p+d>>>1;c[v]<h?p=v+1:d=v}h-c[p-1]<c[p]-h&&e+1<p&&--p;var m=c[p]-f,y=r-m;if(a-i>u-o){var g=(i*y+a*m)/r;t(e,p,m,i,o,g,u),t(p,n,y,g,o,a,u)}else{var b=(o*y+u*m)/r;t(e,p,m,i,o,a,b),t(p,n,y,i,b,a,u)}}(0,u,t.value,e,n,r,i)},Wp=function(t,e,n,r,i){(1&t.depth?Fp:Ep)(t,e,n,r,i)},Hp=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,u,c,l,f=-1,h=a.length,p=t.value;++f<h;){for(u=(s=a[f]).children,c=s.value=0,l=u.length;c<l;++c)s.value+=u[c].value;s.dice?Ep(s,n,r,i,r+=(o-r)*s.value/p):Fp(s,n,r,n+=(i-n)*s.value/p,o),p-=s.value}else t._squarify=a=jp(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Up),zp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2},Kp=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o/(u*=3),a/u]},Gp=function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])};function Qp(t,e){return t[0]-e[0]||t[1]-e[1]}function Yp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Gp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var Xp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Qp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Yp(r),a=Yp(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c},$p=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],s=e[1],u=o[0],c=o[1],l=!1,f=0;f<i;++f)n=(o=t[f])[0],(r=o[1])>s!=c>s&&a<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l},Jp=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],s=o[1],u=0;++r<i;)e=a,n=s,e-=a=(o=t[r])[0],n-=s=o[1],u+=Math.sqrt(e*e+n*n);return u},Zp=function(){return Math.random()},td=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Zp),ed=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Zp),nd=function t(e){function n(){var t=ed.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Zp),rd=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Zp),id=function t(e){function n(t){var n=rd.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Zp),od=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Zp),ad=Array.prototype,sd=ad.map,ud=ad.slice,cd={name:"implicit"};function ld(t){var e=Xo(),n=[],r=cd;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==cd)return r;e.set(o,a=n.push(i))}return t[(a-1)%t.length]}return t=null==t?[]:ud.call(t),i.domain=function(t){if(!arguments.length)return n.slice();n=[],e=Xo();for(var r,o,a=-1,s=t.length;++a<s;)e.has(o=(r=t[a])+"")||e.set(o,n.push(r));return i},i.range=function(e){return arguments.length?(t=ud.call(e),i):t.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ld().domain(n).range(t).unknown(r)},i}function fd(){var t,e,n=ld().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],f=o[l-0],h=o[1-l];t=(h-f)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),a&&(f=Math.round(f),e=Math.round(e));var p=E(n).map(function(e){return f+t*e});return i(l?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=u=Math.max(0,Math.min(1,t)),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),l()):s},n.paddingOuter=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return fd().domain(r()).range(o).round(a).paddingInner(s).paddingOuter(u).align(c)},l()}function hd(){return function t(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t(n())},e}(fd().paddingInner(1))}var pd=function(t){return function(){return t}},dd=function(t){return+t},vd=[0,1];function md(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:pd(e)}function yd(t,e,n,r){var i=t[0],o=t[1],a=e[0],s=e[1];return o<i?(i=n(o,i),a=r(s,a)):(i=n(i,o),a=r(a,s)),function(t){return a(i(t))}}function gd(t,e,n,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=n(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var n=u(t,e,1,i)-1;return a[n](o[n](e))}}function bd(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function _d(t,e){var n,r,i,o=vd,a=vd,s=$n,u=!1;function c(){return n=Math.min(o.length,a.length)>2?gd:yd,r=i=null,l}function l(e){return(r||(r=n(o,a,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}(t):t,s)))(+e)}return l.invert=function(t){return(i||(i=n(a,o,md,u?function(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}(e):e)))(+t)},l.domain=function(t){return arguments.length?(o=sd.call(t,dd),c()):o.slice()},l.range=function(t){return arguments.length?(a=ud.call(t),c()):a.slice()},l.rangeRound=function(t){return a=ud.call(t),s=Jn,c()},l.clamp=function(t){return arguments.length?(u=!!t,c()):u},l.interpolate=function(t){return arguments.length?(s=t,c()):s},c()}var wd=function(t,e,n){var r,i=t[0],o=t[t.length-1],a=N(i,o,null==e?10:e);switch((n=Rs(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(i),Math.abs(o));return null!=n.precision||isNaN(r=Gs(a,s))||(n.precision=r),Us(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(r=Qs(a,Math.max(Math.abs(i),Math.abs(o))))||(n.precision=r-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(r=Ks(a))||(n.precision=r-2*("%"===n.type))}return Fs(n)};function Ed(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return wd(e(),t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=k(s,u,n))>0?r=k(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=k(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function Td(){var t=_d(md,Vn);return t.copy=function(){return bd(t,Td())},Ed(t)}function Cd(){var t=[0,1];function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=sd.call(n,dd),e):t.slice()},e.copy=function(){return Cd().domain(t)},Ed(e)}var xd=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function Sd(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:pd(e)}function kd(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function Nd(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ad(t){return 10===t?Nd:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function Id(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function Od(t){return function(e){return-t(-e)}}function Pd(){var t=_d(Sd,kd).domain([1,10]),e=t.domain,n=10,r=Id(10),i=Ad(10);function o(){return r=Id(n),i=Ad(n),e()[0]<0&&(r=Od(r),i=Od(i)),t}return t.base=function(t){return arguments.length?(n=+t,o()):n},t.domain=function(t){return arguments.length?(e(t),o()):e()},t.ticks=function(t){var o,a=e(),s=a[0],u=a[a.length-1];(o=u<s)&&(h=s,s=u,u=h);var c,l,f,h=r(s),p=r(u),d=null==t?10:+t,v=[];if(!(n%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,s>0){for(;h<p;++h)for(l=1,c=i(h);l<n;++l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else for(;h<p;++h)for(l=n-1,c=i(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;v.push(f)}}else v=S(h,p,Math.min(p-h,d)).map(i);return o?v.reverse():v},t.tickFormat=function(e,o){if(null==o&&(o=10===n?".0e":","),"function"!=typeof o&&(o=Fs(o)),e===1/0)return o;null==e&&(e=10);var a=Math.max(1,n*e/t.ticks().length);return function(t){var e=t/i(Math.round(r(t)));return e*n<n-.5&&(e*=n),e<=a?o(t):""}},t.nice=function(){return e(xd(e(),{floor:function(t){return i(Math.floor(r(t)))},ceil:function(t){return i(Math.ceil(r(t)))}}))},t.copy=function(){return bd(t,Pd().base(n))},t}function Rd(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function Dd(){var t=1,e=_d(function(e,n){return(n=Rd(n,t)-(e=Rd(e,t)))?function(r){return(Rd(r,t)-e)/n}:pd(n)},function(e,n){return n=Rd(n,t)-(e=Rd(e,t)),function(r){return Rd(e+n*r,1/t)}}),n=e.domain;return e.exponent=function(e){return arguments.length?(t=+e,n(n())):t},e.copy=function(){return bd(e,Dd().exponent(t))},Ed(e)}function Md(){return Dd().exponent(.5)}function Ld(){var t=[],e=[],n=[];function i(){var r=0,i=Math.max(1,e.length);for(n=new Array(i-1);++r<i;)n[r-1]=O(t,r/i);return o}function o(t){if(!isNaN(t=+t))return e[u(n,t)]}return o.invertExtent=function(r){var i=e.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:t[0],i<n.length?n[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var n,o=0,a=e.length;o<a;++o)null==(n=e[o])||isNaN(n=+n)||t.push(n);return t.sort(r),i()},o.range=function(t){return arguments.length?(e=ud.call(t),i()):e.slice()},o.quantiles=function(){return n.slice()},o.copy=function(){return Ld().domain(t).range(e)},o}function Fd(){var t=0,e=1,n=1,r=[.5],i=[0,1];function o(t){if(t<=t)return i[u(r,t,0,n)]}function a(){var i=-1;for(r=new Array(n);++i<n;)r[i]=((i+1)*e-(i-n)*t)/(n+1);return o}return o.domain=function(n){return arguments.length?(t=+n[0],e=+n[1],a()):[t,e]},o.range=function(t){return arguments.length?(n=(i=ud.call(t)).length-1,a()):i.slice()},o.invertExtent=function(o){var a=i.indexOf(o);return a<0?[NaN,NaN]:a<1?[t,r[0]]:a>=n?[r[n-1],e]:[r[a-1],r[a]]},o.copy=function(){return Fd().domain([t,e]).range(i)},Ed(o)}function Ud(){var t=[.5],e=[0,1],n=1;function r(r){if(r<=r)return e[u(t,r,0,n)]}return r.domain=function(i){return arguments.length?(t=ud.call(i),n=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(i){return arguments.length?(e=ud.call(i),n=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(n){var r=e.indexOf(n);return[t[r-1],t[r]]},r.copy=function(){return Ud().domain(t).range(e)},r}var jd=new Date,Bd=new Date;function qd(t,e,n,r){function i(e){return t(e=new Date(+e)),e}return i.floor=i,i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return qd(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return jd.setTime(+e),Bd.setTime(+r),t(jd),t(Bd),Math.floor(n(jd,Bd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Vd=qd(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Vd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qd(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):Vd:null};var Wd=Vd,Hd=Vd.range,zd=6e4,Kd=6048e5,Gd=qd(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),Qd=Gd,Yd=Gd.range,Xd=qd(function(t){t.setTime(Math.floor(t/zd)*zd)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getMinutes()}),$d=Xd,Jd=Xd.range,Zd=qd(function(t){var e=t.getTimezoneOffset()*zd%36e5;e<0&&(e+=36e5),t.setTime(36e5*Math.floor((+t-e)/36e5)+e)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),tv=Zd,ev=Zd.range,nv=qd(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/864e5},function(t){return t.getDate()-1}),rv=nv,iv=nv.range;function ov(t){return qd(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*zd)/Kd})}var av=ov(0),sv=ov(1),uv=ov(2),cv=ov(3),lv=ov(4),fv=ov(5),hv=ov(6),pv=av.range,dv=sv.range,vv=uv.range,mv=cv.range,yv=lv.range,gv=fv.range,bv=hv.range,_v=qd(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),wv=_v,Ev=_v.range,Tv=qd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Tv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var Cv=Tv,xv=Tv.range,Sv=qd(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*zd)},function(t,e){return(e-t)/zd},function(t){return t.getUTCMinutes()}),kv=Sv,Nv=Sv.range,Av=qd(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()}),Iv=Av,Ov=Av.range,Pv=qd(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),Rv=Pv,Dv=Pv.range;function Mv(t){return qd(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/Kd})}var Lv=Mv(0),Fv=Mv(1),Uv=Mv(2),jv=Mv(3),Bv=Mv(4),qv=Mv(5),Vv=Mv(6),Wv=Lv.range,Hv=Fv.range,zv=Uv.range,Kv=jv.range,Gv=Bv.range,Qv=qv.range,Yv=Vv.range,Xv=qd(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),$v=Xv,Jv=Xv.range,Zv=qd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Zv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qd(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var tm=Zv,em=Zv.range;function nm(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function im(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function om(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=ym(i),l=gm(i),f=ym(o),h=gm(o),p=ym(a),d=gm(a),v=ym(s),m=gm(s),y=ym(u),g=gm(u),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Um,e:Um,f:Wm,H:jm,I:Bm,j:qm,L:Vm,m:Hm,M:zm,p:function(t){return i[+(t.getHours()>=12)]},Q:by,s:_y,S:Km,u:Gm,U:Qm,V:Ym,w:Xm,W:$m,x:null,X:null,y:Jm,Y:Zm,Z:ty,"%":gy},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ey,e:ey,f:ay,H:ny,I:ry,j:iy,L:oy,m:sy,M:uy,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:by,s:_y,S:cy,u:ly,U:fy,V:hy,w:py,W:dy,x:null,X:null,y:vy,Y:my,Z:yy,"%":gy},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Nm,e:Nm,f:Dm,H:Im,I:Im,j:Am,L:Rm,m:km,M:Om,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},Q:Lm,s:Fm,S:Pm,u:_m,U:wm,V:Em,w:bm,W:Tm,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:xm,Y:Cm,Z:Sm,"%":Mm};function E(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=fm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=im(1900);if(C(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=rm(im(o.y))).getUTCDay())>4||0===i?Fv.ceil(r):Fv(r),r=Rv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=e(im(o.y))).getDay())>4||0===i?sv.ceil(r):sv(r),r=rv.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?rm(im(o.y)).getUTCDay():e(im(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,rm(o)):e(o)}}function C(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in fm?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),_.x=E(n,_),_.X=E(r,_),_.c=E(e,_),{format:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",nm);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t,rm);return e.toString=function(){return t},e}}}var am,sm,um,cm,lm,fm={"-":"",_:" ",0:"0"},hm=/^\s*\d+/,pm=/^%/,dm=/[\\^$*+?|[\]().{}]/g;function vm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function mm(t){return t.replace(dm,"\\$&")}function ym(t){return new RegExp("^(?:"+t.map(mm).join("|")+")","i")}function gm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function bm(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function _m(t,e,n){var r=hm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Em(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Tm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Cm(t,e,n){var r=hm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Sm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function km(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Nm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Im(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Om(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=hm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Rm(t,e,n){var r=hm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=hm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mm(t,e,n){var r=pm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=hm.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Um(t,e){return vm(t.getDate(),e,2)}function jm(t,e){return vm(t.getHours(),e,2)}function Bm(t,e){return vm(t.getHours()%12||12,e,2)}function qm(t,e){return vm(1+rv.count(Cv(t),t),e,3)}function Vm(t,e){return vm(t.getMilliseconds(),e,3)}function Wm(t,e){return Vm(t,e)+"000"}function Hm(t,e){return vm(t.getMonth()+1,e,2)}function zm(t,e){return vm(t.getMinutes(),e,2)}function Km(t,e){return vm(t.getSeconds(),e,2)}function Gm(t){var e=t.getDay();return 0===e?7:e}function Qm(t,e){return vm(av.count(Cv(t),t),e,2)}function Ym(t,e){var n=t.getDay();return t=n>=4||0===n?lv(t):lv.ceil(t),vm(lv.count(Cv(t),t)+(4===Cv(t).getDay()),e,2)}function Xm(t){return t.getDay()}function $m(t,e){return vm(sv.count(Cv(t),t),e,2)}function Jm(t,e){return vm(t.getFullYear()%100,e,2)}function Zm(t,e){return vm(t.getFullYear()%1e4,e,4)}function ty(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+vm(e/60|0,"0",2)+vm(e%60,"0",2)}function ey(t,e){return vm(t.getUTCDate(),e,2)}function ny(t,e){return vm(t.getUTCHours(),e,2)}function ry(t,e){return vm(t.getUTCHours()%12||12,e,2)}function iy(t,e){return vm(1+Rv.count(tm(t),t),e,3)}function oy(t,e){return vm(t.getUTCMilliseconds(),e,3)}function ay(t,e){return oy(t,e)+"000"}function sy(t,e){return vm(t.getUTCMonth()+1,e,2)}function uy(t,e){return vm(t.getUTCMinutes(),e,2)}function cy(t,e){return vm(t.getUTCSeconds(),e,2)}function ly(t){var e=t.getUTCDay();return 0===e?7:e}function fy(t,e){return vm(Lv.count(tm(t),t),e,2)}function hy(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Bv(t):Bv.ceil(t),vm(Bv.count(tm(t),t)+(4===tm(t).getUTCDay()),e,2)}function py(t){return t.getUTCDay()}function dy(t,e){return vm(Fv.count(tm(t),t),e,2)}function vy(t,e){return vm(t.getUTCFullYear()%100,e,2)}function my(t,e){return vm(t.getUTCFullYear()%1e4,e,4)}function yy(){return"+0000"}function gy(){return"%"}function by(t){return+t}function _y(t){return Math.floor(+t/1e3)}function wy(t){return am=om(t),sm=am.format,um=am.parse,cm=am.utcFormat,lm=am.utcParse,am}wy({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ey=Date.prototype.toISOString?function(t){return t.toISOString()}:cm("%Y-%m-%dT%H:%M:%S.%LZ");var Ty=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:lm("%Y-%m-%dT%H:%M:%S.%LZ"),Cy=1e3,xy=60*Cy,Sy=60*xy,ky=24*Sy,Ny=7*ky,Ay=30*ky,Iy=365*ky;function Oy(t){return new Date(t)}function Py(t){return t instanceof Date?+t:+new Date(+t)}function Ry(t,e,n,r,o,a,s,u,c){var l=_d(md,Vn),f=l.invert,h=l.domain,p=c(".%L"),d=c(":%S"),v=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),g=c("%b %d"),b=c("%B"),_=c("%Y"),w=[[s,1,Cy],[s,5,5*Cy],[s,15,15*Cy],[s,30,30*Cy],[a,1,xy],[a,5,5*xy],[a,15,15*xy],[a,30,30*xy],[o,1,Sy],[o,3,3*Sy],[o,6,6*Sy],[o,12,12*Sy],[r,1,ky],[r,2,2*ky],[n,1,Ny],[e,1,Ay],[e,3,3*Ay],[t,1,Iy]];function E(i){return(s(i)<i?p:a(i)<i?d:o(i)<i?v:r(i)<i?m:e(i)<i?n(i)<i?y:g:t(i)<i?b:_)(i)}function T(e,n,r,o){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(r-n)/e,s=i(function(t){return t[2]}).right(w,a);s===w.length?(o=N(n/Iy,r/Iy,e),e=t):s?(o=(s=w[a/w[s-1][2]<w[s][2]/a?s-1:s])[1],e=s[0]):(o=Math.max(N(n,r,e),1),e=u)}return null==o?e:e.every(o)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(sd.call(t,Py)):h().map(Oy)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=T(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?E:c(e)},l.nice=function(t,e){var n=h();return(t=T(t,n[0],n[n.length-1],e))?h(xd(n,t)):l},l.copy=function(){return bd(l,Ry(t,e,n,r,o,a,s,u,c))},l}var Dy=function(){return Ry(Cv,wv,av,rv,tv,$d,Qd,Wd,sm).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},My=function(){return Ry(tm,$v,Lv,Rv,Iv,kv,Qd,Wd,cm).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])};function Ly(t){var e=0,n=1,r=1,i=!1;function o(n){var o=(n-e)*r;return t(i?Math.max(0,Math.min(1,o)):o)}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=e===n?0:1/(n-e),o):[e,n]},o.clamp=function(t){return arguments.length?(i=!!t,o):i},o.interpolator=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return Ly(t).domain([e,n]).clamp(i)},Ed(o)}function Fy(t){var e=0,n=.5,r=1,i=1,o=1,a=!1;function s(e){var r=.5+((e=+e)-n)*(e<n?i:o);return t(a?Math.max(0,Math.min(1,r)):r)}return s.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],r=+t[2],i=e===n?0:.5/(n-e),o=n===r?0:.5/(r-n),s):[e,n,r]},s.clamp=function(t){return arguments.length?(a=!!t,s):a},s.interpolator=function(e){return arguments.length?(t=e,s):t},s.copy=function(){return Fy(t).domain([e,n,r]).clamp(a)},Ed(s)}var Uy=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},jy=Uy("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),By=Uy("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),qy=Uy("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Vy=Uy("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Wy=Uy("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Hy=Uy("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),zy=Uy("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ky=Uy("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Gy=Uy("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Qy=function(t){return Un(t[t.length-1])},Yy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Uy),Xy=Qy(Yy),$y=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Uy),Jy=Qy($y),Zy=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Uy),tg=Qy(Zy),eg=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Uy),ng=Qy(eg),rg=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Uy),ig=Qy(rg),og=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Uy),ag=Qy(og),sg=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Uy),ug=Qy(sg),cg=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Uy),lg=Qy(cg),fg=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Uy),hg=Qy(fg),pg=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Uy),dg=Qy(pg),vg=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Uy),mg=Qy(vg),yg=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Uy),gg=Qy(yg),bg=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Uy),_g=Qy(bg),wg=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Uy),Eg=Qy(wg),Tg=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Uy),Cg=Qy(Tg),xg=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Uy),Sg=Qy(xg),kg=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Uy),Ng=Qy(kg),Ag=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Uy),Ig=Qy(Ag),Og=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Uy),Pg=Qy(Og),Rg=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Uy),Dg=Qy(Rg),Mg=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Uy),Lg=Qy(Mg),Fg=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Uy),Ug=Qy(Fg),jg=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Uy),Bg=Qy(jg),qg=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Uy),Vg=Qy(qg),Wg=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Uy),Hg=Qy(Wg),zg=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Uy),Kg=Qy(zg),Gg=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Uy),Qg=Qy(Gg),Yg=yr(Sn(300,.5,0),Sn(-240,.5,1)),Xg=yr(Sn(-100,.75,.35),Sn(80,1.5,.8)),$g=yr(Sn(260,.75,.35),Sn(80,1.5,.8)),Jg=Sn(),Zg=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Jg.h=360*t-100,Jg.s=1.5-1.5*e,Jg.l=.8-.9*e,Jg+""},tb=ze(),eb=Math.PI/3,nb=2*Math.PI/3,rb=function(t){var e;return t=(.5-t)*Math.PI,tb.r=255*(e=Math.sin(t))*e,tb.g=255*(e=Math.sin(t+eb))*e,tb.b=255*(e=Math.sin(t+nb))*e,tb+""};function ib(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var ob=ib(Uy("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ab=ib(Uy("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sb=ib(Uy("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ub=ib(Uy("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),cb=function(t){return function(){return t}},lb=Math.abs,fb=Math.atan2,hb=Math.cos,pb=Math.max,db=Math.min,vb=Math.sin,mb=Math.sqrt,yb=1e-12,gb=Math.PI,bb=gb/2,_b=2*gb;function wb(t){return t>=1?bb:t<=-1?-bb:Math.asin(t)}function Eb(t){return t.innerRadius}function Tb(t){return t.outerRadius}function Cb(t){return t.startAngle}function xb(t){return t.endAngle}function Sb(t){return t&&t.padAngle}function kb(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/mb(s*s+u*u),l=c*u,f=-c*s,h=t+l,p=e+f,d=n+l,v=r+f,m=(h+d)/2,y=(p+v)/2,g=d-h,b=v-p,_=g*g+b*b,w=i-o,E=h*v-d*p,T=(b<0?-1:1)*mb(pb(0,w*w*_-E*E)),C=(E*b-g*T)/_,x=(-E*g-b*T)/_,S=(E*b+g*T)/_,k=(-E*g+b*T)/_,N=C-m,A=x-y,I=S-m,O=k-y;return N*N+A*A>I*I+O*O&&(C=S,x=k),{cx:C,cy:x,x01:-l,y01:-f,x11:C*(i/w-1),y11:x*(i/w-1)}}var Nb=function(){var t=Eb,e=Tb,n=cb(0),r=null,i=Cb,o=xb,a=Sb,s=null;function u(){var u,c,l,f=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-bb,d=o.apply(this,arguments)-bb,v=lb(d-p),m=d>p;if(s||(s=u=qo()),h<f&&(c=h,h=f,f=c),h>yb)if(v>_b-yb)s.moveTo(h*hb(p),h*vb(p)),s.arc(0,0,h,p,d,!m),f>yb&&(s.moveTo(f*hb(d),f*vb(d)),s.arc(0,0,f,d,p,m));else{var y,g,b=p,_=d,w=p,E=d,T=v,C=v,x=a.apply(this,arguments)/2,S=x>yb&&(r?+r.apply(this,arguments):mb(f*f+h*h)),k=db(lb(h-f)/2,+n.apply(this,arguments)),N=k,A=k;if(S>yb){var I=wb(S/f*vb(x)),O=wb(S/h*vb(x));(T-=2*I)>yb?(w+=I*=m?1:-1,E-=I):(T=0,w=E=(p+d)/2),(C-=2*O)>yb?(b+=O*=m?1:-1,_-=O):(C=0,b=_=(p+d)/2)}var P=h*hb(b),R=h*vb(b),D=f*hb(E),M=f*vb(E);if(k>yb){var L=h*hb(_),F=h*vb(_),U=f*hb(w),j=f*vb(w);if(v<gb){var B=T>yb?function(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,f=s-o,h=(l*(e-o)-f*(t-i))/(f*u-l*c);return[t+h*u,e+h*c]}(P,R,U,j,L,F,D,M):[D,M],q=P-B[0],V=R-B[1],W=L-B[0],H=F-B[1],z=1/vb(((l=(q*W+V*H)/(mb(q*q+V*V)*mb(W*W+H*H)))>1?0:l<-1?gb:Math.acos(l))/2),K=mb(B[0]*B[0]+B[1]*B[1]);N=db(k,(f-K)/(z-1)),A=db(k,(h-K)/(z+1))}}C>yb?A>yb?(y=kb(U,j,P,R,h,A,m),g=kb(L,F,D,M,h,A,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<k?s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,A,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,h,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),!m),s.arc(g.cx,g.cy,A,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):(s.moveTo(P,R),s.arc(0,0,h,b,_,!m)):s.moveTo(P,R),f>yb&&T>yb?N>yb?(y=kb(D,M,L,F,f,-N,m),g=kb(P,R,U,j,f,-N,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),N<k?s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(g.y01,g.x01),!m):(s.arc(y.cx,y.cy,N,fb(y.y01,y.x01),fb(y.y11,y.x11),!m),s.arc(0,0,f,fb(y.cy+y.y11,y.cx+y.x11),fb(g.cy+g.y11,g.cx+g.x11),m),s.arc(g.cx,g.cy,N,fb(g.y11,g.x11),fb(g.y01,g.x01),!m))):s.arc(0,0,f,E,w,m):s.lineTo(D,M)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-gb/2;return[hb(r)*n,vb(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:cb(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u};function Ab(t){this._context=t}Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ib=function(t){return new Ab(t)};function Ob(t){return t[0]}function Pb(t){return t[1]}var Rb=function(){var t=Ob,e=Pb,n=cb(!0),r=null,i=Ib,o=null;function a(a){var s,u,c,l=a.length,f=!1;for(null==r&&(o=i(c=qo())),s=0;s<=l;++s)!(s<l&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,s,a),+e(u,s,a));if(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:cb(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a},Db=function(){var t=Ob,e=null,n=cb(0),r=Pb,i=cb(!0),o=null,a=Ib,s=null;function u(u){var c,l,f,h,p,d=u.length,v=!1,m=new Array(d),y=new Array(d);for(null==o&&(s=a(p=qo())),c=0;c<=d;++c){if(!(c<d&&i(h=u[c],c,u))===v)if(v=!v)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=c-1;f>=l;--f)s.point(m[f],y[f]);s.lineEnd(),s.areaEnd()}v&&(m[c]=+t(h,c,u),y[c]=+n(h,c,u),s.point(e?+e(h,c,u):m[c],r?+r(h,c,u):y[c]))}if(p)return s=null,p+""||null}function c(){return Rb().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:cb(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:cb(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:cb(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cb(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:cb(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u},Mb=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Lb=function(t){return t},Fb=function(){var t=Lb,e=Mb,n=null,r=cb(0),i=cb(_b),o=cb(0);function a(a){var s,u,c,l,f,h=a.length,p=0,d=new Array(h),v=new Array(h),m=+r.apply(this,arguments),y=Math.min(_b,Math.max(-_b,i.apply(this,arguments)-m)),g=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=g*(y<0?-1:1);for(s=0;s<h;++s)(f=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=f);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=n&&d.sort(function(t,e){return n(a[t],a[e])}),s=0,c=p?(y-h*b)/p:0;s<h;++s,m=l)u=d[s],l=m+((f=v[u])>0?f*c:0)+b,v[u]={data:a[u],index:s,value:f,startAngle:m,endAngle:l,padAngle:g};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:cb(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:cb(+t),a):o},a},Ub=Bb(Ib);function jb(t){this._curve=t}function Bb(t){function e(e){return new jb(t(e))}return e._curve=t,e}function qb(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t}jb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vb=function(){return qb(Rb().curve(Ub))},Wb=function(){var t=Db().curve(Ub),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return qb(n())},delete t.lineX0,t.lineEndAngle=function(){return qb(r())},delete t.lineX1,t.lineInnerRadius=function(){return qb(i())},delete t.lineY0,t.lineOuterRadius=function(){return qb(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Bb(t)):e()._curve},t},Hb=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},zb=Array.prototype.slice;function Kb(t){return t.source}function Gb(t){return t.target}function Qb(t){var e=Kb,n=Gb,r=Ob,i=Pb,o=null;function a(){var a,s=zb.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(o||(o=a=qo()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:cb(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function Yb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Xb(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function $b(t,e,n,r,i){var o=Hb(e,n),a=Hb(e,n=(n+i)/2),s=Hb(r,n),u=Hb(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],u[0],u[1])}function Jb(){return Qb(Yb)}function Zb(){return Qb(Xb)}function t_(){var t=Qb($b);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var e_={draw:function(t,e){var n=Math.sqrt(e/gb);t.moveTo(n,0),t.arc(0,0,n,0,_b)}},n_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},r_=Math.sqrt(1/3),i_=2*r_,o_={draw:function(t,e){var n=Math.sqrt(e/i_),r=n*r_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},a_=Math.sin(gb/10)/Math.sin(7*gb/10),s_=Math.sin(_b/10)*a_,u_=-Math.cos(_b/10)*a_,c_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=s_*n,i=u_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=_b*o/5,s=Math.cos(a),u=Math.sin(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},l_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},f_=Math.sqrt(3),h_={draw:function(t,e){var n=-Math.sqrt(e/(3*f_));t.moveTo(0,2*n),t.lineTo(-f_*n,-n),t.lineTo(f_*n,-n),t.closePath()}},p_=Math.sqrt(3)/2,d_=1/Math.sqrt(12),v_=3*(d_/2+1),m_={draw:function(t,e){var n=Math.sqrt(e/v_),r=n/2,i=n*d_,o=r,a=n*d_+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(-.5*r-p_*i,p_*r+-.5*i),t.lineTo(-.5*o-p_*a,p_*o+-.5*a),t.lineTo(-.5*s-p_*u,p_*s+-.5*u),t.lineTo(-.5*r+p_*i,-.5*i-p_*r),t.lineTo(-.5*o+p_*a,-.5*a-p_*o),t.lineTo(-.5*s+p_*u,-.5*u-p_*s),t.closePath()}},y_=[e_,n_,o_,l_,c_,h_,m_],g_=function(){var t=cb(e_),e=cb(64),n=null;function r(){var r;if(n||(n=r=qo()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:cb(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:cb(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},b_=function(){};function __(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function w_(t){this._context=t}w_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:__(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var E_=function(t){return new w_(t)};function T_(t){this._context=t}T_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function x_(t){this._context=t}x_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var S_=function(t){return new x_(t)};function k_(t,e){this._basis=new w_(t),this._beta=e}k_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new w_(t):new k_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function A_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function I_(t,e){this._context=t,this._k=(1-e)/6}I_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var O_=function t(e){function n(t){return new I_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var R_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function D_(t,e){this._context=t,this._k=(1-e)/6}D_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var M_=function t(e){function n(t){return new D_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function L_(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>yb){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>yb){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function F_(t,e){this._context=t,this._alpha=e}F_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new F_(t,e):new I_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function j_(t,e){this._context=t,this._alpha=e}j_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var B_=function t(e){function n(t){return e?new j_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function q_(t,e){this._context=t,this._alpha=e}q_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:L_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new q_(t,e):new D_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t){this._context=t}W_.prototype={areaStart:b_,areaEnd:b_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var H_=function(t){return new W_(t)};function z_(t){return t<0?-1:1}function K_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z_(o)+z_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function G_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Y_(t){this._context=t}function X_(t){this._context=new $_(t)}function $_(t){this._context=t}function J_(t){return new Y_(t)}function Z_(t){return new X_(t)}function tw(t){this._context=t}function ew(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}Y_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Q_(this,this._t0,G_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Q_(this,G_(this,n=K_(this,t,e)),n);break;default:Q_(this,this._t0,n=K_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(X_.prototype=Object.create(Y_.prototype)).point=function(t,e){Y_.prototype.point.call(this,e,t)},$_.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},tw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ew(t),i=ew(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var nw=function(t){return new tw(t)};function rw(t,e){this._context=t,this._t=e}rw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var iw=function(t){return new rw(t,.5)};function ow(t){return new rw(t,0)}function aw(t){return new rw(t,1)}var sw=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},uw=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function cw(t,e){return t[e]}var lw=function(){var t=cb([]),e=uw,n=sw,r=cw;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var f,h=s[o],p=l[o]=new Array(u),d=0;d<u;++d)p[d]=f=[0,+r(i[d],h,d,i)],f.data=i[d];p.key=h}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:cb(zb.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:cb(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?uw:"function"==typeof t?t:cb(zb.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?sw:t,i):n},i},fw=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=t[n][o][1]||0;if(i)for(n=0;n<r;++n)t[n][o][1]/=i}sw(t,e)}},hw=function(t,e){if((s=t.length)>1)for(var n,r,i,o,a,s,u=0,c=t[e[0]].length;u<c;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},pw=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=t[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}sw(t,e)}},dw=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,c=0;s<i;++s){for(var l=t[e[s]],f=l[a][1]||0,h=(f-(l[a-1][1]||0))/2,p=0;p<s;++p){var d=t[e[p]];h+=(d[a][1]||0)-(d[a-1][1]||0)}u+=f,c+=h*f}n[a-1][1]+=n[a-1][0]=o,u&&(o-=c/u)}n[a-1][1]+=n[a-1][0]=o,sw(t,e)}},vw=function(t){var e=t.map(mw);return uw(t).sort(function(t,n){return e[t]-e[n]})};function mw(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var yw=function(t){return vw(t).reverse()},gw=function(t){var e,n,r=t.length,i=t.map(mw),o=uw(t).sort(function(t,e){return i[e]-i[t]}),a=0,s=0,u=[],c=[];for(e=0;e<r;++e)n=o[e],a<s?(a+=i[n],u.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(u)},bw=function(t){return uw(t).reverse()},_w=function(t){return function(){return t}};function ww(t){return t[0]}function Ew(t){return t[1]}function Tw(){this._=null}function Cw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function xw(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Sw(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function kw(t){for(;t.L;)t=t.L;return t}Tw.prototype={constructor:Tw,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=kw(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(xw(this,n),n=(t=n).U),n.C=!1,r.C=!0,Sw(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Sw(this,n),n=(t=n).U),n.C=!1,r.C=!0,xw(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?kw(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,xw(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Sw(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,xw(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Sw(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,xw(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Sw(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Nw=Tw;function Aw(t,e,n,r){var i=[null,null],o=$w.push(i)-1;return i.left=t,i.right=e,n&&Ow(i,t,e,n),r&&Ow(i,e,t,r),Yw[t.index].halfedges.push(o),Yw[e.index].halfedges.push(o),i}function Iw(t,e,n){var r=[e,n];return r.left=t,r}function Ow(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Pw(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],l=0,f=1,h=s[0]-u,p=s[1]-c;if(o=e-u,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>l&&(l=o)}if(o=r-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<f&&(f=o)}if(o=n-c,p||!(o>0)){if(o/=p,p<0){if(o<l)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>l&&(l=o)}if(o=i-c,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>l&&(l=o)}else if(p>0){if(o<l)return;o<f&&(f=o)}return!(l>0||f<1)||(l>0&&(t[0]=[u+l*h,c+l*p]),f<1&&(t[1]=[u+f*h,c+f*p]),!0)}}}}}function Rw(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,l=t.right,f=c[0],h=c[1],p=l[0],d=l[1],v=(f+p)/2,m=(h+d)/2;if(d===h){if(v<e||v>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[v,n];o=[v,i]}else{if(u){if(u[1]<n)return}else u=[v,i];o=[v,n]}}else if(s=m-(a=(f-p)/(d-h))*v,a<-1||a>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function Dw(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Mw(t,e){return e[+(e.left!==t.site)]}function Lw(t,e){return e[+(e.left===t.site)]}var Fw,Uw=[];function jw(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],s=i[1],u=r[0]-a,c=r[1]-s,l=o[0]-a,f=o[1]-s,h=2*(u*f-c*l);if(!(h>=-Zw)){var p=u*u+c*c,d=l*l+f*f,v=(f*p-c*d)/h,m=(u*d-l*p)/h,y=Uw.pop()||new function(){Cw(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=m+s)+Math.sqrt(v*v+m*m),t.circle=y;for(var g=null,b=Xw._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){g=b.P;break}b=b.L}else{if(!b.R){g=b;break}b=b.R}Xw.insert(g,y),g||(Fw=y)}}}}function Bw(t){var e=t.circle;e&&(e.P||(Fw=e.N),Xw.remove(e),Uw.push(e),Cw(e),t.circle=null)}var qw=[];function Vw(t){var e=qw.pop()||new function(){Cw(this),this.edge=this.site=this.circle=null};return e.site=t,e}function Ww(t){Bw(t),Qw.remove(t),qw.push(t),Cw(t)}function Hw(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,s=[t];Ww(t);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Jw&&Math.abs(r-u.circle.cy)<Jw;)o=u.P,s.unshift(u),Ww(u),u=o;s.unshift(u),Bw(u);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Jw&&Math.abs(r-c.circle.cy)<Jw;)a=c.N,s.push(c),Ww(c),c=a;s.push(c),Bw(c);var l,f=s.length;for(l=1;l<f;++l)c=s[l],u=s[l-1],Ow(c.edge,u.site,c.site,i);u=s[0],(c=s[f-1]).edge=Aw(u.site,c.site,null,i),jw(u),jw(c)}function zw(t){for(var e,n,r,i,o=t[0],a=t[1],s=Qw._;s;)if((r=Kw(s,a)-o)>Jw)s=s.L;else{if(!((i=o-Gw(s,a))>Jw)){r>-Jw?(e=s.P,n=s):i>-Jw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){Yw[t.index]={site:t,halfedges:[]}}(t);var u=Vw(t);if(Qw.insert(e,u),e||n){if(e===n)return Bw(e),n=Vw(e.site),Qw.insert(u,n),u.edge=n.edge=Aw(e.site,u.site),jw(e),void jw(n);if(n){Bw(e),Bw(n);var c=e.site,l=c[0],f=c[1],h=t[0]-l,p=t[1]-f,d=n.site,v=d[0]-l,m=d[1]-f,y=2*(h*m-p*v),g=h*h+p*p,b=v*v+m*m,_=[(m*g-p*b)/y+l,(h*b-v*g)/y+f];Ow(n.edge,c,d,_),u.edge=Aw(c,t,null,_),n.edge=Aw(t,d,null,_),jw(e),jw(n)}else u.edge=Aw(e.site,u.site)}}function Kw(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,f=1/o-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-o/2)))/f+r:(r+s)/2}function Gw(t,e){var n=t.N;if(n)return Kw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Qw,Yw,Xw,$w,Jw=1e-6,Zw=1e-12;function tE(t,e){return e[1]-t[1]||e[0]-t[0]}function eE(t,e){var n,r,i,o=t.sort(tE).pop();for($w=[],Yw=new Array(t.length),Qw=new Nw,Xw=new Nw;;)if(i=Fw,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(zw(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;Hw(i.arc)}if(function(){for(var t,e,n,r,i=0,o=Yw.length;i<o;++i)if((t=Yw[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=Dw(t,$w[e[n]]);for(a.sort(function(t,e){return s[e]-s[t]}),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var a=+e[0][0],s=+e[0][1],u=+e[1][0],c=+e[1][1];!function(t,e,n,r){for(var i,o=$w.length;o--;)Rw(i=$w[o],t,e,n,r)&&Pw(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Jw||Math.abs(i[0][1]-i[1][1])>Jw)||delete $w[o]}(a,s,u,c),function(t,e,n,r){var i,o,a,s,u,c,l,f,h,p,d,v,m=Yw.length,y=!0;for(i=0;i<m;++i)if(o=Yw[i]){for(a=o.site,s=(u=o.halfedges).length;s--;)$w[u[s]]||u.splice(s,1);for(s=0,c=u.length;s<c;)d=(p=Lw(o,$w[u[s]]))[0],v=p[1],f=(l=Mw(o,$w[u[++s%c]]))[0],h=l[1],(Math.abs(d-f)>Jw||Math.abs(v-h)>Jw)&&(u.splice(s,0,$w.push(Iw(a,p,Math.abs(d-t)<Jw&&r-v>Jw?[t,Math.abs(f-t)<Jw?h:r]:Math.abs(v-r)<Jw&&n-d>Jw?[Math.abs(h-r)<Jw?f:n,r]:Math.abs(d-n)<Jw&&v-e>Jw?[n,Math.abs(f-n)<Jw?h:e]:Math.abs(v-e)<Jw&&d-t>Jw?[Math.abs(h-e)<Jw?f:t,e]:null))-1),++c);c&&(y=!1)}if(y){var g,b,_,w=1/0;for(i=0,y=null;i<m;++i)(o=Yw[i])&&(_=(g=(a=o.site)[0]-t)*g+(b=a[1]-e)*b)<w&&(w=_,y=o);if(y){var E=[t,e],T=[t,r],C=[n,r],x=[n,e];y.halfedges.push($w.push(Iw(a=y.site,E,T))-1,$w.push(Iw(a,T,C))-1,$w.push(Iw(a,C,x))-1,$w.push(Iw(a,x,E))-1)}}for(i=0;i<m;++i)(o=Yw[i])&&(o.halfedges.length||delete Yw[i])}(a,s,u,c)}this.edges=$w,this.cells=Yw,Qw=Xw=$w=Yw=null}eE.prototype={constructor:eE,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return Mw(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,s,u,c,l=n.site,f=-1,h=e[i[o-1]],p=h.left===l?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===l?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(u=a,c=p,((s=l)[0]-c[0])*(u[1]-s[1])-(s[0]-u[0])*(c[1]-s[1])<0)&&t.push([l.data,a.data,p.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],f=u*u+c*c;f<l&&(l=f,a=s.index)}})}while(null!==a);return o._found=r,null==n||l<=n*n?i.site:null}};var nE=function(){var t=ww,e=Ew,n=null;function r(r){return new eE(r.map(function(n,i){var o=[Math.round(t(n,i,r)/Jw)*Jw,Math.round(e(n,i,r)/Jw)*Jw];return o.index=i,o.data=n,o}),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:_w(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:_w(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},rE=function(t){return function(){return t}};function iE(t,e,n){this.k=t,this.x=e,this.y=n}iE.prototype={constructor:iE,scale:function(t){return 1===t?this:new iE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new iE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var oE=new iE(1,0,0);function aE(t){return t.__zoom||oE}function sE(){Gt.stopImmediatePropagation()}aE.prototype=iE.prototype;var uE=function(){Gt.preventDefault(),Gt.stopImmediatePropagation()};function cE(){return!Gt.button}function lE(){var t,e,n=this;return n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function fE(){return this.__zoom||oE}function hE(){return-Gt.deltaY*(Gt.deltaMode?120:1)/500}function pE(){return"ontouchstart"in this}function dE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var vE=function(){var t,e,n=cE,r=lE,i=dE,o=hE,a=pE,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=sr,f=[],h=ht("start","zoom","end"),p=500,d=150,v=0;function m(t){t.property("__zoom",fE).on("wheel.zoom",T).on("mousedown.zoom",C).on("dblclick.zoom",x).filter(a).on("touchstart.zoom",S).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new iE(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new iE(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n){t.on("start.zoom",function(){w(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).end()}).tween("zoom",function(){var t=arguments,i=w(this,t),o=r.apply(this,t),a=n||b(o),s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=l(u.invert(a).concat(s/u.k),c.invert(a).concat(s/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=s/e[2];t=new iE(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function w(t,e){for(var n,r=0,i=f.length;r<i;++r)if((n=f[r]).that===t)return n;return new E(t,e)}function E(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=r.apply(t,e)}function T(){if(n.apply(this,arguments)){var t=w(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,o.apply(this,arguments)))),a=fe(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],ti(this),t.start()}uE(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},d),t.zoom("mouse",i(g(y(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}}function C(){if(!e&&n.apply(this,arguments)){var t=w(this,arguments),r=ie(Gt.view).on("mousemove.zoom",function(){if(uE(),!t.moved){var e=Gt.clientX-a,n=Gt.clientY-s;t.moved=e*e+n*n>v}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=fe(t.that),t.mouse[1]),t.extent,u))},!0).on("mouseup.zoom",function(){r.on("mousemove.zoom mouseup.zoom",null),ge(Gt.view,t.moved),uE(),t.end()},!0),o=fe(this),a=Gt.clientX,s=Gt.clientY;ye(Gt.view),sE(),t.mouse=[o,this.__zoom.invert(o)],ti(this),t.start()}}function x(){if(n.apply(this,arguments)){var t=this.__zoom,e=fe(this),o=t.invert(e),a=t.k*(Gt.shiftKey?.5:2),s=i(g(y(t,a),e,o),r.apply(this,arguments),u);uE(),c>0?ie(this).transition().duration(c).call(_,s,e):ie(this).call(m.transform,s)}}function S(){if(n.apply(this,arguments)){var e,r,i,o,a=w(this,arguments),s=Gt.changedTouches,u=s.length;for(sE(),r=0;r<u;++r)i=s[r],o=[o=pe(this,s,i.identifier),this.__zoom.invert(o),i.identifier],a.touch0?a.touch1||(a.touch1=o):(a.touch0=o,e=!0);if(t&&(t=clearTimeout(t),!a.touch1))return a.end(),void((o=ie(this).on("dblclick.zoom"))&&o.apply(this,arguments));e&&(t=setTimeout(function(){t=null},p),ti(this),a.start())}}function k(){var e,n,r,o,a=w(this,arguments),s=Gt.changedTouches,c=s.length;for(uE(),t&&(t=clearTimeout(t)),e=0;e<c;++e)n=s[e],r=pe(this,s,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var l=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],d=(d=h[0]-l[0])*d+(d=h[1]-l[1])*d,v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v;n=y(n,Math.sqrt(d/v)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(g(n,r,o),a.extent,u))}function N(){var t,n,r=w(this,arguments),i=Gt.changedTouches,o=i.length;for(sE(),e&&clearTimeout(e),e=setTimeout(function(){e=null},p),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}return m.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",fE),t!==n?_(t,e):n.interrupt().each(function(){w(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},m.scaleBy=function(t,e){m.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)})},m.scaleTo=function(t,e){m.transform(t,function(){var t=r.apply(this,arguments),n=this.__zoom,o=b(t),a=n.invert(o),s="function"==typeof e?e.apply(this,arguments):e;return i(g(y(n,s),o,a),t,u)})},m.translateBy=function(t,e,n){m.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),u)})},m.translateTo=function(t,e,n){m.transform(t,function(){var t=r.apply(this,arguments),o=this.__zoom,a=b(t);return i(oE.translate(a[0],a[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)})},E.prototype={start:function(){return 1==++this.active&&(this.index=f.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(f.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){Jt(new function(t,e,n){this.target=t,this.type=e,this.transform=n}(m,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},m.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:rE(+t),m):o},m.filter=function(t){return arguments.length?(n="function"==typeof t?t:rE(!!t),m):n},m.touchable=function(t){return arguments.length?(a="function"==typeof t?t:rE(!!t),m):a},m.extent=function(t){return arguments.length?(r="function"==typeof t?t:rE([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),m):r},m.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],m):[s[0],s[1]]},m.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],m):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},m.constrain=function(t){return arguments.length?(i=t,m):i},m.duration=function(t){return arguments.length?(c=+t,m):c},m.interpolate=function(t){return arguments.length?(l=t,m):l},m.on=function(){var t=h.on.apply(h,arguments);return t===h?m:t},m.clickDistance=function(t){return arguments.length?(v=(t=+t)*t,m):Math.sqrt(v)},m};n.d(e,"version",function(){return"5.5.0"}),n.d(e,"bisect",function(){return u}),n.d(e,"bisectRight",function(){return a}),n.d(e,"bisectLeft",function(){return s}),n.d(e,"ascending",function(){return r}),n.d(e,"bisector",function(){return i}),n.d(e,"cross",function(){return f}),n.d(e,"descending",function(){return h}),n.d(e,"deviation",function(){return v}),n.d(e,"extent",function(){return m}),n.d(e,"histogram",function(){return I}),n.d(e,"thresholdFreedmanDiaconis",function(){return P}),n.d(e,"thresholdScott",function(){return R}),n.d(e,"thresholdSturges",function(){return A}),n.d(e,"max",function(){return D}),n.d(e,"mean",function(){return M}),n.d(e,"median",function(){return L}),n.d(e,"merge",function(){return F}),n.d(e,"min",function(){return U}),n.d(e,"pairs",function(){return c}),n.d(e,"permute",function(){return j}),n.d(e,"quantile",function(){return O}),n.d(e,"range",function(){return E}),n.d(e,"scan",function(){return B}),n.d(e,"shuffle",function(){return q}),n.d(e,"sum",function(){return V}),n.d(e,"ticks",function(){return S}),n.d(e,"tickIncrement",function(){return k}),n.d(e,"tickStep",function(){return N}),n.d(e,"transpose",function(){return W}),n.d(e,"variance",function(){return d}),n.d(e,"zip",function(){return z}),n.d(e,"axisTop",function(){return rt}),n.d(e,"axisRight",function(){return it}),n.d(e,"axisBottom",function(){return ot}),n.d(e,"axisLeft",function(){return at}),n.d(e,"brush",function(){return xo}),n.d(e,"brushX",function(){return To}),n.d(e,"brushY",function(){return Co}),n.d(e,"brushSelection",function(){return Eo}),n.d(e,"chord",function(){return Ro}),n.d(e,"ribbon",function(){return Go}),n.d(e,"nest",function(){return $o}),n.d(e,"set",function(){return oa}),n.d(e,"map",function(){return Xo}),n.d(e,"keys",function(){return aa}),n.d(e,"values",function(){return sa}),n.d(e,"entries",function(){return ua}),n.d(e,"color",function(){return qe}),n.d(e,"rgb",function(){return ze}),n.d(e,"hsl",function(){return Ye}),n.d(e,"lab",function(){return ln}),n.d(e,"hcl",function(){return gn}),n.d(e,"lch",function(){return yn}),n.d(e,"gray",function(){return cn}),n.d(e,"cubehelix",function(){return Sn}),n.d(e,"contours",function(){return ga}),n.d(e,"contourDensity",function(){return Ta}),n.d(e,"dispatch",function(){return ht}),n.d(e,"drag",function(){return xe}),n.d(e,"dragDisable",function(){return ye}),n.d(e,"dragEnable",function(){return ge}),n.d(e,"dsvFormat",function(){return Ia}),n.d(e,"csvParse",function(){return Pa}),n.d(e,"csvParseRows",function(){return Ra}),n.d(e,"csvFormat",function(){return Da}),n.d(e,"csvFormatRows",function(){return Ma}),n.d(e,"tsvParse",function(){return Fa}),n.d(e,"tsvParseRows",function(){return Ua}),n.d(e,"tsvFormat",function(){return ja}),n.d(e,"tsvFormatRows",function(){return Ba}),n.d(e,"easeLinear",function(){return ci}),n.d(e,"easeQuad",function(){return hi}),n.d(e,"easeQuadIn",function(){return li}),n.d(e,"easeQuadOut",function(){return fi}),n.d(e,"easeQuadInOut",function(){return hi}),n.d(e,"easeCubic",function(){return vi}),n.d(e,"easeCubicIn",function(){return pi}),n.d(e,"easeCubicOut",function(){return di}),n.d(e,"easeCubicInOut",function(){return vi}),n.d(e,"easePoly",function(){return gi}),n.d(e,"easePolyIn",function(){return mi}),n.d(e,"easePolyOut",function(){return yi}),n.d(e,"easePolyInOut",function(){return gi}),n.d(e,"easeSin",function(){return Ti}),n.d(e,"easeSinIn",function(){return wi}),n.d(e,"easeSinOut",function(){return Ei}),n.d(e,"easeSinInOut",function(){return Ti}),n.d(e,"easeExp",function(){return Si}),n.d(e,"easeExpIn",function(){return Ci}),n.d(e,"easeExpOut",function(){return xi}),n.d(e,"easeExpInOut",function(){return Si}),n.d(e,"easeCircle",function(){return Ai}),n.d(e,"easeCircleIn",function(){return ki}),n.d(e,"easeCircleOut",function(){return Ni}),n.d(e,"easeCircleInOut",function(){return Ai}),n.d(e,"easeBounce",function(){return qi}),n.d(e,"easeBounceIn",function(){return Bi}),n.d(e,"easeBounceOut",function(){return qi}),n.d(e,"easeBounceInOut",function(){return Vi}),n.d(e,"easeBack",function(){return zi}),n.d(e,"easeBackIn",function(){return Wi}),n.d(e,"easeBackOut",function(){return Hi}),n.d(e,"easeBackInOut",function(){return zi}),n.d(e,"easeElastic",function(){return Qi}),n.d(e,"easeElasticIn",function(){return Gi}),n.d(e,"easeElasticOut",function(){return Qi}),n.d(e,"easeElasticInOut",function(){return Yi}),n.d(e,"blob",function(){return Va}),n.d(e,"buffer",function(){return Ha}),n.d(e,"dsv",function(){return Qa}),n.d(e,"csv",function(){return Ya}),n.d(e,"tsv",function(){return Xa}),n.d(e,"image",function(){return $a}),n.d(e,"json",function(){return Za}),n.d(e,"text",function(){return Ka}),n.d(e,"xml",function(){return es}),n.d(e,"html",function(){return ns}),n.d(e,"svg",function(){return rs}),n.d(e,"forceCenter",function(){return is}),n.d(e,"forceCollide",function(){return ys}),n.d(e,"forceLink",function(){return _s}),n.d(e,"forceManyBody",function(){return Ss}),n.d(e,"forceRadial",function(){return ks}),n.d(e,"forceSimulation",function(){return xs}),n.d(e,"forceX",function(){return Ns}),n.d(e,"forceY",function(){return As}),n.d(e,"formatDefaultLocale",function(){return zs}),n.d(e,"format",function(){return Fs}),n.d(e,"formatPrefix",function(){return Us}),n.d(e,"formatLocale",function(){return Hs}),n.d(e,"formatSpecifier",function(){return Rs}),n.d(e,"precisionFixed",function(){return Ks}),n.d(e,"precisionPrefix",function(){return Gs}),n.d(e,"precisionRound",function(){return Qs}),n.d(e,"geoArea",function(){return Bu}),n.d(e,"geoBounds",function(){return Pc}),n.d(e,"geoCentroid",function(){return Hc}),n.d(e,"geoCircle",function(){return el}),n.d(e,"geoClipAntimeridian",function(){return hl}),n.d(e,"geoClipCircle",function(){return pl}),n.d(e,"geoClipExtent",function(){return wl}),n.d(e,"geoClipRectangle",function(){return yl}),n.d(e,"geoContains",function(){return jl}),n.d(e,"geoDistance",function(){return Il}),n.d(e,"geoGraticule",function(){return Vl}),n.d(e,"geoGraticule10",function(){return Wl}),n.d(e,"geoInterpolate",function(){return Ql}),n.d(e,"geoLength",function(){return kl}),n.d(e,"geoPath",function(){return Gf}),n.d(e,"geoAlbers",function(){return hh}),n.d(e,"geoAlbersUsa",function(){return ph}),n.d(e,"geoAzimuthalEqualArea",function(){return yh}),n.d(e,"geoAzimuthalEqualAreaRaw",function(){return mh}),n.d(e,"geoAzimuthalEquidistant",function(){return bh}),n.d(e,"geoAzimuthalEquidistantRaw",function(){return gh}),n.d(e,"geoConicConformal",function(){return xh}),n.d(e,"geoConicConformalRaw",function(){return Ch}),n.d(e,"geoConicEqualArea",function(){return fh}),n.d(e,"geoConicEqualAreaRaw",function(){return lh}),n.d(e,"geoConicEquidistant",function(){return Ah}),n.d(e,"geoConicEquidistantRaw",function(){return Nh}),n.d(e,"geoEquirectangular",function(){return kh}),n.d(e,"geoEquirectangularRaw",function(){return Sh}),n.d(e,"geoGnomonic",function(){return Oh}),n.d(e,"geoGnomonicRaw",function(){return Ih}),n.d(e,"geoIdentity",function(){return Rh}),n.d(e,"geoProjection",function(){return sh}),n.d(e,"geoProjectionMutator",function(){return uh}),n.d(e,"geoMercator",function(){return wh}),n.d(e,"geoMercatorRaw",function(){return _h}),n.d(e,"geoNaturalEarth1",function(){return Mh}),n.d(e,"geoNaturalEarth1Raw",function(){return Dh}),n.d(e,"geoOrthographic",function(){return Fh}),n.d(e,"geoOrthographicRaw",function(){return Lh}),n.d(e,"geoStereographic",function(){return jh}),n.d(e,"geoStereographicRaw",function(){return Uh}),n.d(e,"geoTransverseMercator",function(){return qh}),n.d(e,"geoTransverseMercatorRaw",function(){return Bh}),n.d(e,"geoRotation",function(){return Jc}),n.d(e,"geoStream",function(){return Pu}),n.d(e,"geoTransform",function(){return Qf}),n.d(e,"cluster",function(){return zh}),n.d(e,"hierarchy",function(){return Gh}),n.d(e,"pack",function(){return yp}),n.d(e,"packSiblings",function(){return hp}),n.d(e,"packEnclose",function(){return Zh}),n.d(e,"partition",function(){return Tp}),n.d(e,"stratify",function(){return Ap}),n.d(e,"tree",function(){return Lp}),n.d(e,"treemap",function(){return qp}),n.d(e,"treemapBinary",function(){return Vp}),n.d(e,"treemapDice",function(){return Ep}),n.d(e,"treemapSlice",function(){return Fp}),n.d(e,"treemapSliceDice",function(){return Wp}),n.d(e,"treemapSquarify",function(){return Bp}),n.d(e,"treemapResquarify",function(){return Hp}),n.d(e,"interpolate",function(){return $n}),n.d(e,"interpolateArray",function(){return Bn}),n.d(e,"interpolateBasis",function(){return An}),n.d(e,"interpolateBasisClosed",function(){return In}),n.d(e,"interpolateDate",function(){return qn}),n.d(e,"interpolateNumber",function(){return Vn}),n.d(e,"interpolateObject",function(){return Wn}),n.d(e,"interpolateRound",function(){return Jn}),n.d(e,"interpolateString",function(){return Xn}),n.d(e,"interpolateTransformCss",function(){return rr}),n.d(e,"interpolateTransformSvg",function(){return ir}),n.d(e,"interpolateZoom",function(){return sr}),n.d(e,"interpolateRgb",function(){return Ln}),n.d(e,"interpolateRgbBasis",function(){return Un}),n.d(e,"interpolateRgbBasisClosed",function(){return jn}),n.d(e,"interpolateHsl",function(){return cr}),n.d(e,"interpolateHslLong",function(){return lr}),n.d(e,"interpolateLab",function(){return fr}),n.d(e,"interpolateHcl",function(){return pr}),n.d(e,"interpolateHclLong",function(){return dr}),n.d(e,"interpolateCubehelix",function(){return mr}),n.d(e,"interpolateCubehelixLong",function(){return yr}),n.d(e,"piecewise",function(){return gr}),n.d(e,"quantize",function(){return wr}),n.d(e,"path",function(){return qo}),n.d(e,"polygonArea",function(){return zp}),n.d(e,"polygonCentroid",function(){return Kp}),n.d(e,"polygonHull",function(){return Xp}),n.d(e,"polygonContains",function(){return $p}),n.d(e,"polygonLength",function(){return Jp}),n.d(e,"quadtree",function(){return fs}),n.d(e,"randomUniform",function(){return td}),n.d(e,"randomNormal",function(){return ed}),n.d(e,"randomLogNormal",function(){return nd}),n.d(e,"randomBates",function(){return id}),n.d(e,"randomIrwinHall",function(){return rd}),n.d(e,"randomExponential",function(){return od}),n.d(e,"scaleBand",function(){return fd}),n.d(e,"scalePoint",function(){return hd}),n.d(e,"scaleIdentity",function(){return Cd}),n.d(e,"scaleLinear",function(){return Td}),n.d(e,"scaleLog",function(){return Pd}),n.d(e,"scaleOrdinal",function(){return ld}),n.d(e,"scaleImplicit",function(){return cd}),n.d(e,"scalePow",function(){return Dd}),n.d(e,"scaleSqrt",function(){return Md}),n.d(e,"scaleQuantile",function(){return Ld}),n.d(e,"scaleQuantize",function(){return Fd}),n.d(e,"scaleThreshold",function(){return Ud}),n.d(e,"scaleTime",function(){return Dy}),n.d(e,"scaleUtc",function(){return My}),n.d(e,"scaleSequential",function(){return Ly}),n.d(e,"scaleDiverging",function(){return Fy}),n.d(e,"schemeCategory10",function(){return jy}),n.d(e,"schemeAccent",function(){return By}),n.d(e,"schemeDark2",function(){return qy}),n.d(e,"schemePaired",function(){return Vy}),n.d(e,"schemePastel1",function(){return Wy}),n.d(e,"schemePastel2",function(){return Hy}),n.d(e,"schemeSet1",function(){return zy}),n.d(e,"schemeSet2",function(){return Ky}),n.d(e,"schemeSet3",function(){return Gy}),n.d(e,"interpolateBrBG",function(){return Xy}),n.d(e,"schemeBrBG",function(){return Yy}),n.d(e,"interpolatePRGn",function(){return Jy}),n.d(e,"schemePRGn",function(){return $y}),n.d(e,"interpolatePiYG",function(){return tg}),n.d(e,"schemePiYG",function(){return Zy}),n.d(e,"interpolatePuOr",function(){return ng}),n.d(e,"schemePuOr",function(){return eg}),n.d(e,"interpolateRdBu",function(){return ig}),n.d(e,"schemeRdBu",function(){return rg}),n.d(e,"interpolateRdGy",function(){return ag}),n.d(e,"schemeRdGy",function(){return og}),n.d(e,"interpolateRdYlBu",function(){return ug}),n.d(e,"schemeRdYlBu",function(){return sg}),n.d(e,"interpolateRdYlGn",function(){return lg}),n.d(e,"schemeRdYlGn",function(){return cg}),n.d(e,"interpolateSpectral",function(){return hg}),n.d(e,"schemeSpectral",function(){return fg}),n.d(e,"interpolateBuGn",function(){return dg}),n.d(e,"schemeBuGn",function(){return pg}),n.d(e,"interpolateBuPu",function(){return mg}),n.d(e,"schemeBuPu",function(){return vg}),n.d(e,"interpolateGnBu",function(){return gg}),n.d(e,"schemeGnBu",function(){return yg}),n.d(e,"interpolateOrRd",function(){return _g}),n.d(e,"schemeOrRd",function(){return bg}),n.d(e,"interpolatePuBuGn",function(){return Eg}),n.d(e,"schemePuBuGn",function(){return wg}),n.d(e,"interpolatePuBu",function(){return Cg}),n.d(e,"schemePuBu",function(){return Tg}),n.d(e,"interpolatePuRd",function(){return Sg}),n.d(e,"schemePuRd",function(){return xg}),n.d(e,"interpolateRdPu",function(){return Ng}),n.d(e,"schemeRdPu",function(){return kg}),n.d(e,"interpolateYlGnBu",function(){return Ig}),n.d(e,"schemeYlGnBu",function(){return Ag}),n.d(e,"interpolateYlGn",function(){return Pg}),n.d(e,"schemeYlGn",function(){return Og}),n.d(e,"interpolateYlOrBr",function(){return Dg}),n.d(e,"schemeYlOrBr",function(){return Rg}),n.d(e,"interpolateYlOrRd",function(){return Lg}),n.d(e,"schemeYlOrRd",function(){return Mg}),n.d(e,"interpolateBlues",function(){return Ug}),n.d(e,"schemeBlues",function(){return Fg}),n.d(e,"interpolateGreens",function(){return Bg}),n.d(e,"schemeGreens",function(){return jg}),n.d(e,"interpolateGreys",function(){return Vg}),n.d(e,"schemeGreys",function(){return qg}),n.d(e,"interpolatePurples",function(){return Hg}),n.d(e,"schemePurples",function(){return Wg}),n.d(e,"interpolateReds",function(){return Kg}),n.d(e,"schemeReds",function(){return zg}),n.d(e,"interpolateOranges",function(){return Qg}),n.d(e,"schemeOranges",function(){return Gg}),n.d(e,"interpolateCubehelixDefault",function(){return Yg}),n.d(e,"interpolateRainbow",function(){return Zg}),n.d(e,"interpolateWarm",function(){return Xg}),n.d(e,"interpolateCool",function(){return $g}),n.d(e,"interpolateSinebow",function(){return rb}),n.d(e,"interpolateViridis",function(){return ob}),n.d(e,"interpolateMagma",function(){return ab}),n.d(e,"interpolateInferno",function(){return sb}),n.d(e,"interpolatePlasma",function(){return ub}),n.d(e,"create",function(){return oe}),n.d(e,"creator",function(){return mt}),n.d(e,"local",function(){return se}),n.d(e,"matcher",function(){return Ct}),n.d(e,"mouse",function(){return fe}),n.d(e,"namespace",function(){return vt}),n.d(e,"namespaces",function(){return dt}),n.d(e,"clientPoint",function(){return le}),n.d(e,"select",function(){return ie}),n.d(e,"selectAll",function(){return he}),n.d(e,"selection",function(){return re}),n.d(e,"selector",function(){return gt}),n.d(e,"selectorAll",function(){return _t}),n.d(e,"style",function(){return Pt}),n.d(e,"touch",function(){return pe}),n.d(e,"touches",function(){return de}),n.d(e,"window",function(){return Ot}),n.d(e,"event",function(){return Gt}),n.d(e,"customEvent",function(){return Jt}),n.d(e,"arc",function(){return Nb}),n.d(e,"area",function(){return Db}),n.d(e,"line",function(){return Rb}),n.d(e,"pie",function(){return Fb}),n.d(e,"areaRadial",function(){return Wb}),n.d(e,"radialArea",function(){return Wb}),n.d(e,"lineRadial",function(){return Vb}),n.d(e,"radialLine",function(){return Vb}),n.d(e,"pointRadial",function(){return Hb}),n.d(e,"linkHorizontal",function(){return Jb}),n.d(e,"linkVertical",function(){return Zb}),n.d(e,"linkRadial",function(){return t_}),n.d(e,"symbol",function(){return g_}),n.d(e,"symbols",function(){return y_}),n.d(e,"symbolCircle",function(){return e_}),n.d(e,"symbolCross",function(){return n_}),n.d(e,"symbolDiamond",function(){return o_}),n.d(e,"symbolSquare",function(){return l_}),n.d(e,"symbolStar",function(){return c_}),n.d(e,"symbolTriangle",function(){return h_}),n.d(e,"symbolWye",function(){return m_}),n.d(e,"curveBasisClosed",function(){return C_}),n.d(e,"curveBasisOpen",function(){return S_}),n.d(e,"curveBasis",function(){return E_}),n.d(e,"curveBundle",function(){return N_}),n.d(e,"curveCardinalClosed",function(){return R_}),n.d(e,"curveCardinalOpen",function(){return M_}),n.d(e,"curveCardinal",function(){return O_}),n.d(e,"curveCatmullRomClosed",function(){return B_}),n.d(e,"curveCatmullRomOpen",function(){return V_}),n.d(e,"curveCatmullRom",function(){return U_}),n.d(e,"curveLinearClosed",function(){return H_}),n.d(e,"curveLinear",function(){return Ib}),n.d(e,"curveMonotoneX",function(){return J_}),n.d(e,"curveMonotoneY",function(){return Z_}),n.d(e,"curveNatural",function(){return nw}),n.d(e,"curveStep",function(){return iw}),n.d(e,"curveStepAfter",function(){return aw}),n.d(e,"curveStepBefore",function(){return ow}),n.d(e,"stack",function(){return lw}),n.d(e,"stackOffsetExpand",function(){return fw}),n.d(e,"stackOffsetDiverging",function(){return hw}),n.d(e,"stackOffsetNone",function(){return sw}),n.d(e,"stackOffsetSilhouette",function(){return pw}),n.d(e,"stackOffsetWiggle",function(){return dw}),n.d(e,"stackOrderAscending",function(){return vw}),n.d(e,"stackOrderDescending",function(){return yw}),n.d(e,"stackOrderInsideOut",function(){return gw}),n.d(e,"stackOrderNone",function(){return uw}),n.d(e,"stackOrderReverse",function(){return bw}),n.d(e,"timeInterval",function(){return qd}),n.d(e,"timeMillisecond",function(){return Wd}),n.d(e,"timeMilliseconds",function(){return Hd}),n.d(e,"utcMillisecond",function(){return Wd}),n.d(e,"utcMilliseconds",function(){return Hd}),n.d(e,"timeSecond",function(){return Qd}),n.d(e,"timeSeconds",function(){return Yd}),n.d(e,"utcSecond",function(){return Qd}),n.d(e,"utcSeconds",function(){return Yd}),n.d(e,"timeMinute",function(){return $d}),n.d(e,"timeMinutes",function(){return Jd}),n.d(e,"timeHour",function(){return tv}),n.d(e,"timeHours",function(){return ev}),n.d(e,"timeDay",function(){return rv}),n.d(e,"timeDays",function(){return iv}),n.d(e,"timeWeek",function(){return av}),n.d(e,"timeWeeks",function(){return pv}),n.d(e,"timeSunday",function(){return av}),n.d(e,"timeSundays",function(){return pv}),n.d(e,"timeMonday",function(){return sv}),n.d(e,"timeMondays",function(){return dv}),n.d(e,"timeTuesday",function(){return uv}),n.d(e,"timeTuesdays",function(){return vv}),n.d(e,"timeWednesday",function(){return cv}),n.d(e,"timeWednesdays",function(){return mv}),n.d(e,"timeThursday",function(){return lv}),n.d(e,"timeThursdays",function(){return yv}),n.d(e,"timeFriday",function(){return fv}),n.d(e,"timeFridays",function(){return gv}),n.d(e,"timeSaturday",function(){return hv}),n.d(e,"timeSaturdays",function(){return bv}),n.d(e,"timeMonth",function(){return wv}),n.d(e,"timeMonths",function(){return Ev}),n.d(e,"timeYear",function(){return Cv}),n.d(e,"timeYears",function(){return xv}),n.d(e,"utcMinute",function(){return kv}),n.d(e,"utcMinutes",function(){return Nv}),n.d(e,"utcHour",function(){return Iv}),n.d(e,"utcHours",function(){return Ov}),n.d(e,"utcDay",function(){return Rv}),n.d(e,"utcDays",function(){return Dv}),n.d(e,"utcWeek",function(){return Lv}),n.d(e,"utcWeeks",function(){return Wv}),n.d(e,"utcSunday",function(){return Lv}),n.d(e,"utcSundays",function(){return Wv}),n.d(e,"utcMonday",function(){return Fv}),n.d(e,"utcMondays",function(){return Hv}),n.d(e,"utcTuesday",function(){return Uv}),n.d(e,"utcTuesdays",function(){return zv}),n.d(e,"utcWednesday",function(){return jv}),n.d(e,"utcWednesdays",function(){return Kv}),n.d(e,"utcThursday",function(){return Bv}),n.d(e,"utcThursdays",function(){return Gv}),n.d(e,"utcFriday",function(){return qv}),n.d(e,"utcFridays",function(){return Qv}),n.d(e,"utcSaturday",function(){return Vv}),n.d(e,"utcSaturdays",function(){return Yv}),n.d(e,"utcMonth",function(){return $v}),n.d(e,"utcMonths",function(){return Jv}),n.d(e,"utcYear",function(){return tm}),n.d(e,"utcYears",function(){return em}),n.d(e,"timeFormatDefaultLocale",function(){return wy}),n.d(e,"timeFormat",function(){return sm}),n.d(e,"timeParse",function(){return um}),n.d(e,"utcFormat",function(){return cm}),n.d(e,"utcParse",function(){return lm}),n.d(e,"timeFormatLocale",function(){return om}),n.d(e,"isoFormat",function(){return Ey}),n.d(e,"isoParse",function(){return Ty}),n.d(e,"now",function(){return Or}),n.d(e,"timer",function(){return Dr}),n.d(e,"timerFlush",function(){return Mr}),n.d(e,"timeout",function(){return jr}),n.d(e,"interval",function(){return Br}),n.d(e,"transition",function(){return ai}),n.d(e,"active",function(){return Zi}),n.d(e,"interrupt",function(){return ti}),n.d(e,"voronoi",function(){return nE}),n.d(e,"zoom",function(){return vE}),n.d(e,"zoomTransform",function(){return aE}),n.d(e,"zoomIdentity",function(){return oE})},function(t,e,n){var r=n(315);"string"==typeof r&&(r=t.i,r,"");var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";n.r(e),n.d(e,"setLogLevel",function(){return u}),n.d(e,"Logger",function(){return s}),n.d(e,"LogLevel",function(){return r});var r,i=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(r||(r={}));var o=r.INFO,a=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString();switch(e){case r.DEBUG:case r.VERBOSE:console.log.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.INFO:console.info.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.WARN:console.warn.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case r.ERROR:console.error.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}},s=function(){function t(t){this.name=t,this._logLevel=o,this._logHandler=a,i.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in r))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.DEBUG].concat(t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.VERBOSE].concat(t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.INFO].concat(t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.WARN].concat(t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,r.ERROR].concat(t))},t}();function u(t){i.forEach(function(e){e.logLevel=t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(330);((r=i)&&r.__esModule?r:{default:r}).default.initializeApp({apiKey:"AIzaSyCvzQxxjxFKPL6pLT00_iiChoEJwwvgjZ4",authDomain:"igem-7f6f6.firebaseapp.com",databaseURL:"https://igem-7f6f6.firebaseio.com",projectId:"igem-7f6f6",storageBucket:"igem-7f6f6.appspot.com",messagingSenderId:"184454883093"});var o=fetch("https://igem-7f6f6.firebaseio.com/.json",{method:"get"});e.default=o},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(120),s=n(363),u=n(113),c=200;t.exports=function(t,e,n){var l=-1,f=i,h=t.length,p=!0,d=[],v=d;if(n)p=!1,f=o;else if(h>=c){var m=e?null:s(t);if(m)return u(m);p=!1,f=a,v=new r}else v=e?[]:d;t:for(;++l<h;){var y=t[l],g=e?e(y):y;if(y=n||0!==y?y:0,p&&g==g){for(var b=v.length;b--;)if(v[b]===g)continue t;e&&v.push(g),d.push(y)}else f(v,g,n)||(v!==d&&v.push(g),d.push(y))}return d}},function(t,e,n){var r=n(62),i=n(38);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,function(t,r,i){o[++n]=e(t,r,i)}),o}},function(t,e,n){var r=n(125),i=n(376),o=n(92);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var c=e[a],l=r(t,c);n(l,c)&&i(u,o(c,t),l)}return u}},function(t,e,n){var r=n(230),i=n(205),o=n(206);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(162),i=n(107),o=n(157),a=n(229),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e,n){var r=n(238),i=n(405),o=n(38);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(159),i=n(87),o=n(108),a=n(208),s=n(406),u=n(403),c=n(85),l=n(402),f=n(401),h=n(231),p=n(204),d=n(52),v=n(400),m=n(399),y=n(394),g=n(18),b=n(89),_=n(393),w=n(39),E=n(391),T=n(28),C=1,x=2,S=4,k="[object Arguments]",N="[object Function]",A="[object GeneratorFunction]",I="[object Object]",O={};O[k]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[I]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[N]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,P,R,D,M){var L,F=n&C,U=n&x,j=n&S;if(P&&(L=D?P(e,R,D,M):P(e)),void 0!==L)return L;if(!w(e))return e;var B=g(e);if(B){if(L=v(e),!F)return c(e,L)}else{var q=d(e),V=q==N||q==A;if(b(e))return u(e,F);if(q==I||q==k||V&&!D){if(L=U||V?{}:y(e),!F)return U?f(e,s(L,e)):l(e,a(L,e))}else{if(!O[q])return D?e:{};L=m(e,q,F)}}M||(M=new r);var W=M.get(e);if(W)return W;if(M.set(e,L),E(e))return e.forEach(function(r){L.add(t(r,n,P,r,e,M))}),L;if(_(e))return e.forEach(function(r,i){L.set(i,t(r,n,P,i,e,M))}),L;var H=j?U?p:h:U?keysIn:T,z=B?void 0:H(e);return i(z||e,function(r,i){z&&(r=e[i=r]),o(L,i,t(r,n,P,i,e,M))}),L}},function(t,e,n){var r=n(84),i=n(28);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(413),i=n(412),o=n(164),a=n(411);t.exports=function(t,e,n){var s=e+"";return o(t,i(s,a(r(s),n)))}},function(t,e,n){var r=n(219),i=n(246)(r);t.exports=i},function(t,e,n){var r=n(416),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",n=r[e],o=i.call(r,e)?n.length:0;o--;){var a=n[o],s=a.func;if(null==s||s==t)return a.name}return e}},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(156),i=n(154),o=n(211),a=n(415);t.exports=function(t){var e=o(t),n=a[e];if("function"!=typeof n||!(e in r.prototype))return!1;if(t===n)return!0;var s=i(n);return!!s&&t===s[0]}},function(t,e,n){var r=n(213),i=n(210),o=n(209),a=1,s=2,u=4,c=8,l=32,f=64;t.exports=function(t,e,n,h,p,d,v,m,y,g){var b=e&c;e|=b?l:f,(e&=~(b?f:l))&u||(e&=~(a|s));var _=[t,e,p,b?d:void 0,b?v:void 0,b?void 0:d,b?void 0:v,m,y,g],w=n.apply(void 0,_);return r(t)&&i(w,_),w.placeholder=h,o(w,t,e)}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=-1,u=r.length,c=-1,l=e.length,f=n(a-u,0),h=Array(f+l),p=!i;++o<f;)h[o]=t[o];for(var d=o;++c<l;)h[d+c]=e[c];for(;++s<u;)(p||o<a)&&(h[d+r[s]]=t[o++]);return h}},function(t,e){var n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=t.length,s=r.length,u=-1,c=e.length,l=n(a-s,0),f=Array(c+l),h=!i;++u<c;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[r[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}},function(t,e,n){var r=n(216),i=n(215),o=n(417),a=n(110),s=n(214),u=n(152),c=n(410),l=n(109),f=n(33),h=1,p=2,d=8,v=16,m=128,y=512;t.exports=function t(e,n,g,b,_,w,E,T,C,x){var S=n&m,k=n&h,N=n&p,A=n&(d|v),I=n&y,O=N?void 0:a(e);return function h(){for(var p=arguments.length,d=Array(p),v=p;v--;)d[v]=arguments[v];if(A)var m=u(h),y=o(d,m);if(b&&(d=r(d,b,_,A)),w&&(d=i(d,w,E,A)),p-=y,A&&p<x){var P=l(d,m);return s(e,n,t,h.placeholder,g,d,P,T,C,x-p)}var R=k?g:this,D=N?R[e]:e;return p=d.length,T?d=c(d,T):I&&p>1&&d.reverse(),S&&C<p&&(d.length=C),this&&this!==f&&this instanceof h&&(D=O||a(D)),D.apply(R,d)}}},function(t,e,n){var r=n(227),i=r&&new r;t.exports=i},function(t,e,n){var r=n(47),i=n(218),o=i?function(t,e){return i.set(t,e),t}:r;t.exports=o},function(t,e,n){var r=n(182),i=n(42)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(220),i=n(42)("iterator"),o=n(78);t.exports=n(26).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(47);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(453),i=n(253);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(39);t.exports=function(t){return t==t&&!r(t)}},function(t,e,n){var r=n(65)(n(33),"WeakMap");t.exports=r},function(t,e,n){var r=n(65)(n(33),"Set");t.exports=r},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(162),i=n(18);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(230),i=n(157),o=n(28);t.exports=function(t){return r(t,o,i)}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},function(t,e,n){var r=n(33).Uint8Array;t.exports=r},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(123),i=n(234),o=n(120),a=1,s=2;t.exports=function(t,e,n,u,c,l){var f=n&a,h=t.length,p=e.length;if(h!=p&&!(f&&p>h))return!1;var d=l.get(t);if(d&&l.get(e))return d==e;var v=-1,m=!0,y=n&s?new r:void 0;for(l.set(t,e),l.set(e,t);++v<h;){var g=t[v],b=e[v];if(u)var _=f?u(b,g,v,e,t,l):u(g,b,v,t,e,l);if(void 0!==_){if(_)continue;m=!1;break}if(y){if(!i(e,function(t,e){if(!o(y,e)&&(g===t||c(g,t,n,u,l)))return y.push(e)})){m=!1;break}}else if(g!==b&&!c(g,b,n,u,l)){m=!1;break}}return l.delete(t),l.delete(e),m}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(237),i=n(127),o=n(18),a=n(89),s=n(91),u=n(116),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&a(t),h=!n&&!l&&!f&&u(t),p=n||l||f||h,d=p?r(t.length,String):[],v=d.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||d.push(m);return d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=200;t.exports=function(t,e,n,l){var f=-1,h=i,p=!0,d=t.length,v=[],m=e.length;if(!d)return v;n&&(e=a(e,s(n))),l?(h=o,p=!1):e.length>=c&&(h=u,p=!1,e=new r(e));t:for(;++f<d;){var y=t[f],g=null==n?y:n(y);if(y=l||0!==y?y:0,p&&g==g){for(var b=m;b--;)if(e[b]===g)continue t;v.push(y)}else h(e,g,l)||v.push(y)}return v}},function(t,e,n){t.exports=n(482)},function(t,e,n){t.exports=n(483)},function(t,e,n){t.exports=n(485)},function(t,e){var n=800,r=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var a=i(),s=r-(a-o);if(o=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(65),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(126),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(167),i="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},function(t,e,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=n(513)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)}),e});t.exports=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(66))},function(t,e,n){var r=n(92),i=n(127),o=n(18),a=n(91),s=n(165),u=n(64);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&a(h,l)&&(o(t)||i(t))}},function(t,e,n){t.exports=n(523)},function(t,e,n){var r=n(262),i=n(177).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(57),i=n(54),o=n(70),a=n(49),s=n(257),u=n(533).KEY,c=n(79),l=n(178),f=n(174),h=n(137),p=n(42),d=n(171),v=n(170),m=n(532),y=n(531),g=n(55),b=n(71),_=n(69),w=n(183),E=n(95),T=n(175),C=n(530),x=n(134),S=n(56),k=n(94),N=x.f,A=S.f,I=C.f,O=r.Symbol,P=r.JSON,R=P&&P.stringify,D=p("_hidden"),M=p("toPrimitive"),L={}.propertyIsEnumerable,F=l("symbol-registry"),U=l("symbols"),j=l("op-symbols"),B=Object.prototype,q="function"==typeof O,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,H=o&&c(function(){return 7!=T(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=N(B,e);r&&delete B[e],A(t,e,n),r&&t!==B&&A(B,e,r)}:A,z=function(t){var e=U[t]=T(O.prototype);return e._k=t,e},K=q&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},G=function(t,e,n){return t===B&&G(j,e,n),g(t),e=w(e,!0),g(n),i(U,e)?(n.enumerable?(i(t,D)&&t[D][e]&&(t[D][e]=!1),n=T(n,{enumerable:E(0,!1)})):(i(t,D)||A(t,D,E(1,{})),t[D][e]=!0),H(t,e,n)):A(t,e,n)},Q=function(t,e){g(t);for(var n,r=m(e=_(e)),i=0,o=r.length;o>i;)G(t,n=r[i++],e[n]);return t},Y=function(t){var e=L.call(this,t=w(t,!0));return!(this===B&&i(U,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,D)&&this[D][t])||e)},X=function(t,e){if(t=_(t),e=w(e,!0),t!==B||!i(U,e)||i(j,e)){var n=N(t,e);return!n||!i(U,e)||i(t,D)&&t[D][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(_(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==D||e==u||r.push(e);return r},J=function(t){for(var e,n=t===B,r=I(n?j:_(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(B,e)||o.push(U[e]);return o};q||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(j,n),i(this,D)&&i(this[D],t)&&(this[D][t]=!1),H(this,t,E(1,n))};return o&&W&&H(B,t,{configurable:!0,set:e}),z(t)}).prototype,"toString",function(){return this._k}),x.f=X,S.f=G,n(255).f=C.f=$,n(136).f=Y,n(176).f=J,o&&!n(138)&&s(B,"propertyIsEnumerable",Y,!0),d.f=function(t){return z(p(t))}),a(a.G+a.W+a.F*!q,{Symbol:O});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)p(Z[tt++]);for(var et=k(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!q,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!q,"Object",{create:function(t,e){return void 0===e?T(t):Q(T(t),e)},defineProperty:G,defineProperties:Q,getOwnPropertyDescriptor:X,getOwnPropertyNames:$,getOwnPropertySymbols:J}),P&&a(a.S+a.F*(!q||c(function(){var t=O();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,R.apply(P,r)}}),O.prototype[M]||n(80)(O.prototype,M,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(80)},function(t,e,n){"use strict";var r=n(138),i=n(49),o=n(257),a=n(80),s=n(78),u=n(541),c=n(174),l=n(173),f=n(42)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,m,y){u(n,e,d);var g,b,_,w=function(t){if(!h&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",T="values"==v,C=!1,x=t.prototype,S=x[f]||x["@@iterator"]||v&&x[v],k=S||w(v),N=v?T?w("entries"):k:void 0,A="Array"==e&&x.entries||S;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),r||"function"==typeof _[f]||a(_,f,p)),T&&S&&"values"!==S.name&&(C=!0,k=function(){return S.call(this)}),r&&!y||!h&&!C&&x[f]||a(x,f,k),s[e]=k,s[E]=p,v)if(g={values:T?k:w("values"),keys:m?k:w("keys"),entries:N},y)for(b in g)b in x||o(x,b,g[b]);else i(i.P+i.F*(h||C),e,g);return g}},function(t,e,n){t.exports=n(546)},function(t,e,n){var r=n(180),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(182);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(54),i=n(69),o=n(548)(!1),a=n(179)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(71),i=n(57).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){t.exports=!n(70)&&!n(79)(function(){return 7!=Object.defineProperty(n(263)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";

/* object-assign (c) Sindre Sorhus @license MIT

  • /var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(s[a[l]]=n[a[l]])}}return s}},function(t,e,n){var r=n(53),i=n(111),o=n(152),a=n(109),s=r(function(t,e){var n=a(e,o(s));return i(t,64,void 0,e,n)});s.placeholder={},t.exports=s},function(t,e,n){var r=n(237),i=n(222),o=n(46),a=9007199254740991,s=4294967295,u=Math.min;t.exports=function(t,e){if((t=o(t))<1||t>a)return[];var n=s,c=u(t,s);e=i(e),t-=s;for(var l=r(c,e);++n<t;)e(n);return l}},function(t,e,n){var r=n(240),i=n(118);t.exports=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=i(n))==n?n:0),void 0!==e&&(e=(e=i(e))==e?e:0),r(i(t),e,n)}},function(t,e,n){var r=n(331)("round");t.exports=r},function(t,e,n){var r=n(108),i=n(84),o=n(332),a=n(38),s=n(88),u=n(28),c=Object.prototype.hasOwnProperty,l=o(function(t,e){if(s(e)||a(e))i(e,u(e),t);else for(var n in e)c.call(e,n)&&r(t,n,e[n])});t.exports=l},function(t,e,n){var r=n(48),i=n(34),o=n(203),a=n(204);t.exports=function(t,e){if(null==t)return{};var n=r(a(t),function(t){return[t]});return e=i(e),o(t,n,function(t,n){return e(t,n[0])})}},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){var o=null==t?0:t.length;return o?(e=n||void 0===e?1:i(e),r(t,0,(e=o-e)<0?0:e)):[]}},function(t,e,n){var r=n(43),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);t.exports=function(t){return(t=r(t))&&o.test(t)?t.replace(i,"\\$&"):t}},function(t,e,n){var r=n(337),i=n(336),o=n(34),a=n(18),s=n(77);t.exports=function(t,e,n){var u=a(t)?r:i;return n&&s(t,e,n)&&(e=void 0),u(t,o(e,3))}},function(t,e,n){var r=n(350),i=n(343),o=r(function(t,e,n){return t+(n?" ":"")+i(e)});t.exports=o},function(t,e,n){var r=n(23)("toArray",n(352),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("flatMap",n(353));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("split",n(356));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("filter",n(73));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("identity",n(47),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("uniq",n(74),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(87),i=n(86),o=n(160),a=n(34),s=n(107),u=n(18),c=n(89),l=n(44),f=n(39),h=n(116);t.exports=function(t,e,n){var p=u(t),d=p||c(t)||h(t);if(e=a(e,4),null==n){var v=t&&t.constructor;n=d?p?new v:[]:f(t)&&l(v)?i(s(t)):{}}return(d?r:o)(t,function(t,r,i){return e(n,t,r,i)}),n}},function(t,e,n){var r=n(359)();t.exports=r},function(t,e,n){t.exports=n(360)},function(t,e,n){var r=n(41),i=n(30),o="[object Boolean]";t.exports=function(t){return!0===t||!1===t||i(t)&&r(t)==o}},function(t,e,n){var r=n(23)("memoize",n(250));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("sortBy",n(374));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("take",n(375));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isFunction",n(44),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isPlainObject",n(81),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("pick",n(97));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("isObject",n(39),n(40));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("trim",n(382));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(23)("difference",n(99));r.placeholder=n(21),t.exports=r},function(t,e,n){var r=n(112),i=n(441)(function(t,e,n){r(t,n,e)});t.exports=i},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,f){if("string"!=typeof n){if(l){var h=c(n);h&&h!==l&&t(e,h,f)}var p=a(n);s&&(p=p.concat(s(n)));for(var d=0;d<p.length;++d){var v=p[d];if(!(r[v]||i[v]||f&&f[v])){var m=u(n,v);try{o(e,v,m)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";n.r(e);var r=n(82),i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};

/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

                                                                                                                                                          • */function o(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function s(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function u(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var c=n(14),l=n.n(c);n.d(e,"registerMessaging",function(){return L}),n.d(e,"isSupported",function(){return F});var f,h,p,d={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},v=((f={})[d.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",f[d.AVAILABLE_IN_SW]="This method is available in a service worker context.",f[d.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",f[d.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",f[d.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",f[d.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",f[d.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",f[d.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",f[d.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",f[d.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",f[d.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",f[d.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",f[d.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",f[d.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",f[d.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",f[d.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",f[d.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",f[d.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",f[d.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",f[d.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",f[d.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",f[d.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",f[d.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",f[d.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",f[d.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",f[d.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",f[d.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",f[d.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",f[d.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",f[d.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",f[d.BAD_SCOPE]="The service worker scope must be a string with at least one character.",f[d.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",f[d.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",f[d.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",f[d.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",f[d.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",f[d.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",f[d.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",f),m=new r.ErrorFactory("messaging","Messaging",v),y=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),g="https://fcm.googleapis.com";function b(t,e){if(null==t||null==e)return!1;if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<t.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function _(t){return function(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(null,e))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(t){t.TYPE_OF_MSG="firebase-messaging-msg-type",t.DATA="firebase-messaging-msg-data"}(h||(h={})),function(t){t.PUSH_MSG_RECEIVED="push-msg-received",t.NOTIFICATION_CLICKED="notification-clicked"}(p||(p={}));var w=function(){function t(){}return t.prototype.getToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s,c,l,f;return u(this,function(u){switch(u.label){case 0:r=_(e.getKey("p256dh")),i=_(e.getKey("auth")),o="authorized_entity="+t+"&endpoint="+e.endpoint+"&encryption_key="+r+"&encryption_auth="+i,b(n.buffer,y.buffer)||(a=_(n),o+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:o},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",c)];case 2:return[4,u.sent().json()];case 3:return l=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_SUBSCRIBE_FAILED);case 5:if(l.error)throw f=l.error.message,m.create(d.TOKEN_SUBSCRIBE_FAILED,{message:f});if(!l.token)throw m.create(d.TOKEN_SUBSCRIBE_NO_TOKEN);if(!l.pushSet)throw m.create(d.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:l.token,pushSet:l.pushSet}]}})})},t.prototype.updateToken=function(t,e,n,r,i){return s(this,void 0,void 0,function(){var o,a,s,c,l,f,h,p;return u(this,function(u){switch(u.label){case 0:o=_(r.getKey("p256dh")),a=_(r.getKey("auth")),s="push_set="+n+"&token="+e+"&authorized_entity="+t+"&endpoint="+r.endpoint+"&encryption_key="+o+"&encryption_auth="+a,b(i.buffer,y.buffer)||(c=_(i),s+="&application_pub_key="+c),(l=new Headers).append("Content-Type","application/x-www-form-urlencoded"),f={method:"POST",headers:l,body:s},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/subscribe",f)];case 2:return[4,u.sent().json()];case 3:return h=u.sent(),[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UPDATE_FAILED);case 5:if(h.error)throw p=h.error.message,m.create(d.TOKEN_UPDATE_FAILED,{message:p});if(!h.token)throw m.create(d.TOKEN_UPDATE_NO_TOKEN);return[2,h.token]}})})},t.prototype.deleteToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:r="authorized_entity="+t+"&token="+e+"&pushSet="+n,(i=new Headers).append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:i,body:r},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(g+"/fcm/connect/unsubscribe",o)];case 2:return[4,u.sent().json()];case 3:if((a=u.sent()).error)throw s=a.error.message,m.create(d.TOKEN_UNSUBSCRIBE_FAILED,{message:s});return[3,5];case 4:throw u.sent(),m.create(d.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},t}();function E(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}var T="undefined",C="fcm_token_object_Store";function x(){var t=indexedDB.open(T);t.onerror=function(t){},t.onsuccess=function(e){!function(t){if(t.objectStoreNames.contains(C)){var e=t.transaction(C).objectStore(C),n=new w,r=e.openCursor();r.onerror=function(t){console.warn("Unable to cleanup old IDB.",t)},r.onsuccess=function(){var e=r.result;if(e){var i=e.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),e.continue()}else t.close(),indexedDB.deleteDatabase(T)}}}(t.result)}}var S=function(){function t(){this.dbPromise=null}return t.prototype.get=function(t){return this.createTransaction(function(e){return e.get(t)})},t.prototype.getIndex=function(t,e){return this.createTransaction(function(n){return n.index(t).get(e)})},t.prototype.put=function(t){return this.createTransaction(function(e){return e.put(t)},"readwrite")},t.prototype.delete=function(t){return this.createTransaction(function(e){return e.delete(t)},"readwrite")},t.prototype.closeDatabase=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:t.sent().close(),this.dbPromise=null,t.label=2;case 2:return[2]}})})},t.prototype.createTransaction=function(t,e){return void 0===e&&(e="readonly"),s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),r=n.transaction(this.objectStoreName,e),i=r.objectStore(this.objectStoreName),[4,function(t){return new Promise(function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}})}(t(i))];case 2:return o=a.sent(),[2,new Promise(function(t,e){r.oncomplete=function(){t(o)},r.onerror=function(){e(r.error)}})]}})})},t.prototype.getDb=function(){var t=this;return this.dbPromise||(this.dbPromise=new Promise(function(e,n){var r=indexedDB.open(t.dbName,t.dbVersion);r.onsuccess=function(){e(r.result)},r.onerror=function(){t.dbPromise=null,n(r.error)},r.onupgradeneeded=function(e){return t.onDbUpgrade(r,e)}})),this.dbPromise},t}();var k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_token_details_db",e.dbVersion=3,e.objectStoreName="fcm_token_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t,e){var n=t.result;switch(e.oldVersion){case 0:(r=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),r.createIndex("fcmToken","fcmToken",{unique:!0});case 1:x();case 2:var r,i=(r=t.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var t=i.result;if(t){var e=t.value,n=a({},e);e.createTime||(n.createTime=Date.now()),"string"==typeof e.vapidKey&&(n.vapidKey=E(e.vapidKey)),"string"==typeof e.auth&&(n.auth=E(e.auth).buffer),"string"==typeof e.auth&&(n.p256dh=E(e.p256dh).buffer),t.update(n),t.continue()}}}},e.prototype.getTokenDetailsFromToken=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_TOKEN);return N({fcmToken:t}),[2,this.getIndex("fcmToken",t)]})})},e.prototype.getTokenDetailsFromSWScope=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t)throw m.create(d.BAD_SCOPE);return N({swScope:t}),[2,this.get(t)]})})},e.prototype.saveTokenDetails=function(t){return s(this,void 0,void 0,function(){return u(this,function(e){if(!t.swScope)throw m.create(d.BAD_SCOPE);if(!t.vapidKey)throw m.create(d.BAD_VAPID_KEY);if(!t.endpoint||!t.auth||!t.p256dh)throw m.create(d.BAD_SUBSCRIPTION);if(!t.fcmSenderId)throw m.create(d.BAD_SENDER_ID);if(!t.fcmToken)throw m.create(d.BAD_TOKEN);if(!t.fcmPushSet)throw m.create(d.BAD_PUSH_SET);return N(t),[2,this.put(t)]})})},e.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return"string"!=typeof t||0===t.length?[2,Promise.reject(m.create(d.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(e.swScope)];case 2:return n.sent(),[2,e]}})})},e}(S);function N(t){if(t.fcmToken&&("string"!=typeof t.fcmToken||0===t.fcmToken.length))throw m.create(d.BAD_TOKEN);if(t.swScope&&("string"!=typeof t.swScope||0===t.swScope.length))throw m.create(d.BAD_SCOPE);if(t.vapidKey&&(!(t.vapidKey instanceof Uint8Array)||65!==t.vapidKey.length))throw m.create(d.BAD_VAPID_KEY);if(t.endpoint&&("string"!=typeof t.endpoint||0===t.endpoint.length))throw m.create(d.BAD_SUBSCRIPTION);if(t.auth&&!(t.auth instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.p256dh&&!(t.p256dh instanceof ArrayBuffer))throw m.create(d.BAD_SUBSCRIPTION);if(t.fcmSenderId&&("string"!=typeof t.fcmSenderId||0===t.fcmSenderId.length))throw m.create(d.BAD_SENDER_ID);if(t.fcmPushSet&&("string"!=typeof t.fcmPushSet||0===t.fcmPushSet.length))throw m.create(d.BAD_PUSH_SET)}var A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_vapid_details_db",e.dbVersion=1,e.objectStoreName="fcm_vapid_object_Store",e}return o(e,t),e.prototype.onDbUpgrade=function(t){t.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},e.prototype.getVapidFromSWScope=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);return[4,this.get(t)];case 1:return[2,(e=n.sent())?e.vapidKey:void 0]}})})},e.prototype.saveVapidDetails=function(t,e){return s(this,void 0,void 0,function(){var n;return u(this,function(r){if("string"!=typeof t||0===t.length)throw m.create(d.BAD_SCOPE);if(null===e||65!==e.length)throw m.create(d.BAD_VAPID_KEY);return n={swScope:t,vapidKey:e},[2,this.put(n)]})})},e.prototype.deleteVapidDetails=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(t)];case 1:if(!(e=n.sent()))throw m.create(d.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(t)];case 2:return n.sent(),[2,e]}})})},e}(S),I="messagingSenderId",O=function(){function t(t){var e=this;if(!t.options[I]||"string"!=typeof t.options[I])throw m.create(d.BAD_SENDER_ID);this.messagingSenderId=t.options[I],this.tokenDetailsModel=new k,this.vapidDetailsModel=new A,this.iidModel=new w,this.app=t,this.INTERNAL={delete:function(){return e.delete()}}}return t.prototype.getToken=function(){return s(this,void 0,void 0,function(){var t,e,n,r,i;return u(this,function(o){switch(o.label){case 0:if("denied"===(t=this.getNotificationPermission_()))throw m.create(d.NOTIFICATIONS_BLOCKED);return"granted"!==t?[2,null]:[4,this.getSWRegistration_()];case 1:return e=o.sent(),[4,this.getPublicVapidKey_()];case 2:return n=o.sent(),[4,this.getPushSubscription(e,n)];case 3:return r=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(e.scope)];case 4:return(i=o.sent())?[2,this.manageExistingToken(e,r,n,i)]:[2,this.getNewToken(e,r,n)]}})})},t.prototype.manageExistingToken=function(t,e,n,r){return s(this,void 0,void 0,function(){return u(this,function(i){switch(i.label){case 0:return function(t,e,n){if(!n.vapidKey||!b(e.buffer,n.vapidKey.buffer))return!1;var r=t.endpoint===n.endpoint,i=b(t.getKey("auth"),n.auth),o=b(t.getKey("p256dh"),n.p256dh);return r&&i&&o}(e,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(t,e,n,r)]:[4,this.deleteTokenFromDB(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(t,e,n)]}})})},t.prototype.updateToken=function(t,e,n,r){return s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,r.fcmToken,r.fcmPushSet,e,n)];case 1:return i=s.sent(),o={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i,fcmPushSet:r.fcmPushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return s.sent(),[2,i];case 4:return a=s.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}})})},t.prototype.getNewToken=function(t,e,n){return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,e,n)];case 1:return r=o.sent(),i={swScope:t.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r.token,fcmPushSet:r.pushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,n)];case 3:return o.sent(),[2,r.token]}})})},t.prototype.deleteToken=function(t){return s(this,void 0,void 0,function(){var e,n;return u(this,function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(t)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(e=r.sent())?[4,e.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}})})},t.prototype.deleteTokenFromDB=function(t){return s(this,void 0,void 0,function(){var e;return u(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(t)];case 1:return e=n.sent(),[4,this.iidModel.deleteToken(e.fcmSenderId,e.fcmToken,e.fcmPushSet)];case 2:return n.sent(),[2]}})})},t.prototype.getPushSubscription=function(t,e){return t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e})})},t.prototype.requestPermission=function(){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.useServiceWorker=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.usePublicVapidKey=function(t){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onMessage=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.onTokenRefresh=function(t,e,n){throw m.create(d.AVAILABLE_IN_WINDOW)},t.prototype.setBackgroundMessageHandler=function(t){throw m.create(d.AVAILABLE_IN_SW)},t.prototype.delete=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return t.sent(),[2]}})})},t.prototype.getNotificationPermission_=function(){return Notification.permission},t.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},t.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},t.prototype.getIidModel=function(){return this.iidModel},t}();var P=function(t){function e(e){var n=t.call(this,e)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(t){n.onPush(t)}),self.addEventListener("pushsubscriptionchange",function(t){n.onSubChange(t)}),self.addEventListener("notificationclick",function(t){n.onNotificationClick(t)}),n}return o(e,t),e.prototype.onPush=function(t){t.waitUntil(this.onPush_(t))},e.prototype.onSubChange=function(t){t.waitUntil(this.onSubChange_(t))},e.prototype.onNotificationClick=function(t){t.waitUntil(this.onNotificationClick_(t))},e.prototype.onPush_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i,o,a;return u(this,function(s){switch(s.label){case 0:if(!t.data)return[2];try{e=t.data.json()}catch(t){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(e)]:(n=this.getNotificationData_(e))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return i=s.sent(),o=n.actions,a=Notification.maxActions,o&&a&&o.length>a&&console.warn("This browser only supports "+a+" actions.The remaining actions will not be displayed."),[2,i.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}})})},e.prototype.onSubChange_=function(t){return s(this,void 0,void 0,function(){var t,e,n,r;return u(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return t=i.sent(),[3,3];case 2:throw e=i.sent(),m.create(d.UNABLE_TO_RESUBSCRIBE,{message:e});case 3:return i.trys.push([3,5,,8]),[4,t.pushManager.getSubscription()];case 4:return i.sent(),[3,8];case 5:return n=i.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(t.scope)];case 6:if(!(r=i.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw i.sent(),n;case 8:return[2]}})})},e.prototype.onNotificationClick_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return t.notification&&t.notification.data&&t.notification.data.FCM_MSG?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(e=t.notification.data.FCM_MSG).notification&&(n=e.fcmOptions&&e.fcmOptions.link||e.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(r=o.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return r=o.sent(),[3,5];case 3:return[4,r.focus()];case 4:r=o.sent(),o.label=5;case 5:return r?(delete e.notification,delete e.fcmOptions,i=D(p.NOTIFICATION_CLICKED,e),[2,this.attemptToMessageClient_(r,i)]):[2]}})})},e.prototype.getNotificationData_=function(t){if(t&&"object"==typeof t.notification){var e,n=a({},t.notification);return n.data=a({},t.notification.data,((e={}).FCM_MSG=t,e)),n}},e.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw m.create(d.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=t},e.prototype.getWindowClient_=function(t){return s(this,void 0,void 0,function(){var e,n,r,i;return u(this,function(o){switch(o.label){case 0:return e=new URL(t,self.location.href).href,[4,R()];case 1:for(n=o.sent(),r=null,i=0;i<n.length;i++)if(new URL(n[i].url,self.location.href).href===e){r=n[i];break}return[2,r]}})})},e.prototype.attemptToMessageClient_=function(t,e){return s(this,void 0,void 0,function(){return u(this,function(n){if(!t)throw m.create(d.NO_WINDOW_CLIENT_TO_MSG);return t.postMessage(e),[2]})})},e.prototype.hasVisibleClients_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,R()];case 1:return[2,t.sent().some(function(t){return"visible"===t.visibilityState})]}})})},e.prototype.sendMessageToWindowClients_=function(t){return s(this,void 0,void 0,function(){var e,n,r=this;return u(this,function(i){switch(i.label){case 0:return[4,R()];case 1:return e=i.sent(),n=D(p.PUSH_MSG_RECEIVED,t),[4,Promise.all(e.map(function(t){return r.attemptToMessageClient_(t,n)}))];case 2:return i.sent(),[2]}})})},e.prototype.getSWRegistration_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,self.registration]})})},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(t=n.sent()))throw m.create(d.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(t.scope)];case 2:return null==(e=n.sent())?[2,y]:[2,e]}})})},e}(O);function R(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function D(t,e){return(n={})[h.TYPE_OF_MSG]=t,n[h.DATA]=e,n;var n}var M=function(t){function e(e){var n=t.call(this,e)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(r.createSubscribe)(function(t){n.messageObserver=t}),n.onTokenRefreshInternal=Object(r.createSubscribe)(function(t){n.tokenRefreshObserver=t}),n.setupSWMessageListener_(),n}return o(e,t),e.prototype.getToken=function(){return s(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return s(this,void 0,void 0,function(){var t,e;return u(this,function(n){switch(n.label){case 0:if(!(t=document.querySelector('link[rel="manifest"]')))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(t.href)];case 2:return[4,n.sent().json()];case 3:return e=n.sent(),[3,5];case 4:return n.sent(),[2];case 5:if(!e||!e.gcm_sender_id)return[2];if("103953800507"!==e.gcm_sender_id)throw m.create(d.INCORRECT_GCM_SENDER_ID);return[2]}})})}()),[4,this.manifestCheckPromise];case 1:return e.sent(),[2,t.prototype.getToken.call(this)]}})})},e.prototype.requestPermission=function(){return s(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?m.create(d.PERMISSION_BLOCKED):m.create(d.PERMISSION_DEFAULT)}})})},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw m.create(d.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw m.create(d.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=t},e.prototype.usePublicVapidKey=function(t){if("string"!=typeof t)throw m.create(d.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw m.create(d.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var e=E(t);if(65!==e.length)throw m.create(d.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=e},e.prototype.onMessage=function(t,e,n){return"function"==typeof t?this.onMessageInternal(t,e,n):this.onMessageInternal(t)},e.prototype.onTokenRefresh=function(t,e,n){return"function"==typeof t?this.onTokenRefreshInternal(t,e,n):this.onTokenRefreshInternal(t)},e.prototype.waitForRegistrationToActivate_=function(t){var e=t.installing||t.waiting||t.active;return new Promise(function(n,r){if(e)if("activated"!==e.state)if("redundant"!==e.state){var i=function(){if("activated"===e.state)n(t);else{if("redundant"!==e.state)return;r(m.create(d.SW_REG_REDUNDANT))}e.removeEventListener("statechange",i)};e.addEventListener("statechange",i)}else r(m.create(d.SW_REG_REDUNDANT));else n(t);else r(m.create(d.NO_SW_IN_REG))})},e.prototype.getSWRegistration_=function(){var t=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(t){throw m.create(d.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(e){return t.waitForRegistrationToActivate_(e).then(function(){return t.registrationToUse=e,e.update(),e})}))},e.prototype.getPublicVapidKey_=function(){return s(this,void 0,void 0,function(){return u(this,function(t){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,y]})})},e.prototype.setupSWMessageListener_=function(){var t=this;navigator.serviceWorker.addEventListener("message",function(e){if(e.data&&e.data[h.TYPE_OF_MSG]){var n=e.data;switch(n[h.TYPE_OF_MSG]){case p.PUSH_MSG_RECEIVED:case p.NOTIFICATION_CLICKED:var r=n[h.DATA];t.messageObserver&&t.messageObserver.next(r)}}},!1)},e}(O);function L(t){var e={isSupported:F};t.INTERNAL.registerService("messaging",function(t){if(!F())throw m.create(d.UNSUPPORTED_BROWSER);return self&&"ServiceWorkerGlobalScope"in self?new P(t):new M(t)},e)}function F(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}L(l.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t=this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Sidebar example")),o.default.createElement(a.default,{color:"grey",style:{paddingBottom:"30px"}},o.default.createElement(u.Grid,{columns:2,textAlign:"left",stackable:!0},o.default.createElement(u.Grid.Column,{width:13},o.default.createElement(u.Segment,{style:{padding:"30px"}},o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Title one. Yay :)"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Second title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"paragraph.png"}),o.default.createElement("p",null),o.default.createElement(u.Divider,null),o.default.createElement(u.Header,{style:{marginBottom:"30px"}},"Finally, third title"),o.default.createElement(u.Image,{style:{width:"100%"},className:"ui wireframe image",src:"paragraph.png"}),o.default.createElement("p",null))),o.default.createElement(u.Grid.Column,{width:3,textAlign:"center"},o.default.createElement(u.Menu,{vertical:!0,fluid:!0},o.default.createElement(u.Menu.Item,{name:"Title one. Yay :)",active:"Title one. Yay :)"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Second title",active:"Second title"===t,onClick:this.handleItemClick}),o.default.createElement(u.Menu.Item,{name:"Finally, third title",active:"Finally, third title"===t,onClick:this.handleItemClick}))))))}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(102)),u=(c(n(76)),n(37));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"Title one. Yay :)"},n.handleItemClick=function(t,e){var r=e.name;n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){var t;this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.default,{color:"navy",style:{height:"30vh"}},o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Outreach")),o.default.createElement(a.default,{color:"white"},o.default.createElement(u.Container,{text:!0},o.default.createElement(u.Grid,(l(t={stackable:!0,divided:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"Work with us!"),o.default.createElement("p",null,"We would love to collaborate with other iGem teams. To get in contact, use the details below.")),o.default.createElement(u.Grid.Column,{verticalAlign:"center"},o.default.createElement(u.Segment,{style:{marginTop:"1em"}},o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Email: ",o.default.createElement("a",{href:"#"},"nottinghamigem@outlook.com")),o.default.createElement(u.List.Item,null,"Phone: (+44) 0115 846 8001"),o.default.createElement(u.List.Item,{style:{marginTop:"1em"}},o.default.createElement("strong",null,"Address: "),o.default.createElement(u.List,null,o.default.createElement(u.List.Item,null,"Centre for Biomolecular Sciences"),o.default.createElement(u.List.Item,null,"University of Nottingham"),o.default.createElement(u.List.Item,null,"Nottingham"),o.default.createElement(u.List.Item,null,"NG7 2RD")))))))))))}}]),e}();e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=(u(n(4)),u(n(147)),u(n(61))),s=n(37);function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"render",value:function(){return o.default.createElement(a.default,{color:"white",style:{paddingBottom:"30px",backgroundColor:"white"}},o.default.createElement(s.Grid,{verticalAlign:"middle",columns:9,inverted:!0,doubling:!0},o.default.createElement(s.Grid.Row,null,o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/BBSRC%20.jpg?alt=media&token=4bf35f00-9185-4693-b9c4-bdf4182a48a2"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/DW%20Logo.jpg?alt=media&token=84bd9fe3-59c9-4c0c-a6b5-7db2117fe24a"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Eppendorf.png?alt=media&token=5fc72b9d-bbca-4c3d-bdf2-536638c40615"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Labfolder.png?alt=media&token=3dde8225-2853-4f7b-8b1d-51c3813b9174"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/NEB.png?alt=media&token=c8504b3a-e60d-42d7-bcc0-d17921822bd6"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Qiagen.png?alt=media&token=0d3417a9-f532-4ae0-b209-0f9cdbf5e40f"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/Snapgene%20logo.png?alt=media&token=8bd2b021-05a4-4952-b29c-7c6388d2010e"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/SynBio.png?alt=media&token=30fb2ec3-18ca-45d0-a9f1-a5a30a28f334"})),o.default.createElement(s.Grid.Column,null,o.default.createElement(s.Image,{style:{margin:"auto",maxHeight:"100px"},src:"https://firebasestorage.googleapis.com/v0/b/igem-7f6f6.appspot.com/o/wellcome-logo-black.png?alt=media&token=5b2921f8-a279-4cfb-b6ff-10b6fc8d2212"})))))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=l(i),a=l(n(61)),s=l(n(102)),u=(l(n(76)),n(37)),c=n(101);function l(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"blue",style:{height:"30vh"}},o.default.createElement(c.Link,{to:"/Team"},o.default.createElement("div",{style:{color:"white",position:"absolute",right:"20px",top:"15px",fontSize:"2.5em",cursor:"pointer"}},"×")),o.default.createElement(u.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},unescape(window.location.hash.split("?name=")[1]))),o.default.createElement(a.default,{color:"white",style:{height:"100vh"}}),o.default.createElement("style",null,".ui.menu {display:none}"))}}]),e}();e.default=f},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp{padding:0!important}.Team_profileName_1XfIKGYChuTmXuK_SxlpeJ{position:absolute;top:3em;padding-left:.5em;background-color:#ffffff6b;padding:.5em;margin-left:.5em}.Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF{height:10em}.Team_profilePicture_20LK8DeEyHHschQzoZXrdm{width:10em;margin-top:2.5em;float:right;border-radius:50%;margin-right:2.5em}.Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT{padding:2em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Team/Team.css"],names:[],mappings:"AAAA,6CACC,mBAAuB,CACvB,AACD,yCACI,kBAAmB,AACnB,QAAW,AACX,kBAAoB,AACpB,2BAA4B,AAC5B,aAAqB,AACrB,gBAAmB,CACtB,AACD,0CACC,WAAY,CACZ,AACD,4CACI,WAAY,AACZ,iBAAkB,AAClB,YAAa,AACb,kBAAmB,AACnB,kBAAoB,CACvB,AACD,gDACC,WAAW,CACX",file:"Team.css",sourcesContent:[".unpaddedContent {\n\tpadding:0px !important;\n}\n.profileName {\n position: absolute;\n top: 3.0em;\n padding-left: 0.5em;\n background-color: #ffffff6b;\n padding: 0.5em 0.5em;\n margin-left: 0.5em;\n}\n.profileHeader { \n\theight:10em;\n}\n.profilePicture {\n width: 10em;\n margin-top: 2.5em;\n float: right;\n border-radius: 50%;\n margin-right: 2.5em;\n}\n.profileDescription {\n\tpadding:2em\n}"],sourceRoot:""}]),e.locals={unpaddedContent:"Team_unpaddedContent_1bKO-6G8ZHNv9SFgaI3bUp",profileName:"Team_profileName_1XfIKGYChuTmXuK_SxlpeJ",profileHeader:"Team_profileHeader_jKt8NKsZO4GZdTCQaIkPF",profilePicture:"Team_profilePicture_20LK8DeEyHHschQzoZXrdm",profileDescription:"Team_profileDescription_1D4LaYdA_XMjJC5P7A98yT"}},function(t,e,n){var r=n(303);"string"==typeof r&&(r=t.i,r,"");var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=[{name:"Hassan Al-ubeidi",role:"Wiki / Modeller",paragraph:"I study Computer Science and I work within the lab to help out with the modelling and create the Wiki. I found iGem appealing because I wanted to do something interdisciplenary, and enjoyed Biology and Chemistry at A level/ Highschool.\n An interesting fact about me is that I have flappy hands and can clap with one hand.",hierarchy:"student",profilePicture:"blank-profile-picture-973460_1280.png",coverPicture:"Screen_Shot_2018_06_25_at_10_41_58.png"},{name:"Daniel Partridge",role:"Web Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Fatima Taha",role:"Team Leader / Wet Lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lucy Allen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Nemira Žilinskaitė",role:"Wet lab/ Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Varun Lobo",role:"Outreach",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Ruth Bentley",role:"Modeller",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Eun Cho",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Sofya Berestova",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Lukas Hoen",role:"Wet lab",paragraph:"",hierarchy:"student",profilePicture:"",coverPicture:""},{name:"Chris Humphreys",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Daphne Groothius",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Craig Woods",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""},{name:"Louise",role:"Supervisor",paragraph:"",hierarchy:"supervisor",profilePicture:"",coverPicture:""}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n,i,o=960,a=200,s=96,u=50,c=50,l="role",f="name",h="views",p=-550,d="hearts",v=!1,m=!1;function y(y){var g=y.datum();y;var b=y,_=b.selectAll("svg");_.attr("width",o).attr("height",a),g.forEach(function(t){_.append("defs").append("pattern").attr("id",t.name.split(" ")[0]).attr("height","100%").attr("width","100%").append("image").attr("height","100").attr("width","100").attr("preserveAspectRatio","none").attr("xlink:href","dist/images/"+t.name.split(" ")[0]+" Square.jpg")}),i=_;var w=y.append("div").style("position","absolute").style("visibility","hidden").style("color","black").style("padding","8px").style("background-color","#e9ecef").style("border-radius","6px").style("text-align","center").style("width","200px").text("");r.forceSimulation(g).force("charge",r.forceManyBody().strength([p])).force("x",r.forceX()).force("y",r.forceY()).on("tick",function(t){C.attr("transform",function(t){return"translate("+[t.x+o/2,t.y+(a+s)/2]+")"})});v?r.scaleOrdinal().domain(n).range(e):r.scaleOrdinal(r.schemeCategory10);var E=r.min(g,function(t){return+t[h]}),T=r.max(g,function(t){return+t[h]}),C=(r.scaleLinear().domain([E,T]).range([u,c]),_.selectAll("circle").data(g).enter().append("g").attr("transform","translate("+[o/2,a/2]+")").style("opacity",1));_.append("circle").attr("id","petri-dish").attr("r","350").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#e4e4e4").style("stroke-width",30),_.append("circle").attr("id","petri-dish").attr("r","320").attr("cx",400).attr("cy",420).style("fill","none").style("stroke","#b9b9b9").style("stroke-width",30),C.append("circle").attr("id",function(t,e){return e}).attr("r",50).attr("fill",function(t){return"url(#"+t.name.split(" ")[0]+")"}).style("stroke",function(t){return"student"==t.hierarchy?"#00547f":"#ffd300"}).style("stroke-width",3).on("mouseover",function(t){return w.html(t[f]+"
                                                                                                                                                            "+t[l]+"
                                                                                                                                                            "),w.style("visibility","visible")}).on("mousemove",function(){return r.select(this).style("stroke-width",6),r.select(this).style("cursor","pointer"),w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return r.select(this).style("stroke-width",3),r.select(this).style("cursor","default"),w.style("visibility","hidden")}).on("click",function(e){console.log(e),t(e.name,e.paragraph,e.role,e.profilePicture,e.coverPicture)}),C.append("clipPath").attr("id",function(t,e){return"clip-"+e}).append("use").attr("xlink:href",function(t,e){return"#"+e}),m&&C.append("text").attr("clip-path",function(t,e){return"url(#clip-"+e+")"}).attr("text-anchor","middle").append("tspan").attr("x",function(t){return 0}).attr("y",function(t){return".3em"}).text(function(t){return t[f]}).on("mouseover",function(t){return w.html(t[f]+"
                                                                                                                                                            "+t[l]+"
                                                                                                                                                            "+t[h]+" "+d),w.style("visibility","visible")}).on("mousemove",function(){return w.style("top",r.event.pageY-10+"px").style("left",r.event.pageX+10+"px")}).on("mouseout",function(){return w.style("visibility","hidden")})}return y.width=function(t){return arguments.length?(o=t,y):o},y.height=function(t){return arguments.length?(s=.05*(a=t),y):a},y.columnForColors=function(t){return arguments.length?(l=t,y):l},y.columnForRadius=function(t){return arguments.length?(h=t,y):h},y.columnForTitle=function(t){return arguments.length?(f=t,y):f},y.minRadius=function(t){return arguments.length?(u=t,y):u},y.maxRadius=function(t){return arguments.length?(c=t,y):c},y.forceApart=function(t){return arguments.length?(p=t,y):p},y.unitName=function(t){return arguments.length?(d=t,y):d},y.customColors=function(t,r){return v=!0,n=t,e=r,y},y.showTitleOnCircle=function(t){return arguments.length?(m=t,y):m},y.title=function(t){return arguments.length?(title=t,y):title},y.remove=function(t){return i.selectAll("text").style("opacity",1).transition().duration(500).style("opacity","0").remove(),arguments.length?i.selectAll("g").style("opacity",1).duration(500).style("opacity","0").remove().on("end",t):i.selectAll("g").style("opacity",1).transition().duration(500).style("opacity","0").remove(),y},y};var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(196)),s=c(n(306)),u=c(n(305));n(37);function c(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){var t=u.default,e=(0,s.default)(this.props.toggle).width(800).height(800);a.select("#chart").datum(t).call(e)}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement("div",{class:"chart-example",id:"chart"},o.default.createElement("svg",null)))}}]),e}();e.default=l},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#f25d53;text-align:center}.Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#c23616;text-align:center}.Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#e1b12c;text-align:center}.Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#0097e6;text-align:center}.Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#192a56;text-align:center}.Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG{color:#fff;height:400px;padding:5.5em 0;min-width:100vw;background-color:#2f3640;text-align:center}.Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ{height:400px;padding:5.5em 0;min-width:100vw;background-color:#f5f6fa;text-align:center}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Jumbotron/Jumbotron.css"],names:[],mappings:"AAAA,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAiB,AACjB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,+CACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,kDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,gDACC,WAAY,AACZ,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB,AACD,iDACC,aAAc,AACd,gBAAmB,AACnB,gBAAgB,AAChB,yBAA0B,AAC1B,iBAAkB,CAClB",file:"Jumbotron.css",sourcesContent:[".orangeJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n\ttext-align:center;\n}\n.redJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #c23616;\n\ttext-align:center;\n}\n.yellowJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #e1b12c;\n\ttext-align:center;\n}\n.blueJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #0097e6;\n\ttext-align:center;\n}\n.navyJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #192a56;\n\ttext-align:center;\n}\n.darkJumbotron {\n\tcolor:white;\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #2f3640;\n\ttext-align:center;\n}\n.whiteJumbotron {\n\theight: 400px;\n\tpadding: 5.5em 0px;\n\tmin-width:100vw;\n\tbackground-color: #f5f6fa;\n\ttext-align:center;\n}"],sourceRoot:""}]),e.locals={orangeJumbotron:"Jumbotron_orangeJumbotron_21_fvgX1vMXpPv5FiOTkV9",redJumbotron:"Jumbotron_redJumbotron_3Aj8AIktZahBfU3Eu2LyRy",yellowJumbotron:"Jumbotron_yellowJumbotron_3VEoe9DDu5KSrL2JxzTNbL",blueJumbotron:"Jumbotron_blueJumbotron_1ic3ruLGsHN5eI38hsM3id",navyJumbotron:"Jumbotron_navyJumbotron_2yakTOJIamJrMvn3pN9fxF",darkJumbotron:"Jumbotron_darkJumbotron_1rxNtYD0Yt85NSBx7n3YdG",whiteJumbotron:"Jumbotron_whiteJumbotron_1KJxz8f2yCGcTiv9Dci9qQ"}},function(t,e,n){var r=n(308);"string"==typeof r&&(r=t.i,r,"");var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=f(i),a=f(n(61)),s=f(n(102)),u=(f(n(76)),f(n(307))),c=n(37),l=f(n(304));n(101);function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={showModal:!1,userInfo:{name:null,paragraph:null,profilePicture:null,role:null,profileCover:null}},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"toggleProfile",value:function(t,e,n,r,i){this.setState({showModal:!0,userInfo:{name:t,paragraph:e,profilePicture:r,role:n,profileCover:i}})}},{key:"closeModal",value:function(){this.setState({showModal:!1})}},{key:"render",value:function(){return o.default.createElement("div",null,o.default.createElement(s.default,{color:"red",style:{height:"30vh"}},o.default.createElement(c.Header,{style:{fontSize:"4em",margin:"0px",padding:"0px"},as:"h1",inverted:!0},"Meet the team!")),o.default.createElement(a.default,{color:"white",style:{height:"130vh"}},o.default.createElement(u.default,{toggle:this.toggleProfile.bind(this)})),o.default.createElement(c.Modal,{size:"small",open:this.state.showModal,closeOnRootNodeClick:!0},o.default.createElement(c.Modal.Content,{className:l.default.unpaddedContent},o.default.createElement("div",{className:l.default.profileHeader,style:{backgroundImage:"url('"+this.state.userInfo.profileCover+"')",backgroundSize:"cover"}},o.default.createElement("h2",{className:l.default.profileName},this.state.userInfo.name),o.default.createElement("img",{src:this.state.userInfo.profilePicture,className:l.default.profilePicture}),o.default.createElement(c.Icon,{onClick:this.closeModal.bind(this),circular:!0,inverted:!0,color:"blue",link:!0,name:"delete",style:{position:"absolute",right:"-1.125em",top:"-1.125em",fontSize:"1.5em",opacity:1}})),o.default.createElement(c.Modal.Description,{className:l.default.profileDescription},o.default.createElement(c.Header,null,this.state.userInfo.role),o.default.createElement("p",null,this.state.userInfo.paragraph)))))}}]),e}();e.default=h},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".Home_pageHeader_B_ekbgPPnqW8er8XvLnwf{margin-top:2em;text-align:left;padding:1em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/Home/Home.css"],names:[],mappings:"AAAA,uCACC,eAAe,AACf,gBAAgB,AAChB,WAAY,CACZ",file:"Home.css",sourcesContent:[".pageHeader {\n\tmargin-top:2em;\n\ttext-align:left;\n\tpadding:1em;\n}"],sourceRoot:""}]),e.locals={pageHeader:"Home_pageHeader_B_ekbgPPnqW8er8XvLnwf"}},function(t,e,n){var r=n(311);"string"==typeof r&&(r=t.i,r,"");var i={hmr:!0,transform:void 0,insertInto:void 0};n(103)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=c(i),a=c(n(61)),s=c(n(76)),u=n(37);c(n(312));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"componentDidMount",value:function(){}},{key:"scrollToElementRef",value:function(t){this[t].scrollIntoView()}},{key:"render",value:function(){var t,e=this;return o.default.createElement("div",null,o.default.createElement(a.default,{color:"navy"},o.default.createElement(s.default,{header:"Team Nottingham!",subheader:o.default.createElement("span",null,"Engineering bacteriophages to silence toxin expression in ",o.default.createElement("em",null,"Clostridium difficile")),scrollTarget:function(){return e.scrollToElementRef("whatWhyHow")}})),o.default.createElement("a",{ref:function(t){return e.whatWhyHow=t}}),o.default.createElement(a.default,{color:"white",containerStyle:{padding:"50px",paddingBottom:"65px"}},o.default.createElement(u.Grid,{stackable:!0,columns:3,divided:!0},o.default.createElement(u.Grid.Row,{style:{marginTop:"2em"}},o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What is ",o.default.createElement("em",null,"C. difficile")," infection?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},o.default.createElement("em",null,"Clostridium difficile")," infection is the most common cause of antibiotic-associated diarrhoea in the Western World and is a big problem in hospitals and care-facilities. The disease symptoms are caused by two major toxins, TcdA and TcdB. The use of broad-spectrum antibiotics causes a reduction in the natural diversity of the gut microbiota allowing ",o.default.createElement("em",null,"C. difficile")," to take advantage. It is thought that non-toxigenic ",o.default.createElement("em",null,"C. difficile")," present in the gut microbiota could act as a possible probiotic, out-competing toxigenic ",o.default.createElement("em",null,"C. difficile"),".")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What is the problem?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},"A consequence of antibiotic misuse and the capability of bacteria to readily evolve has allowed antibiotic resistance to become a worldwide major dilemma. Each year in the US alone 2 million people are subject to infection from antibiotic resistant bacteria. Currently ",o.default.createElement("em",null,"C. difficile")," is only treatable with a handful of antibiotics which is problematic when antibiotic use is a major risk factor for the infection and in the view of the global concern over antibiotic resistance. The use of bacteriophages has been proposed as a major alternative treatment for many diseases including ",o.default.createElement("em",null,"C. difficile")," infection.")),o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Header,null,"What are we going to do?"),o.default.createElement("p",{style:{textAlign:"left",padding:"2em"}},"The goal of our project is to engineer a phage which will infect ",o.default.createElement("em",null,"C. difficile")," and express genetic constructs designed to suppress toxin production. We will pursue two strategies to achieve this: asRNA and dCas9, both of which will target the toxin genes,tcdA and tcdB. Ultimately we aim to produce a highly specific phage therapeutic which will reduce toxigenicity of resident strains of ",o.default.createElement("em",null,"C. difficile")," without significantly affecting the native gut microbiota."))))),o.default.createElement(a.default,{color:"dark",id:"what-why-how"},o.default.createElement(u.Grid,(l(t={stackable:!0,style:{paddingBottom:"2.5em"},compact:!0,verticalAlign:"middle",columns:1},"style",{padding:"40px 0px 80px 0px"}),l(t,"inverted",!0),t),o.default.createElement(u.Grid.Row,null,o.default.createElement(u.Grid.Column,null,o.default.createElement(u.Statistic,{inverted:!0},o.default.createElement(u.Statistic.Value,null,"£103,990,800"),o.default.createElement(u.Statistic.Label,{style:{marginTop:"1em",color:"#9db4da"}},o.default.createElement("a",{href:"https://www.gov.uk/government/statistics/clostridium-difficile-infection-monthly-data-by-nhs-acute-trust"},"Amount spent treating C. Diff. by the NHS"))))))))}}]),e}();e.default=f},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e,n){(e=t.exports=n(104)(!0)).push([t.i,".PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS{color:#fff;min-width:100vw;background-color:#f25d53}.PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT{color:#fff;min-width:100vw;background-color:#c23616}.PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf{color:#fff;min-width:100vw;background-color:#e1b12c}.PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF{color:#fff;min-width:100vw;background-color:#0097e6}.PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36{color:#fff;min-width:100vw;background-color:#192a56}.PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2{min-width:100vw;background-color:#dcdde1;color:#464e67}.PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w{color:#fff;min-width:100vw;background-color:#2f3640}.PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG{min-width:100vw;background-color:#f5f6fa}.PageCard_container_1ok2Drx5q2skrrX8ItRY6X{text-align:center;padding-top:30px}.PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0{font-size:4rem!important;font-weight:400!important;margin-bottom:0!important;padding-top:25%!important;text-align:center}.PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds{font-size:1.7rem!important;font-weight:400!important;margin-top:1.5rem!important;text-align:center}.PageCard_pageDown_oHQuAa3AvckqK3vgxCT68{margin-top:30%!important}.PageCard_footer_1aaHIPN4H4iCi2PegG278N{padding:2.5em}","",{version:3,sources:["/Users/hassan-alubeidi/igem/src/components/PageCard/PageCard.css"],names:[],mappings:"AAAA,gDACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,4CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,8CAEC,gBAAiB,AACd,yBAA0B,AAC1B,aAAe,CAClB,AACD,8CACC,WAAY,AACZ,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,+CACC,gBAAiB,AACjB,wBAA0B,CAC1B,AACD,2CACC,kBAAkB,AAClB,gBAAiB,CACjB,AACD,4CACC,yBAA2B,AACxB,0BAA+B,AAC/B,0BAA8B,AAC9B,0BAA4B,AAC5B,iBAAkB,CACrB,AACD,+CACC,2BAA6B,AAC1B,0BAA+B,AAC/B,4BAA8B,AAC9B,iBAAkB,CACrB,AACD,yCACC,wBAA0B,CAC1B,AACD,wCACC,aAAc,CACd",file:"PageCard.css",sourcesContent:[".orangePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #F25D53;\n}\n.redPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #c23616;\n}\n.yellowPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #e1b12c;\n}\n.bluePageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #0097e6;\n}\n.navyPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #192a56;\n}\n.greyPageCard {\n\n\tmin-width: 100vw;\n background-color: #dcdde1;\n color: #464e67;\n}\n.darkPageCard {\n\tcolor:white;\n\tmin-width: 100vw;\n\tbackground-color: #2f3640;\n}\n.whitePageCard {\n\tmin-width: 100vw;\n\tbackground-color: #f5f6fa;\n}\n.container {\n\ttext-align:center;\n\tpadding-top:30px;\n}\n.pageHeader {\n\tfont-size: 4rem !important;\n font-weight: normal !important;\n margin-bottom: 0px !important;\n padding-top: 25% !important;\n text-align:center;\n}\n.pageSubHeader {\n\tfont-size: 1.7rem !important;\n font-weight: normal !important;\n margin-top: 1.5rem !important;\n text-align:center;\n}\n.pageDown {\n\tmargin-top:30% !important;\n}\n.footer {\n\tpadding:2.5em;\n}"],sourceRoot:""}]),e.locals={orangePageCard:"PageCard_orangePageCard_2Sr8WGHsk0ceS6U8gK2mUS",redPageCard:"PageCard_redPageCard_SMaxG91MHRyuY9YDewJRT",yellowPageCard:"PageCard_yellowPageCard_4AcGSIS3z3c1yjVGQI_Jf",bluePageCard:"PageCard_bluePageCard_1s7upKE6DVXL5_Cct455oF",navyPageCard:"PageCard_navyPageCard_3yXn1Tq7P7WX6QdWlG-n36",greyPageCard:"PageCard_greyPageCard_3kHRNDSY5C4lHR_KTlYzd2",darkPageCard:"PageCard_darkPageCard_2dJ_YdOsd9hhJHRg89V1_w",whitePageCard:"PageCard_whitePageCard_1FDkni-1zySRhoo8DsFZnG",container:"PageCard_container_1ok2Drx5q2skrrX8ItRY6X",pageHeader:"PageCard_pageHeader_1hPaIH8Im0_xFY9eJHy0m0",pageSubHeader:"PageCard_pageSubHeader_3mkAWv51FNYAj99Yqr_mds",pageDown:"PageCard_pageDown_oHQuAa3AvckqK3vgxCT68",footer:"PageCard_footer_1aaHIPN4H4iCi2PegG278N"}},function(t,e,n){"use strict";n.r(e),n.d(e,"registerStorage",function(){return Kt});var r=n(14),i=n.n(r),o="https://firebasestorage.googleapis.com",a="https://firebasestorage.googleapis.com",s="/v0",u="/v0",c=12e4,l=6e4,f=-9007199254740991,h=function(){function t(t,e){this.code_=d(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return d(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),t}(),p={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"};function d(t){return"storage/"+t}function v(){return new h(p.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(){return new h(p.CANCELED,"User canceled the upload/download.")}function y(){return new h(p.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function g(t,e,n){return new h(p.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function b(){return new h(p.APP_DELETED,"The Firebase app was deleted.")}function _(t,e){return new h(p.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new h(p.INTERNAL_ERROR,"Internal error: "+t)}var E={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function T(t){switch(t){case E.RAW:case E.BASE64:case E.BASE64URL:case E.DATA_URL:return;default:throw"Expected one of the event types: ["+E.RAW+", "+E.BASE64+", "+E.BASE64URL+", "+E.DATA_URL+"]."}}var C=function(){return function(t,e){this.data=t,this.contentType=e||null}}();function x(t,e){switch(t){case E.RAW:return new C(S(e));case E.BASE64:case E.BASE64URL:return new C(k(t,e));case E.DATA_URL:return new C(function(t){var e=new N(t);return e.base64?k(E.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(t){throw _(E.DATA_URL,"Malformed data URL.")}return S(e)}(e.rest)}(e),function(t){return new N(t).contentType}(e))}throw v()}function S(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r))if(n<t.length-1&&56320==(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function k(t,e){switch(t){case E.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw _(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case E.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw _(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(e)}catch(e){throw _(t,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;u++)s[u]=a.charCodeAt(u);return s}var N=function(){return function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw _(E.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i}}();var A,I={STATE_CHANGED:"state_changed"},O={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},P={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function R(t){switch(t){case O.RUNNING:case O.PAUSING:case O.CANCELING:return P.RUNNING;case O.PAUSED:return P.PAUSED;case O.SUCCESS:return P.SUCCESS;case O.CANCELED:return P.CANCELED;case O.ERROR:default:return P.ERROR}}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function M(t,e){for(var n in t)D(t,n)&&e(n,t[n])}function L(t){if(null==t)return{};var e={};return M(t,function(t,n){e[t]=n}),e}function F(t){return new Promise(t)}function U(t){return Promise.resolve(t)}function j(t){return null!=t}function B(t){return void 0!==t}function q(t){return"function"==typeof t}function V(t){return"object"==typeof t}function W(t){return V(t)&&null!==t}function H(t){return"string"==typeof t||t instanceof String}function z(t){return K()&&t instanceof Blob}function K(){return"undefined"!=typeof Blob}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(A||(A={}));var G=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=A.NO_ERROR,this.sendPromise_=F(function(e,n){t.xhr_.addEventListener("abort",function(n){t.errorCode_=A.ABORT,e(t)}),t.xhr_.addEventListener("error",function(n){t.errorCode_=A.NETWORK_ERROR,e(t)}),t.xhr_.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var i=this;if(this.sent_)throw w("cannot .send() more than once");(this.sent_=!0,this.xhr_.open(e,t,!0),j(r))&&M(r,function(t,e){i.xhr_.setRequestHeader(t,e.toString())});return j(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw w("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),Q=function(){function t(){}return t.prototype.createXhrIo=function(){return new G},t}();function Y(t){var e,n;try{e=JSON.parse(t)}catch(t){return null}return V(n=e)&&!Array.isArray(n)?e:null}var X=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n,r;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw r=e,new h(p.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.")},t.makeFromUrl=function(e){var n=null;for(var r=[{regex:new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:function(t){t.path_=decodeURIComponent(t.path)}}],i=0;i<r.length;i++){var o=r[i],a=o.regex.exec(e);if(a){var s=a[o.indices.bucket],u=a[o.indices.path];u||(u=""),n=new t(s,u),o.postModify(n);break}}if(null==n)throw function(t){return new h(p.INVALID_URL,"Invalid URL '"+t+"'.")}(e);return n},t}();function $(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function J(t){return o+s+t}function Z(t){return o+u+t}function tt(t){var e=encodeURIComponent,n="?";return M(t,function(t,r){var i=e(t)+"="+e(r);n=n+i+"&"}),n=n.slice(0,-1)}function et(t,e){return e}var nt=function(){return function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||et}}(),rt=null;function it(){if(rt)return rt;var t=[];t.push(new nt("bucket")),t.push(new nt("generation")),t.push(new nt("metageneration")),t.push(new nt("name","fullPath",!0));var e=new nt("name");e.xform=function(t,e){return function(t){return!H(t)||t.length<2?t:$(t=t)}(e)},t.push(e);var n=new nt("size");return n.xform=function(t,e){return j(e)?+e:e},t.push(n),t.push(new nt("timeCreated")),t.push(new nt("updated")),t.push(new nt("md5Hash",null,!0)),t.push(new nt("cacheControl",null,!0)),t.push(new nt("contentDisposition",null,!0)),t.push(new nt("contentEncoding",null,!0)),t.push(new nt("contentLanguage",null,!0)),t.push(new nt("contentType",null,!0)),t.push(new nt("metadata","customMetadata",!0)),rt=t}function ot(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new X(n,r);return e.makeStorageReference(i)}})}(r,t),r}function at(t,e,n){var r=Y(e);return null===r?null:ot(t,r,n)}function st(t,e){var n=Y(e);if(null===n)return null;if(!H(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map(function(e){var n=t.bucket,r=t.fullPath;return function(t){return a+s+t}("/b/"+i(n)+"/o/"+i(r))+tt({alt:"media",token:e})})[0]}function ut(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function ct(t){if(!(t&&V(t)))throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if(!V(n))throw"Expected object for 'customMetadata' mapping."}else if(W(n))throw"Mapping for '"+e+"' cannot be an object."}}function lt(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}var a,s,u,c,l,f;if(!(r<=n.length&&n.length<=i))throw a=r,s=i,u=t,c=n.length,a===s?(l=a,f=1===a?"argument":"arguments"):(l="between "+a+" and "+s,f="arguments"),new h(p.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+u+"`: Expected "+l+" "+f+", received "+c+".");for(o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(e){throw e instanceof Error?g(o,t,e.message):g(o,t,e)}}var ft=function(){return function(t,e){var n=this;this.validator=function(e){n.optional&&!B(e)||t(e)},this.optional=!!e}}();function ht(t,e){function n(t){if(!H(t))throw"Expected string."}var r,i,o;return t?(i=n,o=t,r=function(t){i(t),o(t)}):r=n,new ft(r,e)}function pt(t){return new ft(ct,t)}function dt(){return new ft(function(t){if(!(function(t){return"number"==typeof t||t instanceof Number}(t)&&t>=0))throw"Expected a number 0 or greater."})}function vt(t,e){return new ft(function(e){if(!(null===e||j(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)},e)}function mt(t){return new ft(function(t){if(null!==t&&!q(t))throw"Expected a Function."},t)}function yt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}var gt=function(){function t(t,e){var n=0,r="";z(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(z(this.data_)){var r=this.data_,i=(a=e,s=n,(o=r).webkitSlice?o.webkitSlice(a,s):o.mozSlice?o.mozSlice(a,s):o.slice?o.slice(a,s):null);return null===i?null:new t(i)}var o,a,s;return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(K()){var r=e.map(function(e){return e instanceof t?e.data_:e});return new t(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=yt();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(K())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}.apply(null,r))}var i=e.map(function(t){return H(t)?x(E.RAW,t).data:t.data_}),o=0;i.forEach(function(t){o+=t.byteLength});var a=new Uint8Array(o),s=0;return i.forEach(function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]}),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}();function bt(t,e){return-1!==t.indexOf(e)}var _t=function(){return function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}();function wt(t){if(!t)throw v()}function Et(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),i}}function Tt(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new h(p.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new h(p.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new h(p.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function Ct(t){var e=Tt(t);return function(n,r){var i,o=e(n,r);return 404===n.getStatus()&&(i=t.path,o=new h(p.OBJECT_NOT_FOUND,"Object '"+i+"' does not exist.")),o.setServerResponseProp(r.serverResponseProp()),o}}function xt(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",Et(t,n),i);return o.errorHandler=Ct(e),o}function St(t,e,n){var r=J(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new _t(r,"GET",function(t,e){return function(n,r){var i=at(t,r,e);return wt(null!==i),st(i,r)}}(t,n),i);return o.errorHandler=Ct(e),o}function kt(t,e,n){var r=L(n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var Nt=function(){return function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null}}();function At(t,e){var n;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(t){wt(!1)}return wt(bt(e||["active"],n)),n}function It(t,e,n,r,i,o,a,s){var u=new Nt(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new h(p.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,l=c;i>0&&(l=Math.min(l,i));var f=u.current,d=f+l,v={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},m=r.slice(f,d);if(null===m)throw y();var g=e.maxUploadRetryTime(),b=new _t(n,"POST",function(t,n){var i,a=At(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?Et(e,o)(t,n):null,new Nt(s,c,"final"===a,i)},g);return b.headers=v,b.body=m.uploadData(),b.progressCallback=s||null,b.errorHandler=Tt(t),b}var Ot=function(){return function(t,e,n){if(q(t)||j(e)||j(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}}(),Pt=function(){return function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o}}();function Rt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];U(!0).then(function(){t.apply(null,e)})}}var Dt=function(){function t(t,e,n,r,i,o){void 0===o&&(o=null);var a=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=O.RUNNING,this.errorHandler_=function(t){a.request_=null,a.chunkMultiplier_=1,t.codeEquals(p.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=t,a.transition_(O.ERROR))},this.metadataErrorHandler_=function(t){a.request_=null,t.codeEquals(p.CANCELED)?a.completeTransitions_():(a.error_=t,a.transition_(O.ERROR))},this.promise_=F(function(t,e){a.resolve_=t,a.reject_=e,a.start_()}),this.promise_.then(null,function(){})}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n,r){t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===O.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then(function(n){switch(e.state_){case O.RUNNING:t(n);break;case O.CANCELING:e.transition_(O.CANCELED);break;case O.PAUSING:e.transition_(O.PAUSED)}})},t.prototype.createResumable_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a=kt(e,r,i),s={name:a.fullPath},u=Z(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=ut(a,n),f=t.maxUploadRetryTime(),h=new _t(u,"POST",function(t,e){var n;At(t);try{n=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){wt(!1)}return wt(H(n)),n},f);return h.urlParams=s,h.headers=c,h.body=l,h.errorHandler=Tt(e),h}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()},t.errorHandler_)})},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_(function(n){var r=function(t,e,n,r){var i=t.maxUploadRetryTime(),o=new _t(n,"POST",function(t,e){var n,i=At(t,["active","final"]);try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){wt(!1)}var o=parseInt(n,10);return wt(!isNaN(o)),new Nt(o,r.size(),"final"===i)},i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=Tt(e),o}(t.authWrapper_,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then(function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()},t.errorHandler_)})},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new Nt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=It(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(e){return t.error_=e,void t.transition_(O.ERROR)}var a=t.authWrapper_.makeRequest(o,i);t.request_=a,a.getPromise().then(function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(O.SUCCESS)):t.completeTransitions_()},t.errorHandler_)})},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_(function(e){var n=xt(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.transition_(O.SUCCESS)},t.metadataErrorHandler_)})},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=kt(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ut(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=gt.getBlob(c,r,l);if(null===f)throw y();var h={name:u.fullPath},p=Z(o),d=t.maxUploadRetryTime(),v=new _t(p,"POST",Et(t,n),d);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=Tt(e),v}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(O.SUCCESS)},t.errorHandler_)})},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case O.CANCELING:case O.PAUSING:this.state_=t,null!==this.request_&&this.request_.cancel();break;case O.RUNNING:var e=this.state_===O.PAUSED;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case O.PAUSED:this.state_=t,this.notifyObservers_();break;case O.CANCELED:this.error_=m(),this.state_=t,this.notifyObservers_();break;case O.ERROR:case O.SUCCESS:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case O.PAUSING:this.transition_(O.PAUSED);break;case O.CANCELING:this.transition_(O.CANCELED);break;case O.RUNNING:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=R(this.state_);return new Pt(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var i="Expected a function or an Object with one of `next`, `error`, `complete` properties.",o=mt(!0).validator,a=vt(null,!0).validator;function s(t){try{return void o(t)}catch(t){}try{if(a(t),!(B(t.next)||B(t.error)||B(t.complete)))throw"";return}catch(t){throw i}}lt("on",[ht(function(e){if(t!==I.STATE_CHANGED)throw"Expected one of the event types: ["+I.STATE_CHANGED+"]."}),vt(s,!0),mt(!0),mt(!0)],arguments);var u=this;function c(t){return function(e,n,i){null!==t&&lt("on",t,arguments);var o=new Ot(e,n,r);return u.addObserver_(o),function(){u.removeObserver_(o)}}}var l=[vt(function(t){if(null===t)throw i;s(t)}),mt(!0),mt(!0)];return!(B(e)||B(n)||B(r))?c(l):c(null)(e,n,r)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){var e,n,r;e=this.observers_,n=t,-1!==(r=e.indexOf(n))&&e.splice(r,1)},t.prototype.notifyObservers_=function(){var t,e=this;this.finishPromise_(),(t=this.observers_,Array.prototype.slice.call(t)).forEach(function(t){e.notifyObserver_(t)})},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(R(this.state_)){case P.SUCCESS:Rt(this.resolve_.bind(null,this.snapshot))();break;case P.CANCELED:case P.ERROR:Rt(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(R(this.state_)){case P.RUNNING:case P.PAUSED:null!==t.next&&Rt(t.next.bind(t,this.snapshot))();break;case P.SUCCESS:null!==t.complete&&Rt(t.complete.bind(t))();break;case P.CANCELED:case P.ERROR:null!==t.error&&Rt(t.error.bind(t,this.error_))();break;default:null!==t.error&&Rt(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){lt("resume",[],arguments);var t=this.state_===O.PAUSED||this.state_===O.PAUSING;return t&&this.transition_(O.RUNNING),t},t.prototype.pause=function(){lt("pause",[],arguments);var t=this.state_===O.RUNNING;return t&&this.transition_(O.PAUSING),t},t.prototype.cancel=function(){lt("cancel",[],arguments);var t=this.state_===O.RUNNING||this.state_===O.PAUSING;return t&&this.transition_(O.CANCELING),t},t}(),Mt=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof X?e:X.makeFromUrl(e)}return t.prototype.toString=function(){return lt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return it()},t.prototype.child=function(t){lt("child",[ht()],arguments);var e=function(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}(this.location.path,t),n=new X(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=function(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this.location.path);if(null===t)return null;var e=new X(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new X(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return $(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),lt("put",[new ft(function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||K()&&t instanceof Blob))throw"Expected Blob or File."}),pt(!0)],arguments),this.throwIfRoot_("put"),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=E.RAW),lt("putString",[ht(),ht(T,!0),pt(!0)],arguments),this.throwIfRoot_("putString");var r=x(e,t),i=L(n);return!j(i.contentType)&&j(r.contentType)&&(i.contentType=r.contentType),new Dt(this,this.authWrapper,this.location,this.mappings(),new gt(r.data,!0),i)},t.prototype.delete=function(){lt("delete",[],arguments),this.throwIfRoot_("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=function(t,e){var n=J(e.fullServerUrl()),r=t.maxOperationRetryTime(),i=new _t(n,"DELETE",function(t,e){},r);return i.successCodes=[200,204],i.errorHandler=Ct(e),i}(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){lt("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=xt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){lt("updateMetadata",[pt()],arguments),this.throwIfRoot_("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=function(t,e,n,r){var i=J(e.fullServerUrl()),o=ut(n,r),a=t.maxOperationRetryTime(),s=new _t(i,"PATCH",Et(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Ct(e),s}(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){lt("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=St(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise().then(function(t){if(null===t)throw new h(p.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return t})})},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw function(t){return new h(p.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(t)},t}(),Lt=function(){function t(t){this.promise_=function(t){return Promise.reject(t)}(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ft=function(){function t(){this.map_={},this.id_=f}return t.prototype.addRequest=function(t){var e=this.id_;this.id_++,this.map_[e]=t;var n=this;function r(){delete n.map_[e]}t.getPromise().then(r,r)},t.prototype.clear=function(){M(this.map_,function(t,e){e&&e.cancel(!0)}),this.map_={}},t}(),Ut=function(){function t(e,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var a=this.app_.options;j(a)&&(this.bucket_=t.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=c,this.maxUploadRetryTime_=l,this.requestMap_=new Ft}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:X.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.app_&&j(this.app_.INTERNAL)&&j(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):U(null)},t.prototype.bucket=function(){if(this.deleted_)throw b();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new Lt(b());var n=this.requestMaker_(t,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}();var jt=function(){function t(t,e,n,r,i,o,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var f=this;this.promise_=F(function(t,e){f.resolve_=t,f.reject_=e,f.start_()})}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,a=n.xhr;if(n.wasSuccessCode)try{var s=t.callback_(a,a.getResponseText());B(s)?i(s):i()}catch(t){o(t)}else null!==a?((r=v()).setServerResponseProp(a.getResponseText()),t.errorCallback_?o(t.errorCallback_(a,r)):o(r)):n.canceled?o(r=t.appDelete_?b():m()):o(r=new h(p.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Bt(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){u||(u=!0,e.apply(null,arguments))}function l(e){i=setTimeout(function(){i=null,t(f,s())},e)}function f(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];u||(t?c.apply(null,arguments):s()||o?c.apply(null,arguments):(r<64&&(r*=2),1===a?(a=2,e=0):e=1e3*(r+Math.random()),l(e)))}var h=!1;function p(t){h||(h=!0,u||(null!==i?(t||(a=2),clearTimeout(i),l(0)):t||(a=1)))}return l(0),setTimeout(function(){o=!0,p(!0)},n),p}(function(e,n){if(n)e(!1,new Bt(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then(function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;var r=(n=n).getErrorCode()===A.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=bt(t.successCodes_,o);e(!0,new Bt(a,n))}else{var s=n.getErrorCode()===A.ABORT;e(!1,new Bt(!1,null,s))}})}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}},e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=bt([408,429],t),r=bt(this.additionalRetryCodes_,t);return e||n||r},t}(),Bt=function(){return function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}}();function qt(t,e,n){var r=tt(t.urlParams),o=t.url+r,a=L(t.headers);return function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(a,e),function(t){var e=void 0!==i.a?i.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(a),new jt(o,t.method,a,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}var Vt=function(){function t(t,e,n){if(this.bucket_=null,this.authWrapper_=new Ut(t,function(t,e){return new Mt(t,e)},qt,this,e),this.app_=t,null!=n)this.bucket_=X.makeFromBucketSpec(n);else{var r=this.authWrapper_.bucket();null!=r&&(this.bucket_=new X(r,""))}this.internals_=new Wt(this)}return t.prototype.ref=function(t){if(lt("ref",[ht(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var e=new Mt(this.authWrapper_,this.bucket_);return null!=t?e.child(t):e},t.prototype.refFromURL=function(t){return lt("refFromURL",[ht(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{X.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new Mt(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){lt("setMaxUploadRetryTime",[dt()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){lt("setMaxOperationRetryTime",[dt()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),t}(),Wt=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),U(void 0)},t}(),Ht="storage";function zt(t,e,n){return new Vt(t,new Q,n)}function Kt(t){var e={TaskState:P,TaskEvent:I,StringFormat:E,Storage:Vt,Reference:Mt};t.INTERNAL.registerService(Ht,zt,e,void 0,!0)}Kt(i.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E});

/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

                                                                                                                                                          • */

var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(317),o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},s=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return i.__extends(e,t),e}(Error);var u=function(){function t(t){this.app=t}return t.prototype.getAuthToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.app.INTERNAL.getToken()];case 1:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getInstanceIdToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t;return i.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.app.messaging?[4,this.app.messaging().getToken()]:[2,void 0];case 1:return(t=e.sent())?[2,t]:[2,void 0];case 2:return e.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getContext=function(){return i.__awaiter(this,void 0,void 0,function(){var t,e;return i.__generator(this,function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}})})},t}();function c(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var l=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null===t||void 0===t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"==typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map(function(t){return e.encode(t)});if("function"==typeof t||"object"==typeof t)return c(t,function(t){return e.encode(t)});throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null===t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=parseFloat(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(function(t){return e.decode(t)}):"function"==typeof t||"object"==typeof t?c(t,function(t){return e.decode(t)}):t},t}(),f=function(){function t(t,e){void 0===e&&(e="us-central1"),this.app_=t,this.region_=e,this.serializer=new l,this.contextProvider=new u(t)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return"https://"+this.region_+"-"+e+".cloudfunctions.net/"+t},t.prototype.httpsCallable=function(t){var e=this;return function(n){return e.call(t,n)}},t.prototype.postJSON=function(t,e,n){return i.__awaiter(this,void 0,void 0,function(){var r,o;return i.__generator(this,function(i){switch(i.label){case 0:n.append("Content-Type","application/json"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),[2,{status:0,json:null}];case 4:o=null,i.label=5;case 5:return i.trys.push([5,7,,8]),[4,r.json()];case 6:return o=i.sent(),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,{status:r.status,json:o}]}})})},t.prototype.call=function(t,e){return i.__awaiter(this,void 0,void 0,function(){var n,r,o,u,c,l,f;return i.__generator(this,function(i){switch(i.label){case 0:return n=this._url(t),e=this.serializer.encode(e),r={data:e},o=new Headers,[4,this.contextProvider.getContext()];case 1:return(u=i.sent()).authToken&&o.append("Authorization","Bearer "+u.authToken),u.instanceIdToken&&o.append("Firebase-Instance-ID-Token",u.instanceIdToken),[4,this.postJSON(n,r,o)];case 2:if(c=i.sent(),l=function(t,e,n){var r=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),i=r,o=void 0;try{var u=e.error;if(u){var c=u.status;if("string"==typeof c){if(!a[c])return new s("internal","internal");r=a[c]}i=c;var l=u.message;"string"==typeof l&&(i=l),void 0!==(o=u.details)&&(o=n.decode(o))}}catch(t){}return"ok"===r?null:new s(r,i,o)}(c.status,c.json,this.serializer))throw l;if(!c.json)throw new s("internal","Response is not valid JSON object.");if(void 0===(f=c.json.data)&&(f=c.json.result),void 0===f)throw new s("internal","Response is missing data field.");return[2,{data:this.serializer.decode(f)}]}})})},t}(),h="functions";function p(t,e,n){return new f(t,n)}function d(t){var e={Functions:f};t.INTERNAL.registerService(h,p,e,void 0,!0)}d(o),e.registerFunctions=d},function(module,exports,__webpack_require__){(function(global){(function(){var g,goog=goog||{},k=this;function l(t){return"string"==typeof t}function n(t,e){t=t.split("."),e=e||k;for(var n=0;n<t.length;n++)if(null==(e=e[t[n]]))return null;return e}function aa(){}function ba(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function p(t){return"array"==ba(t)}function ca(t){var e=ba(t);return"array"==e||"object"==e&&"number"==typeof t.length}function da(t){return"function"==ba(t)}function ea(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var q="closure_uid_"+(1e9*Math.random()>>>0),fa=0;function ha(t,e,n){return t.call.apply(t.bind,arguments)}function ia(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function r(t,e,n){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia).apply(null,arguments)}function ja(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var t=Date.now||function(){return+new Date};function u(t,e){function n(){}n.prototype=e.prototype,t.H=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Ib=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function ka(t){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function la(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");ka.call(this,n+t[r])}function ma(t,e){throw new la("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function w(){0!=na&&(pa[this[q]||(this[q]=++fa)]=this),this.i=this.i,this.m=this.m}u(ka,Error),ka.prototype.name="CustomError",u(la,ka),la.prototype.name="AssertionError";var na=0,pa={};w.prototype.i=!1,w.prototype.$=function(){if(!this.i&&(this.i=!0,this.w(),0!=na)){var t=this[q]||(this[q]=++fa);if(0!=na&&this.m&&0<this.m.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete pa[t]}},w.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var qa=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(l(t))return l(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},ra=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i=l(t)?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function sa(t){t:{for(var e=ta,n=t.length,r=l(t)?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:l(t)?t.charAt(e):t[e]}function ua(t){if(!p(t))for(var e=t.length-1;0<=e;e--)delete t[e];t.length=0}function va(t){return Array.prototype.concat.apply([],arguments)}function wa(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function xa(t){return/^[\s\xa0]*$/.test(t)}var ya=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},x;function za(t,e){return t<e?-1:t>e?1:0}t:{var Aa=k.navigator;if(Aa){var Ba=Aa.userAgent;if(Ba){x=Ba;break t}}x=""}function y(t){return-1!=x.indexOf(t)}function Ca(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function Da(t){var e,n=[],r=0;for(e in t)n[r++]=t[e];return n}function Ea(t){var e,n=[],r=0;for(e in t)n[r++]=e;return n}function Fa(t){var e,n={};for(e in t)n[e]=t[e];return n}var Ga="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ha(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<Ga.length;o++)n=Ga[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function Ia(t){return Ia[" "](t),t}function Ja(t,e){var n=Ka;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}Ia[" "]=aa;var La=y("Opera"),z=y("Trident")||y("MSIE"),Ma=y("Edge"),Na=Ma||z,Oa=y("Gecko")&&!(-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"))&&!(y("Trident")||y("MSIE"))&&!y("Edge"),Pa=-1!=x.toLowerCase().indexOf("webkit")&&!y("Edge"),Ra,a;function Qa(){var t=k.document;return t?t.documentMode:void 0}t:{var Sa="",Ta=(a=x,Oa?/rv:([^\);]+)(\)|;)/.exec(a):Ma?/Edge\/([\d\.]+)/.exec(a):z?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):Pa?/WebKit\/(\S+)/.exec(a):La?/(?:Version)[ \/]?(\S+)/.exec(a):void 0);if(Ta&&(Sa=Ta?Ta[1]:""),z){var Ua=Qa();if(null!=Ua&&Ua>parseFloat(Sa)){Ra=String(Ua);break t}}Ra=Sa}var Ka={},Wa;function Va(t){return Ja(t,function(){for(var e=0,n=ya(String(Ra)).split("."),r=ya(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=za(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||za(0==a[2].length,0==s[2].length)||za(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var Xa=k.document;Wa=Xa&&z?Qa()||("CSS1Compat"==Xa.compatMode?parseInt(Ra,10):5):void 0;var Ya=Object.freeze||function(t){return t},Za=!z||9<=Number(Wa),$a=z&&!Va("9"),ab=function(){if(!k.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return k.addEventListener("test",aa,e),k.removeEventListener("test",aa,e),t}();function A(t,e){this.type=t,this.a=this.target=e,this.Ra=!0}function bb(t,e){if(A.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(Oa){t:{try{Ia(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=l(t.pointerType)?t.pointerType:cb[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}A.prototype.b=function(){this.Ra=!1},u(bb,A);var cb=Ya({2:"touch",3:"pen",4:"mouse"});bb.prototype.b=function(){bb.H.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,$a)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}};var db="closure_listenable_"+(1e6*Math.random()|0),eb=0;function fb(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ga=i,this.key=++eb,this.Z=this.ba=!1}function gb(t){t.Z=!0,t.listener=null,t.proxy=null,t.src=null,t.ga=null}function hb(t){this.src=t,this.a={},this.b=0}function jb(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=qa(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(gb(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ib(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Z&&o.listener==e&&o.capture==!!n&&o.ga==r)return i}return-1}hb.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ib(t,e,r,i);return-1<a?(e=t[a],n||(e.ba=!1)):((e=new fb(e,this.src,o,!!r,i)).ba=n,t.push(e)),e};var kb="closure_lm_"+(1e6*Math.random()|0),lb={},mb=0;function nb(t,e,n,r,i){if(r&&r.once)return ob(t,e,n,r,i);if(p(e)){for(var o=0;o<e.length;o++)nb(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ia(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!1,r,i)}function qb(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=ea(i)?!!i.capture:!!i,s=rb(t);if(s||(t[kb]=s=new hb(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=sb(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)ab||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(tb(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return mb++,n}function sb(){var t=ub,e=Za?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}function ob(t,e,n,r,i){if(p(e)){for(var o=0;o<e.length;o++)ob(t,e[o],n,r,i);return null}return n=pb(n),t&&t[db]?t.Ja(e,n,ea(r)?!!r.capture:!!r,i):qb(t,e,n,!0,r,i)}function vb(t,e,n,r,i){if(p(e))for(var o=0;o<e.length;o++)vb(t,e[o],n,r,i);else r=ea(r)?!!r.capture:!!r,n=pb(n),t&&t[db]?(t=t.f,(e=String(e).toString())in t.a&&(-1<(n=ib(o=t.a[e],n,r,i))&&(gb(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=rb(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ib(e,n,r,i)),(n=-1<t?e[t]:null)&&wb(n))}function wb(t){if("number"!=typeof t&&t&&!t.Z){var e=t.src;if(e&&e[db])jb(e.f,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(tb(n),r):e.addListener&&e.removeListener&&e.removeListener(r),mb--,(n=rb(e))?(jb(n,t),0==n.b&&(n.src=null,e[kb]=null)):gb(t)}}}function tb(t){return t in lb?lb[t]:lb[t]="on"+t}function xb(t,e,n,r){var i=!0;if((t=rb(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.Z&&(o=yb(o,r),i=i&&!1!==o)}return i}function yb(t,e){var n=t.listener,r=t.ga||t.src;return t.ba&&wb(t),n.call(r,e)}function ub(t,e){if(t.Z)return!0;if(!Za){var r=e||n("window.event");e=new bb(r,this);var i=!0;if(!(0>r.keyCode||void 0!=r.returnValue)){t:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=e.a;o;o=o.parentNode)r.push(o);for(t=t.type,o=r.length-1;0<=o;o--){e.a=r[o];var a=xb(r[o],t,!0,e);i=i&&a}for(o=0;o<r.length;o++)e.a=r[o],a=xb(r[o],t,!1,e),i=i&&a}return i}return yb(t,new bb(e,this))}function rb(t){return(t=t[kb])instanceof hb?t:null}var zb="__closure_events_fn_"+(1e9*Math.random()>>>0);function pb(t){return da(t)?t:(t[zb]||(t[zb]=function(e){return t.handleEvent(e)}),t[zb])}function B(){w.call(this),this.f=new hb(this),this.N=this,this.J=null}function Ab(t,e,n,r){if(!(e=t.f.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Z&&a.capture==n){var s=a.listener,u=a.ga||a.src;a.ba&&jb(t.f,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Ra}function Bb(t){return!/^\s*$/.test(t)&&/^[\],:{}\s\u2028\u2029]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))}function Cb(a){if(a=String(a),Bb(a))try{return eval("("+a+")")}catch(t){}throw Error("Invalid JSON string: "+a)}function Db(t){var e=[];return Eb(new Fb,t,e),e.join("")}function Fb(){}function Eb(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(p(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),Eb(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),Gb(r,n),n.push(":"),Eb(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":Gb(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}u(B,w),B.prototype[db]=!0,g=B.prototype,g.addEventListener=function(t,e,n,r){nb(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){vb(this,t,e,n,r)},g.dispatchEvent=function(t){var e,n=this.J;if(n)for(e=[];n;n=n.J)e.push(n);n=this.N;var r=t.type||t;if(l(t))t=new A(t,n);else if(t instanceof A)t.target=t.target||n;else{var i=t;Ha(t=new A(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.a=e[o];i=Ab(a,r,!0,t)&&i}if(i=Ab(a=t.a=n,r,!0,t)&&i,i=Ab(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=Ab(a=t.a=e[o],r,!1,t)&&i;return i},g.w=function(){if(B.H.w.call(this),this.f){var t,e=this.f;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,gb(n[r]);delete e.a[t],e.b--}}this.J=null},g.Ia=function(t,e,n,r){return this.f.add(String(t),e,!1,n,r)},g.Ja=function(t,e,n,r){return this.f.add(String(t),e,!0,n,r)};var Hb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Ib=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function Gb(t,e){e.push('"',t.replace(Ib,function(t){var e=Hb[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Hb[t]=e),e}),'"')}function Jb(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function Kb(){this.b=this.a=null}Jb.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var Nb=new Jb(function(){return new Lb},function(t){t.reset()}),Rb,Tb;function Ob(){var t=Pb,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function Lb(){this.next=this.b=this.a=null}function Qb(t){k.setTimeout(function(){throw t},0)}function Sb(){var t=k.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!y("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=r(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),void 0!==t&&!y("Trident")&&!y("MSIE")){var e=new t,n={},i=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).za;n.za=null,t()}},function(t){i.next={za:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){k.setTimeout(t,0)}}function Ub(){if(-1!=String(k.Promise).indexOf("[native code]")){var t=k.Promise.resolve(void 0);Tb=function(){t.then(Vb)}}else Tb=function(){var t=Vb;!da(k.setImmediate)||k.Window&&k.Window.prototype&&!y("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(Rb||(Rb=Sb()),Rb(t)):k.setImmediate(t)}}Kb.prototype.add=function(t,e){var n=Nb.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},Lb.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},Lb.prototype.reset=function(){this.next=this.b=this.a=null};var Wb=!1,Pb=new Kb;function Vb(){for(var t;t=Ob();){try{t.a.call(t.b)}catch(t){Qb(t)}var e=Nb;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Wb=!1}function Xb(e,n){B.call(this),this.b=e||1,this.a=n||k,this.c=r(this.qb,this),this.g=t()}function Yb(t){t.ea=!1,t.O&&(t.a.clearTimeout(t.O),t.O=null)}function Zb(t,e,n){if(da(t))n&&(t=r(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=r(t.handleEvent,t)}return 2147483647<Number(e)?-1:k.setTimeout(t,e||0)}function $b(t,e,n){w.call(this),this.f=null!=n?r(t,n):t,this.c=e,this.b=r(this.kb,this),this.a=[]}function ac(t){t.Y=Zb(t.b,t.c),t.f.apply(null,t.a)}function bc(t){w.call(this),this.b=t,this.a={}}u(Xb,B),g=Xb.prototype,g.ea=!1,g.O=null,g.qb=function(){if(this.ea){var e=t()-this.g;0<e&&e<.8*this.b?this.O=this.a.setTimeout(this.c,this.b-e):(this.O&&(this.a.clearTimeout(this.O),this.O=null),this.dispatchEvent("tick"),this.ea&&(this.O=this.a.setTimeout(this.c,this.b),this.g=t()))}},g.start=function(){this.ea=!0,this.O||(this.O=this.a.setTimeout(this.c,this.b),this.g=t())},g.w=function(){Xb.H.w.call(this),Yb(this),delete this.a},u($b,w),g=$b.prototype,g.ha=!1,g.Y=null,g.cb=function(t){this.a=arguments,this.Y?this.ha=!0:ac(this)},g.w=function(){$b.H.w.call(this),this.Y&&(k.clearTimeout(this.Y),this.Y=null,this.ha=!1,this.a=[])},g.kb=function(){this.Y=null,this.ha&&(this.ha=!1,ac(this))},u(bc,w);var cc=[];function dc(t,e,n,r){p(n)||(n&&(cc[0]=n.toString()),n=cc);for(var i=0;i<n.length;i++){var o=nb(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function ec(t){Ca(t.a,function(t,e){this.a.hasOwnProperty(e)&&wb(t)},t),t.a={}}function fc(t,e,n){this.reset(t,e,n,void 0,void 0)}bc.prototype.w=function(){bc.H.w.call(this),ec(this)},bc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},fc.prototype.a=null;var gc=0;function hc(t){this.f=t,this.b=this.c=this.a=null}function C(t,e){this.name=t,this.value=e}fc.prototype.reset=function(e,n,r,i,o){"number"==typeof o||gc++,i||t(),delete this.a},C.prototype.toString=function(){return this.name};var ic=new C("SEVERE",1e3),jc=new C("WARNING",900),kc=new C("INFO",800),lc=new C("CONFIG",700),mc=new C("FINE",500);function nc(t){return t.c?t.c:t.a?nc(t.a):(ma("Root logger has no level set."),null)}hc.prototype.log=function(t,e,n){if(t.value>=nc(this).value)for(da(e)&&(e=e()),t=new fc(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var oc={},pc=null;function qc(t){var e;if(pc||(pc=new hc(""),oc[""]=pc,pc.c=lc),!(e=oc[t])){e=new hc(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=qc(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,oc[t]=e}return e}function D(t,e){t&&t.log(jc,e,void 0)}function rc(t,e){t&&t.log(kc,e,void 0)}function E(t,e){t&&t.log(mc,e,void 0)}function sc(){this.a=qc("goog.labs.net.webChannel.WebChannelDebug"),this.b=!0}function tc(t,e,n,r,i,o){F(t,function(){if(t.b)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a})}function uc(t,e,n,r,i,o,a){F(t,function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a})}function G(t,e,n,r){F(t,function(){return"XMLHTTP TEXT ("+e+"): "+vc(t,n)+(r?" "+r:"")})}function wc(t,e){F(t,function(){return"TIMEOUT: "+e})}function H(t,e){E(t.a,e)}function xc(t,e,n){(t=t.a)&&t.log(ic,n||"Exception",e)}function F(t,e){rc(t.a,e)}function J(t,e){(t=t.a)&&t.log(ic,e,void 0)}function vc(t,e){if(!t.b)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(var r=0;r<n.length;r++)if(p(n[r])){var i=n[r];if(!(2>i.length)){var o=i[1];if(p(o)&&!(1>o.length)){var a=o[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var s=1;s<o.length;s++)o[s]=""}}}return Db(n)}catch(n){return H(t,"Exception parsing expected JS array - probably was not JS"),e}}sc.prototype.Fa=function(){this.b=!1};var yc=new B;function zc(t){A.call(this,"serverreachability",t)}function Ac(t){yc.dispatchEvent(new zc(yc,t))}function Bc(t){A.call(this,"statevent",t)}function K(t){yc.dispatchEvent(new Bc(yc,t))}function Cc(t){A.call(this,"timingevent",t)}function Dc(t,e,n){yc.dispatchEvent(new Cc(yc,t,e,n))}function Ec(t,e){if(!da(t))throw Error("Fn must not be null and must be a function");return k.setTimeout(function(){t()},e)}u(zc,A),u(Bc,A),u(Cc,A);var Fc={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},Gc={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};function Hc(){}function Ic(t){var e;return(e=t.a)||(e={},Jc(t)&&(e[0]=!0,e[1]=!0),e=t.a=e),e}function Kc(){}Hc.prototype.a=null;var Lc={OPEN:"a",sb:"b",Va:"c",Bb:"d"},Oc;function Mc(){A.call(this,"d")}function Nc(){A.call(this,"c")}function Pc(){}function Qc(t){return(t=Jc(t))?new ActiveXObject(t):new XMLHttpRequest}function Jc(t){if(!t.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.b=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.b}function L(t,e,n,r){this.i=t,this.b=e,this.c=n,this.T=r||1,this.L=new bc(this),this.R=Rc,t=Na?125:void 0,this.S=new Xb(t),this.j=null,this.f=!1,this.l=this.g=this.h=this.J=this.D=this.U=this.s=null,this.u=[],this.a=null,this.G=0,this.m=this.o=null,this.C=-1,this.B=!1,this.N=0,this.I=null,this.v=this.X=this.K=!1}u(Mc,A),u(Nc,A),u(Pc,Hc),Oc=new Pc;var Rc=45e3;function Sc(t,e){switch(t){case 0:return"Non-200 return code ("+e+")";case 1:return"XMLHTTP failure (no data)";case 2:return"HttpConnection timeout";default:return"Unknown error"}}var Tc={},Uc={};function Vc(t,e,n){t.J=1,t.h=Wc(M(e)),t.l=n,t.K=!0,Xc(t,null)}function Yc(t,e,n,r){t.J=1,t.h=Wc(M(e)),t.l=null,t.K=n,Xc(t,r)}function Xc(e,n){e.D=t(),Zc(e),e.g=M(e.h),$c(e.g,"t",e.T),e.G=0,e.a=e.i.ca(e.i.ia()?n:null),0<e.N&&(e.I=new $b(r(e.Sa,e,e.a),e.N)),dc(e.L,e.a,"readystatechange",e.nb),n=e.j?Fa(e.j):{},e.l?(e.o||(e.o="POST"),n["Content-Type"]="application/x-www-form-urlencoded",e.a.fa(e.g,e.o,e.l,n)):(e.o="GET",e.a.fa(e.g,e.o,null,n)),Ac(1),tc(e.b,e.o,e.g,e.c,e.T,e.l)}function ad(t){var e=N(t.a),n=t.a.Ga(),r=t.a.W();if(!(3>e||3==e&&!Na&&!t.a.V())){t.B||4!=e||7==n||Ac(8==n||0>=r?3:2),bd(t);var i=t.a.W();t.C=i,(n=t.a.V())||H(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,uc(t.b,t.o,t.g,t.c,t.T,e,i),t.f?((r=cd(t))&&(G(t.b,t.c,r,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,dd(t,r)),t.K?(ed(t,e,n),Na&&t.f&&3==e&&fd(t)):(G(t.b,t.c,n,null),dd(t,n)),4==e&&gd(t),t.f&&!t.B&&(4==e?t.i.ta(t):(t.f=!1,Zc(t)))):(400==i&&0<n.indexOf("Unknown SID")?(t.m=3,K(12),D(t.b.a,"XMLHTTP Unknown SID ("+t.c+")")):(t.m=0,K(13),D(t.b.a,"XMLHTTP Bad status "+i+" ("+t.c+")")),gd(t),hd(t))}}function cd(t){return!t.X||t.v?null:t.a&&(t=id(t.a,"X-HTTP-Initial-Response"))&&!xa(t)?t:null}function ed(t,e,n){for(var r=!0;!t.B&&t.G<n.length;){var i=jd(t,n);if(i==Uc){4==e&&(t.m=4,K(14),r=!1),G(t.b,t.c,null,"[Incomplete Response]");break}if(i==Tc){t.m=4,K(15),G(t.b,t.c,n,"[Invalid Chunk]"),r=!1;break}G(t.b,t.c,i,null),dd(t,i)}4==e&&0==n.length&&(t.m=1,K(16),r=!1),t.f=t.f&&r,r||(G(t.b,t.c,n,"[Invalid Chunked Response]"),gd(t),hd(t))}function fd(t){dc(t.L,t.S,"tick",t.mb),t.S.start()}function jd(t,e){var n=t.G,r=e.indexOf("\n",n);return-1==r?Uc:(n=Number(e.substring(n,r)),isNaN(n)?Tc:(r+=1)+n>e.length?Uc:(e=e.substr(r,n),t.G=r+n,e))}function Zc(e){e.U=t()+e.R,kd(e,e.R)}function kd(t,e){if(null!=t.s)throw Error("WatchDog timer not null");t.s=Ec(r(t.lb,t),e)}function bd(t){t.s&&(k.clearTimeout(t.s),t.s=null)}function hd(t){t.i.La()||t.B||t.i.ta(t)}function gd(t){bd(t);var e=t.I;e&&"function"==typeof e.$&&e.$(),t.I=null,Yb(t.S),ec(t.L),t.a&&(e=t.a,t.a=null,e.abort(),e.$())}function dd(t,e){try{t.i.Oa(t,e),Ac(4)}catch(e){xc(t.b,e,"Error in httprequest callback")}}function ld(t){if(t.A&&"function"==typeof t.A)return t.A();if(l(t))return t.split("");if(ca(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}return Da(t)}function md(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(ca(t)||l(t))ra(t,e,void 0);else{if(t.M&&"function"==typeof t.M)var n=t.M();else if(t.A&&"function"==typeof t.A)n=void 0;else if(ca(t)||l(t)){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else n=Ea(t);i=(r=ld(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function O(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof O)for(n=t.M(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function od(t){t.b={},t.a.length=0,t.c=0}function pd(t,e){return!!P(t.b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&nd(t),!0)}function nd(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];P(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)P(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}g=L.prototype,g.setTimeout=function(t){this.R=t},g.nb=function(t){t=t.target;var e=this.I;e&&3==N(t)?(H(this.b,"Throttling readystatechange."),e.cb()):this.Sa(t)},g.Sa=function(t){try{t==this.a?ad(this):D(this.b.a,"Called back with an unexpected xmlhttp")}catch(t){if(H(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var e=this;xc(this.b,t,function(){return"ResponseText: "+e.a.V()})}else xc(this.b,t,"No response text")}},g.mb=function(){if(this.a){var t=N(this.a),e=this.a.V();this.G<e.length&&(bd(this),ed(this,t,e),this.f&&4!=t&&Zc(this))}},g.cancel=function(){this.B=!0,gd(this)},g.lb=function(){this.s=null;var e=t();0<=e-this.U?(this.f&&J(this.b,"Received watchdog timeout even though request loaded successfully"),wc(this.b,this.g),2!=this.J&&(Ac(3),K(17)),gd(this),this.m=2,hd(this)):(D(this.b.a,"WatchDog timer called too early"),kd(this,this.U-e))},g=O.prototype,g.A=function(){nd(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},g.M=function(){return nd(this),this.a.concat()},g.get=function(t,e){return P(this.b,t)?this.b[t]:e},g.set=function(t,e){P(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},g.forEach=function(t,e){for(var n=this.M(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var qd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function rd(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Q(t,e){var n;this.b=this.j=this.f="",this.i=null,this.g=this.a="",this.h=!1,t instanceof Q?(this.h=void 0!==e?e:t.h,sd(this,t.f),this.j=t.j,td(this,t.b),ud(this,t.i),this.a=t.a,vd(this,wd(t.c)),this.g=t.g):t&&(n=String(t).match(qd))?(this.h=!!e,sd(this,n[1]||"",!0),this.j=xd(n[2]||""),td(this,n[3]||"",!0),ud(this,n[4]),this.a=xd(n[5]||"",!0),vd(this,n[6]||"",!0),this.g=xd(n[7]||"")):(this.h=!!e,this.c=new yd(null,this.h))}function M(t){return new Q(t)}function sd(t,e,n){t.f=n?xd(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function td(t,e,n){t.b=n?xd(e,!0):e}function ud(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function vd(t,e,n){e instanceof yd?(t.c=e,Ed(t.c,t.h)):(n||(e=zd(e,Fd)),t.c=new yd(e,t.h))}function R(t,e,n){t.c.set(e,n)}function $c(t,e,n){p(n)||(n=[String(n)]),Gd(t.c,e,n)}function Wc(e){return R(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^t()).toString(36)),e}function Hd(t){return t instanceof Q?M(t):new Q(t,void 0)}function Id(t,e,n,r){var i=new Q(null,void 0);return t&&sd(i,t),e&&td(i,e),n&&ud(i,n),r&&(i.a=r),i}function xd(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function zd(t,e,n){return l(t)?(t=encodeURI(t).replace(e,Jd),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Jd(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Q.prototype.toString=function(){var t=[],e=this.f;e&&t.push(zd(e,Ad,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(zd(e,Ad,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.a)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(zd(n,"/"==n.charAt(0)?Bd:Cd,!0))),(n=this.c.toString())&&t.push("?",n),(n=this.g)&&t.push("#",zd(n,Dd)),t.join("")},Q.prototype.resolve=function(t){var e=M(this),n=!!t.f;n?sd(e,t.f):n=!!t.j,n?e.j=t.j:n=!!t.b,n?td(e,t.b):n=null!=t.i;var r=t.a;if(n)ud(e,t.i);else if(n=!!t.a){if("/"!=r.charAt(0))if(this.b&&!this.a)r="/"+r;else{var i=e.a.lastIndexOf("/");-1!=i&&(r=e.a.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.a=r:n=""!==t.c.toString(),n?vd(e,wd(t.c)):n=!!t.g,n&&(e.g=t.g),e};var Ad=/[#\/\?@]/g,Cd=/[#\?:]/g,Bd=/[#\?]/g,Fd=/[#\?@]/g,Dd=/#/g;function yd(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function S(t){t.a||(t.a=new O,t.b=0,t.c&&rd(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function Ld(t,e){S(t),e=Kd(t,e),P(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,pd(t.a,e))}function Md(t,e){return S(t),e=Kd(t,e),P(t.a.b,e)}function Gd(t,e,n){Ld(t,e),0<n.length&&(t.c=null,t.a.set(Kd(t,e),wa(n)),t.b+=n.length)}function wd(t){var e=new yd;return e.c=t.c,t.a&&(e.a=new O(t.a),e.b=t.b),e}function Kd(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function Ed(t,e){e&&!t.f&&(S(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(Ld(this,e),Gd(this,n,t))},t)),t.f=e}function Nd(){this.a=t()}g=yd.prototype,g.add=function(t,e){S(this),this.c=null,t=Kd(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},g.forEach=function(t,e){S(this),this.a.forEach(function(n,r){ra(n,function(n){t.call(e,n,r,this)},this)},this)},g.M=function(){S(this);for(var t=this.a.A(),e=this.a.M(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},g.A=function(t){S(this);var e=[];if(l(t))Md(this,t)&&(e=va(e,this.a.get(Kd(this,t))));else{t=this.a.A();for(var n=0;n<t.length;n++)e=va(e,t[n])}return e},g.set=function(t,e){return S(this),this.c=null,Md(this,t=Kd(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},g.get=function(t,e){return 0<(t=t?this.A(t):[]).length?String(t[0]):e},g.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.M(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.A(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var Od=null;function Pd(){Od||(Od=new Nd)}function Qd(){Od||(Od=new Nd)}function Rd(t,e){this.a=t,this.b=e,this.c=this.i=null,this.h=!1,this.m=null,this.f=-1,this.l=this.g=null}function Sd(t){H(t.b,"TestConnection: starting stage 2");var e=t.a.I.a;if(null!=e)H(t.b,function(){return"Buffered"}),K(4),e?(K(10),Td(t.a,t,!1)):(K(11),Td(t.a,t,!0));else{t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i;var n=Ud(t.a,t.g,t.m);K(4),$c(n,"TYPE","xmlhttp");var r=t.a.j,i=t.a.K;r&&i&&R(n,r,i),Yc(t.c,n,!1,t.g)}}function Wd(){this.a=this.b=null}function Xd(){this.a=new O}function Yd(t){var e=typeof t;return"object"==e&&t||"function"==e?"o"+(t[q]||(t[q]=++fa)):e.charAt(0)+t}function Zd(t,e){this.a=t,this.b=e}function $d(t){this.g=t||ae,k.PerformanceNavigationTiming?t=0<(t=k.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(k.oa&&k.oa.Ma&&k.oa.Ma()&&k.oa.Ma().Jb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Xd),this.b=null,this.c=[]}Nd.prototype.set=function(t){this.a=t},Nd.prototype.reset=function(){this.set(t())},Nd.prototype.get=function(){return this.a},u(Qd,Pd),g=Rd.prototype,g.P=null,g.ca=function(t){return this.a.ca(t)},g.abort=function(){this.c&&(this.c.cancel(),this.c=null),this.f=-1},g.La=function(){return!1},g.Oa=function(t,e){if(this.f=t.C,0==this.P){if(H(this.b,"TestConnection: Got data for stage 1"),!this.a.o&&(t=t.a)){var n=id(t,"X-Client-Wire-Protocol");this.l=n||null,this.a.j&&((t=id(t,"X-HTTP-Session-Id"))?this.a.K=t:D(this.b.a,"Missing X_HTTP_SESSION_ID in the handshake response"))}if(e){try{var r=this.a.la.a.parse(e)}catch(t){return xc(this.b,t),void Vd(this.a,this)}this.g=r[0]}else H(this.b,"TestConnection: Null responseText"),Vd(this.a,this)}else 1==this.P&&(this.h?K(6):"11111"==e?(K(5),this.h=!0,(!z||10<=Number(Wa))&&(this.f=200,this.c.cancel(),H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0))):(K(7),this.h=!1))},g.ta=function(){this.f=this.c.C,this.c.f?0==this.P?(this.P=1,H(this.b,"TestConnection: request complete for initial check"),Sd(this)):1==this.P&&(H(this.b,"TestConnection: request complete for stage 2"),this.h?(H(this.b,"Test connection succeeded; using streaming connection"),K(11),Td(this.a,this,!0)):(H(this.b,"Test connection failed; not using streaming"),K(10),Td(this.a,this,!1))):(H(this.b,"TestConnection: request failed, in state "+this.P),0==this.P?K(8):1==this.P&&K(9),Vd(this.a,this))},g.ia=function(){return this.a.ia()},g.qa=function(){return this.a.qa()},Xd.prototype.add=function(t){this.a.set(Yd(t),t)},Xd.prototype.A=function(){return this.a.A()};var ae=10;function be(t,e){t.a||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(t.f=t.g,t.a=new Xd,t.b&&(ce(t,t.b),t.b=null))}function de(t){return!!t.b||!!t.a&&t.a.a.c>=t.f}function ee(t,e){return t.b?t=t.b==e:t.a?(e=Yd(e),t=P(t.a.a.b,e)):t=!1,t}function ce(t,e){t.a?t.a.add(e):t.b=e}function fe(t,e){var n;t.b&&t.b==e?t.b=null:((n=t.a)&&(n=Yd(e),n=P(t.a.a.b,n)),n&&pd(t.a.a,Yd(e)))}function ge(t){if(null!=t.b)return t.c.concat(t.b.u);if(null!=t.a&&0!=t.a.a.c){var e=t.c;return ra(t.a.A(),function(t){e=e.concat(t.u)}),e}return wa(t.c)}function he(t,e){t.c=t.c.concat(e)}function ie(){}function je(){this.a=new ie}function ke(t,e,n){var r=n||"";try{md(t,function(t,n){var i=t;ea(t)&&(i=Db(t)),e.push(r+n+"="+encodeURIComponent(i))})}catch(t){throw e.push(r+"type="+encodeURIComponent("_badmap")),t}}function le(t,e){var n=new sc;H(n,"TestLoadImage: loading "+t);var r=new Image;r.onload=ja(me,n,r,"TestLoadImage: loaded",!0,e),r.onerror=ja(me,n,r,"TestLoadImage: error",!1,e),r.onabort=ja(me,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=ja(me,n,r,"TestLoadImage: timeout",!1,e),k.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}function me(t,e,n,r,i){try{H(t,n),e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(e){xc(t,e)}}function T(t){B.call(this),this.headers=new O,this.s=t||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ne,this.v=this.o=!1}$d.prototype.cancel=function(){this.c=ge(this),this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ra(this.a.A(),function(t){t.cancel()}),od(this.a.a))},ie.prototype.stringify=function(t){return k.JSON.stringify(t,void 0)},ie.prototype.parse=function(t){return k.JSON.parse(t,void 0)},u(T,B);var ne="";T.prototype.b=qc("goog.net.XhrIo");var oe=/^https?$/i,pe=["POST","PUT"];function se(t){return z&&Va(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}function ta(t){return"content-type"==t.toLowerCase()}function qe(t,e){t.c=!1,t.a&&(t.h=!0,t.a.abort(),t.h=!1),t.g=e,t.j=5,te(t),ue(t)}function te(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function ve(t){if(t.c&&void 0!==goog)if(t.D[1]&&4==N(t)&&2==t.W())E(t.b,U(t,"Local request error detected and ignored"));else if(t.u&&4==N(t))Zb(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==N(t)){E(t.b,U(t,"Request complete")),t.c=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(qd)[1]||null;if(!o&&k.self&&k.self.location){var a=k.self.location.protocol;o=a.substr(0,a.length-1)}i=!oe.test(o?o.toLowerCase():"")}e=i}e?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",te(t))}finally{ue(t)}}}function ue(t,e){if(t.a){re(t);var n=t.a,r=t.D[0]?aa:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(ic,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function re(t){t.a&&t.v&&(t.a.ontimeout=null),t.C&&(k.clearTimeout(t.C),t.C=null)}function N(t){return t.a?t.a.readyState:0}function id(t,e){return t.a?t.a.getResponseHeader(e):null}function U(t,e){return e+" ["+t.K+" "+t.B+" "+t.W()+"]"}function we(t){var e="";return Ca(t,function(t,n){e+=n,e+=":",e+=t,e+="\r\n"}),e}function xe(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}if(r)return t;if(n=we(n),l(t)){if(e=encodeURIComponent(String(e)),e+=n=null!=n?"="+encodeURIComponent(String(n)):""){if(0>(n=t.indexOf("#"))&&(n=t.length),0>(r=t.indexOf("?"))||r>n){r=n;var i=""}else i=t.substring(r+1,n);n=(t=[t.substr(0,r),i,t.substr(n)])[1],t[1]=e?n?n+"&"+e:e:n,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return R(t,e,n),t}function ye(t){this.ya=0,this.g=[],this.a=new sc,this.I=new Wd,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!n("internalChannelParams.failFast",t),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=n("internalChannelParams.baseRetryDelayMs",t)||5e3,this.$a=n("internalChannelParams.retryDelaySeedMs",t)||1e4,this.Ya=n("internalChannelParams.forwardChannelMaxRetries",t)||2,this.wa=n("internalChannelParams.forwardChannelRequestTimeoutMs",t)||2e4,this.Ta=t&&t.Kb||void 0,this.G=void 0,this.S=t&&t.supportsCrossDomainXhr||!1,this.J="",this.c=new $d(t&&t.concurrentRequestLimit),this.la=new je,this.o=!t||void 0===t.backgroundChannelTest||t.backgroundChannelTest,(this.va=t&&t.fastHandshake||!1)&&!this.o&&(D(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),t&&t.Fa&&this.a.Fa()}function ze(e){if(H(e.a,"disconnect()"),Ae(e),3==e.F){var n=e.R++,r=M(e.D);R(r,"SID",e.J),R(r,"RID",n),R(r,"TYPE","terminate"),Be(e,r),(n=new L(e,e.a,n,void 0)).J=2,n.h=Wc(M(r)),r=!1,k.navigator&&k.navigator.sendBeacon&&(r=k.navigator.sendBeacon(n.h.toString(),"")),!r&&k.Image&&((new Image).src=n.h,r=!0),r||(n.a=n.i.ca(null),n.a.fa(n.h)),n.D=t(),Zc(n)}Ce(e)}function Ae(t){t.C&&(t.C.abort(),t.C=null),t.b&&(t.b.cancel(),t.b=null),t.l&&(k.clearTimeout(t.l),t.l=null),De(t),t.c.cancel(),t.m&&(k.clearTimeout(t.m),t.m=null)}function Ee(t,e){1e3==t.g.length&&J(t.a,function(){return"Already have 1000 queued maps upon queueing "+Db(e)}),t.g.push(new Zd(t.Za++,e)),3==t.F&&Fe(t)}function Fe(t){de(t.c)||t.m||(t.m=Ec(r(t.Qa,t),0),t.v=0)}function Ge(t,e){var n=t.c;return(n.b?1:n.a?n.a.a.c:0)>=t.c.f-(t.m?1:0)?(J(t.a,"Unexpected retry request is scheduled."),!1):t.m?(H(t.a,"Use the retry request that is already scheduled."),t.g=e.u.concat(t.g),!0):!(1==t.F||2==t.F||t.v>=(t.Xa?0:t.Ya))&&(H(t.a,"Going to retry POST"),t.m=Ec(r(t.Qa,t,e),He(t,t.v)),t.v++,!0)}function Je(t,e){var n;n=e?e.c:t.R++;var r=M(t.D);R(r,"SID",t.J),R(r,"RID",n),R(r,"AID",t.N),Be(t,r),t.h&&t.i&&xe(r,t.h,t.i),n=new L(t,t.a,n,t.v+1),null===t.h&&(n.j=t.i),e&&(t.g=e.u.concat(t.g)),e=Ie(t,n),n.setTimeout(Math.round(.5*t.wa)+Math.round(.5*t.wa*Math.random())),ce(t.c,n),Vc(n,r,e)}function Be(t,e){t.f&&md({},function(t,n){R(e,n,t)})}function Ie(t,e){var n=Math.min(t.g.length,1e3),i=t.f?r(t.f.ab,t.f,t):null;t:for(var o=t.g,a=-1;;){var s=["count="+n];-1==a?0<n?(a=o[0].a,s.push("ofs="+a)):a=0:s.push("ofs="+a);for(var u=!0,c=0;c<n;c++){var l=o[c].a,f=o[c].b;if(0>(l-=a))a=Math.max(0,o[c].a-100),u=!1;else try{ke(f,s,"req"+l+"_")}catch(t){i&&i(f)}}if(u){i=s.join("&");break t}}return t=t.g.splice(0,n),e.u=t,i}function Ke(t){if(!t.b&&!t.l){t.T=1;var e=t.Pa;Tb||Ub(),Wb||(Tb(),Wb=!0),Pb.add(e,t),t.B=0}}function Le(t){return t.b||t.l?(J(t.a,"Request already in progress"),!1):!(3<=t.B)&&(H(t.a,"Going to retry GET"),t.T++,t.l=Ec(r(t.Pa,t),He(t,t.B)),t.B++,!0)}function Td(t,e,n){H(t.a,"Test Connection Finished");var r=e.l;r&&be(t.c,r),t.ka=n,t.u=e.f,H(t.a,"connectChannel_()"),t.D=Me(t,t.ja),Fe(t)}function Vd(t,e){H(t.a,"Test Connection Failed"),t.u=e.f,V(t,2)}function De(t){null!=t.s&&(k.clearTimeout(t.s),t.s=null)}function He(t,e){var n=t.Wa+Math.floor(Math.random()*t.$a);return t.qa()||(H(t.a,"Inactive channel"),n*=2),n*e}function V(t,e){if(F(t.a,"Error code "+e),2==e){var n=null;t.f&&(n=null);var i=r(t.pb,t);n||(n=new Q("//www.google.com/images/cleardot.gif"),k.location&&"http"==k.location.protocol||sd(n,"https"),Wc(n)),le(n.toString(),i)}else K(2);H(t.a,"HttpChannel: error - "+e),t.F=0,t.f&&t.f.Ba(e),Ce(t),Ae(t)}function Ce(t){if(t.F=0,t.u=-1,t.f){var e=ge(t.c);0==e.length&&0==t.g.length||(H(t.a,function(){return"Number of undelivered maps, pending: "+e.length+", outgoing: "+t.g.length}),t.c.c.length=0,wa(t.g),t.g.length=0),t.f.Aa()}}function Me(t,e){return e=Ne(t,null,e),H(t.a,"GetForwardChannelUri: "+e),e}function Ud(t,e,n){return e=Ne(t,t.ia()?e:null,n),H(t.a,"GetBackChannelUri: "+e),e}function Ne(t,e,n){var r=Hd(n);if(""!=r.b)e&&td(r,e+"."+r.b),ud(r,r.i);else{var i,o=k.location;i=e?e+"."+o.hostname:o.hostname,r=Id(o.protocol,i,o.port,n)}return t.U&&Ca(t.U,function(t,e){R(r,e,t)}),e=t.j,n=t.K,e&&n&&R(r,e,n),R(r,"VER",t.na),Be(t,r),r}function Oe(){}function Pe(t){for(var e=arguments[0],n=1;n<arguments.length;n++){var r,i=arguments[n];if(0==i.lastIndexOf("/",0))e=i;else(r=""==e)||(r=0<=(r=e.length-1)&&e.indexOf("/",r)==r),e+=r?i:"/"+i}return e}function Qe(){if(z&&!(10<=Number(Wa)))throw Error("Environmental error: no available transport.")}function W(t,e){B.call(this),this.a=new ye(e),this.b=t,this.o=e&&e.testUrl?e.testUrl:Pe(this.b,"test"),this.c=qc("goog.labs.net.webChannel.WebChannelBaseTransport"),this.g=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.i=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.Ea&&(t?t["X-WebChannel-Client-Profile"]=e.Ea:t={"X-WebChannel-Client-Profile":e.Ea}),this.a.L=t,(t=e&&e.httpHeadersOverwriteParam)&&!xa(t)&&(this.a.h=t),this.l=e&&e.supportsCrossDomainXhr||!1,this.j=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!xa(e)&&(this.a.j=e,null!==(t=this.g)&&e in t&&(e in(t=this.g)&&delete t[e],D(this.c,"Ignore httpSessionIdParam also specified with messageUrlParams: "+e))),this.h=new Re(this)}function Se(t){Mc.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Te(){Nc.call(this),this.status=1}function Re(t){this.a=t}g=T.prototype,g.fa=function(t,e,n,i){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.g="",this.j=0,this.K=e,this.G=!1,this.c=!0,this.a=this.s?Qc(this.s):Qc(Oc),this.D=this.s?Ic(this.s):Ic(Oc),this.a.onreadystatechange=r(this.Na,this);try{E(this.b,U(this,"Opening Xhr")),this.I=!0,this.a.open(e,String(t),!0),this.I=!1}catch(t){return E(this.b,U(this,"Error opening Xhr: "+t.message)),void qe(this,t)}t=n||"";var o=new O(this.headers);i&&md(i,function(t,e){o.set(e,t)}),i=sa(o.M()),n=k.FormData&&t instanceof k.FormData,!(0<=qa(pe,e))||i||n||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},this),this.L&&(this.a.responseType=this.L),"withCredentials"in this.a&&this.a.withCredentials!==this.o&&(this.a.withCredentials=this.o);try{re(this),0<this.l&&(this.v=se(this.a),E(this.b,U(this,"Will abort after "+this.l+"ms if incomplete, xhr2 "+this.v)),this.v?(this.a.timeout=this.l,this.a.ontimeout=r(this.Ka,this)):this.C=Zb(this.Ka,this.l,this)),E(this.b,U(this,"Sending request")),this.u=!0,this.a.send(t),this.u=!1}catch(t){E(this.b,U(this,"Send error: "+t.message)),qe(this,t)}},g.Ka=function(){void 0!==goog&&this.a&&(this.g="Timed out after "+this.l+"ms, aborting",this.j=8,E(this.b,U(this,this.g)),this.dispatchEvent("timeout"),this.abort(8))},g.abort=function(t){this.a&&this.c&&(E(this.b,U(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.j=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ue(this))},g.w=function(){this.a&&(this.c&&(this.c=!1,this.h=!0,this.a.abort(),this.h=!1),ue(this,!0)),T.H.w.call(this)},g.Na=function(){this.i||(this.I||this.u||this.h?ve(this):this.jb())},g.jb=function(){ve(this)},g.W=function(){try{return 2<N(this)?this.a.status:-1}catch(t){return-1}},g.Ha=function(){try{return 2<N(this)?this.a.statusText:""}catch(t){return E(this.b,"Can not get status: "+t.message),""}},g.V=function(){try{return this.a?this.a.responseText:""}catch(t){return E(this.b,"Can not get responseText: "+t.message),""}},g.eb=function(t){if(this.a){var e=this.a.responseText;t&&0==e.indexOf(t)&&(e=e.substring(t.length));t:{if(t=e,k.JSON)try{var n=k.JSON.parse(t);break t}catch(t){}n=Cb(t)}return n}},g.Ga=function(){return this.j},g.hb=function(){return l(this.g)?this.g:String(this.g)},g=ye.prototype,g.na=8,g.F=1,g.La=function(){return 0==this.F},g.Qa=function(t){if(this.m=null,H(this.a,"startForwardChannel_"),1==this.F)if(t)J(this.a,"Not supposed to retry the open");else{H(this.a,"open_()"),this.R=Math.floor(1e5*Math.random()),t=this.R++;var e=new L(this,this.a,t,void 0),n=this.i;this.L&&(n?Ha(n=Fa(n),this.L):n=this.L),null===this.h&&(e.j=n);var r=Ie(this,e),i=M(this.D);R(i,"RID",t),R(i,"CVER",22),this.o&&this.j&&R(i,"X-HTTP-Session-Id",this.j),Be(this,i),this.h&&n&&xe(i,this.h,n),ce(this.c,e),this.va?(R(i,"$req",r),R(i,"SID","null"),e.X=!0,Vc(e,i,null)):Vc(e,i,r),this.F=2}else 3==this.F&&(t?Je(this,t):0==this.g.length?H(this.a,"startForwardChannel_ returned: nothing to send"):de(this.c)?J(this.a,"startForwardChannel_ returned: connection already in progress"):(Je(this),H(this.a,"startForwardChannel_ finished, sent request")))},g.Pa=function(){this.l=null,H(this.a,"Creating new HttpRequest"),this.b=new L(this,this.a,"rpc",this.T),null===this.h&&(this.b.j=this.i),this.b.N=0;var t=M(this.ua);R(t,"RID","rpc"),R(t,"SID",this.J),R(t,"CI",this.ka?"0":"1"),R(t,"AID",this.N),Be(this,t),R(t,"TYPE","xmlhttp"),this.h&&this.i&&xe(t,this.h,this.i),this.G&&this.b.setTimeout(this.G),Yc(this.b,t,!0,this.X),H(this.a,"New Request created")},g.Oa=function(t,e){if(0!=this.F&&(this.b==t||ee(this.c,t)))if(this.u=t.C,!t.v&&ee(this.c,t)&&3==this.F){try{var n=this.la.a.parse(e)}catch(t){n=null}if(p(n)&&3==n.length)if(0==(e=n)[0])t:if(H(this.a,"Server claims our backchannel is missing."),this.l)H(this.a,"But we are currently starting the request.");else{if(this.b){if(!(this.b.D+3e3<t.D))break t;De(this),this.b.cancel(),this.b=null}else D(this.a.a,"We do not have a BackChannel established");Le(this),K(18)}else this.xa=e[1],0<(t=this.xa-this.N)&&(e=e[2],H(this.a,e+" bytes (in "+t+" arrays) are outstanding on the BackChannel"),37500>e&&this.ka&&0==this.B&&!this.s&&(this.s=Ec(r(this.ib,this),6e3)));else H(this.a,"Bad POST response data returned"),V(this,11)}else if((t.v||this.b==t)&&De(this),!xa(e))for(e=n=this.la.a.parse(e),n=0;n<e.length;n++){var i=e[n];if(this.N=i[0],i=i[1],2==this.F)if("c"==i[0]){this.J=i[1],this.X=i[2];var o=i[3];null!=o&&(this.na=o,F(this.a,"VER="+this.na)),null!=(o=i[4])&&(this.ya=o,F(this.a,"SVER="+this.ya)),null!=(i=i[5])&&"number"==typeof i&&0<i&&(this.G=i*=1.5,F(this.a,"backChannelRequestTimeoutMs_="+i)),this.o&&(i=t.a)&&((o=id(i,"X-Client-Wire-Protocol"))&&be(this.c,o),this.j&&((i=id(i,"X-HTTP-Session-Id"))?(this.K=i,R(this.D,this.j,i)):D(this.a.a,"Missing X_HTTP_SESSION_ID in the handshake response"))),this.F=3,this.f&&this.f.Da(),i=t,this.ua=Ud(this,this.X,this.ja),i.v?(H(this.a,"Upgrade the handshake request to a backchannel."),fe(this.c,i),(o=this.G)&&i.setTimeout(o),i.s&&(bd(i),Zc(i)),this.b=i):Ke(this)}else"stop"!=i[0]&&"close"!=i[0]||V(this,7);else 3==this.F&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?V(this,7):ze(this):"noop"!=i[0]&&this.f&&this.f.Ca(i),this.B=0)}},g.ib=function(){null!=this.s&&(this.s=null,this.b.cancel(),this.b=null,Le(this),K(19))},g.ta=function(e){H(this.a,"Request complete");var n=null;if(this.b==e){De(this),this.b=null;var r=2}else{if(!ee(this.c,e))return;n=e.u,fe(this.c,e),r=1}if(this.u=e.C,0!=this.F)if(e.f)1==r?(Dc(e.l?e.l.length:0,t()-e.D,this.v),Fe(this)):Ke(this);else{var i=e.m;if(3==i||0==i&&0<this.u)H(this.a,"Not retrying due to error type");else{var o=this;if(H(this.a,function(){return"Maybe retrying, last error: "+Sc(i,o.u)}),1==r&&Ge(this,e)||2==r&&Le(this))return;H(this.a,"Exceeded max number of retries")}switch(n&&0<n.length&&he(this.c,n),H(this.a,"Error: HTTP request failed"),i){case 1:V(this,5);break;case 4:V(this,10);break;case 3:V(this,6);break;default:V(this,2)}}},g.pb=function(t){t?(F(this.a,"Successfully pinged google.com"),K(2)):(F(this.a,"Failed to ping google.com"),K(1))},g.ca=function(t){if(t&&!this.S)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new T(this.Ta)).o=this.S,t},g.qa=function(){return!!this.f&&!0},g.ia=function(){return this.S},new Qd,g=Oe.prototype,g.Da=function(){},g.Ca=function(){},g.Ba=function(){},g.Aa=function(){},g.ab=function(){},Qe.prototype.a=function(t,e){return new W(t,e)},u(W,B),g=W.prototype,g.addEventListener=function(t,e,n,r){W.H.addEventListener.call(this,t,e,n,r)},g.removeEventListener=function(t,e,n,r){W.H.removeEventListener.call(this,t,e,n,r)},g.fb=function(){this.a.f=this.h,this.l&&(this.a.S=!0);var t=this.a,e=this.o,n=this.b,r=this.g||void 0;H(t.a,"connect()"),K(0),t.ja=n,t.U=r||{},t.o&&(H(t.a,"connect() bypassed channel-test."),t.I.b=[],t.I.a=!1),H(t.a,"connectTest_()"),t.C=new Rd(t,t.a),null===t.h&&(t.C.i=t.i),n=e,t.h&&t.i&&(n=xe(e,t.h,t.i)),(t=t.C).m=n,e=Me(t.a,t.m),K(3),null!=(n=t.a.I.b)?(t.g=n[0],t.P=1,Sd(t)):($c(e,"MODE","init"),!t.a.o&&t.a.j&&$c(e,"X-HTTP-Session-Id",t.a.j),t.c=new L(t,t.b,void 0,void 0),t.c.j=t.i,Yc(t.c,e,!1,null),t.P=0)},g.close=function(){ze(this.a)},g.gb=function(t){if(l(t)){var e={};e.__data__=t,Ee(this.a,e)}else this.j?((e={}).__data__=Db(t),Ee(this.a,e)):Ee(this.a,t)},g.w=function(){this.a.f=null,delete this.h,ze(this.a),delete this.a,W.H.w.call(this)},u(Se,Mc),u(Te,Nc),u(Re,Oe),Re.prototype.Da=function(){rc(this.a.c,"WebChannel opened on "+this.a.b),this.a.dispatchEvent("a")},Re.prototype.Ca=function(t){this.a.dispatchEvent(new Se(t))},Re.prototype.Ba=function(t){rc(this.a.c,"WebChannel aborted on "+this.a.b+" due to channel error: "+t),this.a.dispatchEvent(new Te(t))},Re.prototype.Aa=function(){rc(this.a.c,"WebChannel closed on "+this.a.b),this.a.dispatchEvent("b")};var Ue=ja(function(t,e){function n(){}n.prototype=t.prototype;var r=new n;return t.apply(r,Array.prototype.slice.call(arguments,1)),r},Qe);function Ve(){this.b=[],this.a=[]}function We(t){return 0==t.b.length&&(t.b=t.a,t.b.reverse(),t.a=[]),t.b.pop()}function Xe(t){return t.b.length+t.a.length}function Ye(t,e){if(w.call(this),this.h=t||0,this.c=e||10,this.h>this.c)throw Error(Ze);this.a=new Ve,this.b=new Xd,this.g=null,this.aa()}Ve.prototype.A=function(){for(var t=[],e=this.b.length-1;0<=e;--e)t.push(this.b[e]);var n=this.a.length;for(e=0;e<n;++e)t.push(this.a[e]);return t},u(Ye,w);var Ze="[goog.structs.Pool] Min can not be greater than max";function af(t){if("function"==typeof t.$)t.$();else for(var e in t)t[e]=null}function $e(t){return Xe(t.a)+t.b.a.c}function bf(t,e){this.a=t,this.b=e}function cf(t){if(this.a=[],t)t:{if(t instanceof cf){var e=t.M();if(t=t.A(),0>=this.a.length){for(var n=this.a,r=0;r<e.length;r++)n.push(new bf(e[r],t[r]));break t}}else e=Ea(t),t=Da(t);for(r=0;r<e.length;r++)df(this,e[r],t[r])}}function df(t,e,n){var r=t.a;for(r.push(new bf(e,n)),e=r.length-1,n=(t=t.a)[e];0<e&&t[r=e-1>>1].a>n.a;)t[e]=t[r],e=r;t[e]=n}function ef(){cf.call(this)}function Y(t,e){this.f=new ef,Ye.call(this,t,e)}function Z(t,e,n,r){this.l=t,this.j=!!r,Y.call(this,e,n)}g=Ye.prototype,g.da=function(){var e=t();if(!(null!=this.g&&0>e-this.g)){for(var n;0<Xe(this.a)&&(n=We(this.a),!this.sa(n));)this.aa();return!n&&$e(this)<this.c&&(n=this.pa()),n&&(this.g=e,this.b.add(n)),n}},g.ob=function(t){return!!pd(this.b.a,Yd(t))&&(this.ma(t),!0)},g.ma=function(t){pd(this.b.a,Yd(t)),this.sa(t)&&$e(this)<this.c?this.a.a.push(t):af(t)},g.aa=function(){for(var t=this.a;$e(this)<this.h;){var e=this.pa();t.a.push(e)}for(;$e(this)>this.c&&0<Xe(this.a);)af(We(t))},g.pa=function(){return{}},g.sa=function(t){return"function"!=typeof t.bb||t.bb()},g.w=function(){if(Ye.H.w.call(this),0<this.b.a.c)throw Error("[goog.structs.Pool] Objects not released");delete this.b;for(var t=this.a;0!=t.b.length||0!=t.a.length;)af(We(t));delete this.a},cf.prototype.A=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].b);return e},cf.prototype.M=function(){for(var t=this.a,e=[],n=t.length,r=0;r<n;r++)e.push(t[r].a);return e},u(ef,cf),u(Y,Ye),g=Y.prototype,g.da=function(t,e){if(!t)return Y.H.da.call(this);df(this.f,void 0!==e?e:100,t),this.ra()},g.ra=function(){for(var t=this.f;0<t.a.length;){var e=this.da();if(!e)break;var n=t,r=n.a,i=r.length,o=r[0];if(0>=i)o=void 0;else{if(1==i)ua(r);else{r[0]=r.pop(),r=0,i=(n=n.a).length;for(var a=n[r];r>1;){var s=2*r+1,u=2*r+2;if(n[s=u<i&&n[u].a<n[s].a?u:s].a>a.a)break;n[r]=n[s],r=s}n[r]=a}o=o.b}o.apply(this,[e])}},g.ma=function(t){Y.H.ma.call(this,t),this.ra()},g.aa=function(){Y.H.aa.call(this),this.ra()},g.w=function(){Y.H.w.call(this),k.clearTimeout(void 0),ua(this.f.a),this.f=null},u(Z,Y),Z.prototype.pa=function(){var t=new T,e=this.l;return e&&e.forEach(function(e,n){t.headers.set(n,e)}),this.j&&(t.o=!0),t},Z.prototype.sa=function(t){return!t.i&&!t.a},Qe.prototype.createWebChannel=Qe.prototype.a,W.prototype.send=W.prototype.gb,W.prototype.open=W.prototype.fb,W.prototype.close=W.prototype.close,Fc.NO_ERROR=0,Fc.TIMEOUT=8,Fc.HTTP_ERROR=6,Gc.COMPLETE="complete",Kc.EventType=Lc,Lc.OPEN="a",Lc.CLOSE="b",Lc.ERROR="c",Lc.MESSAGE="d",B.prototype.listen=B.prototype.Ia,Z.prototype.getObject=Z.prototype.da,Z.prototype.releaseObject=Z.prototype.ob,T.prototype.listenOnce=T.prototype.Ja,T.prototype.getLastError=T.prototype.hb,T.prototype.getLastErrorCode=T.prototype.Ga,T.prototype.getStatus=T.prototype.W,T.prototype.getStatusText=T.prototype.Ha,T.prototype.getResponseJson=T.prototype.eb,T.prototype.getResponseText=T.prototype.V,T.prototype.getResponseText=T.prototype.V,T.prototype.send=T.prototype.fa,module.exports={createWebChannelTransport:Ue,ErrorCode:Fc,EventType:Gc,WebChannel:Kc,XhrIoPool:Z}}).call(void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(this,__webpack_require__(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

                                                                                                                                                          • */

var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r,a=n(198),s=n(320),u=n(319),c=o.SDK_VERSION,l=new a.Logger("@firebase/firestore");function f(){return l.logLevel===a.LogLevel.DEBUG?i.DEBUG:l.logLevel===a.LogLevel.SILENT?i.SILENT:i.ERROR}function h(t){switch(t){case i.DEBUG:l.logLevel=a.LogLevel.DEBUG;break;case i.ERROR:l.logLevel=a.LogLevel.ERROR;break;case i.SILENT:l.logLevel=a.LogLevel.SILENT;break;default:l.error("Firestore ("+c+"): Invalid value passed to `setLogLevel`")}}function p(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(l.logLevel<=a.LogLevel.DEBUG){var i=n.map(v);l.debug.apply(l,["Firestore ("+c+") ["+t+"]: "+e].concat(i))}}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(l.logLevel<=a.LogLevel.ERROR){var r=e.map(v);l.error.apply(l,["Firestore ("+c+"): "+t].concat(r))}}function v(t){if("string"==typeof t)return t;var e=g.getPlatform();try{return e.formatJSON(t)}catch(e){return t}}function m(t){var e="FIRESTORE ("+c+") INTERNAL ASSERTION FAILED: "+t;throw d(e),new Error(e)}function y(t,e){t||m(e)}!function(t){t[t.DEBUG=0]="DEBUG",t[t.ERROR=1]="ERROR",t[t.SILENT=2]="SILENT"}(i||(i={}));var g=function(){function t(){}return t.setPlatform=function(e){t.platform&&m("Platform already defined"),t.platform=e},t.getPlatform=function(){return t.platform||m("Platform not set"),t.platform},t}();function b(){return g.getPlatform().emptyByteString}var _={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},w=function(t){function e(e,n){var r=t.call(this,n)||this;return r.code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return s.__extends(e,t),e}(Error);function E(t,e){function n(){var t="This constructor is private.";throw e&&(t+=" ",t+=e),new w(_.INVALID_ARGUMENT,t)}for(var r in n.prototype=t.prototype,t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e){return void 0!==t?t:e}function x(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Number(n);isNaN(r)||e(r,t[n])}}function S(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function k(t){for(var e in y(null!=t&&"object"==typeof t,"isEmpty() expects object parameter."),t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function N(t,e,n){if(e.length!==n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function A(t,e,n){if(e.length<n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires at least "+H(n,"argument")+", but was called with "+H(e.length,"argument")+".")}function I(t,e,n,r){if(e.length<n||e.length>r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+H(e.length,"argument")+".")}function O(t,e,n,r){F(t,e,W(n)+" argument",r)}function P(t,e,n,r){void 0!==r&&O(t,e,n,r)}function R(t,e,n,r){F(t,e,n+" option",r)}function D(t,e,n,r){void 0!==r&&R(t,e,n,r)}function M(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){if(!(r instanceof Array))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+j(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be "+n+", but the value at index "+o+" was: "+j(r[o]))}(t,e,n,r,i)}function L(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){for(var o=[],a=0,s=i;a<s.length;a++){var u=s[a];if(u===r)return;o.push(j(u))}var c=j(r);throw new w(_.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function F(t,e,n,r){if(typeof r!==e||"object"===e&&!U(r)){var i=j(r);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function U(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function j(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":m("Unknown wrong type: "+typeof t)}function B(t,e,n){if(void 0===n)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+W(e)+" argument, but it was undefined.")}function q(t,e,n){S(e,function(e,r){if(n.indexOf(e)<0)throw new w(_.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))})}function V(t,e,n,r){var i=j(r);return new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+W(n)+" argument to be a "+e+", but it was: "+i)}function W(t){switch(t){case 1:return"first";case 2:return"second";case 3:return"third";default:return t+"th"}}function H(t,e){return t+" "+e+(1===t?"":"s")}var z=function(){function t(){}return t.newId=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return y(20===e.length,"Invalid auto ID: "+e),e},t}();function K(t,e){return t<e?-1:t>e?1:0}function G(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].isEqual(e[n]))return!1;return!0}function Q(){if("undefined"==typeof Uint8Array)throw new w(_.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function Y(){if(!g.getPlatform().base64Available)throw new w(_.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var X,$,J=function(){function t(t){Y(),this._binaryString=t}return t.fromBase64String=function(e){N("Blob.fromBase64String",arguments,1),O("Blob.fromBase64String","string",1,e),Y();try{return new t(g.getPlatform().atob(e))}catch(t){throw new w(_.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},t.fromUint8Array=function(e){if(N("Blob.fromUint8Array",arguments,1),Q(),!(e instanceof Uint8Array))throw V("Blob.fromUint8Array","Uint8Array",1,e);return new t(Array.prototype.map.call(e,function(t){return String.fromCharCode(t)}).join(""))},t.prototype.toBase64=function(){return N("Blob.toBase64",arguments,0),Y(),g.getPlatform().btoa(this._binaryString)},t.prototype.toUint8Array=function(){N("Blob.toUint8Array",arguments,0),Q();for(var t=new Uint8Array(this._binaryString.length),e=0;e<this._binaryString.length;e++)t[e]=this._binaryString.charCodeAt(e);return t},t.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this._binaryString===t._binaryString},t.prototype._compareTo=function(t){return K(this._binaryString,t._binaryString)},t}(),Z=E(J,"Use Blob.fromUint8Array() or Blob.fromBase64String() instead."),tt=function(){function t(t,e){if(N("GeoPoint",arguments,2),O("GeoPoint","number",1,t),O("GeoPoint","number",2,e),!isFinite(t)||t<-90||t>90)throw new w(_.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new w(_.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this._long},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},t.prototype._compareTo=function(t){return K(this._lat,t._lat)||K(this._long,t._long)},t}(),et=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new w(_.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new w(_.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype._compareTo=function(t){return this.seconds===t.seconds?K(this.nanoseconds,t.nanoseconds):K(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t}(),nt=function(){return function(t,e,n,r){this.databaseId=t,this.persistenceKey=e,this.host=n,this.ssl=r}}(),rt="(default)",it=function(){function t(t,e){this.projectId=t,this.database=e||rt}return Object.defineProperty(t.prototype,"isDefaultDatabase",{get:function(){return this.database===rt},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.compareTo=function(t){return K(this.projectId,t.projectId)||K(this.database,t.database)},t}(),ot=function(){function t(t,e,n){this.init(t,e,n)}return t.prototype.init=function(t,e,n){void 0===e?e=0:e>t.length&&m("offset "+e+" out of range "+t.length),void 0===n?n=t.length-e:n>t.length-e&&m("length "+n+" out of range "+(t.length-e)),this.segments=t,this.offset=e,this.len=n},t.prototype.construct=function(t,e,n){var r=Object.create(Object.getPrototypeOf(this));return r.init(t,e,n),r},Object.defineProperty(t.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.comparator(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(function(t){n.push(t)}):"string"==typeof e?n.push(e):m("Unknown parameter type for Path.child(): "+e),this.construct(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.popFirst=function(t){return t=void 0===t?1:t,y(this.length>=t,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+t,this.length-t)},t.prototype.popLast=function(){return y(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},t.prototype.firstSegment=function(){return y(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},t.prototype.lastSegment=function(){return y(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},t.prototype.get=function(t){return y(t<this.length,"Index out of range"),this.segments[this.offset+t]},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.isPrefixOf=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},t.comparator=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.canonicalString=function(){return this.toArray().join("/")},e.prototype.toString=function(){return this.canonicalString()},e.fromString=function(t){if(t.indexOf("//")>=0)throw new w(_.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter(function(t){return t.length>0}))},e.EMPTY_PATH=new e([]),e}(ot),st=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.isValidIdentifier=function(t){return st.test(t)},e.prototype.canonicalString=function(){return this.toArray().map(function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t}).join(".")},e.prototype.toString=function(){return this.canonicalString()},e.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},e.keyField=function(){return new e(["__name__"])},e.fromServerFormat=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new w(_.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new w(_.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new w(_.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.EMPTY_PATH=new e([]),e}(ot),ct=function(){function t(e){this.path=e,y(t.isDocumentKey(e),"Invalid DocumentKey with an odd number of segments: "+e.toArray().join("/"))}return t.prototype.isEqual=function(t){return null!==t&&0===at.comparator(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.comparator=function(t,e){return at.comparator(t.path,e.path)},t.isDocumentKey=function(t){return t.length%2==0},t.fromSegments=function(e){return new t(new at(e.slice()))},t.fromPathString=function(e){return new t(at.fromString(e))},t.EMPTY=new t(new at([])),t}(),lt=function(){function t(t,e,n,r){this.key=t,this.version=e,this.data=n,this.hasLocalMutations=r.hasLocalMutations}return t.prototype.field=function(t){return this.data.field(t)},t.prototype.fieldValue=function(t){var e=this.field(t);return e?e.value():void 0},t.prototype.value=function(){return this.data.value()},t.prototype.isEqual=function(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.data.isEqual(e.data)&&this.hasLocalMutations===e.hasLocalMutations},t.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.data.toString()+", {hasLocalMutations: "+this.hasLocalMutations+"})"},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t.compareByField=function(t,e,n){var r=e.field(t),i=n.field(t);return void 0!==r&&void 0!==i?r.compareTo(i):m("Trying to compare documents on fields that don't exist")},t}(),ft=function(){function t(t,e){this.key=t,this.version=e}return t.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},t.prototype.isEqual=function(t){return t&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)},t}(),ht=function(){function t(t,e){this.comparator=t,this.root=e||dt.EMPTY}return t.prototype.insert=function(e,n){return new t(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator,this.root.remove(e,this.comparator).copy(null,null,dt.BLACK,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.isEmpty();){var n=this.comparator(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.isEmpty();){var r=this.comparator(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),t.prototype.minKey=function(){return this.root.minKey()},t.prototype.maxKey=function(){return this.root.maxKey()},t.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},t.prototype.forEach=function(t){this.inorderTraversal(function(e,n){return t(e,n),!1})},t.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},t.prototype.getIterator=function(){return new pt(this.root,null,this.comparator,!1)},t.prototype.getIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!1)},t.prototype.getReverseIterator=function(){return new pt(this.root,null,this.comparator,!0)},t.prototype.getReverseIteratorFrom=function(t){return new pt(this.root,t,this.comparator,!0)},t}(),pt=function(){function t(t,e,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!t.isEmpty();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.isReverse?t.left:t.right;else{if(0===i){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return t.prototype.getNext=function(){y(this.nodeStack.length>0,"getNext() called on iterator when hasNext() is false.");var t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e},t.prototype.hasNext=function(){return this.nodeStack.length>0},t.prototype.peek=function(){if(0===this.nodeStack.length)return null;var t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}},t}(),dt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},t.prototype.minKey=function(){return this.min().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp()},t.prototype.removeMin=function(){if(this.left.isEmpty())return t.EMPTY;var e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()},t.prototype.isRed=function(){return this.color},t.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},t.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight())).rotateLeft()).colorFlip()),t},t.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=(t=t.rotateRight()).colorFlip()),t},t.prototype.rotateLeft=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},t.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw m("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw m("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check();if(t!==this.right.check())throw m("Black depths differ");return t+(this.isRed()?0:1)},t.EMPTY=null,t.RED=!0,t.BLACK=!1,t}(),vt=function(){function t(){this.size=0}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new dt(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.isRed=function(){return!1},t.prototype.checkMaxDepth=function(){return!0},t.prototype.check=function(){return 0},t}();dt.EMPTY=new vt,function(t){t[t.NullValue=0]="NullValue",t[t.BooleanValue=1]="BooleanValue",t[t.NumberValue=2]="NumberValue",t[t.TimestampValue=3]="TimestampValue",t[t.StringValue=4]="StringValue",t[t.BlobValue=5]="BlobValue",t[t.RefValue=6]="RefValue",t[t.GeoPointValue=7]="GeoPointValue",t[t.ArrayValue=8]="ArrayValue",t[t.ObjectValue=9]="ObjectValue"}(X||(X={})),function(t){t[t.Default=0]="Default",t[t.Estimate=1]="Estimate",t[t.Previous=2]="Previous"}($||($={}));var mt=function(){function t(t,e){this.serverTimestampBehavior=t,this.timestampsInSnapshots=e}return t.fromSnapshotOptions=function(e,n){switch(e.serverTimestamps){case"estimate":return new t($.Estimate,n);case"previous":return new t($.Previous,n);case"none":case void 0:return new t($.Default,n);default:return m("fromSnapshotOptions() called with invalid options.")}},t}(),yt=function(){function t(){}return t.prototype.toString=function(){var t=this.value();return null===t?"null":t.toString()},t.prototype.defaultCompareTo=function(t){return y(this.typeOrder!==t.typeOrder,"Default compareTo should not be used for values of same type."),K(this.typeOrder,t.typeOrder)},t}(),gt=function(t){function e(){var e=t.call(this)||this;return e.typeOrder=X.NullValue,e.internalValue=null,e}return s.__extends(e,t),e.prototype.value=function(t){return null},e.prototype.isEqual=function(t){return t instanceof e},e.prototype.compareTo=function(t){return t instanceof e?0:this.defaultCompareTo(t)},e.INSTANCE=new e,e}(yt),bt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BooleanValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this,t):this.defaultCompareTo(t)},e.of=function(t){return t?e.TRUE:e.FALSE},e.TRUE=new e(!0),e.FALSE=new e(!1),e}(yt),_t=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.NumberValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.compareTo=function(t){return t instanceof e?(n=this.internalValue,r=t.internalValue,n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1):this.defaultCompareTo(t);var n,r},e}(yt);function wt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var Et=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e}(_t),Tt=function(t){function e(e){var n=t.call(this,e)||this;return n.internalValue=e,n}return s.__extends(e,t),e.prototype.isEqual=function(t){return t instanceof e&&wt(this.internalValue,t.internalValue)},e.NAN=new e(NaN),e.POSITIVE_INFINITY=new e(1/0),e.NEGATIVE_INFINITY=new e(-1/0),e}(_t),Ct=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.StringValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue===t.internalValue},e.prototype.compareTo=function(t){return t instanceof e?K(this.internalValue,t.internalValue):this.defaultCompareTo(t)},e}(yt),xt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.TimestampValue,n}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):t instanceof St?-1:this.defaultCompareTo(t)},e}(yt),St=function(t){function e(e,n){var r=t.call(this)||this;return r.localWriteTime=e,r.previousValue=n,r.typeOrder=X.TimestampValue,r}return s.__extends(e,t),e.prototype.value=function(t){return t&&t.serverTimestampBehavior===$.Estimate?new xt(this.localWriteTime).value(t):t&&t.serverTimestampBehavior===$.Previous&&this.previousValue?this.previousValue.value(t):null},e.prototype.isEqual=function(t){return t instanceof e&&this.localWriteTime.isEqual(t.localWriteTime)},e.prototype.compareTo=function(t){return t instanceof e?this.localWriteTime._compareTo(t.localWriteTime):t instanceof xt?1:this.defaultCompareTo(t)},e.prototype.toString=function(){return"<ServerTimestamp localTime="+this.localWriteTime.toString()+">"},e}(yt),kt=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.BlobValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),Nt=function(t){function e(e,n){var r=t.call(this)||this;return r.databaseId=e,r.key=n,r.typeOrder=X.RefValue,r}return s.__extends(e,t),e.prototype.value=function(t){return this.key},e.prototype.isEqual=function(t){return t instanceof e&&(this.key.isEqual(t.key)&&this.databaseId.isEqual(t.databaseId))},e.prototype.compareTo=function(t){if(t instanceof e){var n=this.databaseId.compareTo(t.databaseId);return 0!==n?n:ct.comparator(this.key,t.key)}return this.defaultCompareTo(t)},e}(yt),At=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.GeoPointValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue},e.prototype.isEqual=function(t){return t instanceof e&&this.internalValue.isEqual(t.internalValue)},e.prototype.compareTo=function(t){return t instanceof e?this.internalValue._compareTo(t.internalValue):this.defaultCompareTo(t)},e}(yt),It=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ObjectValue,n}return s.__extends(e,t),e.prototype.value=function(t){var e={};return this.internalValue.inorderTraversal(function(n,r){e[n]=r.value(t)}),e},e.prototype.forEach=function(t){this.internalValue.inorderTraversal(t)},e.prototype.isEqual=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext();if(i.key!==o.key||!i.value.isEqual(o.value))return!1}return!n.hasNext()&&!r.hasNext()}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=this.internalValue.getIterator(),r=t.internalValue.getIterator();n.hasNext()&&r.hasNext();){var i=n.getNext(),o=r.getNext(),a=K(i.key,o.key)||i.value.compareTo(o.value);if(a)return a}return K(n.hasNext(),r.hasNext())}return this.defaultCompareTo(t)},e.prototype.set=function(t,n){if(y(!t.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===t.length)return this.setChild(t.firstSegment(),n);var r=this.child(t.firstSegment());r instanceof e||(r=e.EMPTY);var i=r.set(t.popFirst(),n);return this.setChild(t.firstSegment(),i)},e.prototype.delete=function(t){if(y(!t.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===t.length)return new e(this.internalValue.remove(t.firstSegment()));var n=this.child(t.firstSegment());if(n instanceof e){var r=n.delete(t.popFirst());return new e(this.internalValue.insert(t.firstSegment(),r))}return this},e.prototype.contains=function(t){return void 0!==this.field(t)},e.prototype.field=function(t){y(!t.isEmpty(),"Can't get field of empty path");var n=this;return t.forEach(function(t){n=n instanceof e&&n.internalValue.get(t)||void 0}),n},e.prototype.toString=function(){return JSON.stringify(this.value())},e.prototype.child=function(t){return this.internalValue.get(t)||void 0},e.prototype.setChild=function(t,n){return new e(this.internalValue.insert(t,n))},e.EMPTY=new e(new ht(K)),e}(yt),Ot=function(t){function e(e){var n=t.call(this)||this;return n.internalValue=e,n.typeOrder=X.ArrayValue,n}return s.__extends(e,t),e.prototype.value=function(t){return this.internalValue.map(function(e){return e.value(t)})},e.prototype.forEach=function(t){this.internalValue.forEach(t)},e.prototype.isEqual=function(t){if(t instanceof e){if(this.internalValue.length!==t.internalValue.length)return!1;for(var n=0;n<this.internalValue.length;n++)if(!this.internalValue[n].isEqual(t.internalValue[n]))return!1;return!0}return!1},e.prototype.compareTo=function(t){if(t instanceof e){for(var n=Math.min(this.internalValue.length,t.internalValue.length),r=0;r<n;r++){var i=this.internalValue[r].compareTo(t.internalValue[r]);if(i)return i}return K(this.internalValue.length,t.internalValue.length)}return this.defaultCompareTo(t)},e.prototype.toString=function(){return JSON.stringify(this.value())},e}(yt),Pt=Number,Rt=Pt.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),Dt=Pt.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Mt=Pt.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function Lt(t){return null===t||void 0===t}var Ft=function(){function t(t,e,n,r,i,o){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=null),this.path=t,this.explicitOrderBy=e,this.filters=n,this.limit=r,this.startAt=i,this.endAt=o,this.memoizedCanonicalId=null,this.memoizedOrderBy=null,this.startAt&&this.assertValidBound(this.startAt),this.endAt&&this.assertValidBound(this.endAt)}return t.atPath=function(e){return new t(e)},Object.defineProperty(t.prototype,"orderBy",{get:function(){if(null===this.memoizedOrderBy){var t=this.getInequalityFilterField(),e=this.getFirstOrderByField();if(null!==t&&null===e)t.isKeyField()?this.memoizedOrderBy=[Kt]:this.memoizedOrderBy=[new zt(t),Kt];else{y(null===t||null!==e&&t.isEqual(e),"First orderBy should match inequality field."),this.memoizedOrderBy=[];for(var n=!1,r=0,i=this.explicitOrderBy;r<i.length;r++){var o=i[r];this.memoizedOrderBy.push(o),o.field.isKeyField()&&(n=!0)}if(!n){var a=this.explicitOrderBy.length>0?this.explicitOrderBy[this.explicitOrderBy.length-1].dir:Wt.ASCENDING;this.memoizedOrderBy.push(a===Wt.ASCENDING?Kt:Gt)}}}return this.memoizedOrderBy},enumerable:!0,configurable:!0}),t.prototype.addFilter=function(e){y(null==this.getInequalityFilterField()||!(e instanceof jt)||!e.isInequality()||e.field.isEqual(this.getInequalityFilterField()),"Query must only have one inequality field."),y(!ct.isDocumentKey(this.path),"No filtering allowed for document query");var n=this.filters.concat([e]);return new t(this.path,this.explicitOrderBy.slice(),n,this.limit,this.startAt,this.endAt)},t.prototype.addOrderBy=function(e){y(!ct.isDocumentKey(this.path),"No ordering allowed for document query"),y(!this.startAt&&!this.endAt,"Bounds must be set after orderBy");var n=this.explicitOrderBy.concat([e]);return new t(this.path,n,this.filters.slice(),this.limit,this.startAt,this.endAt)},t.prototype.withLimit=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),e,this.startAt,this.endAt)},t.prototype.withStartAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,e,this.endAt)},t.prototype.withEndAt=function(e){return new t(this.path,this.explicitOrderBy.slice(),this.filters.slice(),this.limit,this.startAt,e)},t.prototype.canonicalId=function(){if(null===this.memoizedCanonicalId){var t=this.path.canonicalString();t+="|f:";for(var e=0,n=this.filters;e<n.length;e++){t+=n[e].canonicalId(),t+=","}t+="|ob:";for(var r=0,i=this.orderBy;r<i.length;r++){t+=i[r].canonicalId(),t+=","}Lt(this.limit)||(t+="|l:",t+=this.limit),this.startAt&&(t+="|lb:",t+=this.startAt.canonicalId()),this.endAt&&(t+="|ub:",t+=this.endAt.canonicalId()),this.memoizedCanonicalId=t}return this.memoizedCanonicalId},t.prototype.toString=function(){var t="Query("+this.path.canonicalString();return this.filters.length>0&&(t+=", filters: ["+this.filters.join(", ")+"]"),Lt(this.limit)||(t+=", limit: "+this.limit),this.explicitOrderBy.length>0&&(t+=", orderBy: ["+this.explicitOrderBy.join(", ")+"]"),this.startAt&&(t+=", startAt: "+this.startAt.canonicalId()),this.endAt&&(t+=", endAt: "+this.endAt.canonicalId()),t+")"},t.prototype.isEqual=function(t){if(this.limit!==t.limit)return!1;if(this.orderBy.length!==t.orderBy.length)return!1;for(var e=0;e<this.orderBy.length;e++)if(!this.orderBy[e].isEqual(t.orderBy[e]))return!1;if(this.filters.length!==t.filters.length)return!1;for(e=0;e<this.filters.length;e++)if(!this.filters[e].isEqual(t.filters[e]))return!1;return!!this.path.isEqual(t.path)&&(!(null!==this.startAt?!this.startAt.isEqual(t.startAt):null!==t.startAt)&&(null!==this.endAt?this.endAt.isEqual(t.endAt):null===t.endAt))},t.prototype.docComparator=function(t,e){for(var n=!1,r=0,i=this.orderBy;r<i.length;r++){var o=i[r],a=o.compare(t,e);if(0!==a)return a;n=n||o.field.isKeyField()}return y(n,"orderBy used that doesn't compare on key field"),0},t.prototype.matches=function(t){return this.matchesAncestor(t)&&this.matchesOrderBy(t)&&this.matchesFilters(t)&&this.matchesBounds(t)},t.prototype.hasLimit=function(){return!Lt(this.limit)},t.prototype.getFirstOrderByField=function(){return this.explicitOrderBy.length>0?this.explicitOrderBy[0].field:null},t.prototype.getInequalityFilterField=function(){for(var t=0,e=this.filters;t<e.length;t++){var n=e[t];if(n instanceof jt&&n.isInequality())return n.field}return null},t.prototype.hasArrayContainsFilter=function(){return void 0!==this.filters.find(function(t){return t instanceof jt&&t.op===Ut.ARRAY_CONTAINS})},t.prototype.isDocumentQuery=function(){return ct.isDocumentKey(this.path)&&0===this.filters.length},t.prototype.matchesAncestor=function(t){var e=t.key.path;return ct.isDocumentKey(this.path)?this.path.isEqual(e):this.path.isPrefixOf(e)&&this.path.length===e.length-1},t.prototype.matchesOrderBy=function(t){for(var e=0,n=this.explicitOrderBy;e<n.length;e++){var r=n[e];if(!r.field.isKeyField()&&void 0===t.field(r.field))return!1}return!0},t.prototype.matchesFilters=function(t){for(var e=0,n=this.filters;e<n.length;e++){if(!n[e].matches(t))return!1}return!0},t.prototype.matchesBounds=function(t){return!(this.startAt&&!this.startAt.sortsBeforeDocument(this.orderBy,t))&&(!this.endAt||!this.endAt.sortsBeforeDocument(this.orderBy,t))},t.prototype.assertValidBound=function(t){y(t.position.length<=this.orderBy.length,"Bound is longer than orderBy")},t}(),Ut=function(){function t(t){this.name=t}return t.fromString=function(e){switch(e){case"<":return t.LESS_THAN;case"<=":return t.LESS_THAN_OR_EQUAL;case"==":return t.EQUAL;case">=":return t.GREATER_THAN_OR_EQUAL;case">":return t.GREATER_THAN;case"array-contains":return t.ARRAY_CONTAINS;default:return m("Unknown relation: "+e)}},t.prototype.toString=function(){return this.name},t.prototype.isEqual=function(t){return this.name===t.name},t.LESS_THAN=new t("<"),t.LESS_THAN_OR_EQUAL=new t("<="),t.EQUAL=new t("=="),t.GREATER_THAN=new t(">"),t.GREATER_THAN_OR_EQUAL=new t(">="),t.ARRAY_CONTAINS=new t("array-contains"),t}(),jt=function(){function t(t,e,n){this.field=t,this.op=e,this.value=n}return t.prototype.matches=function(t){if(this.field.isKeyField()){y(this.value instanceof Nt,"Comparing on key, but filter value not a RefValue"),y(this.op!==Ut.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var e=this.value,n=ct.comparator(t.key,e.key);return this.matchesComparison(n)}var r=t.field(this.field);return void 0!==r&&this.matchesValue(r)},t.prototype.matchesValue=function(t){var e=this;return this.op===Ut.ARRAY_CONTAINS?t instanceof Ot&&void 0!==t.internalValue.find(function(t){return t.isEqual(e.value)}):this.value.typeOrder===t.typeOrder&&this.matchesComparison(t.compareTo(this.value))},t.prototype.matchesComparison=function(t){switch(this.op){case Ut.LESS_THAN:return t<0;case Ut.LESS_THAN_OR_EQUAL:return t<=0;case Ut.EQUAL:return 0===t;case Ut.GREATER_THAN:return t>0;case Ut.GREATER_THAN_OR_EQUAL:return t>=0;default:return m("Unknown relation op"+this.op)}},t.prototype.isInequality=function(){return this.op!==Ut.EQUAL&&this.op!==Ut.ARRAY_CONTAINS},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.op.toString()+this.value.toString()},t.prototype.isEqual=function(e){return e instanceof t&&(this.op.isEqual(e.op)&&this.field.isEqual(e.field)&&this.value.isEqual(e.value))},t.prototype.toString=function(){return this.field.canonicalString()+" "+this.op+" "+this.value.value()},t}(),Bt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field);return void 0!==e&&null===e.value()},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS null"},t.prototype.toString=function(){return this.field.canonicalString()+" IS null"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}(),qt=function(){function t(t){this.field=t}return t.prototype.matches=function(t){var e=t.field(this.field).value();return"number"==typeof e&&isNaN(e)},t.prototype.canonicalId=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.toString=function(){return this.field.canonicalString()+" IS NaN"},t.prototype.isEqual=function(e){return e instanceof t&&this.field.isEqual(e.field)},t}();var Vt,Wt=function(){function t(t){this.name=t}return t.prototype.toString=function(){return this.name},t.ASCENDING=new t("asc"),t.DESCENDING=new t("desc"),t}(),Ht=function(){function t(t,e){this.position=t,this.before=e}return t.prototype.canonicalId=function(){for(var t=this.before?"b:":"a:",e=0,n=this.position;e<n.length;e++){t+=n[e].toString()}return t},t.prototype.sortsBeforeDocument=function(t,e){y(this.position.length<=t.length,"Bound has more components than query's orderBy");for(var n=0,r=0;r<this.position.length;r++){var i=t[r],o=this.position[r];if(i.field.isKeyField())y(o instanceof Nt,"Bound has a non-key value where the key path is being used."),n=ct.comparator(o.key,e.key);else{var a=e.field(i.field);y(void 0!==a,"Field should exist since document matched the orderBy already."),n=o.compareTo(a)}if(i.dir===Wt.DESCENDING&&(n*=-1),0!==n)break}return this.before?n<=0:n<0},t.prototype.isEqual=function(t){if(null===t)return!1;if(this.before!==t.before||this.position.length!==t.position.length)return!1;for(var e=0;e<this.position.length;e++){var n=this.position[e],r=t.position[e];return n.isEqual(r)}return!0},t}(),zt=function(){function t(t,e){this.field=t,void 0===e&&(e=Wt.ASCENDING),this.dir=e,this.isKeyOrderBy=t.isKeyField()}return t.prototype.compare=function(t,e){var n=this.isKeyOrderBy?lt.compareByKey(t,e):lt.compareByField(this.field,t,e);switch(this.dir){case Wt.ASCENDING:return n;case Wt.DESCENDING:return-1*n;default:return m("Unknown direction: "+this.dir)}},t.prototype.canonicalId=function(){return this.field.canonicalString()+this.dir.toString()},t.prototype.toString=function(){return this.field.canonicalString()+" ("+this.dir+")"},t.prototype.isEqual=function(t){return this.dir===t.dir&&this.field.isEqual(t.field)},t}(),Kt=new zt(ut.keyField(),Wt.ASCENDING),Gt=new zt(ut.keyField(),Wt.DESCENDING),Qt=function(){function t(t){this.timestamp=t}return t.fromMicroseconds=function(e){var n=Math.floor(e/1e6);return new t(new et(n,e%1e6*1e3))},t.fromTimestamp=function(e){return new t(e)},t.forDeletedDoc=function(){return t.MIN},t.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.toTimestamp=function(){return this.timestamp},t.MIN=new t(new et(0,0)),t}();!function(t){t[t.Listen=0]="Listen",t[t.ExistenceFilterMismatch=1]="ExistenceFilterMismatch",t[t.LimboResolution=2]="LimboResolution"}(Vt||(Vt={}));var Yt,Xt=function(){function t(t,e,n,r,i){void 0===r&&(r=Qt.MIN),void 0===i&&(i=b()),this.query=t,this.targetId=e,this.purpose=n,this.snapshotVersion=r,this.resumeToken=i}return t.prototype.update=function(e){return new t(this.query,this.targetId,this.purpose,e.snapshotVersion,e.resumeToken)},t.prototype.isEqual=function(t){return this.targetId===t.targetId&&this.purpose===t.purpose&&this.snapshotVersion.isEqual(t.snapshotVersion)&&this.resumeToken===t.resumeToken&&this.query.isEqual(t.query)},t}(),$t=function(){function t(t){this.fields=t}return t.prototype.covers=function(t){for(var e=0,n=this.fields;e<n.length;e++){if(n[e].isPrefixOf(t))return!0}return!1},t.prototype.isEqual=function(t){return G(this.fields,t.fields)},t}(),Jt=function(){function t(t,e){this.field=t,this.transform=e}return t.prototype.isEqual=function(t){return this.field.isEqual(t.field)&&this.transform.isEqual(t.transform)},t}(),Zt=function(){return function(t,e){this.version=t,this.transformResults=e}}();!function(t){t[t.Set=0]="Set",t[t.Patch=1]="Patch",t[t.Transform=2]="Transform",t[t.Delete=3]="Delete"}(Yt||(Yt={}));var te,ee=function(){function t(t,e){this.updateTime=t,this.exists=e,y(void 0===t||void 0===e,'Precondition can specify "exists" or "updateTime" but not both')}return t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!0,configurable:!0}),t.prototype.isValidFor=function(t){return void 0!==this.updateTime?t instanceof lt&&t.version.isEqual(this.updateTime):void 0!==this.exists?this.exists?t instanceof lt:null===t||t instanceof ft:(y(this.isNone,"Precondition should be empty"),!0)},t.prototype.isEqual=function(t){return e=this.updateTime,n=t.updateTime,(null!==e&&void 0!==e?!(!n||!e.isEqual(n)):e===n)&&this.exists===t.exists;var e,n},t.NONE=new t,t}(),ne=function(){function t(){}return t.prototype.verifyKeyMatches=function(t){null!=t&&y(t.key.isEqual(this.key),"Can only apply a mutation to a document with the same key")},t.getPostMutationVersion=function(t){return t instanceof lt?t.version:Qt.MIN},t}(),re=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.value=n,i.precondition=r,i.type=Yt.Set,i}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by SetMutation.");var n=ne.getPostMutationVersion(t);return new lt(this.key,n,this.value,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t);return new lt(this.key,r,this.value,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.value.isEqual(t.value)&&this.precondition.isEqual(t.precondition)},e}(ne),ie=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.key=e,o.data=n,o.fieldMask=r,o.precondition=i,o.type=Yt.Patch,o}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by PatchMutation."),!this.precondition.isValidFor(t))return t;var n=ne.getPostMutationVersion(t),r=this.patchDocument(t);return new lt(this.key,n,r,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=ne.getPostMutationVersion(t),i=this.patchDocument(t);return new lt(this.key,r,i,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.fieldMask.isEqual(t.fieldMask)&&this.precondition.isEqual(t.precondition)},e.prototype.patchDocument=function(t){var e;return e=t instanceof lt?t.data:It.EMPTY,this.patchObject(e)},e.prototype.patchObject=function(t){for(var e=0,n=this.fieldMask.fields;e<n.length;e++){var r=n[e],i=this.data.field(r);t=void 0!==i?t.set(r,i):t.delete(r)}return t},e}(ne),oe=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.fieldTransforms=n,r.type=Yt.Transform,r.precondition=ee.exists(!0),r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){if(this.verifyKeyMatches(t),y(null!=e.transformResults,"Transform results missing for TransformMutation."),!this.precondition.isValidFor(t))return t;var n=this.requireDocument(t),r=this.serverTransformResults(t,e.transformResults),i=this.transformObject(n.data,r);return new lt(this.key,n.version,i,{hasLocalMutations:!1})},e.prototype.applyToLocalView=function(t,e,n){if(this.verifyKeyMatches(t),!this.precondition.isValidFor(t))return t;var r=this.requireDocument(t),i=this.localTransformResults(n,e),o=this.transformObject(r.data,i);return new lt(this.key,r.version,o,{hasLocalMutations:!0})},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&G(this.fieldTransforms,t.fieldTransforms)&&this.precondition.isEqual(t.precondition)},e.prototype.requireDocument=function(t){y(t instanceof lt,"Unknown MaybeDocument type "+t);var e=t;return y(e.key.isEqual(this.key),"Can only transform a document with the same key"),e},e.prototype.serverTransformResults=function(t,e){var n=[];y(this.fieldTransforms.length===e.length,"server transform result count ("+e.length+") should match field transform count ("+this.fieldTransforms.length+")");for(var r=0;r<e.length;r++){var i=this.fieldTransforms[r],o=i.transform,a=null;t instanceof lt&&(a=t.field(i.field)||null),n.push(o.applyToRemoteDocument(a,e[r]))}return n},e.prototype.localTransformResults=function(t,e){for(var n=[],r=0,i=this.fieldTransforms;r<i.length;r++){var o=i[r],a=o.transform,s=null;e instanceof lt&&(s=e.field(o.field)||null),n.push(a.applyToLocalView(s,t))}return n},e.prototype.transformObject=function(t,e){y(e.length===this.fieldTransforms.length,"TransformResults length mismatch.");for(var n=0;n<this.fieldTransforms.length;n++){var r=this.fieldTransforms[n].field;t=t.set(r,e[n])}return t},e}(ne),ae=function(t){function e(e,n){var r=t.call(this)||this;return r.key=e,r.precondition=n,r.type=Yt.Delete,r}return s.__extends(e,t),e.prototype.applyToRemoteDocument=function(t,e){return this.verifyKeyMatches(t),y(null==e.transformResults,"Transform results received by DeleteMutation."),new ft(this.key,Qt.MIN)},e.prototype.applyToLocalView=function(t,e,n){return this.verifyKeyMatches(t),this.precondition.isValidFor(t)?(t&&y(t.key.isEqual(this.key),"Can only apply mutation to document with same key"),new ft(this.key,Qt.forDeletedDoc())):t},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.precondition.isEqual(t.precondition)},e}(ne),se=function(){function t(t){this.count=t}return t.prototype.isEqual=function(t){return t&&t.count===this.count},t}();function ue(t){switch(t){case _.OK:return m("Treated status OK as error");case _.CANCELLED:case _.UNKNOWN:case _.DEADLINE_EXCEEDED:case _.RESOURCE_EXHAUSTED:case _.INTERNAL:case _.UNAVAILABLE:case _.UNAUTHENTICATED:return!1;case _.INVALID_ARGUMENT:case _.NOT_FOUND:case _.ALREADY_EXISTS:case _.PERMISSION_DENIED:case _.FAILED_PRECONDITION:case _.ABORTED:case _.OUT_OF_RANGE:case _.UNIMPLEMENTED:case _.DATA_LOSS:return!0;default:return m("Unknown status code: "+t)}}function ce(t){if(void 0===t)return d("GRPC error has no .code"),_.UNKNOWN;switch(t){case te.OK:return _.OK;case te.CANCELLED:return _.CANCELLED;case te.UNKNOWN:return _.UNKNOWN;case te.DEADLINE_EXCEEDED:return _.DEADLINE_EXCEEDED;case te.RESOURCE_EXHAUSTED:return _.RESOURCE_EXHAUSTED;case te.INTERNAL:return _.INTERNAL;case te.UNAVAILABLE:return _.UNAVAILABLE;case te.UNAUTHENTICATED:return _.UNAUTHENTICATED;case te.INVALID_ARGUMENT:return _.INVALID_ARGUMENT;case te.NOT_FOUND:return _.NOT_FOUND;case te.ALREADY_EXISTS:return _.ALREADY_EXISTS;case te.PERMISSION_DENIED:return _.PERMISSION_DENIED;case te.FAILED_PRECONDITION:return _.FAILED_PRECONDITION;case te.ABORTED:return _.ABORTED;case te.OUT_OF_RANGE:return _.OUT_OF_RANGE;case te.UNIMPLEMENTED:return _.UNIMPLEMENTED;case te.DATA_LOSS:return _.DATA_LOSS;default:return m("Unknown status code: "+t)}}!function(t){t[t.OK=0]="OK",t[t.CANCELLED=1]="CANCELLED",t[t.UNKNOWN=2]="UNKNOWN",t[t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",t[t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",t[t.NOT_FOUND=5]="NOT_FOUND",t[t.ALREADY_EXISTS=6]="ALREADY_EXISTS",t[t.PERMISSION_DENIED=7]="PERMISSION_DENIED",t[t.UNAUTHENTICATED=16]="UNAUTHENTICATED",t[t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",t[t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",t[t.ABORTED=10]="ABORTED",t[t.OUT_OF_RANGE=11]="OUT_OF_RANGE",t[t.UNIMPLEMENTED=12]="UNIMPLEMENTED",t[t.INTERNAL=13]="INTERNAL",t[t.UNAVAILABLE=14]="UNAVAILABLE",t[t.DATA_LOSS=15]="DATA_LOSS"}(te||(te={}));var le=function(){function t(t){this.comparator=t,this.data=new ht(this.comparator)}return t.fromMapKeys=function(e){var n=new t(e.comparator);return e.forEach(function(t){n=n.add(t)}),n},t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.minKey()},t.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!0,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.forEachInRange=function(t,e){for(var n=this.data.getIteratorFrom(t[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}},t.prototype.forEachWhile=function(t,e){var n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();){if(!t(n.getNext().key))return}},t.prototype.firstAfterOrEqual=function(t){var e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null},t.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.isEmpty=function(){return this.data.isEmpty()},t.prototype.unionWith=function(t){var e=this;return t.forEach(function(t){e=e.add(t)}),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.getIterator(),r=e.data.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(0!==this.comparator(i,o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){return t.push(e)}),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.comparator);return n.data=e,n},t}(),fe=new ht(ct.comparator);function he(){return fe}var pe=new ht(ct.comparator);function de(){return pe}var ve=new ht(ct.comparator);function me(){return ve}var ye=new le(ct.comparator);function ge(){return ye}var be,_e,we=function(){return function(t,e,n,r,i){this.snapshotVersion=t,this.targetChanges=e,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}}(),Ee=function(){return function(t,e,n,r,i){this.resumeToken=t,this.current=e,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}}();!function(t){t[t.Added=0]="Added",t[t.Removed=1]="Removed",t[t.Modified=2]="Modified",t[t.Metadata=3]="Metadata"}(be||(be={})),function(t){t[t.Local=0]="Local",t[t.Synced=1]="Synced"}(_e||(_e={}));var Te,Ce=function(){function t(){this.changeMap=new ht(ct.comparator)}return t.prototype.track=function(t){var e=t.doc.key,n=this.changeMap.get(e);n?t.type!==be.Added&&n.type===be.Metadata?this.changeMap=this.changeMap.insert(e,t):t.type===be.Metadata&&n.type!==be.Removed?this.changeMap=this.changeMap.insert(e,{type:n.type,doc:t.doc}):t.type===be.Modified&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):t.type===be.Modified&&n.type===be.Added?this.changeMap=this.changeMap.insert(e,{type:be.Added,doc:t.doc}):t.type===be.Removed&&n.type===be.Added?this.changeMap=this.changeMap.remove(e):t.type===be.Removed&&n.type===be.Modified?this.changeMap=this.changeMap.insert(e,{type:be.Removed,doc:n.doc}):t.type===be.Added&&n.type===be.Removed?this.changeMap=this.changeMap.insert(e,{type:be.Modified,doc:t.doc}):m("unsupported combination of changes: "+JSON.stringify(t)+" after "+JSON.stringify(n)):this.changeMap=this.changeMap.insert(e,t)},t.prototype.getChanges=function(){var t=[];return this.changeMap.inorderTraversal(function(e,n){t.push(n)}),t},t}(),xe=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.fromCache=i,this.hasPendingWrites=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}return t.prototype.isEqual=function(t){if(this.fromCache!==t.fromCache||this.hasPendingWrites!==t.hasPendingWrites||this.syncStateChanged!==t.syncStateChanged||!this.query.isEqual(t.query)||!this.docs.isEqual(t.docs)||!this.oldDocs.isEqual(t.oldDocs))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),Se=function(){return function(t,e,n,r){this.updatedTargetIds=t,this.removedTargetIds=e,this.key=n,this.newDoc=r}}(),ke=function(){return function(t,e){this.targetId=t,this.existenceFilter=e}}();!function(t){t[t.NoChange=0]="NoChange",t[t.Added=1]="Added",t[t.Removed=2]="Removed",t[t.Current=3]="Current",t[t.Reset=4]="Reset"}(Te||(Te={}));var Ne=function(){return function(t,e,n,r){void 0===n&&(n=b()),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r}}(),Ae=function(){function t(){this.pendingResponses=0,this.documentChanges=Pe(),this._resumeToken=b(),this._current=!1,this._hasPendingChanges=!0}return Object.defineProperty(t.prototype,"current",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this._resumeToken},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPending",{get:function(){return 0!==this.pendingResponses},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingChanges",{get:function(){return this._hasPendingChanges},enumerable:!0,configurable:!0}),t.prototype.updateResumeToken=function(t){t.length>0&&(this._hasPendingChanges=!0,this._resumeToken=t)},t.prototype.toTargetChange=function(){var t=ge(),e=ge(),n=ge();return this.documentChanges.forEach(function(r,i){switch(i){case be.Added:t=t.add(r);break;case be.Modified:e=e.add(r);break;case be.Removed:n=n.add(r);break;default:m("Encountered invalid change type: "+i)}}),new Ee(this._resumeToken,this._current,t,e,n)},t.prototype.clearPendingChanges=function(){this._hasPendingChanges=!1,this.documentChanges=Pe()},t.prototype.addDocumentChange=function(t,e){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.insert(t,e)},t.prototype.removeDocumentChange=function(t){this._hasPendingChanges=!0,this.documentChanges=this.documentChanges.remove(t)},t.prototype.recordPendingTargetRequest=function(){this.pendingResponses+=1},t.prototype.recordTargetResponse=function(){this.pendingResponses-=1},t.prototype.markCurrent=function(){this._hasPendingChanges=!0,this._current=!0},t}(),Ie=function(){function t(t){this.metadataProvider=t,this.targetStates={},this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K)}return t.prototype.handleDocumentChange=function(t){for(var e=0,n=t.updatedTargetIds;e<n.length;e++){var r=n[e];t.newDoc instanceof lt?this.addDocumentToTarget(r,t.newDoc):t.newDoc instanceof ft&&this.removeDocumentFromTarget(r,t.key,t.newDoc)}for(var i=0,o=t.removedTargetIds;i<o.length;i++){r=o[i];this.removeDocumentFromTarget(r,t.key,t.newDoc)}},t.prototype.handleTargetChange=function(t){var e=this;t.targetIds.forEach(function(n){var r=e.ensureTargetState(n);switch(t.state){case Te.NoChange:e.isActiveTarget(n)&&r.updateResumeToken(t.resumeToken);break;case Te.Added:r.recordTargetResponse(),r.isPending||r.clearPendingChanges(),r.updateResumeToken(t.resumeToken);break;case Te.Removed:r.recordTargetResponse(),r.isPending||e.removeTarget(n),y(!t.cause,"WatchChangeAggregator does not handle errored targets");break;case Te.Current:e.isActiveTarget(n)&&(r.markCurrent(),r.updateResumeToken(t.resumeToken));break;case Te.Reset:e.isActiveTarget(n)&&(e.resetTarget(n),r.updateResumeToken(t.resumeToken));break;default:m("Unknown target watch change state: "+t.state)}})},t.prototype.handleExistenceFilter=function(t){var e=t.targetId,n=t.existenceFilter.count,r=this.queryDataForActiveTarget(e);if(r){var i=r.query;if(i.isDocumentQuery())if(0===n){var o=new ct(i.path);this.removeDocumentFromTarget(e,o,new ft(o,Qt.forDeletedDoc()))}else y(1===n,"Single document existence filter with count: "+n);else this.getCurrentDocumentCountForTarget(e)!==n&&(this.resetTarget(e),this.pendingTargetResets=this.pendingTargetResets.add(e))}},t.prototype.createRemoteEvent=function(t){var e=this,n={};x(this.targetStates,function(r,i){var o=e.queryDataForActiveTarget(r);if(o){if(i.current&&o.query.isDocumentQuery()){var a=new ct(o.query.path);null!==e.pendingDocumentUpdates.get(a)||e.targetContainsDocument(r,a)||e.removeDocumentFromTarget(r,a,new ft(a,t))}i.hasPendingChanges&&(n[r]=i.toTargetChange(),i.clearPendingChanges())}});var r=ge();this.pendingDocumentTargetMapping.forEach(function(t,n){var i=!0;n.forEachWhile(function(t){var n=e.queryDataForActiveTarget(t);return!n||n.purpose===Vt.LimboResolution||(i=!1,!1)}),i&&(r=r.add(t))});var i=new we(t,n,this.pendingTargetResets,this.pendingDocumentUpdates,r);return this.pendingDocumentUpdates=he(),this.pendingDocumentTargetMapping=Oe(),this.pendingTargetResets=new le(K),i},t.prototype.addDocumentToTarget=function(t,e){if(this.isActiveTarget(t)){var n=this.targetContainsDocument(t,e.key)?be.Modified:be.Added;this.ensureTargetState(t).addDocumentChange(e.key,n),this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e.key,e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e.key,this.ensureDocumentTargetMapping(e.key).add(t))}},t.prototype.removeDocumentFromTarget=function(t,e,n){if(this.isActiveTarget(t)){var r=this.ensureTargetState(t);this.targetContainsDocument(t,e)?r.addDocumentChange(e,be.Removed):r.removeDocumentChange(e),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(e,this.ensureDocumentTargetMapping(e).delete(t)),n&&(this.pendingDocumentUpdates=this.pendingDocumentUpdates.insert(e,n))}},t.prototype.removeTarget=function(t){delete this.targetStates[t]},t.prototype.getCurrentDocumentCountForTarget=function(t){var e=this.ensureTargetState(t).toTargetChange();return this.metadataProvider.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size},t.prototype.recordPendingTargetRequest=function(t){this.ensureTargetState(t).recordPendingTargetRequest()},t.prototype.ensureTargetState=function(t){return this.targetStates[t]||(this.targetStates[t]=new Ae),this.targetStates[t]},t.prototype.ensureDocumentTargetMapping=function(t){var e=this.pendingDocumentTargetMapping.get(t);return e||(e=new le(K),this.pendingDocumentTargetMapping=this.pendingDocumentTargetMapping.insert(t,e)),e},t.prototype.isActiveTarget=function(t){return null!==this.queryDataForActiveTarget(t)},t.prototype.queryDataForActiveTarget=function(t){var e=this.targetStates[t];return e&&e.isPending?null:this.metadataProvider.getQueryDataForTarget(t)},t.prototype.resetTarget=function(t){var e=this;y(!this.targetStates[t].isPending,"Should only reset active targets"),this.targetStates[t]=new Ae,this.metadataProvider.getRemoteKeysForTarget(t).forEach(function(n){e.removeDocumentFromTarget(t,n)})},t.prototype.targetContainsDocument=function(t,e){return this.metadataProvider.getRemoteKeysForTarget(t).has(e)},t}();function Oe(){return new ht(ct.comparator)}function Pe(){return new ht(ct.comparator)}var Re=function(){function t(){}return t.prototype.applyToLocalView=function(t,e){return new St(e,t)},t.prototype.applyToRemoteDocument=function(t,e){return e},t.prototype.isEqual=function(e){return e instanceof t},t.instance=new t,t}(),De=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e.find(function(e){return e.isEqual(t)})||e.push(t)},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}(),Me=function(){function t(t){this.elements=t}return t.prototype.applyToLocalView=function(t,e){return this.apply(t)},t.prototype.applyToRemoteDocument=function(t,e){return this.apply(t)},t.prototype.apply=function(t){for(var e=Le(t),n=function(t){e=e.filter(function(e){return!e.isEqual(t)})},r=0,i=this.elements;r<i.length;r++){n(i[r])}return new Ot(e)},t.prototype.isEqual=function(e){return e instanceof t&&G(e.elements,this.elements)},t}();function Le(t){return t instanceof Ot?t.internalValue.slice():[]}var Fe,Ue,je=((Fe={})[Wt.ASCENDING.name]="ASCENDING",Fe[Wt.DESCENDING.name]="DESCENDING",Fe),Be=((Ue={})[Ut.LESS_THAN.name]="LESS_THAN",Ue[Ut.LESS_THAN_OR_EQUAL.name]="LESS_THAN_OR_EQUAL",Ue[Ut.GREATER_THAN.name]="GREATER_THAN",Ue[Ut.GREATER_THAN_OR_EQUAL.name]="GREATER_THAN_OR_EQUAL",Ue[Ut.EQUAL.name]="EQUAL",Ue[Ut.ARRAY_CONTAINS.name]="ARRAY_CONTAINS",Ue),qe=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ve(t,e){y(!Lt(t),e+" is missing")}function We(t){return"number"==typeof t?t:"string"==typeof t?Number(t):m("can't parse "+t)}var He=function(){function t(t,e){this.databaseId=t,this.options=e}return t.prototype.emptyByteString=function(){return this.options.useProto3Json?"":new Uint8Array(0)},t.prototype.unsafeCastProtoByteString=function(t){return t},t.prototype.fromRpcStatus=function(t){var e=void 0===t.code?_.UNKNOWN:ce(t.code);return new w(e,t.message||"")},t.prototype.toInt32Value=function(t){return Lt(t)?void 0:{value:t}},t.prototype.fromInt32Value=function(t){var e;return Lt(e="object"==typeof t?t.value:t)?null:e},t.prototype.toTimestamp=function(t){return{seconds:t.seconds,nanos:t.nanoseconds}},t.prototype.fromTimestamp=function(t){if("string"==typeof t)return this.fromIso8601String(t);y(!!t,"Cannot deserialize null or undefined timestamp.");var e=We(t.seconds||"0"),n=t.nanos||0;return new et(e,n)},t.prototype.fromIso8601String=function(t){var e=0,n=qe.exec(t);if(y(!!n,"invalid timestamp: "+t),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t),o=Math.floor(i.getTime()/1e3);return new et(o,e)},t.prototype.toBytes=function(t){return this.options.useProto3Json?t.toBase64():this.unsafeCastProtoByteString(t.toUint8Array())},t.prototype.fromBlob=function(t){return"string"==typeof t?(y(this.options.useProto3Json,"Expected bytes to be passed in as Uint8Array, but got a string instead."),J.fromBase64String(t)):(y(!this.options.useProto3Json,"Expected bytes to be passed in as string, but got something else instead."),J.fromUint8Array(t))},t.prototype.toVersion=function(t){return this.toTimestamp(t.toTimestamp())},t.prototype.fromVersion=function(t){return y(!!t,"Trying to deserialize version that isn't set"),Qt.fromTimestamp(this.fromTimestamp(t))},t.prototype.toResourceName=function(t,e){return this.fullyQualifiedPrefixPath(t).child("documents").child(e).canonicalString()},t.prototype.fromResourceName=function(t){var e=at.fromString(t);return y(this.isValidResourceName(e),"Tried to deserialize invalid key "+e.toString()),e},t.prototype.toName=function(t){return this.toResourceName(this.databaseId,t.path)},t.prototype.fromName=function(t){var e=this.fromResourceName(t);return y(e.get(1)===this.databaseId.projectId,"Tried to deserialize key from different project: "+e.get(1)+" vs "+this.databaseId.projectId),y(!e.get(3)&&!this.databaseId.database||e.get(3)===this.databaseId.database,"Tried to deserialize key from different database: "+e.get(3)+" vs "+this.databaseId.database),new ct(this.extractLocalPathFromResourceName(e))},t.prototype.toQueryPath=function(t){return 0===t.length?this.encodedDatabaseId:this.toResourceName(this.databaseId,t)},t.prototype.fromQueryPath=function(t){var e=this.fromResourceName(t);return 4===e.length?at.EMPTY_PATH:this.extractLocalPathFromResourceName(e)},Object.defineProperty(t.prototype,"encodedDatabaseId",{get:function(){return new at(["projects",this.databaseId.projectId,"databases",this.databaseId.database]).canonicalString()},enumerable:!0,configurable:!0}),t.prototype.fullyQualifiedPrefixPath=function(t){return new at(["projects",t.projectId,"databases",t.database])},t.prototype.extractLocalPathFromResourceName=function(t){return y(t.length>4&&"documents"===t.get(4),"tried to deserialize invalid key "+t.toString()),t.popFirst(5)},t.prototype.isValidResourceName=function(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)},t.prototype.toValue=function(t){if(t instanceof gt)return{nullValue:"NULL_VALUE"};if(t instanceof bt)return{booleanValue:t.value()};if(t instanceof Et)return{integerValue:""+t.value()};if(t instanceof Tt){var e=t.value();if(this.options.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:t.value()}}return t instanceof Ct?{stringValue:t.value()}:t instanceof It?{mapValue:this.toMapValue(t)}:t instanceof Ot?{arrayValue:this.toArrayValue(t)}:t instanceof xt?{timestampValue:this.toTimestamp(t.internalValue)}:t instanceof At?{geoPointValue:{latitude:t.value().latitude,longitude:t.value().longitude}}:t instanceof kt?{bytesValue:this.toBytes(t.value())}:t instanceof Nt?{referenceValue:this.toResourceName(t.databaseId,t.key.path)}:m("Unknown FieldValue "+JSON.stringify(t))},t.prototype.fromValue=function(t){var e=this,n=t.value_type;if(ze(t,n,"nullValue"))return gt.INSTANCE;if(ze(t,n,"booleanValue"))return bt.of(t.booleanValue);if(ze(t,n,"integerValue"))return new Et(We(t.integerValue));if(ze(t,n,"doubleValue")){if(this.options.useProto3Json){if("NaN"===t.doubleValue)return Tt.NAN;if("Infinity"===t.doubleValue)return Tt.POSITIVE_INFINITY;if("-Infinity"===t.doubleValue)return Tt.NEGATIVE_INFINITY}return new Tt(t.doubleValue)}if(ze(t,n,"stringValue"))return new Ct(t.stringValue);if(ze(t,n,"mapValue"))return this.fromFields(t.mapValue.fields||{});if(ze(t,n,"arrayValue")){Ve(t.arrayValue,"arrayValue");var r=t.arrayValue.values||[];return new Ot(r.map(function(t){return e.fromValue(t)}))}if(ze(t,n,"timestampValue"))return Ve(t.timestampValue,"timestampValue"),new xt(this.fromTimestamp(t.timestampValue));if(ze(t,n,"geoPointValue")){Ve(t.geoPointValue,"geoPointValue");var i=t.geoPointValue.latitude||0,o=t.geoPointValue.longitude||0;return new At(new tt(i,o))}if(ze(t,n,"bytesValue")){Ve(t.bytesValue,"bytesValue");var a=this.fromBlob(t.bytesValue);return new kt(a)}if(ze(t,n,"referenceValue")){Ve(t.referenceValue,"referenceValue");var s=this.fromResourceName(t.referenceValue),u=new it(s.get(1),s.get(3)),c=new ct(this.extractLocalPathFromResourceName(s));return new Nt(u,c)}return m("Unknown Value proto "+JSON.stringify(t))},t.prototype.toMutationDocument=function(t,e){return{name:this.toName(t),fields:this.toFields(e)}},t.prototype.toDocument=function(t){return y(!t.hasLocalMutations,"Can't serialize documents with mutations."),{name:this.toName(t.key),fields:this.toFields(t.data),updateTime:this.toTimestamp(t.version.toTimestamp())}},t.prototype.fromDocument=function(t){return new lt(this.fromName(t.name),this.fromVersion(t.updateTime),this.fromFields(t.fields||{}),{hasLocalMutations:!1})},t.prototype.toFields=function(t){var e=this,n={};return t.forEach(function(t,r){n[t]=e.toValue(r)}),n},t.prototype.fromFields=function(t){var e=this,n=t,r=It.EMPTY;return S(n,function(t,n){r=r.set(new ut([t]),e.fromValue(n))}),r},t.prototype.toMapValue=function(t){return{fields:this.toFields(t)}},t.prototype.toArrayValue=function(t){var e=this,n=[];return t.forEach(function(t){n.push(e.toValue(t))}),{values:n}},t.prototype.fromFound=function(t){y(!!t.found,"Tried to deserialize a found document from a missing document."),Ve(t.found.name,"doc.found.name"),Ve(t.found.updateTime,"doc.found.updateTime");var e=this.fromName(t.found.name),n=this.fromVersion(t.found.updateTime),r=this.fromFields(t.found.fields||{});return new lt(e,n,r,{hasLocalMutations:!1})},t.prototype.fromMissing=function(t){y(!!t.missing,"Tried to deserialize a missing document from a found document."),y(!!t.readTime,"Tried to deserialize a missing document without a read time.");var e=this.fromName(t.missing),n=this.fromVersion(t.readTime);return new ft(e,n)},t.prototype.fromMaybeDocument=function(t){var e=t.result;return ze(t,e,"found")?this.fromFound(t):ze(t,e,"missing")?this.fromMissing(t):m("invalid batch get response: "+JSON.stringify(t))},t.prototype.toWatchTargetChangeState=function(t){switch(t){case Te.Added:return"ADD";case Te.Current:return"CURRENT";case Te.NoChange:return"NO_CHANGE";case Te.Removed:return"REMOVE";case Te.Reset:return"RESET";default:return m("Unknown WatchTargetChangeState: "+t)}},t.prototype.toTestWatchChange=function(t){if(t instanceof ke)return{filter:{count:t.existenceFilter.count,targetId:t.targetId}};if(t instanceof Se){if(t.newDoc instanceof lt){var e=t.newDoc;return{documentChange:{document:{name:this.toName(e.key),fields:this.toFields(e.data),updateTime:this.toVersion(e.version)},targetIds:t.updatedTargetIds,removedTargetIds:t.removedTargetIds}}}if(t.newDoc instanceof ft){e=t.newDoc;return{documentDelete:{document:this.toName(e.key),readTime:this.toVersion(e.version),removedTargetIds:t.removedTargetIds}}}if(null===t.newDoc)return{documentRemove:{document:this.toName(t.key),removedTargetIds:t.removedTargetIds}}}if(t instanceof Ne){var n=void 0;return t.cause&&(n={code:function(t){if(void 0===t)return te.OK;switch(t){case _.OK:return te.OK;case _.CANCELLED:return te.CANCELLED;case _.UNKNOWN:return te.UNKNOWN;case _.DEADLINE_EXCEEDED:return te.DEADLINE_EXCEEDED;case _.RESOURCE_EXHAUSTED:return te.RESOURCE_EXHAUSTED;case _.INTERNAL:return te.INTERNAL;case _.UNAVAILABLE:return te.UNAVAILABLE;case _.UNAUTHENTICATED:return te.UNAUTHENTICATED;case _.INVALID_ARGUMENT:return te.INVALID_ARGUMENT;case _.NOT_FOUND:return te.NOT_FOUND;case _.ALREADY_EXISTS:return te.ALREADY_EXISTS;case _.PERMISSION_DENIED:return te.PERMISSION_DENIED;case _.FAILED_PRECONDITION:return te.FAILED_PRECONDITION;case _.ABORTED:return te.ABORTED;case _.OUT_OF_RANGE:return te.OUT_OF_RANGE;case _.UNIMPLEMENTED:return te.UNIMPLEMENTED;case _.DATA_LOSS:return te.DATA_LOSS;default:return m("Unknown status code: "+t)}}(t.cause.code),message:t.cause.message}),{targetChange:{targetChangeType:this.toWatchTargetChangeState(t.state),targetIds:t.targetIds,resumeToken:this.unsafeCastProtoByteString(t.resumeToken),cause:n}}}return m("Unrecognized watch change: "+JSON.stringify(t))},t.prototype.fromWatchChange=function(t){var e,n=t.response_type;if(ze(t,n,"targetChange")){Ve(t.targetChange,"targetChange");var r=this.fromWatchTargetChangeState(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=t.targetChange.resumeToken||this.emptyByteString(),a=t.targetChange.cause,s=a&&this.fromRpcStatus(a);e=new Ne(r,i,o,s||null)}else if(ze(t,n,"documentChange")){Ve(t.documentChange,"documentChange"),Ve(t.documentChange.document,"documentChange.name"),Ve(t.documentChange.document.name,"documentChange.document.name"),Ve(t.documentChange.document.updateTime,"documentChange.document.updateTime");var u=t.documentChange,c=this.fromName(u.document.name),l=this.fromVersion(u.document.updateTime),f=this.fromFields(u.document.fields||{}),h=new lt(c,l,f,{hasLocalMutations:!1}),p=u.targetIds||[],d=u.removedTargetIds||[];e=new Se(p,d,h.key,h)}else if(ze(t,n,"documentDelete")){Ve(t.documentDelete,"documentDelete"),Ve(t.documentDelete.document,"documentDelete.document");var v=t.documentDelete;c=this.fromName(v.document),l=v.readTime?this.fromVersion(v.readTime):Qt.forDeletedDoc(),h=new ft(c,l),d=v.removedTargetIds||[];e=new Se([],d,h.key,h)}else if(ze(t,n,"documentRemove")){Ve(t.documentRemove,"documentRemove"),Ve(t.documentRemove.document,"documentRemove");var y=t.documentRemove;c=this.fromName(y.document),d=y.removedTargetIds||[];e=new Se([],d,c,null)}else{if(!ze(t,n,"filter"))return m("Unknown change type "+JSON.stringify(t));Ve(t.filter,"filter"),Ve(t.filter.targetId,"filter.targetId");var g=t.filter,b=g.count||0,_=new se(b),w=g.targetId;e=new ke(w,_)}return e},t.prototype.fromWatchTargetChangeState=function(t){return"NO_CHANGE"===t?Te.NoChange:"ADD"===t?Te.Added:"REMOVE"===t?Te.Removed:"CURRENT"===t?Te.Current:"RESET"===t?Te.Reset:m("Got unexpected TargetChange.state: "+t)},t.prototype.versionFromListenResponse=function(t){if(!ze(t,t.response_type,"targetChange"))return Qt.MIN;var e=t.targetChange;return e.targetIds&&e.targetIds.length?Qt.MIN:e.readTime?this.fromVersion(e.readTime):Qt.MIN},t.prototype.toMutation=function(t){var e,n=this;if(t instanceof re)e={update:this.toMutationDocument(t.key,t.value)};else if(t instanceof ae)e={delete:this.toName(t.key)};else if(t instanceof ie)e={update:this.toMutationDocument(t.key,t.data),updateMask:this.toDocumentMask(t.fieldMask)};else{if(!(t instanceof oe))return m("Unknown mutation type "+t.type);e={transform:{document:this.toName(t.key),fieldTransforms:t.fieldTransforms.map(function(t){return n.toFieldTransform(t)})}}}return t.precondition.isNone||(e.currentDocument=this.toPrecondition(t.precondition)),e},t.prototype.fromMutation=function(t){var e=this,n=t.currentDocument?this.fromPrecondition(t.currentDocument):ee.NONE;if(t.update){Ve(t.update.name,"name");var r=this.fromName(t.update.name),i=this.fromFields(t.update.fields||{});if(t.updateMask){var o=this.fromDocumentMask(t.updateMask);return new ie(r,i,o,n)}return new re(r,i,n)}if(t.delete){r=this.fromName(t.delete);return new ae(r,n)}if(t.transform){r=this.fromName(t.transform.document);var a=t.transform.fieldTransforms.map(function(t){return e.fromFieldTransform(t)});return y(!0===n.exists,'Transforms only support precondition "exists == true"'),new oe(r,a)}return m("unknown mutation proto: "+JSON.stringify(t))},t.prototype.toPrecondition=function(t){return y(!t.isNone,"Can't serialize an empty precondition"),void 0!==t.updateTime?{updateTime:this.toVersion(t.updateTime)}:void 0!==t.exists?{exists:t.exists}:m("Unknown precondition")},t.prototype.fromPrecondition=function(t){return void 0!==t.updateTime?ee.updateTime(this.fromVersion(t.updateTime)):void 0!==t.exists?ee.exists(t.exists):ee.NONE},t.prototype.fromWriteResult=function(t){var e=this,n=t.updateTime?this.fromVersion(t.updateTime):null,r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults.map(function(t){return e.fromValue(t)})),new Zt(n,r)},t.prototype.fromWriteResults=function(t){var e=this;return(t||[]).map(function(t){return e.fromWriteResult(t)})},t.prototype.toFieldTransform=function(t){var e=this,n=t.transform;return n instanceof Re?{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"}:n instanceof De?{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements.map(function(t){return e.toValue(t)})}}:n instanceof Me?{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements.map(function(t){return e.toValue(t)})}}:void m("Unknown transform: "+t.transform)},t.prototype.fromFieldTransform=function(t){var e=this,n=t.transform_type,r=null;if(ze(t,n,"setToServerValue"))y("REQUEST_TIME"===t.setToServerValue,"Unknown server value transform proto: "+JSON.stringify(t)),r=Re.instance;else if(ze(t,n,"appendMissingElements")){var i=t.appendMissingElements.values||[];r=new De(i.map(function(t){return e.fromValue(t)}))}else if(ze(t,n,"removeAllFromArray")){i=t.removeAllFromArray.values||[];r=new Me(i.map(function(t){return e.fromValue(t)}))}else m("Unknown transform proto: "+JSON.stringify(t));var o=ut.fromServerFormat(t.fieldPath);return new Jt(o,r)},t.prototype.toDocumentsTarget=function(t){return{documents:[this.toQueryPath(t.path)]}},t.prototype.fromDocumentsTarget=function(t){var e=t.documents.length;y(1===e,"DocumentsTarget contained other than 1 document: "+e);var n=t.documents[0];return Ft.atPath(this.fromQueryPath(n))},t.prototype.toQueryTarget=function(t){var e={structuredQuery:{}};if(t.path.isEmpty())e.parent=this.toQueryPath(at.EMPTY_PATH);else{var n=t.path;y(n.length%2!=0,"Document queries with filters are not supported."),e.parent=this.toQueryPath(n.popLast()),e.structuredQuery.from=[{collectionId:n.lastSegment()}]}var r=this.toFilter(t.filters);r&&(e.structuredQuery.where=r);var i=this.toOrder(t.orderBy);i&&(e.structuredQuery.orderBy=i);var o=this.toInt32Value(t.limit);return void 0!==o&&(e.structuredQuery.limit=o),t.startAt&&(e.structuredQuery.startAt=this.toCursor(t.startAt)),t.endAt&&(e.structuredQuery.endAt=this.toCursor(t.endAt)),e},t.prototype.fromQueryTarget=function(t){var e=this.fromQueryPath(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0;if(r>0){y(1===r,"StructuredQuery.from with more than one collection is not supported.");var i=n.from[0];e=e.child(i.collectionId)}var o=[];n.where&&(o=this.fromFilter(n.where));var a=[];n.orderBy&&(a=this.fromOrder(n.orderBy));var s=null;n.limit&&(s=this.fromInt32Value(n.limit));var u=null;n.startAt&&(u=this.fromCursor(n.startAt));var c=null;return n.endAt&&(c=this.fromCursor(n.endAt)),new Ft(e,a,o,s,u,c)},t.prototype.toListenRequestLabels=function(t){var e=this.toLabel(t.purpose);return null==e?null:{"goog-listen-tags":e}},t.prototype.toLabel=function(t){switch(t){case Vt.Listen:return null;case Vt.ExistenceFilterMismatch:return"existence-filter-mismatch";case Vt.LimboResolution:return"limbo-document";default:return m("Unrecognized query purpose: "+t)}},t.prototype.toTarget=function(t){var e,n=t.query;return(e=n.isDocumentQuery()?{documents:this.toDocumentsTarget(n)}:{query:this.toQueryTarget(n)}).targetId=t.targetId,t.resumeToken.length>0&&(e.resumeToken=this.unsafeCastProtoByteString(t.resumeToken)),e},t.prototype.toFilter=function(t){var e=this;if(0!==t.length){var n=t.map(function(t){return t instanceof jt?e.toRelationFilter(t):e.toUnaryFilter(t)});return 1===n.length?n[0]:{compositeFilter:{op:"AND",filters:n}}}},t.prototype.fromFilter=function(t){var e=this;return t?void 0!==t.unaryFilter?[this.fromUnaryFilter(t)]:void 0!==t.fieldFilter?[this.fromRelationFilter(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map(function(t){return e.fromFilter(t)}).reduce(function(t,e){return t.concat(e)}):m("Unknown filter: "+JSON.stringify(t)):[]},t.prototype.toOrder=function(t){var e=this;if(0!==t.length)return t.map(function(t){return e.toPropertyOrder(t)})},t.prototype.fromOrder=function(t){var e=this;return t.map(function(t){return e.fromPropertyOrder(t)})},t.prototype.toCursor=function(t){var e=this;return{before:t.before,values:t.position.map(function(t){return e.toValue(t)})}},t.prototype.fromCursor=function(t){var e=this,n=!!t.before,r=t.values.map(function(t){return e.fromValue(t)});return new Ht(r,n)},t.prototype.toDirection=function(t){return je[t.name]},t.prototype.fromDirection=function(t){switch(t){case"ASCENDING":return Wt.ASCENDING;case"DESCENDING":return Wt.DESCENDING;default:return}},t.prototype.toOperatorName=function(t){return Be[t.name]},t.prototype.fromOperatorName=function(t){switch(t){case"EQUAL":return Ut.EQUAL;case"GREATER_THAN":return Ut.GREATER_THAN;case"GREATER_THAN_OR_EQUAL":return Ut.GREATER_THAN_OR_EQUAL;case"LESS_THAN":return Ut.LESS_THAN;case"LESS_THAN_OR_EQUAL":return Ut.LESS_THAN_OR_EQUAL;case"ARRAY_CONTAINS":return Ut.ARRAY_CONTAINS;case"OPERATOR_UNSPECIFIED":return m("Unspecified relation");default:return m("Unknown relation")}},t.prototype.toFieldPathReference=function(t){return{fieldPath:t.canonicalString()}},t.prototype.fromFieldPathReference=function(t){return ut.fromServerFormat(t.fieldPath)},t.prototype.toPropertyOrder=function(t){return{field:this.toFieldPathReference(t.field),direction:this.toDirection(t.dir)}},t.prototype.fromPropertyOrder=function(t){return new zt(this.fromFieldPathReference(t.field),this.fromDirection(t.direction))},t.prototype.toRelationFilter=function(t){return t instanceof jt?{fieldFilter:{field:this.toFieldPathReference(t.field),op:this.toOperatorName(t.op),value:this.toValue(t.value)}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromRelationFilter=function(t){return new jt(this.fromFieldPathReference(t.fieldFilter.field),this.fromOperatorName(t.fieldFilter.op),this.fromValue(t.fieldFilter.value))},t.prototype.toUnaryFilter=function(t){return t instanceof qt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NAN"}}:t instanceof Bt?{unaryFilter:{field:this.toFieldPathReference(t.field),op:"IS_NULL"}}:m("Unrecognized filter: "+JSON.stringify(t))},t.prototype.fromUnaryFilter=function(t){switch(t.unaryFilter.op){case"IS_NAN":var e=this.fromFieldPathReference(t.unaryFilter.field);return new qt(e);case"IS_NULL":var n=this.fromFieldPathReference(t.unaryFilter.field);return new Bt(n);case"OPERATOR_UNSPECIFIED":return m("Unspecified filter");default:return m("Unknown filter")}},t.prototype.toDocumentMask=function(t){return{fieldPaths:t.fields.map(function(t){return t.canonicalString()})}},t.prototype.fromDocumentMask=function(t){var e=(t.fieldPaths||[]).map(function(t){return ut.fromServerFormat(t)});return new $t(e)},t}();function ze(t,e,n){return e===n||!e&&n in t}var Ke="FirebaseError",Ge=Error.captureStackTrace,Qe=function(){return function(t,e){if(this.code=t,this.message=e,Ge)Ge(this,Ye.prototype.create);else try{throw Error.apply(this,arguments)}catch(t){this.name=Ke,Object.defineProperty(this,"stack",{get:function(){return t.stack}})}}}();Qe.prototype=Object.create(Error.prototype),Qe.prototype.constructor=Qe,Qe.prototype.name=Ke;var Ye=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new Qe(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}(),Xe=(function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}s.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t}}(function(){return function(){this.blockSize=-1}}()),function(){function t(t){this.sendFn=t.sendFn,this.closeFn=t.closeFn}return t.prototype.onOpen=function(t){y(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=t},t.prototype.onClose=function(t){y(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=t},t.prototype.onMessage=function(t){y(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=t},t.prototype.close=function(){this.closeFn()},t.prototype.send=function(t){this.sendFn(t)},t.prototype.callOnOpen=function(){y(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},t.prototype.callOnClose=function(t){y(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(t)},t.prototype.callOnMessage=function(t){y(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(t)},t}()),$e="Connection",Je={BatchGetDocuments:"batchGet",Commit:"commit"},Ze="gl-js/ fire/"+c,tn=function(){function t(t){this.databaseId=t.databaseId,this.pool=new u.XhrIoPool;var e=t.ssl?"https":"http";this.baseUrl=e+"://"+t.host}return t.prototype.modifyHeadersForRequest=function(t,e){if(e)for(var n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n]);t["X-Goog-Api-Client"]=Ze},t.prototype.invokeRPC=function(t,e,n){var r=this,i=this.makeUrl(t);return new Promise(function(o,a){r.pool.getObject(function(s){s.listenOnce(u.EventType.COMPLETE,function(){try{switch(s.getLastErrorCode()){case u.ErrorCode.NO_ERROR:var e=s.getResponseJson();p($e,"XHR received:",JSON.stringify(e)),o(e);break;case u.ErrorCode.TIMEOUT:p($e,'RPC "'+t+'" timed out'),a(new w(_.DEADLINE_EXCEEDED,"Request time out"));break;case u.ErrorCode.HTTP_ERROR:var n=s.getStatus();p($e,'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0?a(new w(function(t){switch(t){case 200:return _.OK;case 400:return _.INVALID_ARGUMENT;case 401:return _.UNAUTHENTICATED;case 403:return _.PERMISSION_DENIED;case 404:return _.NOT_FOUND;case 409:return _.ABORTED;case 416:return _.OUT_OF_RANGE;case 429:return _.RESOURCE_EXHAUSTED;case 499:return _.CANCELLED;case 500:return _.UNKNOWN;case 501:return _.UNIMPLEMENTED;case 503:return _.UNAVAILABLE;case 504:return _.DEADLINE_EXCEEDED;default:return t>=200&&t<300?_.OK:t>=400&&t<500?_.FAILED_PRECONDITION:t>=500&&t<600?_.INTERNAL:_.UNKNOWN}}(n),"Server responded with status "+s.getStatusText())):(p($e,'RPC "'+t+'" failed'),a(new w(_.UNAVAILABLE,"Connection failed.")));break;default:m('RPC "'+t+'" failed with unanticipated webchannel error '+s.getLastErrorCode()+": "+s.getLastError()+", giving up.")}}finally{p($e,'RPC "'+t+'" completed.'),r.pool.releaseObject(s)}});var c=JSON.stringify(e);p($e,"XHR sending: ",i+" "+c);var l={"Content-Type":"text/plain"};r.modifyHeadersForRequest(l,n),s.send(i,"POST",c,l,15)})})},t.prototype.invokeStreamingRPC=function(t,e,n){return this.invokeRPC(t,e,n)},t.prototype.openStream=function(t,e){var n=[this.baseUrl,"/","google.firestore.v1beta1.Firestore","/",t,"/channel"],r=u.createWebChannelTransport(),i={backgroundChannelTest:!0,httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0};this.modifyHeadersForRequest(i.initMessageHeaders,e),"object"==typeof navigator&&"ReactNative"===navigator.product||(i.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");p($e,"Creating WebChannel: "+o+" "+i);var a=r.createWebChannel(o,i),s=!1,c=!1,l=new Xe({sendFn:function(t){c?p($e,"Not sending because WebChannel is closed:",t):(s||(p($e,"Opening WebChannel transport."),a.open(),s=!0),p($e,"WebChannel sending:",t),a.send(t))},closeFn:function(){return a.close()}}),f=function(t,e){a.listen(t,function(t){try{e(t)}catch(t){setTimeout(function(){throw t},0)}})};return f(u.WebChannel.EventType.OPEN,function(){c||p($e,"WebChannel transport opened.")}),f(u.WebChannel.EventType.CLOSE,function(){c||(c=!0,p($e,"WebChannel transport closed"),l.callOnClose())}),f(u.WebChannel.EventType.ERROR,function(t){c||(c=!0,p($e,"WebChannel transport errored:",t),l.callOnClose(new w(_.UNAVAILABLE,"The operation could not be completed")))}),f(u.WebChannel.EventType.MESSAGE,function(t){if(!c){var e=t.data[0];y(!!e,"Got a webchannel message without data.");var n=e.error||e[0]&&e[0].error;if(n){p($e,"WebChannel received error:",n);var r=n.status,i=function(t){var e=te[t];if(void 0!==e)return ce(e)}(r),o=n.message;void 0===i&&(i=_.INTERNAL,o="Unknown error status: "+r+" with message "+n.message),c=!0,l.callOnClose(new w(i,o)),a.close()}else p($e,"WebChannel received:",e),l.callOnMessage(e)}}),setTimeout(function(){l.callOnOpen()},0),l},t.prototype.makeUrl=function(t){var e=Je[t];y(void 0!==e,"Unknown REST mapping for: "+t);var n=[this.baseUrl,"/","v1beta1"];return n.push("/projects/"),n.push(this.databaseId.projectId),n.push("/databases/"),n.push(this.databaseId.database),n.push("/documents"),n.push(":"),n.push(e),n.join("")},t}(),en=function(){function t(){this.emptyByteString="",this.base64Available="undefined"!=typeof atob}return t.prototype.loadConnection=function(t){return Promise.resolve(new tn(t))},t.prototype.newSerializer=function(t){return new He(t,{useProto3Json:!0})},t.prototype.formatJSON=function(t){return JSON.stringify(t)},t.prototype.atob=function(t){return atob(t)},t.prototype.btoa=function(t){return btoa(t)},t}();g.setPlatform(new en);var nn,rn=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];!function(t,e,n,r){if(!(e instanceof Array)||e.length<r)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" argument to be an array with at least "+H(r,"element")+".")}("FieldPath",t,"fieldNames",1);for(var n=0;n<t.length;++n)if(O("FieldPath","string",n,t[n]),0===t[n].length)throw new w(_.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ut(t)}return t.documentId=function(){return t._DOCUMENT_ID},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","FieldPath",1,e);return this._internalPath.isEqual(e._internalPath)},t._DOCUMENT_ID=new t(ut.keyField().canonicalString()),t}(),on=new RegExp("[~\\*/\\[\\]]");!function(t){t[t.Unknown=0]="Unknown",t[t.Online=1]="Online",t[t.Offline=2]="Offline"}(nn||(nn={}));var an,sn=function(){function t(t){this.comparator=t?function(e,n){return t(e,n)||ct.comparator(e.key,n.key)}:function(t,e){return ct.comparator(t.key,e.key)},this.keyedMap=de(),this.sortedSet=new ht(this.comparator)}return t.emptySet=function(e){return new t(e.comparator)},t.prototype.has=function(t){return null!=this.keyedMap.get(t)},t.prototype.get=function(t){return this.keyedMap.get(t)},t.prototype.first=function(){return this.sortedSet.minKey()},t.prototype.last=function(){return this.sortedSet.maxKey()},t.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},t.prototype.indexOf=function(t){var e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.sortedSet.inorderTraversal(function(e,n){return t(e),!1})},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach(function(e){t.push(e.toString())}),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r},t}(),un=function(){function t(t){this.mapKeyFn=t,this.inner={}}return t.prototype.get=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(a.isEqual(t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.mapKeyFn(t),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(r[i][0].isEqual(t))return void(r[i]=[t,e]);r.push([t,e])}else this.inner[n]=t,e},t.prototype.delete=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(n[r][0].isEqual(t))return 1===n.length?delete this.inner[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){S(this.inner,function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}})},t.prototype.isEmpty=function(){return k(this.inner)},t}(),cn=function(){return function(){this.listeners=[]}}(),ln=function(){function t(t){this.syncEngine=t,this.queries=new un(function(t){return t.canonicalId()}),this.onlineState=nn.Unknown,this.syncEngine.subscribe(this.onChange.bind(this),this.onError.bind(this))}return t.prototype.listen=function(t){var e=t.query,n=!1,r=this.queries.get(e);return r||(n=!0,r=new cn,this.queries.set(e,r)),r.listeners.push(t),t.applyOnlineStateChange(this.onlineState),r.viewSnap&&t.onViewSnapshot(r.viewSnap),n?this.syncEngine.listen(e).then(function(t){return r.targetId=t,t}):Promise.resolve(r.targetId)},t.prototype.unlisten=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n,r,i;return s.__generator(this,function(o){return e=t.query,n=!1,(r=this.queries.get(e))&&(i=r.listeners.indexOf(t))>=0&&(r.listeners.splice(i,1),n=0===r.listeners.length),n?(this.queries.delete(e),[2,this.syncEngine.unlisten(e)]):[2]})})},t.prototype.onChange=function(t){for(var e=0,n=t;e<n.length;e++){var r=n[e],i=r.query,o=this.queries.get(i);if(o){for(var a=0,s=o.listeners;a<s.length;a++){s[a].onViewSnapshot(r)}o.viewSnap=r}}},t.prototype.onError=function(t,e){var n=this.queries.get(t);if(n)for(var r=0,i=n.listeners;r<i.length;r++){i[r].onError(e)}this.queries.delete(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.queries.forEach(function(e,n){for(var r=0,i=n.listeners;r<i.length;r++){i[r].applyOnlineStateChange(t)}})},t}(),fn=function(){function t(t,e,n){this.query=t,this.queryObserver=e,this.raisedInitialEvent=!1,this.onlineState=nn.Unknown,this.options=n||{}}return t.prototype.onViewSnapshot=function(t){if(y(t.docChanges.length>0||t.syncStateChanged,"We got a new snapshot with no changes?"),!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];i.type!==be.Metadata&&e.push(i)}t=new xe(t.query,t.docs,t.oldDocs,e,t.fromCache,t.hasPendingWrites,t.syncStateChanged,!0)}this.raisedInitialEvent?this.shouldRaiseEvent(t)&&this.queryObserver.next(t):this.shouldRaiseInitialEvent(t,this.onlineState)&&this.raiseInitialEvent(t),this.snap=t},t.prototype.onError=function(t){this.queryObserver.error(t)},t.prototype.applyOnlineStateChange=function(t){this.onlineState=t,this.snap&&!this.raisedInitialEvent&&this.shouldRaiseInitialEvent(this.snap,t)&&this.raiseInitialEvent(this.snap)},t.prototype.shouldRaiseInitialEvent=function(t,e){if(y(!this.raisedInitialEvent,"Determining whether to raise first event but already had first event"),!t.fromCache)return!0;var n=e!==nn.Offline;return this.options.waitForSyncWhenOnline&&n?(y(t.fromCache,"Waiting for sync, but snapshot is not from cache"),!1):!t.docs.isEmpty()||e===nn.Offline},t.prototype.shouldRaiseEvent=function(t){if(t.docChanges.length>0)return!0;var e=this.snap&&this.snap.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.raiseInitialEvent=function(e){y(!this.raisedInitialEvent,"Trying to raise initial events for second time"),e=new xe(e.query,e.docs,sn.emptySet(e.docs),t.getInitialViewChanges(e),e.fromCache,e.hasPendingWrites,!0,!1),this.raisedInitialEvent=!0,this.queryObserver.next(e)},t.getInitialViewChanges=function(t){var e=[];return t.docs.forEach(function(t){e.push({type:be.Added,doc:t})}),e},t}(),hn=function(){function t(t){var e=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(function(t){e.isDone=!0,e.result=t,e.nextCallback&&e.nextCallback(t)},function(t){e.isDone=!0,e.error=t,e.catchCallback&&e.catchCallback(t)})}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&m("Called next() or catch() twice for PersistencePromise"),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t(function(t,i){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,i)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,i)}})},t.prototype.toPromise=function(){var t=this;return new Promise(function(e,n){t.next(e,n)})},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction(function(){return e(n)}):t.reject(n)},t.resolve=function(e){return new t(function(t,n){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.waitFor=function(e){var n=e.length;if(0===n)return t.resolve();var r=0;return new t(function(t,i){for(var o=0,a=e;o<a.length;o++){a[o].next(function(){++r===n&&t()},function(t){return i(t)})}})},t.map=function(e){for(var n=[],r=[],i=function(t){r[t]=e[t].next(function(e){n[t]=e})},o=0;o<e.length;++o)i(o);return t.waitFor(r).next(function(){return n})},t}(),pn=function(){function t(){this.isEager=!0,this.sources=[],this.potentialGarbage=ge()}return t.prototype.addGarbageSource=function(t){this.sources.push(t),t.setGarbageCollector(this)},t.prototype.removeGarbageSource=function(t){this.sources.splice(this.sources.indexOf(t),1),t.setGarbageCollector(null)},t.prototype.addPotentialGarbageKey=function(t){this.potentialGarbage=this.potentialGarbage.add(t)},t.prototype.collectGarbage=function(t){var e=this,n=[],r=ge();return this.potentialGarbage.forEach(function(i){var o=e.documentHasAnyReferences(t,i);n.push(o.next(function(t){return t||(r=r.add(i)),hn.resolve()}))}),this.potentialGarbage=ge(),hn.waitFor(n).next(function(){return r})},t.prototype.documentHasAnyReferences=function(t,e){var n=hn.resolve(!1);return this.sources.map(function(n){return function(){return n.containsKey(t,e)}}).reduce(function(t,e){return t.next(function(t){return t?hn.resolve(!0):e()})},n)},t}(),dn=function(){function t(t,e,n){this.query=t,this.addedKeys=e,this.removedKeys=n}return t.fromSnapshot=function(e){for(var n=ge(),r=ge(),i=0,o=e.docChanges;i<o.length;i++){var a=o[i];switch(a.type){case be.Added:n=n.add(a.doc.key);break;case be.Removed:r=r.add(a.doc.key)}}return new t(e.query,n,r)},t}(),vn=function(){function t(){this.refsByKey=new le(mn.compareByKey),this.refsByTarget=new le(mn.compareByTargetId),this.garbageCollector=null}return t.prototype.isEmpty=function(){return this.refsByKey.isEmpty()},t.prototype.addReference=function(t,e){var n=new mn(t,e);this.refsByKey=this.refsByKey.add(n),this.refsByTarget=this.refsByTarget.add(n)},t.prototype.addReferences=function(t,e){var n=this;t.forEach(function(t){return n.addReference(t,e)})},t.prototype.removeReference=function(t,e){this.removeRef(new mn(t,e))},t.prototype.removeReferences=function(t,e){var n=this;t.forEach(function(t){return n.removeReference(t,e)})},t.prototype.removeReferencesForId=function(t){var e=this,n=ct.EMPTY,r=new mn(n,t),i=new mn(n,t+1);this.refsByTarget.forEachInRange([r,i],function(t){e.removeRef(t)})},t.prototype.removeAllReferences=function(){var t=this;this.refsByKey.forEach(function(e){return t.removeRef(e)})},t.prototype.removeRef=function(t){this.refsByKey=this.refsByKey.delete(t),this.refsByTarget=this.refsByTarget.delete(t),null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(t.key)},t.prototype.referencesForId=function(t){var e=ct.EMPTY,n=new mn(e,t),r=new mn(e,t+1),i=ge();return this.refsByTarget.forEachInRange([n,r],function(t){i=i.add(t.key)}),i},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.refsByKey.firstAfterOrEqual(n);return hn.resolve(null!==r&&e.isEqual(r.key))},t}(),mn=function(){function t(t,e){this.key=t,this.targetOrBatchId=e}return t.compareByKey=function(t,e){return ct.comparator(t.key,e.key)||K(t.targetOrBatchId,e.targetOrBatchId)},t.compareByTargetId=function(t,e){return K(t.targetOrBatchId,e.targetOrBatchId)||ct.comparator(t.key,e.key)},t}(),yn=1;!function(t){t[t.LocalStore=0]="LocalStore",t[t.SyncEngine=1]="SyncEngine"}(an||(an={}));var gn=function(){function t(t,e){void 0===e&&(e=0),this.generatorId=t;var n=e>>yn<<yn,r=e-n;this.previousId=r>=t?n|this.generatorId:(n|this.generatorId)-(1<<yn)}return t.prototype.next=function(){return this.previousId+=1<<yn,this.previousId},t.forLocalStore=function(e){return void 0===e&&(e=0),new t(an.LocalStore,e)},t.forSyncEngine=function(){return new t(an.SyncEngine)},t}(),bn=function(){return function(t){this.key=t}}(),_n=function(){return function(t){this.key=t}}(),wn=function(){function t(t,e){this.query=t,this._syncedDocuments=e,this.syncState=null,this.current=!1,this.limboDocuments=ge(),this.mutatedKeys=ge(),this.documentSet=new sn(t.docComparator.bind(t))}return Object.defineProperty(t.prototype,"syncedDocuments",{get:function(){return this._syncedDocuments},enumerable:!0,configurable:!0}),t.prototype.computeDocChanges=function(t,e){var n=this,r=e?e.changeSet:new Ce,i=e?e.documentSet:this.documentSet,o=e?e.mutatedKeys:this.mutatedKeys,a=i,s=!1,u=this.query.hasLimit()&&i.size===this.query.limit?i.last():null;if(t.inorderTraversal(function(t,e){var c=i.get(t),l=e instanceof lt?e:null;if(l&&(y(t.isEqual(l.key),"Mismatching keys found in document changes: "+t+" != "+l.key),l=n.query.matches(l)?l:null),l?(a=a.add(l),o=l.hasLocalMutations?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)),c&&l){var f=c.data.isEqual(l.data);f&&c.hasLocalMutations===l.hasLocalMutations||(f?r.track({type:be.Metadata,doc:l}):r.track({type:be.Modified,doc:l}),u&&n.query.docComparator(l,u)>0&&(s=!0))}else!c&&l?r.track({type:be.Added,doc:l}):c&&!l&&(r.track({type:be.Removed,doc:c}),u&&(s=!0))}),this.query.hasLimit())for(;a.size>this.query.limit;){var c=a.last();a=a.delete(c.key),r.track({type:be.Removed,doc:c})}return y(!s||!e,"View was refilled using docs that themselves needed refilling."),{documentSet:a,changeSet:r,needsRefill:s,mutatedKeys:o}},t.prototype.applyChanges=function(t,e){var n=this;y(!t.needsRefill,"Cannot apply changes that need a refill");var r=this.documentSet;this.documentSet=t.documentSet,this.mutatedKeys=t.mutatedKeys;var i=t.changeSet.getChanges();i.sort(function(t,e){return function(t,e){var n=function(t){switch(t){case be.Added:return 1;case be.Modified:case be.Metadata:return 2;case be.Removed:return 0;default:return m("Unknown ChangeType: "+t)}};return n(t)-n(e)}(t.type,e.type)||n.query.docComparator(t.doc,e.doc)}),this.applyTargetChange(e);var o=this.updateLimboDocuments(),a=0===this.limboDocuments.size&&this.current?_e.Synced:_e.Local,s=a!==this.syncState;return this.syncState=a,0!==i.length||s?{snapshot:new xe(this.query,t.documentSet,r,i,a===_e.Local,!t.mutatedKeys.isEmpty(),s,!1),limboChanges:o}:{limboChanges:o}},t.prototype.applyOnlineStateChange=function(t){return this.current&&t===nn.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new Ce,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},t.prototype.shouldBeInLimbo=function(t){return!this._syncedDocuments.has(t)&&(!!this.documentSet.has(t)&&!this.documentSet.get(t).hasLocalMutations)},t.prototype.applyTargetChange=function(t){var e=this;t&&(t.addedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.add(t)}),t.modifiedDocuments.forEach(function(t){return y(e._syncedDocuments.has(t),"Modified document "+t+" not found in view.")}),t.removedDocuments.forEach(function(t){return e._syncedDocuments=e._syncedDocuments.delete(t)}),this.current=t.current)},t.prototype.updateLimboDocuments=function(){var t=this;if(!this.current)return[];var e=this.limboDocuments;this.limboDocuments=ge(),this.documentSet.forEach(function(e){t.shouldBeInLimbo(e.key)&&(t.limboDocuments=t.limboDocuments.add(e.key))});var n=[];return e.forEach(function(e){t.limboDocuments.has(e)||n.push(new _n(e))}),this.limboDocuments.forEach(function(t){e.has(t)||n.push(new bn(t))}),n},t}();var En=function(){return function(t,e,n,r){this.query=t,this.targetId=e,this.resumeToken=n,this.view=r}}(),Tn=function(){function t(t,e,n){this.localStore=t,this.remoteStore=e,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new un(function(t){return t.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new ht(ct.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new vn,this.limboCollector=new pn,this.mutationUserCallbacks={},this.targetIdGenerator=gn.forSyncEngine()}return t.prototype.subscribe=function(t,e){y(null!==t&&null!==e,"View and error handlers cannot be null"),y(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=t,this.errorHandler=e,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},t.prototype.listen=function(t){var e=this;return this.assertSubscribed("listen()"),y(!this.queryViewsByQuery.has(t),"We already listen to the query: "+t),this.localStore.allocateQuery(t).then(function(n){return e.localStore.executeQuery(t).then(function(r){return e.localStore.remoteDocumentKeys(n.targetId).then(function(i){var o=new wn(t,i),a=o.computeDocChanges(r),s=o.applyChanges(a);y(0===s.limboChanges.length,"View returned limbo docs before target ack from the server."),y(!!s.snapshot,"applyChanges for new view should always return a snapshot");var u=new En(t,n.targetId,n.resumeToken,o);e.queryViewsByQuery.set(t,u),e.queryViewsByTarget[n.targetId]=u,e.viewHandler([s.snapshot]),e.remoteStore.listen(n)})}).then(function(){return n.targetId})})},t.prototype.unlisten=function(t){var e=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(t);return y(!!n,"Trying to unlisten on query not found:"+t),this.localStore.releaseQuery(t).then(function(){return e.remoteStore.unlisten(n.targetId),e.removeAndCleanupQuery(n).then(function(){return e.localStore.collectGarbage()})})},t.prototype.write=function(t,e){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(t).then(function(t){return n.addMutationCallback(t.batchId,e),n.emitNewSnapsAndNotifyLocalStore(t.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},t.prototype.wrapUpdateFunctionError=function(t){return t},t.prototype.runTransaction=function(t,e){var n=this;void 0===e&&(e=5),y(e>=0,"Got negative number of retries for transaction.");var r=this.remoteStore.createTransaction();return function(){try{var e=t(r);return!Lt(e)&&e.catch&&e.then?e.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(i){return r.commit().then(function(){return i}).catch(function(r){return 0===e?Promise.reject(r):n.runTransaction(t,e-1)})})},t.prototype.applyRemoteEvent=function(t){var e=this;return this.assertSubscribed("applyRemoteEvent()"),this.localStore.applyRemoteEvent(t).then(function(n){return e.emitNewSnapsAndNotifyLocalStore(n,t)})},t.prototype.applyOnlineStateChange=function(t){var e=[];this.queryViewsByQuery.forEach(function(n,r){var i=r.view.applyOnlineStateChange(t);y(0===i.limboChanges.length,"OnlineState should not affect limbo documents."),i.snapshot&&e.push(i.snapshot)}),this.viewHandler(e)},t.prototype.rejectListen=function(t,e){var n=this;this.assertSubscribed("rejectListens()");var r=this.limboKeysByTarget[t];if(r){this.limboTargetsByKey=this.limboTargetsByKey.remove(r),delete this.limboKeysByTarget[t];var i=new ht(ct.comparator);i=i.insert(r,new ft(r,Qt.forDeletedDoc()));var o=ge().add(r),a=new we(Qt.MIN,{},new le(K),i,o);return this.applyRemoteEvent(a)}var s=this.queryViewsByTarget[t];return y(!!s,"Unknown targetId: "+t),this.localStore.releaseQuery(s.query).then(function(){return n.removeAndCleanupQuery(s).then(function(){n.errorHandler(s.query,e)})})},t.prototype.applySuccessfulWrite=function(t){var e=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(t.batch.batchId,null),this.localStore.acknowledgeBatch(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.rejectFailedWrite=function(t,e){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(t,e),this.localStore.rejectBatch(t).then(function(t){return n.emitNewSnapsAndNotifyLocalStore(t)})},t.prototype.addMutationCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new ht(K)),n=n.insert(t,e),this.mutationUserCallbacks[this.currentUser.toKey()]=n},t.prototype.processUserCallback=function(t,e){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var r=n.get(t);r&&(y(t===n.minKey(),"Mutation callbacks processed out-of-order?"),e?r.reject(e):r.resolve(),n=n.remove(t)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},t.prototype.removeAndCleanupQuery=function(t){return this.queryViewsByQuery.delete(t.query),delete this.queryViewsByTarget[t.targetId],this.limboDocumentRefs.removeReferencesForId(t.targetId),this.gcLimboDocuments()},t.prototype.updateTrackedLimbos=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i instanceof bn?(this.limboDocumentRefs.addReference(i.key,t),this.trackLimboChange(i)):i instanceof _n?(p("SyncEngine","Document no longer in limbo: "+i.key),this.limboDocumentRefs.removeReference(i.key,t)):m("Unknown limbo change: "+JSON.stringify(i))}return this.gcLimboDocuments()},t.prototype.trackLimboChange=function(t){var e=t.key;if(!this.limboTargetsByKey.get(e)){p("SyncEngine","New document in limbo: "+e);var n=this.targetIdGenerator.next(),r=Ft.atPath(e.path);this.limboKeysByTarget[n]=e,this.remoteStore.listen(new Xt(r,n,Vt.LimboResolution)),this.limboTargetsByKey=this.limboTargetsByKey.insert(e,n)}},t.prototype.gcLimboDocuments=function(){var t=this;return this.limboCollector.collectGarbage(null).next(function(e){e.forEach(function(e){var n=t.limboTargetsByKey.get(e);null!==n&&(t.remoteStore.unlisten(n),t.limboTargetsByKey=t.limboTargetsByKey.remove(e),delete t.limboKeysByTarget[n])})}).toPromise()},t.prototype.currentLimboDocs=function(){return this.limboTargetsByKey},t.prototype.emitNewSnapsAndNotifyLocalStore=function(t,e){var n=this,r=[],i=[],o=[];return this.queryViewsByQuery.forEach(function(a,s){o.push(Promise.resolve().then(function(){var e=s.view.computeDocChanges(t);return e.needsRefill?n.localStore.executeQuery(s.query).then(function(t){return s.view.computeDocChanges(t,e)}):e}).then(function(t){var o=e&&e.targetChanges[s.targetId],a=s.view.applyChanges(t,o);return n.updateTrackedLimbos(s.targetId,a.limboChanges).then(function(){if(a.snapshot){r.push(a.snapshot);var t=dn.fromSnapshot(a.snapshot);i.push(t)}})}))}),Promise.all(o).then(function(){return n.viewHandler(r),n.localStore.notifyLocalViewChanges(i)}).then(function(){return n.localStore.collectGarbage()})},t.prototype.assertSubscribed=function(t){y(null!==this.viewHandler&&null!==this.errorHandler,"Trying to call "+t+" before calling subscribe().")},t.prototype.handleUserChange=function(t){var e=this;return this.currentUser=t,this.localStore.handleUserChange(t).then(function(t){return e.emitNewSnapsAndNotifyLocalStore(t)}).then(function(){return e.remoteStore.handleUserChange(t)})},t.prototype.getRemoteKeysForTarget=function(t){return this.queryViewsByTarget[t]?this.queryViewsByTarget[t].view.syncedDocuments:ge()},t}(),Cn=-1,xn=function(){function t(t,e,n){this.batchId=t,this.localWriteTime=e,this.mutations=n}return t.prototype.applyToRemoteDocument=function(t,e,n){e&&y(e.key.isEqual(t),"applyToRemoteDocument: key "+t+" should match maybeDoc key\n "+e.key);var r=n.mutationResults;y(r.length===this.mutations.length,"Mismatch between mutations length\n ("+this.mutations.length+") and mutation results length\n ("+r.length+").");for(var i=0;i<this.mutations.length;i++){var o=this.mutations[i];if(o.key.isEqual(t)){var a=r[i];e=o.applyToRemoteDocument(e,a)}}return e},t.prototype.applyToLocalView=function(t,e){e&&y(e.key.isEqual(t),"applyToLocalDocument: key "+t+" should match maybeDoc key\n "+e.key);for(var n=e,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(t)&&(e=i.applyToLocalView(e,n,this.localWriteTime))}return e},t.prototype.keys=function(){for(var t=ge(),e=0,n=this.mutations;e<n.length;e++){var r=n[e];t=t.add(r.key)}return t},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&G(this.mutations,t.mutations)},t.prototype.isTombstone=function(){return 0===this.mutations.length},t.prototype.toTombstone=function(){return new t(this.batchId,this.localWriteTime,[])},t}(),Sn=function(){function t(t,e,n,r,i){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.streamToken=r,this.docVersions=i}return t.from=function(e,n,r,i){y(e.mutations.length===r.length,"Mutations sent "+e.mutations.length+" must equal results received "+r.length);for(var o=me(),a=e.mutations,s=0;s<a.length;s++){var u=r[s].version;null===u&&(u=n),o=o.insert(a[s].key,u)}return new t(e,n,r,i,o)},t}(),kn="�",Nn="�",An="�",In="�";function On(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=Rn(e)),e=Pn(t.get(n),e);return Rn(e)}function Pn(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+=kn+An;break;case kn:n+=kn+In;break;default:n+=o}}return n}function Rn(t){return t+kn+Nn}function Dn(t){var e=t.length;if(y(e>=2,"Invalid path "+t),2===e)return y(t.charAt(0)===kn&&t.charAt(1)===Nn,"Non-empty path "+t+" had length 2"),at.EMPTY_PATH;for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf(kn,o);switch((a<0||a>n)&&m('Invalid encoded resource path: "'+t+'"'),t.charAt(a+1)){case Nn:var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case An:i+=t.substring(o,a),i+="\0";break;case In:i+=t.substring(o,a+1);break;default:m('Invalid encoded resource path: "'+t+'"')}o=a+2}return new at(r)}function Mn(t,e,n,r){y(n<r&&n>=0&&r<=2,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),n<1&&r>=1&&(function(t){t.createObjectStore(Fn.store)}(t),function(t){t.createObjectStore(Un.store,{keyPath:Un.keyPath}),t.createObjectStore(jn.store,{keyPath:jn.keyPath}),t.createObjectStore(Bn.store)}(t),function(t){t.createObjectStore(Hn.store,{keyPath:Hn.keyPath}).createIndex(Hn.documentTargetsIndex,Hn.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Wn.store,{keyPath:Wn.keyPath}).createIndex(Wn.queryTargetsIndexName,Wn.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(zn.store)}(t),function(t){t.createObjectStore(Vn.store)}(t));var i=hn.resolve();return n<2&&r>=2&&(i=function(t){var e=t.store(zn.store);return e.get(zn.key).next(function(t){return null!=t?hn.resolve(t):(t=new zn(0,0,Qt.MIN.toTimestamp(),0),e.put(zn.key,t).next(function(){return t}))})}(e).next(function(t){return function(t,e){var n=t.store(zn.store);return t.store(Wn.store).count().next(function(t){return e.targetCount=t,n.put(zn.key,e)})}(e,t)})),i}var Ln=function(){return function(t,e){this.seconds=t,this.nanoseconds=e}}(),Fn=function(){function t(t,e){this.ownerId=t,this.leaseTimestampMs=e}return t.store="owner",t}();var Un=function(){function t(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n}return t.store="mutationQueues",t.keyPath="userId",t}(),jn=function(){function t(t,e,n,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.mutations=r}return t.store="mutations",t.keyPath=["userId","batchId"],t}();var Bn=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,On(e)]},t.key=function(t,e,n){return[t,On(e),n]},t.store="documentMutations",t.PLACEHOLDER=new t,t}();var qn=function(){return function(t,e){this.path=t,this.readTime=e}}(),Vn=function(){function t(t,e){this.noDocument=t,this.document=e}return t.store="remoteDocuments",t}(),Wn=function(){function t(t,e,n,r,i,o){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.query=o}return t.store="targets",t.keyPath="targetId",t.queryTargetsIndexName="queryTargetsIndex",t.queryTargetsKeyPath=["canonicalId","targetId"],t}(),Hn=function(){function t(t,e){this.targetId=t,this.path=e}return t.store="targetDocuments",t.keyPath=["targetId","path"],t.documentTargetsIndex="documentTargetsIndex",t.documentTargetsKeyPath=["path","targetId"],t}(),zn=function(){function t(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r}return t.key="targetGlobalKey",t.store="targetGlobal",t}();var Kn=[Un.store,jn.store,Bn.store,Vn.store,Wn.store,Fn.store,zn.store,Hn.store],Gn=function(){return function(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}}(),Qn=function(){function e(t){this.db=t}return e.openOrCreate=function(t,n,r){return y(e.isAvailable(),"IndexedDB not supported in current environment."),p("SimpleDb","Opening database:",t),new hn(function(i,o){var a=window.indexedDB.open(t,n);a.onsuccess=function(t){var n=t.target.result;i(new e(n))},a.onerror=function(t){o(t.target.error)},a.onupgradeneeded=function(e){p("SimpleDb",'Database "'+t+'" requires upgrade from version:',e.oldVersion);var n=e.target.result,i=new Xn(a.transaction);r(n,i,e.oldVersion,2).next(function(){p("SimpleDb","Database upgrade to version 2 complete")})}}).toPromise()},e.delete=function(t){return p("SimpleDb","Removing database:",t),Jn(window.indexedDB.deleteDatabase(t)).toPromise()},e.isAvailable=function(){if("undefined"==typeof window||null==window.indexedDB)return!1;if(void 0===window.navigator)return"YES"===t.env.USE_MOCK_PERSISTENCE;var e=window.navigator.userAgent;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0)},e.getStore=function(t,e){return t instanceof Xn?t.store(e):m("Invalid transaction object provided!")},e.prototype.runTransaction=function(t,e,n){var r=Xn.open(this.db,t,e),i=n(r).catch(function(t){r.abort(t)}).toPromise();return r.completionPromise.then(function(){return i})},e.prototype.close=function(){this.db.close()},e}(),Yn=function(){function t(t){this.dbCursor=t,this.shouldStop=!1,this.nextKey=null}return Object.defineProperty(t.prototype,"isDone",{get:function(){return this.shouldStop},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipToKey",{get:function(){return this.nextKey},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.dbCursor=t},enumerable:!0,configurable:!0}),t.prototype.done=function(){this.shouldStop=!0},t.prototype.skip=function(t){this.nextKey=t},t.prototype.delete=function(){return Jn(this.dbCursor.delete())},t}(),Xn=function(){function t(t){var e=this;this.transaction=t,this.aborted=!1,this.completionDeferred=new Gn,this.transaction.oncomplete=function(){e.completionDeferred.resolve()},this.transaction.onabort=function(){t.error?e.completionDeferred.reject(t.error):e.completionDeferred.resolve()},this.transaction.onerror=function(t){e.completionDeferred.reject(t.target.error)}}return t.open=function(e,n,r){return new t(e.transaction(r,n))},Object.defineProperty(t.prototype,"completionPromise",{get:function(){return this.completionDeferred.promise},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){t&&this.completionDeferred.reject(t),this.aborted||(p("SimpleDb","Aborting transaction: %s",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return y(!!e,"Object store not part of transaction: "+t),new $n(e)},t}(),$n=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(p("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(p("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),Jn(n)},t.prototype.get=function(t){var e=this;return Jn(this.store.get(t)).next(function(n){return void 0===n&&(n=null),p("SimpleDb","GET",e.store.name,t,n),n})},t.prototype.delete=function(t){return p("SimpleDb","DELETE",this.store.name,t),Jn(this.store.delete(t))},t.prototype.count=function(){return p("SimpleDb","COUNT",this.store.name),Jn(this.store.count())},t.prototype.loadAll=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.iterateCursor(n,function(t,e){r.push(e)}).next(function(){return r})},t.prototype.deleteAll=function(t,e){p("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.keysOnly=!1;var r=this.cursor(n);return this.iterateCursor(r,function(t,e,n){return n.delete()})},t.prototype.iterate=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.iterateCursor(r,e)},t.prototype.iterateCursor=function(t,e){var n=[];return new hn(function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new Yn(i),a=e(i.primaryKey,i.value,o);a instanceof hn&&n.push(a),o.isDone?r():null===o.skipToKey?i.continue():i.continue(o.skipToKey)}else r()}}).next(function(){return hn.waitFor(n)})},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:(y(void 0===e,"3rd argument must not be defined if 2nd is a range."),e=t)),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.keysOnly?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function Jn(t){return new hn(function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){n(t.target.error)}})}var Zn=function(){function t(t,e){this.userId=t,this.serializer=e,this.garbageCollector=null}return t.forUser=function(e,n){return y(""!==e.uid,"UserID must not be an empty string."),new t(e.isAuthenticated()?e.uid:"",n)},t.prototype.start=function(e){var n=this;return t.loadNextBatchIdFromDb(e).next(function(t){return n.nextBatchId=t,rr(e).get(n.userId)}).next(function(t){return t||(t=new Un(n.userId,Cn,"")),n.metadata=t,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(e).next(function(t){return y(t,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Cn,rr(e).put(n.metadata)}):hn.resolve()})},t.loadNextBatchIdFromDb=function(t){var e=Cn;return er(t).iterate({reverse:!0},function(t,n,r){var i,o,a=t[0];if(t[1]>e&&(e=n.batchId),""===a)r.done();else{var s=(o=(i=a).length-1,0===i.length?"":"\0"===i.charAt(o)?i.substring(0,o):i.substring(0,o)+String.fromCharCode(i.charCodeAt(o)-1));r.skip([s])}}).next(function(){return e+1})},t.prototype.checkEmpty=function(t){var e=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).iterate({range:n},function(t,n,r){e=!1,r.done()}).next(function(){return e})},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.metadata.lastAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;return y(r>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=r,this.metadata.lastStreamToken=tr(n),rr(t).put(this.metadata)},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.metadata.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.metadata.lastStreamToken=tr(e),rr(t).put(this.metadata)},t.prototype.addMutationBatch=function(t,e,n){var r=this,i=this.nextBatchId;this.nextBatchId++;var o=new xn(i,e,n),a=this.serializer.toDbMutationBatch(this.userId,o);return er(t).put(a).next(function(){for(var e=[],o=0,a=n;o<a.length;o++){var s=a[o],u=Bn.key(r.userId,s.key.path,i);e.push(nr(t).put(u,Bn.PLACEHOLDER))}return hn.waitFor(e)}).next(function(){return o})},t.prototype.lookupMutationBatch=function(t,e){var n=this;return er(t).get(this.keyForBatchId(e)).next(function(t){return t?n.serializer.fromDbMutationBatch(t):null})},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){var n=this,r=Math.max(e,this.metadata.lastAcknowledgedBatchId)+1,i=IDBKeyRange.lowerBound(this.keyForBatchId(r)),o=null;return er(t).iterate({range:i},function(t,e,i){e.userId===n.userId&&(y(e.batchId>=r,"Should have found mutation after "+r),o=n.serializer.fromDbMutationBatch(e)),i.done()}).next(function(){return o})},t.prototype.getAllMutationBatches=function(t){var e=this,n=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(Number.POSITIVE_INFINITY));return er(t).loadAll(n).next(function(t){return t.map(function(t){return e.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this,r=IDBKeyRange.bound(this.keyForBatchId(Cn),this.keyForBatchId(e));return er(t).loadAll(r).next(function(t){return t.map(function(t){return n.serializer.fromDbMutationBatch(t)})})},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return nr(t).iterate({range:i},function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Dn(u);if(s===n.userId&&e.path.isEqual(l)){var f=n.keyForBatchId(c);return er(t).get(f).next(function(t){null===t&&m("Dangling document-mutation reference found: "+r+" which points to "+f),o.push(n.serializer.fromDbMutationBatch(t))})}a.done()}).next(function(){return o})},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this;y(!e.isDocumentQuery(),"Document queries shouldn't go down this path");var r=e.path,i=r.length+1,o=Bn.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new le(K);return nr(t).iterate({range:a},function(t,e,o){var a=t[0],u=t[1],c=t[2],l=Dn(u);a===n.userId&&r.isPrefixOf(l)?l.length===i&&(s=s.add(c)):o.done()}).next(function(){var e=[],r=[];return s.forEach(function(i){var o=n.keyForBatchId(i);r.push(er(t).get(o).next(function(t){null===t&&m("Dangling document-mutation reference found, which points to "+o),e.push(n.serializer.fromDbMutationBatch(t))}))}),hn.waitFor(r).next(function(){return e})})},t.prototype.removeMutationBatches=function(t,e){for(var n=er(t),r=nr(t),i=[],o=function(t){var e=IDBKeyRange.only(a.keyForBatchId(t.batchId)),o=0,s=n.iterate({range:e},function(t,e,n){return o++,n.delete()});i.push(s.next(function(){y(1===o,"Dangling document-mutation reference found: Missing batch "+t.batchId)}));for(var u=0,c=t.mutations;u<c.length;u++){var l=c[u],f=Bn.key(a.userId,l.key.path,t.batchId);i.push(r.delete(f)),null!==a.garbageCollector&&a.garbageCollector.addPotentialGarbageKey(l.key)}},a=this,s=0,u=e;s<u.length;s++){o(u[s])}return hn.waitFor(i)},t.prototype.performConsistencyCheck=function(t){var e=this;return this.checkEmpty(t).next(function(n){if(!n)return hn.resolve();var r=IDBKeyRange.lowerBound(Bn.prefixForUser(e.userId)),i=[];return nr(t).iterate({range:r},function(t,n,r){if(t[0]===e.userId){var o=Dn(t[1]);i.push(o)}else r.done()}).next(function(){y(0===i.length,"Document leak -- detected dangling mutation references when queue is empty. Dangling keys: "+i.map(function(t){return t.canonicalString()}))})})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=this,r=Bn.prefixForPath(this.userId,e.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return nr(t).iterate({range:o,keysOnly:!0},function(t,e,r){var o=t[0],s=t[1];t[2];o===n.userId&&s===i&&(a=!0),r.done()}).next(function(){return a})},t.prototype.keyForBatchId=function(t){return[this.userId,t]},t}();function tr(e){return e instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function er(t){return Qn.getStore(t,jn.store)}function nr(t){return Qn.getStore(t,Bn.store)}function rr(t){return Qn.getStore(t,Un.store)}var ir=function(){function t(t){this.serializer=t,this.lastRemoteSnapshotVersion=Qt.MIN,this.metadata=null,this.garbageCollector=null}return t.prototype.start=function(t){var e=this;return ar(t).get(zn.key).next(function(t){y(null!==t,"Missing metadata row that should be added by schema migration."),e.metadata=t;var n=t.lastRemoteSnapshotVersion;return e.lastRemoteSnapshotVersion=Qt.fromTimestamp(new et(n.seconds,n.nanoseconds)),hn.resolve()})},t.prototype.getHighestTargetId=function(){return this.metadata.highestTargetId},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,this.metadata.lastRemoteSnapshotVersion=e.toTimestamp(),ar(t).put(zn.key,this.metadata)},t.prototype.addQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.metadata.targetCount+=1,n.updateMetadataFromQueryData(e),n.saveMetadata(t)})},t.prototype.updateQueryData=function(t,e){var n=this;return this.saveQueryData(t,e).next(function(){return n.updateMetadataFromQueryData(e)?n.saveMetadata(t):hn.resolve()})},t.prototype.removeQueryData=function(t,e){var n=this;return y(this.metadata.targetCount>0,"Removing from an empty query cache"),this.removeMatchingKeysForTargetId(t,e.targetId).next(function(){return or(t).delete(e.targetId)}).next(function(){return n.metadata.targetCount-=1,n.saveMetadata(t)})},t.prototype.saveMetadata=function(t){return ar(t).put(zn.key,this.metadata)},t.prototype.saveQueryData=function(t,e){return or(t).put(this.serializer.toDbTarget(e))},t.prototype.updateMetadataFromQueryData=function(t){var e=!1;return t.targetId>this.metadata.highestTargetId&&(this.metadata.highestTargetId=t.targetId,e=!0),e},Object.defineProperty(t.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this,r=e.canonicalId(),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),o=null;return or(t).iterate({range:i,index:Wn.queryTargetsIndexName},function(t,r,i){var a=n.serializer.fromDbTarget(r);e.isEqual(a.query)&&(o=a,i.done())}).next(function(){return o})},t.prototype.addMatchingKeys=function(t,e,n){var r=[],i=sr(t);return e.forEach(function(t){var e=On(t.path);r.push(i.put(new Hn(n,e)))}),hn.waitFor(r)},t.prototype.removeMatchingKeys=function(t,e,n){var r=this,i=[],o=sr(t);return e.forEach(function(t){var e=On(t.path);i.push(o.delete([n,e])),null!==r.garbageCollector&&r.garbageCollector.addPotentialGarbageKey(t)}),hn.waitFor(i)},t.prototype.removeMatchingKeysForTargetId=function(t,e){var n=sr(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return this.notifyGCForRemovedKeys(t,r).next(function(){return n.delete(r)})},t.prototype.notifyGCForRemovedKeys=function(t,e){var n=this,r=sr(t);return null!==this.garbageCollector&&this.garbageCollector.isEager?r.iterate({range:e,keysOnly:!0},function(t,e,r){var i=Dn(t[1]),o=new ct(i);y(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=sr(t),i=ge();return r.iterate({range:n,keysOnly:!0},function(t,e,n){var r=Dn(t[1]),o=new ct(r);i=i.add(o)}).next(function(){return i})},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){y(null!==t,"Persistence Transaction cannot be null for query cache containsKey");var n,r=On(e.path),i=IDBKeyRange.bound([r],[(n=r,n+"\0")],!1,!0),o=0;return sr(t).iterate({index:Hn.documentTargetsIndex,keysOnly:!0,range:i},function(t,e,n){o++,n.done()}).next(function(){return o>0})},t}();function or(t){return Qn.getStore(t,Wn.store)}function ar(t){return Qn.getStore(t,zn.store)}function sr(t){return Qn.getStore(t,Hn.store)}var ur=function(){function t(t){this.serializer=t}return t.prototype.addEntry=function(t,e){return cr(t).put(lr(e.key),this.serializer.toDbRemoteDocument(e))},t.prototype.removeEntry=function(t,e){return cr(t).delete(lr(e))},t.prototype.getEntry=function(t,e){var n=this;return cr(t).get(lr(e)).next(function(t){return t?n.serializer.fromDbRemoteDocument(t):null})},t.prototype.getDocumentsMatchingQuery=function(t,e){var n=this,r=de(),i=e.path.toArray(),o=IDBKeyRange.lowerBound(i);return cr(t).iterate({range:o},function(t,i,o){var a=n.serializer.fromDbRemoteDocument(i);e.path.isPrefixOf(a.key.path)?a instanceof lt&&e.matches(a)&&(r=r.insert(a.key,a)):o.done()}).next(function(){return r})},t}();function cr(t){return Qn.getStore(t,Vn.store)}function lr(t){return t.path.toArray()}var fr=function(){function e(t){this.remoteSerializer=t}return e.prototype.fromDbRemoteDocument=function(t){if(t.document)return this.remoteSerializer.fromDocument(t.document);if(t.noDocument){var e=ct.fromSegments(t.noDocument.path),n=t.noDocument.readTime,r=new et(n.seconds,n.nanoseconds);return new ft(e,Qt.fromTimestamp(r))}return m("Unexpected DbRemoteDocument")},e.prototype.toDbRemoteDocument=function(t){if(t instanceof lt){var e=this.remoteSerializer.toDocument(t);return new Vn(null,e)}var n=t.key.path.toArray(),r=t.version.toTimestamp(),i=new Ln(r.seconds,r.nanoseconds);return new Vn(new qn(n,i),null)},e.prototype.toDbMutationBatch=function(t,e){var n=this,r=e.mutations.map(function(t){return n.remoteSerializer.toMutation(t)});return new jn(t,e.batchId,e.localWriteTime.toMillis(),r)},e.prototype.fromDbMutationBatch=function(t){var e=this,n=t.mutations.map(function(t){return e.remoteSerializer.fromMutation(t)}),r=et.fromMillis(t.localWriteTimeMs);return new xn(t.batchId,r,n)},e.prototype.fromDbTarget=function(t){var e,n=new et(t.readTime.seconds,t.readTime.nanoseconds),r=Qt.fromTimestamp(n);return e=void 0!==t.query.documents?this.remoteSerializer.fromDocumentsTarget(t.query):this.remoteSerializer.fromQueryTarget(t.query),new Xt(e,t.targetId,Vt.Listen,r,t.resumeToken)},e.prototype.toDbTarget=function(e){y(Vt.Listen===e.purpose,"Only queries with purpose "+Vt.Listen+" may be stored, got "+e.purpose);var n,r,i=e.snapshotVersion.toTimestamp(),o=new Ln(i.seconds,i.nanoseconds);return n=e.query.isDocumentQuery()?this.remoteSerializer.toDocumentsTarget(e.query):this.remoteSerializer.toQueryTarget(e.query),e.resumeToken instanceof Uint8Array?(y("YES"===t.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),r=e.resumeToken.toString()):r=e.resumeToken,new Wn(e.targetId,e.query.canonicalId(),o,r,0,n)},e}();var hr,pr="IndexedDbPersistence",dr="There is another tab open with offline persistence enabled. Only one such tab is allowed at a time. The other tab must be closed or persistence must be disabled.",vr=function(){function t(e,n){this.ownerId=this.generateOwnerId(),this.dbName=e+t.MAIN_DATABASE,this.serializer=new fr(n),this.localStoragePrefix=e}return t.prototype.start=function(){var e=this;return t.isAvailable()?(y(!this.started,"IndexedDbPersistence double-started!"),this.started=!0,Qn.openOrCreate(this.dbName,2,Mn).then(function(t){e.simpleDb=t}).then(function(){return e.tryAcquireOwnerLease()}).then(function(){e.scheduleOwnerLeaseRefreshes(),e.attachWindowUnloadHook()})):(this.persistenceError=new w(_.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled."),Promise.reject(this.persistenceError))},t.prototype.shutdown=function(t){var e=this;return y(this.started,"IndexedDbPersistence shutdown without start!"),this.started=!1,this.detachWindowUnloadHook(),this.stopOwnerLeaseRefreshes(),this.releaseOwnerLease().then(function(){if(e.simpleDb.close(),t)return Qn.delete(e.dbName)})},t.prototype.getMutationQueue=function(t){return Zn.forUser(t,this.serializer)},t.prototype.getQueryCache=function(){return new ir(this.serializer)},t.prototype.getRemoteDocumentCache=function(){return new ur(this.serializer)},t.prototype.runTransaction=function(t,e){var n=this;return this.persistenceError?Promise.reject(this.persistenceError):(p(pr,"Starting transaction:",t),this.simpleDb.runTransaction("readwrite",Kn,function(t){return n.ensureOwnerLease(t).next(function(){return e(t)})}))},t.isAvailable=function(){return Qn.isAvailable()},t.buildStoragePrefix=function(t){var e=t.databaseId.projectId;return t.databaseId.isDefaultDatabase||(e+="."+t.databaseId.database),"firestore/"+t.persistenceKey+"/"+e+"/"},t.prototype.tryAcquireOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){if(t.validOwner(e))return p(pr,"Valid owner already. Failing. Current owner:",e),t.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(t.persistenceError);var r=new Fn(t.ownerId,Date.now());return p(pr,"No valid owner. Acquiring owner lease. Current owner:",e,"New owner:",r),n.put("owner",r)})})},t.prototype.releaseOwnerLease=function(){var t=this;return this.simpleDb.runTransaction("readwrite",[Fn.store],function(e){var n=e.store(Fn.store);return n.get("owner").next(function(e){return null!==e&&e.ownerId===t.ownerId?(p(pr,"Releasing owner lease."),n.delete("owner")):hn.resolve()})})},t.prototype.ensureOwnerLease=function(t){var e=this;return t.store(Fn.store).get("owner").next(function(t){return null===t||t.ownerId!==e.ownerId?(e.persistenceError=new w(_.FAILED_PRECONDITION,dr),hn.reject(e.persistenceError)):hn.resolve()})},t.prototype.validOwner=function(t){var e=Date.now(),n=e-5e3,r=e;return null!==t&&(!(t.leaseTimestampMs<n)&&(t.leaseTimestampMs>r?(d("Persistence owner-lease is in the future. Discarding.",t),!1):t.ownerId!==this.getZombiedOwnerId()))},t.prototype.scheduleOwnerLeaseRefreshes=function(){var t=this;this.ownerLeaseRefreshHandle=setInterval(function(){t.runTransaction("Refresh owner timestamp",function(e){return e.store(Fn.store).put("owner",new Fn(t.ownerId,Date.now()))}).catch(function(e){d(e),t.stopOwnerLeaseRefreshes()})},4e3)},t.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},t.prototype.attachWindowUnloadHook=function(){var t=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){t.setZombiedOwnerId(t.ownerId),t.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},t.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(y("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},t.prototype.getZombiedOwnerId=function(){try{var t=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return p(pr,"Zombied ownerID from LocalStorage:",t),t}catch(t){return d("Failed to get zombie owner id.",t),null}},t.prototype.setZombiedOwnerId=function(t){try{null===t?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),t)}catch(t){d("Failed to set zombie owner id.",t)}},t.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},t.prototype.generateOwnerId=function(){return z.newId()},t.MAIN_DATABASE="main",t}(),mr=function(){function t(t,e){this.remoteDocumentCache=t,this.mutationQueue=e}return t.prototype.getDocument=function(t,e){var n=this;return this.remoteDocumentCache.getEntry(t,e).next(function(r){return n.computeLocalDocument(t,e,r)})},t.prototype.getDocuments=function(t,e){var n=this,r=[],i=he();return e.forEach(function(e){r.push(n.getDocument(t,e).next(function(t){t||(t=new ft(e,Qt.forDeletedDoc())),i=i.insert(e,t)}))}),hn.waitFor(r).next(function(){return i})},t.prototype.getDocumentsMatchingQuery=function(t,e){return ct.isDocumentKey(e.path)?this.getDocumentsMatchingDocumentQuery(t,e.path):this.getDocumentsMatchingCollectionQuery(t,e)},t.prototype.getDocumentsMatchingDocumentQuery=function(t,e){return this.getDocument(t,new ct(e)).next(function(t){var e=de();return t instanceof lt&&(e=e.insert(t.key,t)),e})},t.prototype.getDocumentsMatchingCollectionQuery=function(t,e){var n,r=this;return this.remoteDocumentCache.getDocumentsMatchingQuery(t,e).next(function(e){return r.computeLocalDocuments(t,e)}).next(function(i){return n=i,r.mutationQueue.getAllMutationBatchesAffectingQuery(t,e)}).next(function(e){for(var i=ge(),o=0,a=e;o<a.length;o++)for(var s=0,u=a[o].mutations;s<u.length;s++){var c=u[s];n.get(c.key)||(i=i.add(c.key))}var l=[];return i.forEach(function(e){l.push(r.getDocument(t,e).next(function(t){t instanceof lt&&(n=n.insert(t.key,t))}))}),hn.waitFor(l)}).next(function(){return n.forEach(function(t,r){e.matches(r)||(n=n.remove(t))}),n})},t.prototype.computeLocalDocument=function(t,e,n){return this.mutationQueue.getAllMutationBatchesAffectingDocumentKey(t,e).next(function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];n=o.applyToLocalView(e,n)}return n})},t.prototype.computeLocalDocuments=function(t,e){var n=this,r=[];return e.forEach(function(i,o){r.push(n.computeLocalDocument(t,i,o).next(function(t){t instanceof lt?e=e.insert(t.key,t):t instanceof ft?e=e.remove(t.key):m("Unknown MaybeDocument: "+t)}))}),hn.waitFor(r).next(function(){return e})},t}(),yr=function(){function t(t){this.remoteDocumentCache=t,this.changes=he()}return t.prototype.addEntry=function(t){var e=this.assertChanges();this.changes=e.insert(t.key,t)},t.prototype.getEntry=function(t,e){var n=this.assertChanges().get(e);return n?hn.resolve(n):this.remoteDocumentCache.getEntry(t,e)},t.prototype.apply=function(t){var e=this,n=[];return this.assertChanges().forEach(function(r,i){n.push(e.remoteDocumentCache.addEntry(t,i))}),this.changes=null,hn.waitFor(n)},t.prototype.assertChanges=function(){return y(null!==this.changes,"Changes have already been applied."),this.changes},t}(),gr=function(){function t(t,e,n){this.persistence=t,this.garbageCollector=n,this.localViewReferences=new vn,this.targetIds={},this.targetIdGenerator=gn.forLocalStore(),this.heldBatchResults=[],this.mutationQueue=t.getMutationQueue(e),this.remoteDocuments=t.getRemoteDocumentCache(),this.queryCache=t.getQueryCache(),this.localDocuments=new mr(this.remoteDocuments,this.mutationQueue),this.garbageCollector.addGarbageSource(this.localViewReferences),this.garbageCollector.addGarbageSource(this.queryCache),this.garbageCollector.addGarbageSource(this.mutationQueue)}return t.prototype.start=function(){var t=this;return this.persistence.runTransaction("Start LocalStore",function(e){return t.startMutationQueue(e).next(function(){return t.startQueryCache(e)})})},t.prototype.handleUserChange=function(t){var e=this;return this.persistence.runTransaction("Handle user change",function(n){var r;return e.mutationQueue.getAllMutationBatches(n).next(function(i){return r=i,e.garbageCollector.removeGarbageSource(e.mutationQueue),e.mutationQueue=e.persistence.getMutationQueue(t),e.garbageCollector.addGarbageSource(e.mutationQueue),e.startMutationQueue(n)}).next(function(){return e.localDocuments=new mr(e.remoteDocuments,e.mutationQueue),e.mutationQueue.getAllMutationBatches(n)}).next(function(t){for(var i=ge(),o=0,a=[r,t];o<a.length;o++)for(var s=0,u=a[o];s<u.length;s++)for(var c=0,l=u[s].mutations;c<l.length;c++){var f=l[c];i=i.add(f.key)}return e.localDocuments.getDocuments(n,i)})})},t.prototype.startQueryCache=function(t){var e=this;return this.queryCache.start(t).next(function(){var t=e.queryCache.getHighestTargetId();e.targetIdGenerator=gn.forLocalStore(t)})},t.prototype.startMutationQueue=function(t){var e=this;return this.mutationQueue.start(t).next(function(){return e.heldBatchResults=[],e.mutationQueue.getHighestAcknowledgedBatchId(t)}).next(function(n){return n!==Cn?e.mutationQueue.getAllMutationBatchesThroughBatchId(t,n):hn.resolve([])}).next(function(n){return n.length>0?e.mutationQueue.removeMutationBatches(t,n):hn.resolve()})},t.prototype.localWrite=function(t){var e=this;return this.persistence.runTransaction("Locally write mutations",function(n){var r,i=et.now();return e.mutationQueue.addMutationBatch(n,i,t).next(function(t){var i=(r=t).keys();return e.localDocuments.getDocuments(n,i)}).next(function(t){return{batchId:r.batchId,changes:t}})})},t.prototype.acknowledgeBatch=function(t){var e=this;return this.persistence.runTransaction("Acknowledge batch",function(n){var r;return e.mutationQueue.acknowledgeBatch(n,t.batch,t.streamToken).next(function(){if(e.shouldHoldBatchResult(t.commitVersion))return e.heldBatchResults.push(t),r=ge(),hn.resolve();var i=new yr(e.remoteDocuments);return e.releaseBatchResults(n,[t],i).next(function(t){return r=t,i.apply(n)})}).next(function(){return e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,r)})})},t.prototype.rejectBatch=function(t){var e=this;return this.persistence.runTransaction("Reject batch",function(n){var r,i;return e.mutationQueue.lookupMutationBatch(n,t).next(function(i){return y(null!=i,"Attempt to reject nonexistent batch!"),r=i,e.mutationQueue.getHighestAcknowledgedBatchId(n).next(function(e){return y(t>e,"Acknowledged batches can't be rejected."),r})}).next(function(){return e.removeMutationBatch(n,r)}).next(function(t){return i=t,e.mutationQueue.performConsistencyCheck(n)}).next(function(){return e.localDocuments.getDocuments(n,i)})})},t.prototype.getLastStreamToken=function(){var t=this;return this.persistence.runTransaction("Get last stream token",function(e){return t.mutationQueue.getLastStreamToken(e)})},t.prototype.setLastStreamToken=function(t){var e=this;return this.persistence.runTransaction("Set last stream token",function(n){return e.mutationQueue.setLastStreamToken(n,t)})},t.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},t.prototype.applyRemoteEvent=function(t){var e=this,n=new yr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(r){var i=[];x(t.targetChanges,function(n,o){var a=e.targetIds[n];if(a){i.push(e.queryCache.removeMatchingKeys(r,o.removedDocuments,n).next(function(){return e.queryCache.addMatchingKeys(r,o.addedDocuments,n)}));var s=o.resumeToken;s.length>0&&(a=a.update({resumeToken:s,snapshotVersion:t.snapshotVersion}),e.targetIds[n]=a,i.push(e.queryCache.updateQueryData(r,a)))}});var o=ge();t.documentUpdates.forEach(function(t,a){o=o.add(t),i.push(n.getEntry(r,t).next(function(r){null==r||a.version.isEqual(Qt.MIN)||a.version.compareTo(r.version)>=0?n.addEntry(a):p("LocalStore","Ignoring outdated watch update for ",t,". Current version:",r.version," Watch version:",a.version),e.garbageCollector.addPotentialGarbageKey(t)}))});var a,s=e.queryCache.getLastRemoteSnapshotVersion(),u=t.snapshotVersion;return u.isEqual(Qt.MIN)||(y(u.compareTo(s)>=0,"Watch stream reverted to previous snapshot?? "+u+" < "+s),i.push(e.queryCache.setLastRemoteSnapshotVersion(r,u))),hn.waitFor(i).next(function(){return e.releaseHeldBatchResults(r,n)}).next(function(t){return a=t,n.apply(r)}).next(function(){return e.localDocuments.getDocuments(r,o.unionWith(a))})})},t.prototype.notifyLocalViewChanges=function(t){var e=this;return this.persistence.runTransaction("Notify local view changes",function(n){for(var r=[],i=function(t){r.push(e.queryCache.getQueryData(n,t.query).next(function(n){y(null!==n,"Local view changes contain unallocated query.");var r=n.targetId;e.localViewReferences.addReferences(t.addedKeys,r),e.localViewReferences.removeReferences(t.removedKeys,r)}))},o=0,a=t;o<a.length;o++){i(a[o])}return hn.waitFor(r)})},t.prototype.nextMutationBatch=function(t){var e=this;return this.persistence.runTransaction("Get next mutation batch",function(n){return void 0===t&&(t=Cn),e.mutationQueue.getNextMutationBatchAfterBatchId(n,t)})},t.prototype.readDocument=function(t){var e=this;return this.persistence.runTransaction("read document",function(n){return e.localDocuments.getDocument(n,t)})},t.prototype.allocateQuery=function(t){var e=this;return this.persistence.runTransaction("Allocate query",function(n){var r;return e.queryCache.getQueryData(n,t).next(function(i){if(i)return r=i,hn.resolve();var o=e.targetIdGenerator.next();return r=new Xt(t,o,Vt.Listen),e.queryCache.addQueryData(n,r)}).next(function(){return y(!e.targetIds[r.targetId],"Tried to allocate an already allocated query: "+t),e.targetIds[r.targetId]=r,r})})},t.prototype.releaseQuery=function(t){var e=this;return this.persistence.runTransaction("Release query",function(n){return e.queryCache.getQueryData(n,t).next(function(r){return y(null!=r,"Tried to release nonexistent query: "+t),e.localViewReferences.removeReferencesForId(r.targetId),delete e.targetIds[r.targetId],e.garbageCollector.isEager?e.queryCache.removeQueryData(n,r):hn.resolve()}).next(function(){if(k(e.targetIds)){var t=new yr(e.remoteDocuments);return e.releaseHeldBatchResults(n,t).next(function(){t.apply(n)})}return hn.resolve()})})},t.prototype.executeQuery=function(t){var e=this;return this.persistence.runTransaction("Execute query",function(n){return e.localDocuments.getDocumentsMatchingQuery(n,t)})},t.prototype.remoteDocumentKeys=function(t){var e=this;return this.persistence.runTransaction("Remote document keys",function(n){return e.queryCache.getMatchingKeysForTargetId(n,t)})},t.prototype.collectGarbage=function(){var t=this;return this.persistence.runTransaction("Garbage collection",function(e){return t.garbageCollector.collectGarbage(e).next(function(n){var r=[];return n.forEach(function(n){r.push(t.remoteDocuments.removeEntry(e,n))}),hn.waitFor(r)})})},t.prototype.releaseHeldBatchResults=function(t,e){for(var n=[],r=0,i=this.heldBatchResults;r<i.length;r++){var o=i[r];if(!this.isRemoteUpToVersion(o.commitVersion))break;n.push(o)}return 0===n.length?hn.resolve(ge()):(this.heldBatchResults.splice(0,n.length),this.releaseBatchResults(t,n,e))},t.prototype.isRemoteUpToVersion=function(t){var e=this.queryCache.getLastRemoteSnapshotVersion();return t.compareTo(e)<=0||k(this.targetIds)},t.prototype.shouldHoldBatchResult=function(t){return!this.isRemoteUpToVersion(t)||this.heldBatchResults.length>0},t.prototype.releaseBatchResults=function(t,e,n){for(var r=this,i=hn.resolve(),o=function(e){i=i.next(function(){return r.applyWriteToRemoteDocuments(t,e,n)})},a=0,s=e;a<s.length;a++){o(s[a])}return i.next(function(){return r.removeMutationBatches(t,e.map(function(t){return t.batch}))})},t.prototype.removeMutationBatch=function(t,e){return this.removeMutationBatches(t,[e])},t.prototype.removeMutationBatches=function(t,e){for(var n=ge(),r=0,i=e;r<i.length;r++)for(var o=0,a=i[r].mutations;o<a.length;o++){var s=a[o].key;n=n.add(s)}return this.mutationQueue.removeMutationBatches(t,e).next(function(){return n})},t.prototype.applyWriteToRemoteDocuments=function(t,e,n){var r=e.batch,i=r.keys(),o=hn.resolve();return i.forEach(function(i){o=o.next(function(){return n.getEntry(t,i)}).next(function(t){var o=t,a=e.docVersions.get(i);y(null!==a,"ackVersions should contain every doc in the write."),(!o||o.version.compareTo(a)<0)&&((o=r.applyToRemoteDocument(i,o,e))?n.addEntry(o):y(!t,"Mutation batch "+r+" applied to document "+t+" resulted in null"))})}),o},t}(),br=function(){function t(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn,this.lastStreamToken=b(),this.garbageCollector=null,this.batchesByDocumentKey=new le(mn.compareByKey)}return t.prototype.start=function(t){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Cn),y(this.highestAcknowledgedBatchId<this.nextBatchId,"highestAcknowledgedBatchId must be less than the nextBatchId"),hn.resolve()},t.prototype.checkEmpty=function(t){return hn.resolve(0===this.mutationQueue.length)},t.prototype.getNextBatchId=function(t){return hn.resolve(this.nextBatchId)},t.prototype.getHighestAcknowledgedBatchId=function(t){return hn.resolve(this.highestAcknowledgedBatchId)},t.prototype.acknowledgeBatch=function(t,e,n){var r=e.batchId;y(r>this.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var i=this.indexOfExistingBatchId(r,"acknowledged"),o=this.mutationQueue[i];return y(r===o.batchId,"Queue ordering failure: expected batch "+r+", got batch "+o.batchId),y(!o.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=r,this.lastStreamToken=n,hn.resolve()},t.prototype.getLastStreamToken=function(t){return hn.resolve(this.lastStreamToken)},t.prototype.setLastStreamToken=function(t,e){return this.lastStreamToken=e,hn.resolve()},t.prototype.addMutationBatch=function(t,e,n){y(0!==n.length,"Mutation batches should not be empty");var r=this.nextBatchId;(this.nextBatchId++,this.mutationQueue.length>0)&&y(this.mutationQueue[this.mutationQueue.length-1].batchId<r,"Mutation batchIDs must be monotonically increasing order");var i=new xn(r,e,n);this.mutationQueue.push(i);for(var o=0,a=n;o<a.length;o++){var s=a[o];this.batchesByDocumentKey=this.batchesByDocumentKey.add(new mn(s.key,r))}return hn.resolve(i)},t.prototype.lookupMutationBatch=function(t,e){return hn.resolve(this.findMutationBatch(e))},t.prototype.getNextMutationBatchAfterBatchId=function(t,e){for(var n=this.mutationQueue.length,r=Math.max(e,this.highestAcknowledgedBatchId)+1,i=this.indexOfBatchId(r),o=i<0?0:i;o<n;o++){var a=this.mutationQueue[o];if(!a.isTombstone())return hn.resolve(a)}return hn.resolve(null)},t.prototype.getAllMutationBatches=function(t){return hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(this.mutationQueue.length))},t.prototype.getAllMutationBatchesThroughBatchId=function(t,e){var n=this.mutationQueue.length,r=this.indexOfBatchId(e);return r<0?r=0:r>=n?r=n:r++,hn.resolve(this.getAllLiveMutationBatchesBeforeIndex(r))},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=new mn(e,0),i=new mn(e,Number.POSITIVE_INFINITY),o=[];return this.batchesByDocumentKey.forEachInRange([r,i],function(t){y(e.isEqual(t.key),"Should only iterate over a single key's batches");var r=n.findMutationBatch(t.targetOrBatchId);y(null!==r,"Batches in the index must exist in the main table"),o.push(r)}),hn.resolve(o)},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this,r=e.path,i=r.length+1,o=r;ct.isDocumentKey(o)||(o=o.child(""));var a=new mn(new ct(o),0),s=new le(K);this.batchesByDocumentKey.forEachWhile(function(t){var e=t.key.path;return!!r.isPrefixOf(e)&&(e.length===i&&(s=s.add(t.targetOrBatchId)),!0)},a);var u=[];return s.forEach(function(t){var e=n.findMutationBatch(t);null!==e&&u.push(e)}),hn.resolve(u)},t.prototype.removeMutationBatches=function(t,e){var n=e.length;y(n>0,"Should not remove mutations when none exist.");var r=e[0].batchId,i=this.mutationQueue.length,o=this.indexOfExistingBatchId(r,"removed");y(this.mutationQueue[o].batchId===r,"Removed batches must exist in the queue");for(var a=1,s=o+1;a<n&&s<i;){(p=this.mutationQueue[s]).isTombstone()?s++:(y(p.batchId===e[a].batchId,"Removed batches must be contiguous in the queue"),a++,s++)}if(0===o){for(;s<i;s++){if(!(p=this.mutationQueue[s]).isTombstone())break}var u=s-o;this.mutationQueue.splice(o,u)}else for(var c=o;c<s;c++)this.mutationQueue[c]=this.mutationQueue[c].toTombstone();for(var l=this.batchesByDocumentKey,f=0,h=e;f<h.length;f++)for(var p,d=(p=h[f]).batchId,v=0,m=p.mutations;v<m.length;v++){var g=m[v].key;null!==this.garbageCollector&&this.garbageCollector.addPotentialGarbageKey(g);var b=new mn(g,d);l=l.delete(b)}return this.batchesByDocumentKey=l,hn.resolve()},t.prototype.setGarbageCollector=function(t){this.garbageCollector=t},t.prototype.containsKey=function(t,e){var n=new mn(e,0),r=this.batchesByDocumentKey.firstAfterOrEqual(n);return hn.resolve(e.isEqual(r&&r.key))},t.prototype.performConsistencyCheck=function(t){return 0===this.mutationQueue.length&&y(this.batchesByDocumentKey.isEmpty(),"Document leak -- detected dangling mutation references when queue is empty."),hn.resolve()},t.prototype.getAllLiveMutationBatchesBeforeIndex=function(t){for(var e=[],n=0;n<t;n++){var r=this.mutationQueue[n];r.isTombstone()||e.push(r)}return e},t.prototype.indexOfExistingBatchId=function(t,e){var n=this.indexOfBatchId(t);return y(n>=0&&n<this.mutationQueue.length,"Batches must exist to be "+e),n},t.prototype.indexOfBatchId=function(t){return 0===this.mutationQueue.length?0:t-this.mutationQueue[0].batchId},t.prototype.findMutationBatch=function(t){var e=this.indexOfBatchId(t);if(e<0||e>=this.mutationQueue.length)return null;var n=this.mutationQueue[e];return y(n.batchId===t,"If found batch must match"),n.isTombstone()?null:n},t}(),_r=function(){function t(){this.queries=new un(function(t){return t.canonicalId()}),this.lastRemoteSnapshotVersion=Qt.MIN,this.highestTargetId=0,this.references=new vn,this.targetCount=0}return t.prototype.start=function(t){return hn.resolve()},t.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},t.prototype.getHighestTargetId=function(){return this.highestTargetId},t.prototype.setLastRemoteSnapshotVersion=function(t,e){return this.lastRemoteSnapshotVersion=e,hn.resolve()},t.prototype.saveQueryData=function(t){this.queries.set(t.query,t);var e=t.targetId;e>this.highestTargetId&&(this.highestTargetId=e)},t.prototype.addQueryData=function(t,e){return y(!this.queries.has(e.query),"Adding a query that already exists"),this.saveQueryData(e),this.targetCount+=1,hn.resolve()},t.prototype.updateQueryData=function(t,e){return y(this.queries.has(e.query),"Updating a non-existent query"),this.saveQueryData(e),hn.resolve()},t.prototype.removeQueryData=function(t,e){return y(this.targetCount>0,"Removing a target from an empty cache"),y(this.queries.has(e.query),"Removing a non-existent target from the cache"),this.queries.delete(e.query),this.references.removeReferencesForId(e.targetId),this.targetCount-=1,hn.resolve()},Object.defineProperty(t.prototype,"count",{get:function(){return this.targetCount},enumerable:!0,configurable:!0}),t.prototype.getQueryData=function(t,e){var n=this.queries.get(e)||null;return hn.resolve(n)},t.prototype.addMatchingKeys=function(t,e,n){return this.references.addReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeys=function(t,e,n){return this.references.removeReferences(e,n),hn.resolve()},t.prototype.removeMatchingKeysForTargetId=function(t,e){return this.references.removeReferencesForId(e),hn.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=this.references.referencesForId(e);return hn.resolve(n)},t.prototype.setGarbageCollector=function(t){this.references.setGarbageCollector(t)},t.prototype.containsKey=function(t,e){return this.references.containsKey(t,e)},t}(),wr=function(){function t(){this.docs=he()}return t.prototype.addEntry=function(t,e){return this.docs=this.docs.insert(e.key,e),hn.resolve()},t.prototype.removeEntry=function(t,e){return this.docs=this.docs.remove(e),hn.resolve()},t.prototype.getEntry=function(t,e){return hn.resolve(this.docs.get(e))},t.prototype.getDocumentsMatchingQuery=function(t,e){for(var n=de(),r=new ct(e.path.child("")),i=this.docs.getIteratorFrom(r);i.hasNext();){var o=i.getNext(),a=o.key,s=o.value;if(!e.path.isPrefixOf(a.path))break;s instanceof lt&&e.matches(s)&&(n=n.insert(s.key,s))}return hn.resolve(n)},t}(),Er=function(){function t(){this.mutationQueues={},this.remoteDocumentCache=new wr,this.queryCache=new _r,this.started=!1}return t.prototype.start=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(!this.started,"MemoryPersistence double-started!"),this.started=!0,[2]})})},t.prototype.shutdown=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return y(this.started,"MemoryPersistence shutdown without start!"),this.started=!1,[2]})})},t.prototype.getMutationQueue=function(t){var e=this.mutationQueues[t.toKey()];return e||(e=new br,this.mutationQueues[t.toKey()]=e),e},t.prototype.getQueryCache=function(){return this.queryCache},t.prototype.getRemoteDocumentCache=function(){return this.remoteDocumentCache},t.prototype.runTransaction=function(t,e){return p("MemoryPersistence","Starting transaction:",t),e(new Tr).toPromise()},t}(),Tr=function(){return function(){}}(),Cr=function(){function t(){this.isEager=!1}return t.prototype.addGarbageSource=function(t){},t.prototype.removeGarbageSource=function(t){},t.prototype.addPotentialGarbageKey=function(t){},t.prototype.collectGarbage=function(t){return hn.resolve(ge())},t}();!function(t){t.All="all",t.ListenStreamIdle="listen_stream_idle",t.ListenStreamConnectionBackoff="listen_stream_connection_backoff",t.WriteStreamIdle="write_stream_idle",t.WriteStreamConnectionBackoff="write_stream_connection_backoff",t.OnlineStateTimeout="online_state_timeout"}(hr||(hr={}));var xr,Sr=function(){function t(t,e,n,r,i){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new Gn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.catch=this.deferred.promise.catch.bind(this.deferred.promise),this.deferred.promise.catch(function(t){})}return t.createAndSchedule=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.timerHandle=setTimeout(function(){return e.handleDelayElapsed()},t)},t.prototype.skipDelay=function(){return this.handleDelayElapsed()},t.prototype.cancel=function(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new w(_.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},t.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueue(function(){return null!==t.timerHandle?(t.clearTimeout(),t.op().then(function(e){return t.deferred.resolve(e)})):Promise.resolve()})},t.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},t}(),kr=function(){function t(){this.tail=Promise.resolve(),this.delayedOperations=[],this.operationInProgress=!1}return t.prototype.enqueue=function(t){var e=this;this.verifyNotFailed();var n=this.tail.then(function(){return e.operationInProgress=!0,t().catch(function(t){e.failure=t,e.operationInProgress=!1;var n=t.stack||t.message||"";throw d("INTERNAL UNHANDLED ERROR: ",n),n.indexOf("Firestore Test Simulated Error")<0&&setTimeout(function(){throw t},0),t}).then(function(t){return e.operationInProgress=!1,t})});return this.tail=n,n},t.prototype.enqueueAfterDelay=function(t,e,n){var r=this;this.verifyNotFailed(),y(!this.containsDelayedOperation(t),"Attempted to schedule multiple operations with timer id "+t+".");var i=Sr.createAndSchedule(this,t,e,n,function(t){return r.removeDelayedOperation(t)});return this.delayedOperations.push(i),i},t.prototype.verifyNotFailed=function(){this.failure&&m("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},t.prototype.verifyOperationInProgress=function(){y(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},t.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},t.prototype.containsDelayedOperation=function(t){return this.delayedOperations.findIndex(function(e){return e.timerId===t})>=0},t.prototype.runDelayedOperationsEarly=function(t){var e=this;return this.drain().then(function(){y(t===hr.All||e.containsDelayedOperation(t),"Attempted to drain to missing operation "+t),e.delayedOperations.sort(function(t,e){return t.targetTimeMs-e.targetTimeMs});for(var n=0,r=e.delayedOperations;n<r.length;n++){var i=r[n];if(i.skipDelay(),t!==hr.All&&i.timerId===t)break}return e.drain()})},t.prototype.removeDelayedOperation=function(t){var e=this.delayedOperations.indexOf(t);y(e>=0,"Delayed operation not found."),this.delayedOperations.splice(e,1)},t}(),Nr=function(){function t(t,e,n,r,i){this.queue=t,this.timerId=e,this.initialDelayMs=n,this.backoffFactor=r,this.maxDelayMs=i,this.timerPromise=null,this.reset()}return t.prototype.reset=function(){this.currentBaseMs=0},t.prototype.resetToMax=function(){this.currentBaseMs=this.maxDelayMs},t.prototype.backoffAndRun=function(t){this.cancel();var e=this.currentBaseMs+this.jitterDelayMs();this.currentBaseMs>0&&p("ExponentialBackoff","Backing off for "+e+" ms (base delay: "+this.currentBaseMs+" ms)"),this.timerPromise=this.queue.enqueueAfterDelay(this.timerId,e,t),this.currentBaseMs*=this.backoffFactor,this.currentBaseMs<this.initialDelayMs&&(this.currentBaseMs=this.initialDelayMs),this.currentBaseMs>this.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},t.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},t.prototype.jitterDelayMs=function(){return(Math.random()-.5)*this.currentBaseMs},t}();!function(t){t[t.Initial=0]="Initial",t[t.Auth=1]="Auth",t[t.Open=2]="Open",t[t.Error=3]="Error",t[t.Backoff=4]="Backoff",t[t.Stopped=5]="Stopped"}(xr||(xr={}));var Ar=1e3,Ir=6e4,Or=1.5,Pr=function(){function t(t,e,n,r,i){this.queue=t,this.idleTimerId=n,this.connection=r,this.credentialsProvider=i,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new Nr(t,e,Ar,Or,Ir),this.state=xr.Initial}return t.prototype.isStarted=function(){return this.state===xr.Backoff||this.state===xr.Auth||this.state===xr.Open},t.prototype.isOpen=function(){return this.state===xr.Open},t.prototype.start=function(t){this.state!==xr.Error?(y(this.state===xr.Initial,"Already started"),this.listener=t,this.auth()):this.performBackoff(t)},t.prototype.stop=function(){this.isStarted()&&this.close(xr.Stopped)},t.prototype.inhibitBackoff=function(){y(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=xr.Initial,this.backoff.reset()},t.prototype.markIdle=function(){var t=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,6e4,function(){return t.handleIdleCloseTimer()}))},t.prototype.sendRequest=function(t){this.cancelIdleCheck(),this.stream.send(t)},t.prototype.handleIdleCloseTimer=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.isOpen()?[2,this.close(xr.Initial)]:[2]})})},t.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},t.prototype.close=function(t,e){return s.__awaiter(this,void 0,void 0,function(){var n;return s.__generator(this,function(r){return y(t===xr.Error||Lt(e),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),t!==xr.Error?this.backoff.reset():e&&e.code===_.RESOURCE_EXHAUSTED&&(d(e.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=t,n=this.listener,this.listener=null,t!==xr.Stopped?[2,n.onClose(e)]:[2]})})},t.prototype.tearDown=function(){},t.prototype.auth=function(){var t=this;y(this.state===xr.Initial,"Must be in initial state to auth"),this.state=xr.Auth,this.credentialsProvider.getToken(!1).then(function(e){t.startStream(e)},function(e){t.queue.enqueue(function(){return s.__awaiter(t,void 0,void 0,function(){var t;return s.__generator(this,function(n){return this.state!==xr.Stopped?(t=new w(_.UNKNOWN,"Fetching auth token failed: "+e.message),[2,this.handleStreamClose(t)]):[2]})})})})},t.prototype.startStream=function(t){var e=this;if(this.state!==xr.Stopped){y(this.state===xr.Auth,"Trying to start stream in a non-auth state");var n=function(t,n){e.queue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.stream===t?[2,n()]:[2]})})})};if(null!==this.listener){var r=this.startRpc(t);this.stream=r,this.stream.onOpen(function(){n(r,function(){return y(e.state===xr.Auth,"Expected stream to be in state auth, but was "+e.state),e.state=xr.Open,e.listener.onOpen()})}),this.stream.onClose(function(t){n(r,function(){return e.handleStreamClose(t)})}),this.stream.onMessage(function(t){n(r,function(){return e.onMessage(t)})})}}},t.prototype.performBackoff=function(t){var e=this;y(this.state===xr.Error,"Should only perform backoff in an error case"),this.state=xr.Backoff,this.backoff.backoffAndRun(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return this.state===xr.Stopped?[2]:(this.state=xr.Initial,this.start(t),y(this.isStarted(),"PersistentStream should have started"),[2])})})})},t.prototype.handleStreamClose=function(t){return y(this.isStarted(),"Can't handle server close on non-started stream"),p("PersistentStream","close with error: "+t),this.stream=null,this.close(xr.Error,t)},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.ListenStreamConnectionBackoff,hr.ListenStreamIdle,n,r)||this;return o.serializer=i,o}return s.__extends(e,t),e.prototype.startRpc=function(t){return this.connection.openStream("Listen",t)},e.prototype.onMessage=function(t){this.backoff.reset();var e=this.serializer.fromWatchChange(t),n=this.serializer.versionFromListenResponse(t);return this.listener.onWatchChange(e,n)},e.prototype.watch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.addTarget=this.serializer.toTarget(t);var n=this.serializer.toListenRequestLabels(t);n&&(e.labels=n),this.sendRequest(e)},e.prototype.unwatch=function(t){var e={};e.database=this.serializer.encodedDatabaseId,e.removeTarget=t,this.sendRequest(e)},e}(Pr),Dr=function(t){function e(e,n,r,i){var o=t.call(this,e,hr.WriteStreamConnectionBackoff,hr.WriteStreamIdle,n,r)||this;return o.serializer=i,o.handshakeComplete_=!1,o}return s.__extends(e,t),Object.defineProperty(e.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),e.prototype.start=function(e){this.handshakeComplete_=!1,t.prototype.start.call(this,e)},e.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},e.prototype.startRpc=function(t){return this.connection.openStream("Write",t)},e.prototype.onMessage=function(t){if(y(!!t.streamToken,"Got a write response without a stream token"),this.lastStreamToken=t.streamToken,this.handshakeComplete_){this.backoff.reset();var e=this.serializer.fromWriteResults(t.writeResults),n=this.serializer.fromVersion(t.commitTime);return this.listener.onMutationResult(n,e)}return y(!t.writeResults||0===t.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete()},e.prototype.writeHandshake=function(){y(this.isOpen(),"Writing handshake requires an opened stream"),y(!this.handshakeComplete_,"Handshake already completed");var t={};t.database=this.serializer.encodedDatabaseId,this.sendRequest(t)},e.prototype.writeMutations=function(t){var e=this;y(this.isOpen(),"Writing mutations requires an opened stream"),y(this.handshakeComplete_,"Handshake must be complete before writing mutations"),y(this.lastStreamToken.length>0,"Trying to write mutation without a token");var n={streamToken:this.lastStreamToken,writes:t.map(function(t){return e.serializer.toMutation(t)})};this.sendRequest(n)},e}(Pr),Mr=function(){function t(t,e,n,r){this.queue=t,this.connection=e,this.credentials=n,this.serializer=r}return t.prototype.newPersistentWriteStream=function(){return new Dr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.newPersistentWatchStream=function(){return new Rr(this.queue,this.connection,this.credentials,this.serializer)},t.prototype.commit=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,writes:t.map(function(t){return e.serializer.toMutation(t)})};return this.invokeRPC("Commit",n).then(function(t){return e.serializer.fromWriteResults(t.writeResults)})},t.prototype.lookup=function(t){var e=this,n={database:this.serializer.encodedDatabaseId,documents:t.map(function(t){return e.serializer.toName(t)})};return this.invokeStreamingRPC("BatchGetDocuments",n).then(function(n){var r=he();n.forEach(function(t){var n=e.serializer.fromMaybeDocument(t);r=r.insert(n.key,n)});var i=[];return t.forEach(function(t){var e=r.get(t);y(!!e,"Missing entity in write response for "+t),i.push(e)}),i})},t.prototype.invokeRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeRPC(t,e,r)})},t.prototype.invokeStreamingRPC=function(t,e){var n=this;return this.credentials.getToken(!1).then(function(r){return n.connection.invokeStreamingRPC(t,e,r)})},t}(),Lr=function(){function t(t){this.datastore=t,this.readVersions=me(),this.mutations=[],this.committed=!1}return t.prototype.recordVersion=function(t){var e=t.version;t instanceof ft&&(e=Qt.forDeletedDoc());var n=this.readVersions.get(t.key);if(null!==n){if(!e.isEqual(n))throw new w(_.ABORTED,"Document version changed between two reads.")}else this.readVersions=this.readVersions.insert(t.key,e)},t.prototype.lookup=function(t){var e=this;return this.committed?Promise.reject("Transaction has already completed."):this.mutations.length>0?Promise.reject("Transactions lookups are invalid after writes."):this.datastore.lookup(t).then(function(t){return t.forEach(function(t){return e.recordVersion(t)}),t})},t.prototype.write=function(t){if(this.committed)throw new w(_.FAILED_PRECONDITION,"Transaction has already completed.");this.mutations=this.mutations.concat(t)},t.prototype.precondition=function(t){var e=this.readVersions.get(t);return e?ee.updateTime(e):ee.NONE},t.prototype.preconditionForUpdate=function(t){var e=this.readVersions.get(t);if(e&&e.isEqual(Qt.forDeletedDoc()))throw new w(_.FAILED_PRECONDITION,"Can't update a document that doesn't exist.");return e?ee.updateTime(e):ee.exists(!0)},t.prototype.set=function(t,e){this.write(e.toMutations(t,this.precondition(t)))},t.prototype.update=function(t,e){this.write(e.toMutations(t,this.preconditionForUpdate(t)))},t.prototype.delete=function(t){this.write([new ae(t,this.precondition(t))]),this.readVersions=this.readVersions.insert(t,Qt.forDeletedDoc())},t.prototype.commit=function(){var t=this,e=this.readVersions;return this.mutations.forEach(function(t){e=e.remove(t.key)}),e.isEmpty()?this.datastore.commit(this.mutations).then(function(){t.committed=!0}):Promise.reject(Error("Every document read in a transaction must also be written."))},t}(),Fr=function(){function t(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state=nn.Unknown,this.watchStreamFailures=0,this.onlineStateTimer=null,this.shouldWarnClientIsOffline=!0}return t.prototype.handleWatchStreamStart=function(){var t=this;0===this.watchStreamFailures&&(this.setAndBroadcast(nn.Unknown),y(null===this.onlineStateTimer,"onlineStateTimer shouldn't be started yet"),this.onlineStateTimer=this.asyncQueue.enqueueAfterDelay(hr.OnlineStateTimeout,1e4,function(){return t.onlineStateTimer=null,y(t.state===nn.Unknown,"Timer should be canceled if we transitioned to a different state."),t.logClientOfflineWarningIfNecessary("Backend didn't respond within 10 seconds."),t.setAndBroadcast(nn.Offline),Promise.resolve()}))},t.prototype.handleWatchStreamFailure=function(t){this.state===nn.Online?(this.setAndBroadcast(nn.Unknown),y(0===this.watchStreamFailures,"watchStreamFailures must be 0"),y(null===this.onlineStateTimer,"onlineStateTimer must be null")):(this.watchStreamFailures++,this.watchStreamFailures>=2&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed 2 times. Most recent error: "+t.toString()),this.setAndBroadcast(nn.Offline)))},t.prototype.set=function(t){this.clearOnlineStateTimer(),this.watchStreamFailures=0,t===nn.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(t)},t.prototype.setAndBroadcast=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},t.prototype.logClientOfflineWarningIfNecessary=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(d(e),this.shouldWarnClientIsOffline=!1):p("OnlineStateTracker",e)},t.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},t}(),Ur=function(){function t(t,e,n,r){this.localStore=t,this.datastore=e,this.pendingWrites=[],this.lastBatchSeen=Cn,this.listenTargets={},this.watchStream=null,this.writeStream=null,this.watchChangeAggregator=null,this.onlineStateTracker=new Fr(n,r)}return t.prototype.start=function(){return this.enableNetwork()},t.prototype.isNetworkEnabled=function(){return y(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},t.prototype.enableNetwork=function(){var t=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(e){return t.writeStream.lastStreamToken=e,t.shouldStartWatchStream()?t.startWatchStream():t.onlineStateTracker.set(nn.Unknown),t.fillWritePipeline()}))},t.prototype.disableNetwork=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Offline),[2]})})},t.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},t.prototype.shutdown=function(){return p("RemoteStore","RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),Promise.resolve()},t.prototype.listen=function(t){y(!T(this.listenTargets,t.targetId),"listen called with duplicate targetId!"),this.listenTargets[t.targetId]=t,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(t)},t.prototype.unlisten=function(t){y(T(this.listenTargets,t),"unlisten called without assigned target ID!"),delete this.listenTargets[t],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(t),k(this.listenTargets)&&this.watchStream.markIdle())},t.prototype.getQueryDataForTarget=function(t){return this.listenTargets[t]||null},t.prototype.getRemoteKeysForTarget=function(t){return this.syncEngine.getRemoteKeysForTarget(t)},t.prototype.sendWatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t.targetId),this.watchStream.watch(t)},t.prototype.sendUnwatchRequest=function(t){this.watchChangeAggregator.recordPendingTargetRequest(t),this.watchStream.unwatch(t)},t.prototype.startWatchStream=function(){y(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchChangeAggregator=new Ie(this),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},t.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!k(this.listenTargets)},t.prototype.cleanUpWatchStreamState=function(){this.watchChangeAggregator=null},t.prototype.onWatchStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return x(this.listenTargets,function(e,n){t.sendWatchRequest(n)}),[2]})})},t.prototype.onWatchStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return y(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(t&&this.onlineStateTracker.handleWatchStreamFailure(t),this.startWatchStream()):this.onlineStateTracker.set(nn.Unknown),[2]})})},t.prototype.onWatchStreamChange=function(t,e){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(n){switch(n.label){case 0:return this.onlineStateTracker.set(nn.Online),t instanceof Ne&&t.state===Te.Removed&&t.cause?[2,this.handleTargetError(t)]:(t instanceof Se?this.watchChangeAggregator.handleDocumentChange(t):t instanceof ke?this.watchChangeAggregator.handleExistenceFilter(t):(y(t instanceof Ne,"Expected watchChange to be an instance of WatchTargetChange"),this.watchChangeAggregator.handleTargetChange(t)),!e.isEqual(Qt.MIN)&&e.compareTo(this.localStore.getLastRemoteSnapshotVersion())>=0?[4,this.raiseWatchSnapshot(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.raiseWatchSnapshot=function(t){var e=this;y(!t.isEqual(Qt.MIN),"Can't raise event for unknown SnapshotVersion");var n=this.watchChangeAggregator.createRemoteEvent(t);return x(n.targetChanges,function(n,r){if(r.resumeToken.length>0){var i=e.listenTargets[n];i&&(e.listenTargets[n]=i.update({resumeToken:r.resumeToken,snapshotVersion:t}))}}),n.targetMismatches.forEach(function(t){var n=e.listenTargets[t];if(n){n.resumeToken=b(),e.sendUnwatchRequest(t);var r=new Xt(n.query,t,Vt.ExistenceFilterMismatch);e.sendWatchRequest(r)}}),this.syncEngine.applyRemoteEvent(n)},t.prototype.handleTargetError=function(t){var e=this;y(!!t.cause,"Handling target error without a cause");var n=t.cause,r=Promise.resolve();return t.targetIds.forEach(function(t){r=r.then(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(e){return T(this.listenTargets,t)?(delete this.listenTargets[t],this.watchChangeAggregator.removeTarget(t),[2,this.syncEngine.rejectListen(t,n)]):[2]})})})}),r},t.prototype.cleanUpWriteStreamState=function(){this.lastBatchSeen=Cn,p("RemoteStore","Stopping write stream with "+this.pendingWrites.length+" pending writes"),this.pendingWrites=[]},t.prototype.fillWritePipeline=function(){return s.__awaiter(this,void 0,void 0,function(){var t=this;return s.__generator(this,function(e){return this.canWriteMutations()?[2,this.localStore.nextMutationBatch(this.lastBatchSeen).then(function(e){if(null!==e)return t.commit(e),t.fillWritePipeline();0===t.pendingWrites.length&&t.writeStream.markIdle()})]:[2]})})},t.prototype.canWriteMutations=function(){return this.isNetworkEnabled()&&this.pendingWrites.length<10},t.prototype.outstandingWrites=function(){return this.pendingWrites.length},t.prototype.commit=function(t){y(this.canWriteMutations(),"commit called when batches can't be written"),this.lastBatchSeen=t.batchId,this.pendingWrites.push(t),this.shouldStartWriteStream()?this.startWriteStream():this.isNetworkEnabled()&&this.writeStream.handshakeComplete&&this.writeStream.writeMutations(t.mutations)},t.prototype.shouldStartWriteStream=function(){return this.isNetworkEnabled()&&!this.writeStream.isStarted()&&this.pendingWrites.length>0},t.prototype.startWriteStream=function(){y(this.shouldStartWriteStream(),"startWriteStream() called when shouldStartWriteStream() is false."),this.writeStream.start({onOpen:this.onWriteStreamOpen.bind(this),onClose:this.onWriteStreamClose.bind(this),onHandshakeComplete:this.onWriteHandshakeComplete.bind(this),onMutationResult:this.onMutationResult.bind(this)})},t.prototype.onWriteStreamOpen=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.writeStream.writeHandshake(),[2]})})},t.prototype.onWriteHandshakeComplete=function(){var t=this;return this.localStore.setLastStreamToken(this.writeStream.lastStreamToken).then(function(){for(var e=0,n=t.pendingWrites;e<n.length;e++){var r=n[e];t.writeStream.writeMutations(r.mutations)}})},t.prototype.onMutationResult=function(t,e){var n=this;y(this.pendingWrites.length>0,"Got result for empty pending writes");var r=this.pendingWrites.shift(),i=Sn.from(r,t,e,this.writeStream.lastStreamToken);return this.syncEngine.applySuccessfulWrite(i).then(function(){return n.fillWritePipeline()})},t.prototype.onWriteStreamClose=function(t){return s.__awaiter(this,void 0,void 0,function(){var e=this;return s.__generator(this,function(n){return y(this.isNetworkEnabled(),"onWriteStreamClose() should only be called when the network is enabled"),t&&this.pendingWrites.length>0?(y(!!t,"We have pending writes, but the write stream closed without an error"),void 0,[2,(this.writeStream.handshakeComplete?this.handleWriteError(t):this.handleHandshakeError(t)).then(function(){e.shouldStartWriteStream()&&e.startWriteStream()})]):[2]})})},t.prototype.handleHandshakeError=function(t){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(e){return ue(t.code)||t.code===_.ABORTED?(p("RemoteStore","RemoteStore error before completed handshake; resetting stream token: ",this.writeStream.lastStreamToken),this.writeStream.lastStreamToken=b(),[2,this.localStore.setLastStreamToken(b())]):[2]})})},t.prototype.handleWriteError=function(t){return s.__awaiter(this,void 0,void 0,function(){var e,n=this;return s.__generator(this,function(r){return ue(t.code)?(e=this.pendingWrites.shift(),this.writeStream.inhibitBackoff(),[2,this.syncEngine.rejectFailedWrite(e.batchId,t).then(function(){return n.fillWritePipeline()})]):[2]})})},t.prototype.createTransaction=function(){return new Lr(this.datastore)},t.prototype.handleUserChange=function(t){if(p("RemoteStore","RemoteStore changing users: uid=",t.uid),this.isNetworkEnabled())return this.disableNetworkInternal(),this.onlineStateTracker.set(nn.Unknown),this.enableNetwork()},t}(),jr=function(){function t(t,e,n,r){this.platform=t,this.databaseInfo=e,this.credentials=n,this.asyncQueue=r}return t.prototype.start=function(t){var e=this,n=new Gn,r=new Gn,i=!1;return this.credentials.setUserChangeListener(function(o){i?e.asyncQueue.enqueue(function(){return e.handleUserChange(o)}):(i=!0,e.initializePersistence(t,r).then(function(){return e.initializeRest(o)}).then(n.resolve,n.reject))}),this.asyncQueue.enqueue(function(){return n.promise}),r.promise},t.prototype.enableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.enableNetwork()})},t.prototype.initializePersistence=function(t,e){var n=this;return t?this.startIndexedDbPersistence().then(e.resolve).catch(function(t){return e.reject(t),n.canFallback(t)?(console.warn("Error enabling offline storage. Falling back to storage disabled: "+t),n.startMemoryPersistence()):Promise.reject(t)}):(e.resolve(),this.startMemoryPersistence())},t.prototype.canFallback=function(t){return t instanceof w?t.code===_.FAILED_PRECONDITION||t.code===_.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||(22===t.code||20===t.code)},t.prototype.startIndexedDbPersistence=function(){this.garbageCollector=new Cr;var t=vr.buildStoragePrefix(this.databaseInfo),e=new He(this.databaseInfo.databaseId,{useProto3Json:!0});return this.persistence=new vr(t,e),this.persistence.start()},t.prototype.startMemoryPersistence=function(){return this.garbageCollector=new pn,this.persistence=new Er,this.persistence.start()},t.prototype.initializeRest=function(t){var e=this;return this.platform.loadConnection(this.databaseInfo).then(function(n){e.localStore=new gr(e.persistence,t,e.garbageCollector);var r=e.platform.newSerializer(e.databaseInfo.databaseId),i=new Mr(e.asyncQueue,n,e.credentials,r);return e.remoteStore=new Ur(e.localStore,i,e.asyncQueue,function(t){e.syncEngine.applyOnlineStateChange(t),e.eventMgr.applyOnlineStateChange(t)}),e.syncEngine=new Tn(e.localStore,e.remoteStore,t),e.remoteStore.syncEngine=e.syncEngine,e.eventMgr=new ln(e.syncEngine),e.localStore.start()}).then(function(){return e.remoteStore.start()})},t.prototype.handleUserChange=function(t){return this.asyncQueue.verifyOperationInProgress(),p("FirestoreClient","User Changed: "+t.uid),this.syncEngine.handleUserChange(t)},t.prototype.disableNetwork=function(){var t=this;return this.asyncQueue.enqueue(function(){return t.remoteStore.disableNetwork()})},t.prototype.shutdown=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.credentials.removeUserChangeListener(),e.remoteStore.shutdown()}).then(function(){return e.persistence.shutdown(t&&t.purgePersistenceWithDataLoss)})},t.prototype.listen=function(t,e,n){var r=this,i=new fn(t,e,n);return this.asyncQueue.enqueue(function(){return r.eventMgr.listen(i)}),i},t.prototype.unlisten=function(t){var e=this;this.asyncQueue.enqueue(function(){return e.eventMgr.unlisten(t)})},t.prototype.getDocumentFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.readDocument(t)}).then(function(t){if(t instanceof lt)return t;throw new w(_.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")})},t.prototype.getDocumentsFromLocalCache=function(t){var e=this;return this.asyncQueue.enqueue(function(){return e.localStore.executeQuery(t)}).then(function(e){var n=ge(),r=new wn(t,n),i=r.computeDocChanges(e);return r.applyChanges(i).snapshot})},t.prototype.write=function(t){var e=this,n=new Gn;return this.asyncQueue.enqueue(function(){return e.syncEngine.write(t,n)}),n.promise},t.prototype.databaseId=function(){return this.databaseInfo.databaseId},t.prototype.transaction=function(t){var e=this;return this.asyncQueue.enqueue(function(){return s.__awaiter(e,void 0,void 0,function(){return s.__generator(this,function(t){return[2]})})}).then(function(){return e.syncEngine.runTransaction(t)})},t}(),Br=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.scheduleEvent(this.observer.next,t)},t.prototype.error=function(t){this.scheduleEvent(this.observer.error,t)},t.prototype.mute=function(){this.muted=!0},t.prototype.scheduleEvent=function(t,e){var n=this;this.muted||setTimeout(function(){n.muted||t(e)},0)},t}(),qr=function(){function t(t){this.uid=t}return t.prototype.isAuthenticated=function(){return null!=this.uid},t.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t.UNAUTHENTICATED=new t(null),t.GOOGLE_CREDENTIALS=new t("google-credentials-uid"),t.FIRST_PARTY=new t("first-party-uid"),t}(),Vr=function(){return function(t,e){this.user=e,this.type="OAuth",this.authHeaders={Authorization:"Bearer "+t}}}(),Wr=function(){function t(){this.userListener=null}return t.prototype.getToken=function(t){return Promise.resolve(null)},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,t(qr.UNAUTHENTICATED)},t.prototype.removeUserChangeListener=function(){y(null!==this.userListener,"removeUserChangeListener() when no listener registered"),this.userListener=null},t}(),Hr=function(){function t(t){var e=this;this.app=t,this.tokenListener=null,this.userCounter=0,this.userListener=null,this.tokenListener=function(){var t=e.getUser();e.currentUser&&t.isEqual(e.currentUser)||(e.currentUser=t,e.userCounter++,e.userListener&&e.userListener(e.currentUser))},this.userCounter=0,this.app.INTERNAL.addAuthTokenListener(this.tokenListener)}return t.prototype.getToken=function(t){var e=this;y(null!=this.tokenListener,"getToken cannot be called after listener removed.");var n=this.userCounter;return this.app.INTERNAL.getToken(t).then(function(t){if(e.userCounter!==n)throw new w(_.ABORTED,"getToken aborted due to uid change.");return t?(y("string"==typeof t.accessToken,"Invalid tokenData returned from getToken():"+t),new Vr(t.accessToken,e.currentUser)):null})},t.prototype.setUserChangeListener=function(t){y(!this.userListener,"Can only call setUserChangeListener() once."),this.userListener=t,this.currentUser&&t(this.currentUser)},t.prototype.removeUserChangeListener=function(){y(null!=this.tokenListener,"removeUserChangeListener() called twice"),y(null!==this.userListener,"removeUserChangeListener() called when no listener registered"),this.app.INTERNAL.removeAuthTokenListener(this.tokenListener),this.tokenListener=null,this.userListener=null},t.prototype.getUser=function(){"function"!=typeof this.app.INTERNAL.getUid&&m("This version of the Firestore SDK requires at least version 3.7.0 of firebase.js.");var t=this.app.INTERNAL.getUid();return y(null===t||"string"==typeof t,"Received invalid UID: "+t),new qr(t)},t}(),zr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,this.type="FirstParty",this.user=qr.FIRST_PARTY,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return Object.defineProperty(t.prototype,"authHeaders",{get:function(){return{Authorization:this.gapi.auth.getAuthHeaderValueForFirstParty([]),"X-Goog-AuthUser":this.sessionIndex}},enumerable:!0,configurable:!0}),t}(),Kr=function(){function t(t,e){this.gapi=t,this.sessionIndex=e,y(this.gapi&&this.gapi.auth&&this.gapi.auth.getAuthHeaderValueForFirstParty,"unexpected gapi interface")}return t.prototype.getToken=function(t){return Promise.resolve(new zr(this.gapi,this.sessionIndex))},t.prototype.setUserChangeListener=function(t){t(qr.FIRST_PARTY)},t.prototype.removeUserChangeListener=function(){},t}();function Gr(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t,["next","error","complete"])}var Qr,Yr=function(){function t(t){this.methodName=t}return t.delete=function(){return Xr.instance},t.serverTimestamp=function(){return $r.instance},t._arrayUnion=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayUnion",arguments,1),new Jr(t)},t._arrayRemove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A("FieldValue.arrayRemove",arguments,1),new Zr(t)},t.prototype.isEqual=function(t){return this===t},t}(),Xr=function(t){function e(){return t.call(this,"FieldValue.delete")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),$r=function(t){function e(){return t.call(this,"FieldValue.serverTimestamp")||this}return s.__extends(e,t),e.instance=new e,e}(Yr),Jr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayUnion")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),Zr=function(t){function e(e){var n=t.call(this,"FieldValue.arrayRemove")||this;return n._elements=e,n}return s.__extends(e,t),e}(Yr),ti=E(Yr,"Use FieldValue.<field>() instead."),ei=/^__.*__$/,ni=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[];return null!==this.fieldMask?n.push(new ie(t,this.data,this.fieldMask,e)):n.push(new re(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}(),ri=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutations=function(t,e){var n=[new ie(t,this.data,this.fieldMask,e)];return this.fieldTransforms.length>0&&n.push(new oe(t,this.fieldTransforms)),n},t}();function ii(t){switch(t){case Qr.Set:case Qr.MergeSet:case Qr.Update:return!0;case Qr.Argument:return!1;default:throw m("Unexpected case for UserDataSource: "+t)}}!function(t){t[t.Set=0]="Set",t[t.Update=1]="Update",t[t.MergeSet=2]="MergeSet",t[t.Argument=3]="Argument"}(Qr||(Qr={}));var oi=function(){function t(t,e,n,r,i,o){this.dataSource=t,this.methodName=e,this.path=n,this.arrayElement=r,void 0===i&&this.validatePath(),this.arrayElement=void 0!==r&&r,this.fieldTransforms=i||[],this.fieldMask=o||[]}return t.prototype.childContextForField=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePathSegment(e),r},t.prototype.childContextForFieldPath=function(e){var n=null==this.path?null:this.path.child(e),r=new t(this.dataSource,this.methodName,n,!1,this.fieldTransforms,this.fieldMask);return r.validatePath(),r},t.prototype.childContextForArray=function(e){return new t(this.dataSource,this.methodName,null,!0,this.fieldTransforms,this.fieldMask)},t.prototype.createError=function(t){var e=null===this.path||this.path.isEmpty()?"":" (found in field "+this.path.toString()+")";return new w(_.INVALID_ARGUMENT,"Function "+this.methodName+"() called with invalid data. "+t+e)},t.prototype.contains=function(t){return void 0!==this.fieldMask.find(function(e){return t.isPrefixOf(e)})||void 0!==this.fieldTransforms.find(function(e){return t.isPrefixOf(e.field)})},t.prototype.validatePath=function(){if(null!==this.path)for(var t=0;t<this.path.length;t++)this.validatePathSegment(this.path.get(t))},t.prototype.validatePathSegment=function(t){if(ii(this.dataSource)&&ei.test(t))throw this.createError("Document fields cannot begin and end with __")},t}(),ai=function(){return function(t,e){this.databaseId=t,this.key=e}}(),si=function(){function t(t){this.preConverter=t}return t.prototype.parseSetData=function(t,e){var n=new oi(Qr.Set,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",n,e);var r=this.parseData(e,n);return new ni(r,null,n.fieldTransforms)},t.prototype.parseMergeData=function(t,e,n){var r=new oi(Qr.MergeSet,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i,o,a=this.parseData(e,r);if(n){for(var s=[],u=0,c=n;u<c.length;u++){var l=c[u],f=void 0;if(l instanceof rn?f=l:"string"==typeof l?f=fi(t,l):m("Expected stringOrFieldPath to be a string or a FieldPath"),!r.contains(f))throw new w(_.INVALID_ARGUMENT,"Field '"+f+"' is specified in your field mask but missing from your input data.");s.push(f)}i=new $t(s),o=r.fieldTransforms.filter(function(t){return i.covers(t.field)})}else i=new $t(r.fieldMask),o=r.fieldTransforms;return new ni(a,i,o)},t.prototype.parseUpdateData=function(t,e){var n=this,r=new oi(Qr.Update,t,ut.EMPTY_PATH);ci("Data must be an object, but it was:",r,e);var i=[],o=It.EMPTY;S(e,function(e,a){var s=fi(t,e),u=r.childContextForFieldPath(s);if((a=n.runPreConverter(a,u))instanceof Xr)i.push(s);else{var c=n.parseData(a,u);null!=c&&(i.push(s),o=o.set(s,c))}});var a=new $t(i);return new ri(o,a,r.fieldTransforms)},t.prototype.parseUpdateVarargs=function(t,e,n,r){var i=new oi(Qr.Update,t,ut.EMPTY_PATH),o=[li(t,e)],a=[n];if(r.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var s=0;s<r.length;s+=2)o.push(li(t,r[s])),a.push(r[s+1]);var u=[],c=It.EMPTY;for(s=0;s<o.length;++s){var l=o[s],f=i.childContextForFieldPath(l),h=this.runPreConverter(a[s],f);if(h instanceof Xr)u.push(l);else{var p=this.parseData(h,f);null!=p&&(u.push(l),c=c.set(l,p))}}var d=new $t(u);return new ri(c,d,i.fieldTransforms)},t.prototype.parseQueryValue=function(t,e){var n=new oi(Qr.Argument,t,ut.EMPTY_PATH),r=this.parseData(e,n);return y(null!=r,"Parsed data should not be null."),y(0===n.fieldTransforms.length,"Field transforms should have been disallowed."),r},t.prototype.runPreConverter=function(t,e){try{return this.preConverter(t)}catch(t){var n=hi(t);throw e.createError(n)}},t.prototype.parseData=function(t,e){if(ui(t=this.runPreConverter(t,e)))return ci("Unsupported field value:",e,t),this.parseObject(t,e);if(t instanceof Yr)return this.parseSentinelFieldValue(t,e),null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.arrayElement)throw e.createError("Nested arrays are not supported");return this.parseArray(t,e)}return this.parseScalarValue(t,e)},t.prototype.parseObject=function(t,e){var n=this,r=new ht(K);return S(t,function(t,i){var o=n.parseData(i,e.childContextForField(t));null!=o&&(r=r.insert(t,o))}),new It(r)},t.prototype.parseArray=function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=o[i],s=this.parseData(a,e.childContextForArray(r));null==s&&(s=gt.INSTANCE),n.push(s),r++}return new Ot(n)},t.prototype.parseSentinelFieldValue=function(t,e){if(!ii(e.dataSource))throw e.createError(t.methodName+"() can only be used with update() and set()");if(null===e.path)throw e.createError(t.methodName+"() is not currently supported inside arrays");if(t instanceof Xr){if(e.dataSource!==Qr.MergeSet)throw e.dataSource===Qr.Update?(y(e.path.length>0,"FieldValue.delete() at the top level should have already been handled."),e.createError("FieldValue.delete() can only appear at the top level of your update data")):e.createError("FieldValue.delete() cannot be used with set() unless you pass {merge:true}");e.fieldMask.push(e.path)}else if(t instanceof $r)e.fieldTransforms.push(new Jt(e.path,Re.instance));else if(t instanceof Jr){var n=this.parseArrayTransformElements(t.methodName,t._elements),r=new De(n);e.fieldTransforms.push(new Jt(e.path,r))}else if(t instanceof Zr){n=this.parseArrayTransformElements(t.methodName,t._elements);var i=new Me(n);e.fieldTransforms.push(new Jt(e.path,i))}else m("Unknown FieldValue type: "+t)},t.prototype.parseScalarValue=function(t,e){if(null===t)return gt.INSTANCE;if("number"==typeof t)return function(t){return Mt(t)&&t<=Dt&&t>=Rt}(t)?new Et(t):new Tt(t);if("boolean"==typeof t)return bt.of(t);if("string"==typeof t)return new Ct(t);if(t instanceof Date)return new xt(et.fromDate(t));if(t instanceof et)return new xt(new et(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)));if(t instanceof tt)return new At(t);if(t instanceof J)return new kt(t);if(t instanceof ai)return new Nt(t.databaseId,t.key);throw e.createError("Unsupported field value: "+j(t))},t.prototype.parseArrayTransformElements=function(t,e){var n=this;return e.map(function(e,r){var i=new oi(Qr.Argument,t,ut.EMPTY_PATH);return n.parseData(e,i.childContextForArray(r))})},t}();function ui(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof et||t instanceof tt||t instanceof J||t instanceof ai||t instanceof Yr)}function ci(t,e,n){if(!ui(n)||!U(n)){var r=j(n);throw"an object"===r?e.createError(t+" a custom object"):e.createError(t+" "+r)}}function li(t,e){if(e instanceof rn)return e._internalPath;if("string"==typeof e)return fi(t,e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. Field path arguments must be of type string or FieldPath.")}function fi(t,e){try{return function(t){if(t.search(on)>=0)throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(rn.bind.apply(rn,[void 0].concat(t.split("."))))}catch(e){throw new w(_.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e)._internalPath}catch(e){var n=hi(e);throw new w(_.INVALID_ARGUMENT,"Function "+t+"() called with invalid data. "+n)}}function hi(t){return t instanceof Error?t.message:t.toString()}var pi="firestore.googleapis.com",di=!0,vi=!1,mi=function(){function t(t){if(void 0===t.host){if(void 0!==t.ssl)throw new w(_.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=pi,this.ssl=di}else R("settings","string","host",t.host),this.host=t.host,D("settings","boolean","ssl",t.ssl),this.ssl=C(t.ssl,di);q("settings",t,["host","ssl","credentials","timestampsInSnapshots"]),D("settings","object","credentials",t.credentials),this.credentials=t.credentials,D("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),this.timestampsInSnapshots=C(t.timestampsInSnapshots,vi)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.timestampsInSnapshots===t.timestampsInSnapshots&&this.credentials===t.credentials},t}(),yi=function(){return function(){}}(),gi=function(){function t(e){var n=this;this._queue=new kr,this.INTERNAL={delete:function(t){return s.__awaiter(n,void 0,void 0,function(){return s.__generator(this,function(e){return this._firestoreClient?[2,this._firestoreClient.shutdown(t)]:[2]})})}};var r=new yi;if("object"==typeof e.options){var i=e;r.firebaseApp=i,r.databaseId=t.databaseIdFromApp(i),r.persistenceKey=r.firebaseApp.name,r.credentials=new Hr(i)}else{var o=e;if(!o.projectId)throw new w(_.INVALID_ARGUMENT,"Must provide projectId");r.databaseId=new it(o.projectId,o.database),r.persistenceKey="[DEFAULT]",r.credentials=new Wr}r.settings=new mi({}),this._config=r,this._databaseId=r.databaseId}return t.prototype.settings=function(t){if(N("Firestore.settings",arguments,1),O("Firestore.settings","object",1,t),T(t,"persistence"))throw new w(_.INVALID_ARGUMENT,'"persistence" is now specified with a separate call to firestore.enablePersistence().');var e=new mi(t);if(this._firestoreClient&&!this._config.settings.isEqual(e))throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this._config.settings=e,void 0!==e.credentials&&(this._config.credentials=function(t){if(!t)return new Wr;switch(t.type){case"gapi":return new Kr(t.client,t.sessionIndex||"0");case"provider":return t.client;default:throw new w(_.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.enableNetwork()},t.prototype.disableNetwork=function(){return this.ensureClientConfigured(),this._firestoreClient.disableNetwork()},t.prototype.enablePersistence=function(){if(this._firestoreClient)throw new w(_.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");return this.configureClient(!0)},t.prototype.ensureClientConfigured=function(){return this._firestoreClient||this.configureClient(!1),this._firestoreClient},t.prototype.configureClient=function(t){var e=this;y(!!this._config.settings.host,"FirestoreSettings.host cannot be falsey"),this._config.settings.timestampsInSnapshots||d("\nThe behavior for Date objects stored in Firestore is going to change\nAND YOUR APP MAY BREAK.\nTo hide this warning and ensure your app does not break, you need to add the\nfollowing code to your app before calling any other Cloud Firestore methods:\n\n const firestore = firebase.firestore();\n const settings = {/* your settings... */ timestampsInSnapshots: true};\n firestore.settings(settings);\n\nWith this change, timestamps stored in Cloud Firestore will be read back as\nFirebase Timestamp objects instead of as system Date objects. So you will also\nneed to update code expecting a Date to instead expect a Timestamp. For example:\n\n // Old:\n const date = snapshot.get('created_at');\n // New:\n const timestamp = snapshot.get('created_at');\n const date = timestamp.toDate();\n\nPlease audit all existing usages of Date when you enable the new behavior. In a\nfuture release, the behavior will change to the new behavior, so if you do not\nfollow these steps, YOUR APP MAY BREAK."),y(!this._firestoreClient,"configureClient() called multiple times");var n=new nt(this._config.databaseId,this._config.persistenceKey,this._config.settings.host,this._config.settings.ssl);return this._dataConverter=new si(function(t){if(t instanceof wi){var n=e._config.databaseId,r=t.firestore._config.databaseId;if(!r.isEqual(n))throw new w(_.INVALID_ARGUMENT,"Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return new ai(e._config.databaseId,t._key)}return t}),this._firestoreClient=new jr(g.getPlatform(),n,this._config.credentials,this._queue),this._firestoreClient.start(t)},t.databaseIdFromApp=function(t){var e=t.options;if(!T(e,"projectId")){if(T(e,"firestoreId"))throw new w(_.INVALID_ARGUMENT,'"firestoreId" is now specified as "projectId" in firebase.initializeApp.');throw new w(_.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.')}if(T(e,"firestoreOptions"))throw new w(_.INVALID_ARGUMENT,'"firestoreOptions" values are now specified with Firestore.settings()');var n=e.projectId;if(!n||"string"!=typeof n)throw new w(_.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new it(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this._config.firebaseApp)throw new w(_.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._config.firebaseApp},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("Firestore.collection",arguments,1),O("Firestore.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection path to collection()");return this.ensureClientConfigured(),new ki(at.fromString(t),this)},t.prototype.doc=function(t){if(N("Firestore.doc",arguments,1),O("Firestore.doc","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty document path to doc()");return this.ensureClientConfigured(),wi.forPath(at.fromString(t),this)},t.prototype.runTransaction=function(t){var e=this;return N("Firestore.runTransaction",arguments,1),O("Firestore.runTransaction","function",1,t),this.ensureClientConfigured().transaction(function(n){return t(new bi(e,n))})},t.prototype.batch=function(){return this.ensureClientConfigured(),new _i(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(f()){case i.DEBUG:return"debug";case i.ERROR:return"error";case i.SILENT:return"silent";default:return m("Unknown log level: "+f())}},enumerable:!0,configurable:!0}),t.setLogLevel=function(t){switch(N("Firestore.setLogLevel",arguments,1),O("Firestore.setLogLevel","string",1,t),t){case"debug":h(i.DEBUG);break;case"error":h(i.ERROR);break;case"silent":h(i.SILENT);break;default:throw new w(_.INVALID_ARGUMENT,"Invalid log level: "+t)}},t.prototype._areTimestampsInSnapshotsEnabled=function(){return this._config.settings.timestampsInSnapshots},t}(),bi=function(){function t(t,e){this._firestore=t,this._transaction=e}return t.prototype.get=function(t){var e=this;N("Transaction.get",arguments,1);var n=Ii("Transaction.get",t,this._firestore);return this._transaction.lookup([n._key]).then(function(t){if(!t||1!==t.length)return m("Mismatch in docs returned from document lookup.");var r=t[0];return new Ti(e._firestore,n._key,r instanceof ft?null:r,!1)})},t.prototype.set=function(t,e,n){I("Transaction.set",arguments,2,3);var r=Ii("Transaction.set",t,this._firestore),i=(n=Ni("Transaction.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("Transaction.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("Transaction.set",e);return this._transaction.set(r._key,i),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof e||e instanceof rn?(A("Transaction.update",arguments,3),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("Transaction.update",e,n,o)):(N("Transaction.update",arguments,2),r=Ii("Transaction.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("Transaction.update",e)),this._transaction.update(r._key,i),this},t.prototype.delete=function(t){N("Transaction.delete",arguments,1);var e=Ii("Transaction.delete",t,this._firestore);return this._transaction.delete(e._key),this},t}(),_i=function(){function t(t){this._firestore=t,this._mutations=[],this._committed=!1}return t.prototype.set=function(t,e,n){I("WriteBatch.set",arguments,2,3),this.verifyNotCommitted();var r=Ii("WriteBatch.set",t,this._firestore),i=(n=Ni("WriteBatch.set",n)).merge||n.mergeFields?this._firestore._dataConverter.parseMergeData("WriteBatch.set",e,n.mergeFields):this._firestore._dataConverter.parseSetData("WriteBatch.set",e);return this._mutations=this._mutations.concat(i.toMutations(r._key,ee.NONE)),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.verifyNotCommitted(),"string"==typeof e||e instanceof rn?(A("WriteBatch.update",arguments,3),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateVarargs("WriteBatch.update",e,n,o)):(N("WriteBatch.update",arguments,2),r=Ii("WriteBatch.update",t,this._firestore),i=this._firestore._dataConverter.parseUpdateData("WriteBatch.update",e)),this._mutations=this._mutations.concat(i.toMutations(r._key,ee.exists(!0))),this},t.prototype.delete=function(t){N("WriteBatch.delete",arguments,1),this.verifyNotCommitted();var e=Ii("WriteBatch.delete",t,this._firestore);return this._mutations=this._mutations.concat(new ae(e._key,ee.NONE)),this},t.prototype.commit=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(t){return this.verifyNotCommitted(),this._committed=!0,this._mutations.length>0?[2,this._firestore.ensureClientConfigured().write(this._mutations)]:[2]})})},t.prototype.verifyNotCommitted=function(){if(this._committed)throw new w(_.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),wi=function(){function t(t,e){this._key=t,this.firestore=e,this._firestoreClient=this.firestore.ensureClientConfigured()}return t.forPath=function(e,n){if(e.length%2!=0)throw new w(_.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e.canonicalString()+" has "+e.length);return new t(new ct(e),n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new ki(this._key.path.popLast(),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.collection=function(t){if(N("DocumentReference.collection",arguments,1),O("DocumentReference.collection","string",1,t),!t)throw new w(_.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=at.fromString(t);return new ki(this._key.path.child(e),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentReference",1,e);return this.firestore===e.firestore&&this._key.isEqual(e._key)},t.prototype.set=function(t,e){I("DocumentReference.set",arguments,1,2);var n=(e=Ni("DocumentReference.set",e)).merge||e.mergeFields?this.firestore._dataConverter.parseMergeData("DocumentReference.set",t,e.mergeFields):this.firestore._dataConverter.parseSetData("DocumentReference.set",t);return this._firestoreClient.write(n.toMutations(this._key,ee.NONE))},t.prototype.update=function(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof rn?(A("DocumentReference.update",arguments,2),n=this.firestore._dataConverter.parseUpdateVarargs("DocumentReference.update",t,e,r)):(N("DocumentReference.update",arguments,1),n=this.firestore._dataConverter.parseUpdateData("DocumentReference.update",t)),this._firestoreClient.write(n.toMutations(this._key,ee.exists(!0)))},t.prototype.delete=function(){return N("DocumentReference.delete",arguments,0),this._firestoreClient.write([new ae(this._key,ee.NONE)])},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("DocumentReference.onSnapshot",arguments,1,4);var n,r={includeMetadataChanges:!1},i=0;"object"!=typeof t[i]||Gr(t[i])||(q("DocumentReference.onSnapshot",r=t[i],["includeMetadataChanges"]),D("DocumentReference.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++);var o={includeMetadataChanges:r.includeMetadataChanges};return Gr(t[i])?n=t[i]:(O("DocumentReference.onSnapshot","function",i,t[i]),P("DocumentReference.onSnapshot","function",i+1,t[i+1]),P("DocumentReference.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(o,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){if(e.next){y(t.docs.size<=1,"Too many documents returned on a document query");var r=t.docs.get(n._key);e.next(new Ti(n.firestore,n._key,r,t.fromCache))}},error:r}),o=this._firestoreClient.listen(Ft.atPath(this._key.path),i,t);return function(){i.mute(),n._firestoreClient.unlisten(o)}},t.prototype.get=function(t){var e=this;return q("DocumentReference.get",t,["source"]),t&&L("DocumentReference.get",0,"source",t.source,["default","server","cache"]),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentFromLocalCache(e._key).then(function(t){n(new Ti(e.firestore,e._key,t,!0))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),!i.exists&&i.metadata.fromCache?e(new w(_.UNAVAILABLE,"Failed to get document because the client is offline.")):i.exists&&i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):t(i)},error:e})},t}(),Ei=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Ti=function(){function t(t,e,n,r){this._firestore=t,this._key=e,this._document=n,this._fromCache=r}return t.prototype.data=function(t){return I("DocumentSnapshot.data",arguments,0,1),t=Ai("DocumentSnapshot.data",t),this._document?this.convertObject(this._document.data,mt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},t.prototype.get=function(t,e){if(I("DocumentSnapshot.get",arguments,1,2),e=Ai("DocumentSnapshot.get",e),this._document){var n=this._document.data.field(li("DocumentSnapshot.get",t));if(void 0!==n)return this.convertValue(n,mt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new wi(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ei(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","DocumentSnapshot",1,e);return this._firestore===e._firestore&&this._fromCache===e._fromCache&&this._key.isEqual(e._key)&&(null===this._document?null===e._document:this._document.isEqual(e._document))},t.prototype.convertObject=function(t,e){var n=this,r={};return t.forEach(function(t,i){r[t]=n.convertValue(i,e)}),r},t.prototype.convertValue=function(t,e){if(t instanceof It)return this.convertObject(t,e);if(t instanceof Ot)return this.convertArray(t,e);if(t instanceof Nt){var n=t.value(e),r=this._firestore.ensureClientConfigured().databaseId();return t.databaseId.isEqual(r)||d("Document "+this._key.path+" contains a document reference within a different database ("+t.databaseId.projectId+"/"+t.databaseId.database+") which is not supported. It will be treated as a reference in the current database ("+r.projectId+"/"+r.database+") instead."),new wi(n,this._firestore)}return t.value(e)},t.prototype.convertArray=function(t,e){var n=this;return t.internalValue.map(function(t){return n.convertValue(t,e)})},t}(),Ci=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return s.__extends(e,t),e.prototype.data=function(e){var n=t.prototype.data.call(this,e);return y("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},e}(Ti),xi=function(){function t(t,e){this._query=t,this.firestore=e}return t.prototype.where=function(e,n,r){var i;N("Query.where",arguments,3),O("Query.where","string",2,n),B("Query.where",3,r);var o=li("Query.where",e),a=Ut.fromString(n);if(o.isKeyField()){if(a===Ut.ARRAY_CONTAINS)throw new w(_.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof r){if(-1!==r.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===r)throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var s=this._query.path.child(new at([r]));y(s.length%2==0,"Path should be a document key"),i=new Nt(this.firestore._databaseId,new ct(s))}else{if(!(r instanceof wi))throw new w(_.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+j(r)+".");var u=r;i=new Nt(this.firestore._databaseId,u._key)}}else i=this.firestore._dataConverter.parseQueryValue("Query.where",r);var c=function(t,e,n){if(n.isEqual(gt.INSTANCE)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new Bt(t)}if(n.isEqual(Tt.NAN)){if(e!==Ut.EQUAL)throw new w(_.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new qt(t)}return new jt(t,e,n)}(o,a,i);return this.validateNewFilter(c),new t(this._query.addFilter(c),this.firestore)},t.prototype.orderBy=function(e,n){var r;if(I("Query.orderBy",arguments,1,2),P("Query.orderBy","string",2,n),void 0===n||"asc"===n)r=Wt.ASCENDING;else{if("desc"!==n)throw new w(_.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r=Wt.DESCENDING}if(null!==this._query.startAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new w(_.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var i=li("Query.orderBy",e),o=new zt(i,r);return this.validateNewOrderBy(o),new t(this._query.addOrderBy(o),this.firestore)},t.prototype.limit=function(e){if(N("Query.limit",arguments,1),O("Query.limit","number",1,e),e<=0)throw new w(_.INVALID_ARGUMENT,"Invalid Query. Query limit ("+e+") is invalid. Limit must be positive.");return new t(this._query.withLimit(e),this.firestore)},t.prototype.startAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAt",arguments,1);var i=this.boundFromDocOrFields("Query.startAt",e,n,!0);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.startAfter=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.startAfter",arguments,1);var i=this.boundFromDocOrFields("Query.startAfter",e,n,!1);return new t(this._query.withStartAt(i),this.firestore)},t.prototype.endBefore=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endBefore",arguments,1);var i=this.boundFromDocOrFields("Query.endBefore",e,n,!0);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.endAt=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];A("Query.endAt",arguments,1);var i=this.boundFromDocOrFields("Query.endAt",e,n,!1);return new t(this._query.withEndAt(i),this.firestore)},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","Query",1,e);return this.firestore===e.firestore&&this._query.isEqual(e._query)},t.prototype.boundFromDocOrFields=function(t,e,n,r){if(B(t,1,e),e instanceof Ti){if(n.length>0)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"().");var i=e;if(!i.exists)throw new w(_.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+t+"().");return this.boundFromDocument(t,i._document,r)}var o=[e].concat(n);return this.boundFromFields(t,o,r)},t.prototype.boundFromDocument=function(t,e,n){for(var r=[],i=0,o=this._query.orderBy;i<o.length;i++){var a=o[i];if(a.field.isKeyField())r.push(new Nt(this.firestore._databaseId,e.key));else{var s=e.field(a.field);if(void 0===s){var u=a.field.canonicalString();throw new w(_.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+u+"' (used as the orderBy) does not exist.")}r.push(s)}}return new Ht(r,n)},t.prototype.boundFromFields=function(t,e,n){var r=this._query.explicitOrderBy;if(e.length>r.length)throw new w(_.INVALID_ARGUMENT,"Too many arguments provided to "+t+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var i=[],o=0;o<e.length;o++){var a=e[o];if(r[o].field.isKeyField()){if("string"!=typeof a)throw new w(_.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+t+"(), but got a "+typeof a);if(-1!==a.indexOf("/"))throw new w(_.INVALID_ARGUMENT,"Invalid query. Document ID '"+a+"' contains a slash in "+t+"()");var s=new ct(this._query.path.child(a));i.push(new Nt(this.firestore._databaseId,s))}else{var u=this.firestore._dataConverter.parseQueryValue(t,a);i.push(u)}}return new Ht(i,n)},t.prototype.onSnapshot=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];I("Query.onSnapshot",arguments,1,4);var n,r={},i=0;return"object"!=typeof t[i]||Gr(t[i])||(q("Query.onSnapshot",r=t[i],["includeMetadataChanges"]),D("Query.onSnapshot","boolean","includeMetadataChanges",r.includeMetadataChanges),i++),Gr(t[i])?n=t[i]:(O("Query.onSnapshot","function",i,t[i]),P("Query.onSnapshot","function",i+1,t[i+1]),P("Query.onSnapshot","function",i+2,t[i+2]),n={next:t[i],error:t[i+1],complete:t[i+2]}),this.onSnapshotInternal(r,n)},t.prototype.onSnapshotInternal=function(t,e){var n=this,r=function(t){console.error("Uncaught Error in onSnapshot:",t)};e.error&&(r=e.error.bind(e));var i=new Br({next:function(t){e.next&&e.next(new Si(n.firestore,n._query,t))},error:r}),o=this.firestore.ensureClientConfigured(),a=o.listen(this._query,i,t);return function(){i.mute(),o.unlisten(a)}},t.prototype.get=function(t){var e=this;return I("Query.get",arguments,0,1),new Promise(function(n,r){t&&"cache"===t.source?e.firestore.ensureClientConfigured().getDocumentsFromLocalCache(e._query).then(function(t){n(new Si(e.firestore,e._query,t))},r):e.getViaSnapshotListener(n,r,t)})},t.prototype.getViaSnapshotListener=function(t,e,n){var r=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(i){r(),i.metadata.fromCache&&n&&"server"===n.source?e(new w(_.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):t(i)},error:e})},t.prototype.validateNewFilter=function(t){if(t instanceof jt)if(t.isInequality()){var e=this._query.getInequalityFilterField();if(null!==e&&!e.isEqual(t.field))throw new w(_.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+e.toString()+"' and '"+t.field.toString()+"'");var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(t.field,n)}else if(t.op===Ut.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new w(_.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},t.prototype.validateNewOrderBy=function(t){if(null===this._query.getFirstOrderByField()){var e=this._query.getInequalityFilterField();null!==e&&this.validateOrderByAndInequalityMatch(e,t.field)}},t.prototype.validateOrderByAndInequalityMatch=function(t,e){if(!e.isEqual(t))throw new w(_.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+e.toString()+"' instead.")},t}(),Si=function(){function t(t,e,n){this._firestore=t,this._originalQuery=e,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new Ei(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach(function(e){return t.push(e)}),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;I("QuerySnapshot.forEach",arguments,1,2),O("QuerySnapshot.forEach","function",1,t),this._snapshot.docs.forEach(function(r){t.call(e,n.convertToDocumentImpl(r))})},Object.defineProperty(t.prototype,"query",{get:function(){return new xi(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),t.prototype.docChanges=function(t){q("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),t&&D("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges);var e=t&&t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new w(_.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e,n){if(n.oldDocs.isEmpty()){var r,i=0;return n.docChanges.map(function(e){var o=new Ci(t,e.doc.key,e.doc,n.fromCache);return y(e.type===be.Added,"Invalid event type for first snapshot"),y(!r||n.query.docComparator(r,e.doc)<0,"Got added events in wrong order"),r=e.doc,{type:"added",doc:o,oldIndex:-1,newIndex:i++}})}var o=n.oldDocs;return n.docChanges.filter(function(t){return e||t.type!==be.Metadata}).map(function(e){var r=new Ci(t,e.doc.key,e.doc,n.fromCache),i=-1,a=-1;return e.type!==be.Added&&(y((i=o.indexOf(e.doc.key))>=0,"Index for document not found"),o=o.delete(e.doc.key)),e.type!==be.Removed&&(o=o.add(e.doc),a=o.indexOf(e.doc.key)),{type:function(t){switch(t){case be.Added:return"added";case be.Modified:case be.Metadata:return"modified";case be.Removed:return"removed";default:return m("Unknown change type: "+t)}}(e.type),doc:r,oldIndex:i,newIndex:a}})}(this._firestore,e,this._snapshot),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges},t.prototype.isEqual=function(e){if(!(e instanceof t))throw V("isEqual","QuerySnapshot",1,e);return this._firestore===e._firestore&&this._originalQuery.isEqual(e._originalQuery)&&this._snapshot.isEqual(e._snapshot)},t.prototype.convertToDocumentImpl=function(t){return new Ci(this._firestore,t.key,t,this.metadata.fromCache)},t}();["length","forEach","map"].concat("undefined"!=typeof Symbol?[Symbol.iterator]:[]).forEach(function(t){try{Object.defineProperty(Si.prototype.docChanges,t,{get:function(){return function(){throw new w(_.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a method, so usages like "querySnapshot.docChanges" should become "querySnapshot.docChanges()"')}()}})}catch(t){}});var ki=function(t){function e(e,n){var r=t.call(this,Ft.atPath(e),n)||this;if(e.length%2!=1)throw new w(_.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.canonicalString()+" has "+e.length);return r}return s.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._query.path.popLast();return t.isEmpty()?null:new wi(new ct(t),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),e.prototype.doc=function(t){if(I("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=z.newId()),O("CollectionReference.doc","string",1,t),""===t)throw new w(_.INVALID_ARGUMENT,"Document path must be a non-empty string");var e=at.fromString(t);return wi.forPath(this._query.path.child(e),this.firestore)},e.prototype.add=function(t){N("CollectionReference.add",arguments,1),O("CollectionReference.add","object",1,t);var e=this.doc();return e.set(t).then(function(){return e})},e}(xi);function Ni(t,e){if(void 0===e)return{merge:!1};if(q(t,e,["merge","mergeFields"]),D(t,"boolean","merge",e.merge),M(t,"mergeFields","a string or a FieldPath",e.mergeFields,function(t){return"string"==typeof t||t instanceof rn}),void 0!==e.mergeFields&&void 0!==e.merge)throw new w(_.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Ai(t,e){return void 0===e?{}:(q(t,e,["serverTimestamps"]),L(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function Ii(t,e,n){if(e instanceof wi){if(e.firestore!==n)throw new w(_.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw V(t,"DocumentReference",1,e)}var Oi=E(gi,"Use firebase.firestore() instead."),Pi=E(bi,"Use firebase.firestore().runTransaction() instead."),Ri=E(_i,"Use firebase.firestore().batch() instead."),Di=E(wi,"Use firebase.firestore().doc() instead."),Mi=E(Ti),Li=E(Ci),Fi=E(xi),Ui=E(Si),ji=E(ki,"Use firebase.firestore().collection() instead."),Bi={Firestore:Oi,GeoPoint:tt,Timestamp:et,Blob:Z,Transaction:Pi,WriteBatch:Ri,DocumentReference:Di,DocumentSnapshot:Mi,Query:Fi,QueryDocumentSnapshot:Li,QuerySnapshot:Ui,CollectionReference:ji,FieldPath:rn,FieldValue:ti,setLogLevel:gi.setLogLevel};function qi(t){t.INTERNAL.registerService("firestore",function(t){return new gi(t)},function(t){y(t&&"object"==typeof t,"shallowCopy() expects object parameter.");var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(Bi))}function Vi(t){qi(t)}Vi(o),e.registerFirestore=Vi}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

                                                                                                                                                          • */

var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i,o,a=n(82),s=n(198),u=n(322),c=(i=n(14))&&"object"==typeof i&&"default"in i?i.default:i,l=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),a.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:a.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),f=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return a.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),h=function(t){try{if("undefined"!=typeof window&&void 0!==window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new l(e)}}catch(t){}return new f},p=h("localStorage"),d=h("sessionStorage"),v=new s.Logger("@firebase/database"),m=(o=1,function(){return o++}),y=function(t){var e=a.stringToByteArray(t),n=new a.Sha1;n.update(e);var r=n.digest();return a.base64.encodeByteArray(r)},g=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=g.apply(null,t[r]):"object"==typeof t[r]?n+=a.stringify(t[r]):n+=t[r],n+=" ";return n},b=null,_=!0,w=function(t,e){a.assert(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(v.logLevel=s.LogLevel.VERBOSE,b=v.log.bind(v),e&&d.set("logging_enabled",!0)):"function"==typeof t?b=t:(b=null,d.remove("logging_enabled"))},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===_&&(_=!1,null===b&&!0===d.get("logging_enabled")&&w(!0)),b){var n=g.apply(null,t);b(n)}},T=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];E.apply(void 0,[t].concat(e))}},C=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+g.apply(void 0,t);v.error(n)},x=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+g.apply(void 0,t);throw v.error(n),new Error(n)},S=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+g.apply(void 0,t);v.warn(n)},k=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},N="[MIN_NAME]",A="[MAX_NAME]",I=function(t,e){if(t===e)return 0;if(t===N||e===A)return-1;if(e===N||t===A)return 1;var n=U(t),r=U(e);return null!==n?null!==r?n-r==0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},O=function(t,e){return t===e?0:t<e?-1:1},P=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+a.stringify(e))},R=function(t){if("object"!=typeof t||null===t)return a.stringify(t);var e=[];for(var n in t)e.push(n);e.sort();for(var r="{",i=0;i<e.length;i++)0!==i&&(r+=","),r+=a.stringify(e[i]),r+=":",r+=R(t[e[i]]);return r+="}"},D=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},M=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else a.forEach(t,function(t,n){return e(n,t)})},L=function(t){a.assert(!k(t),"Invalid JSON number");var e,n,r,i,o,s,u;for(0===t?(n=0,r=0,e=1/t==-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074)))),s=[],o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(e?1:0),s.reverse(),u=s.join("");var c="";for(o=0;o<64;o+=8){var l=parseInt(u.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),c+=l}return c.toLowerCase()},F=new RegExp("^-?\\d{1,10}$"),U=function(t){if(F.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},j=function(t){try{t()}catch(t){setTimeout(function(){var e=t.stack||"";throw S("Exception was thrown by user callback.",e),t},Math.floor(0))}},B=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},q=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n},V=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=I(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),W=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=a.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=a.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=a.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),H="long_polling",z=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=p.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&p.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(a.assert("string"==typeof t,"typeof type must == string"),a.assert("object"==typeof e,"typeof params must == object"),"websocket"===t)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==H)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return a.forEach(e,function(t,e){r.push(t+"="+e)}),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}();var K,G,Q,Y,X,$=function(t){var e=J(t),n=e.subdomain;"firebase"===e.domain&&x(e.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!=n||"localhost"===e.domain||x("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),e.secure||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new z(e.host,e.secure,n,r),path:new V(e.pathString)}},J=function(t){var e="",n="",r="",i="",o=!0,a="https",s=443;if("string"==typeof t){var u=t.indexOf("//");u>=0&&(a=t.substring(0,u-1),t=t.substring(u+2));var c=t.indexOf("/");-1===c&&(c=t.length);var l=t.indexOf("?");-1===l&&(l=t.length),e=t.substring(0,Math.min(c,l)),c<l&&(i=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(t){}e+="/"+i}return e}(t.substring(c,l)));var f=function(t){var e={};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=t.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var o=i.split("=");2===o.length?e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]):S("Invalid query segment '"+i+"' in query '"+t+"'")}}return e}(t.substring(Math.min(t.length,l)));(u=e.indexOf(":"))>=0?(o="https"===a||"wss"===a,s=parseInt(e.substring(u+1),10)):u=t.length;var h=e.split(".");3===h.length?(n=h[1],r=h[0].toLowerCase()):2===h.length?n=h[0]:"localhost"===h[0].slice(0,u).toLowerCase()&&(n="localhost"),""===r&&"ns"in f&&(r=f.ns)}return{host:e,port:s,domain:n,subdomain:r,secure:o,scheme:a,pathString:i}},Z=/[\[\].#$\/\u0000-\u001F\u007F]/,tt=/[\[\].#$\u0000-\u001F\u007F]/,et=function(t){return"string"==typeof t&&0!==t.length&&!Z.test(t)},nt=function(t){return"string"==typeof t&&0!==t.length&&!tt.test(t)},rt=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!k(t)||t&&"object"==typeof t&&a.contains(t,".sv")},it=function(t,e,n,r,i){i&&void 0===n||ot(a.errorPrefix(t,e,i),n,r)},ot=function(t,e,n){var r=n instanceof V?new W(n,t):n;if(void 0===e)throw new Error(t+"contains undefined "+r.toErrorString());if("function"==typeof e)throw new Error(t+"contains a function "+r.toErrorString()+" with contents = "+e.toString());if(k(e))throw new Error(t+"contains "+e.toString()+" "+r.toErrorString());if("string"==typeof e&&e.length>10485760/3&&a.stringLength(e)>10485760)throw new Error(t+"contains a string greater than 10485760 utf8 bytes "+r.toErrorString()+" ('"+e.substring(0,50)+"...')");if(e&&"object"==typeof e){var i=!1,o=!1;if(a.forEach(e,function(e,n){if(".value"===e)i=!0;else if(".priority"!==e&&".sv"!==e&&(o=!0,!et(e)))throw new Error(t+" contains an invalid key ("+e+") "+r.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(e),ot(t,n,r),r.pop()}),i&&o)throw new Error(t+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},at=function(t,e,n,r,i){if(!i||void 0!==n){var o=a.errorPrefix(t,e,i);if(!n||"object"!=typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var s=[];a.forEach(n,function(t,e){var n=new V(t);if(ot(o,e,r.child(n)),".priority"===n.getBack()&&!rt(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)}),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!et(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(V.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(o,s)}},st=function(t,e,n,r){if(!r||void 0!==n){if(k(n))throw new Error(a.errorPrefix(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!rt(n))throw new Error(a.errorPrefix(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},ut=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(a.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},ct=function(t,e,n,r){if(!(r&&void 0===n||et(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},lt=function(t,e,n,r){if(!(r&&void 0===n||nt(n)))throw new Error(a.errorPrefix(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ft=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},ht=function(t,e,n){var r=n.path.toString();if("string"!=typeof n.repoInfo.host||0===n.repoInfo.host.length||!et(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),nt(t)}(r))throw new Error(a.errorPrefix(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},pt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){a.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),a.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){a.validateArgCount("OnDisconnect.remove",0,1,arguments.length),ft("OnDisconnect.remove",this.path_),a.validateCallback("OnDisconnect.remove",1,t,!0);var e=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){a.validateArgCount("OnDisconnect.set",1,2,arguments.length),ft("OnDisconnect.set",this.path_),it("OnDisconnect.set",1,t,this.path_,!1),a.validateCallback("OnDisconnect.set",2,e,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){a.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),ft("OnDisconnect.setWithPriority",this.path_),it("OnDisconnect.setWithPriority",1,t,this.path_,!1),st("OnDisconnect.setWithPriority",2,e,!1),a.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(a.validateArgCount("OnDisconnect.update",1,2,arguments.length),ft("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("OnDisconnect.update",1,t,this.path_,!1),a.validateCallback("OnDisconnect.update",2,e,!0);var i=new a.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),dt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return a.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),vt=(K="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",G=0,Q=[],function(t){var e,n=t===G;G=t;var r=new Array(8);for(e=7;e>=0;e--)r[e]=K.charAt(t%64),t=Math.floor(t/64);a.assert(0===t,"Cannot push at time == 0");var i=r.join("");if(n){for(e=11;e>=0&&63===Q[e];e--)Q[e]=0;Q[e]++}else for(e=0;e<12;e++)Q[e]=Math.floor(64*Math.random());for(e=0;e<12;e++)i+=K.charAt(Q[e]);return a.assert(20===i.length,"nextPushId: Length should be 20."),i}),mt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),yt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new mt(N,t),r=new mt(N,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return mt.MIN},t}(),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return Y},set:function(t){Y=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return I(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw a.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,Y)},e.prototype.makePost=function(t,e){return a.assert("string"==typeof t,"KeyIndex indexValue must always be a string."),new mt(t,Y)},e.prototype.toString=function(){return".key"},e}(yt),bt=new gt;var _t,wt,Et,Tt=function(t){return"number"==typeof t?"number:"+L(t):"string:"+t},Ct=function(t){if(t.isLeafNode()){var e=t.val();a.assert("string"==typeof e||"number"==typeof e||"object"==typeof e&&a.contains(e,".sv"),"Priority must be a string or number.")}else a.assert(t===X||t.isEmpty(),"priority of unexpected type.");a.assert(t===X||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},xt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,a.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Ct(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return _t},set:function(t){_t=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(a.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+Tt(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?L(this.value_):this.value_,this.lazyHash_=y(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(a.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return a.assert(i>=0,"Unknown leaf type: "+n),a.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var St,kt,Nt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return new mt(A,new xt("[PRIORITY-POST]",Et))},e.prototype.makePost=function(t,e){var n=wt(t);return new mt(e,new xt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(yt)),At=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),It=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Pt.EMPTY_NODE,this.right=null!=o?o:Pt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return(i=(r=n(t,(i=this).key))<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return Pt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return Pt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){var t;if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Ot=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new It(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),Pt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,It.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new At(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new At(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new At(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Ot,t}(),Rt=Math.log(2),Dt=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/Rt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Mt=function(t,e,n,r){t.sort(e);var i=function(e,r){var o,a,s=r-e;if(0==s)return null;if(1==s)return o=t[e],a=n?n(o):o,new It(a,o.node,It.BLACK,null,null);var u=parseInt(s/2,10)+e,c=i(e,u),l=i(u+1,r);return o=t[u],a=n?n(o):o,new It(a,o.node,It.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new It(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,It.BLACK):(s(f,It.BLACK),s(f,It.RED))}return o}(new Dt(t.length));return new Pt(r||e,o)},Lt={},Ft=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return a.assert(Lt&&Nt,"ChildrenNode.ts has not been loaded"),St=St||new t({".priority":Lt},{".priority":Nt})},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=a.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e===Lt?null:e},t.prototype.hasIndex=function(t){return a.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){a.assert(e!==bt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],o=!1,s=n.getIterator(mt.Wrap),u=s.getNext();u;)o=o||e.isDefinedOn(u.node),i.push(u),u=s.getNext();r=o?Mt(i,e.getCompare()):Lt;var c=e.toString(),l=a.clone(this.indexSet_);l[c]=e;var f=a.clone(this.indexes_);return f[c]=r,new t(f,l)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(a.map(this.indexes_,function(t,i){var o=a.safeGet(r.indexSet_,i);if(a.assert(o,"Missing index implementation for "+i),t===Lt){if(o.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(mt.Wrap),c=u.getNext();c;)c.name!=e.name&&s.push(c),c=u.getNext();return s.push(e),Mt(s,o.getCompare())}return Lt}var l=n.get(e.name),f=t;return l&&(f=f.remove(new mt(e.name,l))),f.insert(e,e.node)}),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(a.map(this.indexes_,function(t){if(t===Lt)return t;var r=n.get(e.name);return r?t.remove(new mt(e.name,r)):t}),this.indexSet_)},t}();function Ut(t,e){return I(t.name,e.name)}function jt(t,e){return I(t,e)}var Bt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Ct(this.priorityNode_),this.children_.isEmpty()&&a.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return kt||(kt=new t(new Pt(jt),null,Ft.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||kt},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?kt:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(a.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new mt(e,n),i=void 0,o=void 0;return n.isEmpty()?(i=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_)),new t(i,i.isEmpty()?kt:this.priorityNode_,o)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;a.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Nt,function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+Tt(this.getPriority().val())+":"),this.forEachChild(Nt,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":y(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new mt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new mt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,mt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===qt?-1:0},t.prototype.withIndex=function(e){if(e===bt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===bt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Nt),r=e.getIterator(Nt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===bt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),qt=new(function(t){function e(){return t.call(this,new Pt(jt),Bt.EMPTY_NODE,Ft.Default)||this}return u.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Bt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Bt));Object.defineProperties(mt,{MIN:{value:new mt(N,Bt.EMPTY_NODE)},MAX:{value:new mt(A,qt)}}),gt.__EMPTY_NODE=Bt.EMPTY_NODE,xt.__childrenNodeConstructor=Bt,X=qt,function(t){Et=t}(qt);var Vt=!0;function Wt(t,e){if(void 0===e&&(e=null),null===t)return Bt.EMPTY_NODE;if("object"==typeof t&&".priority"in t&&(e=t[".priority"]),a.assert(null===e||"string"==typeof e||"number"==typeof e||"object"==typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t)return new xt(t,Wt(e));if(t instanceof Array||!Vt){var n=Bt.EMPTY_NODE,r=t;return a.forEach(r,function(t,e){if(a.contains(r,t)&&"."!==t.substring(0,1)){var i=Wt(e);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}}),n.updatePriority(Wt(e))}var i=[],o=!1,s=t;if(a.forEach(s,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=Wt(s[t]);n.isEmpty()||(o=o||!n.getPriority().isEmpty(),i.push(new mt(t,n)))}}),0==i.length)return Bt.EMPTY_NODE;var u=Mt(i,Ut,function(t){return t.name},jt);if(o){var c=Mt(i,Nt.getCompare());return new Bt(u,Wt(e),new Ft({".priority":c},{".priority":Nt}))}return new Bt(u,Wt(e),Ft.Default)}!function(t){wt=t}(Wt);var Ht,zt,Kt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?I(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return mt.MIN},e.prototype.maxPost=function(){return mt.MAX},e.prototype.makePost=function(t,e){var n=Wt(t);return new mt(e,n)},e.prototype.toString=function(){return".value"},e}(yt)),Gt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,a.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return u.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?I(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Wt(t),r=Bt.EMPTY_NODE.updateChild(this.indexPath_,n);return new mt(e,r)},e.prototype.maxPost=function(){var t=Bt.EMPTY_NODE.updateChild(this.indexPath_,qt);return new mt(A,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(yt),Qt=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return a.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return a.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return a.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return a.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){a.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),lt("DataSnapshot.child",1,e,!1);var n=new V(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Nt)},t.prototype.hasChild=function(t){a.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),lt("DataSnapshot.hasChild",1,t,!1);var e=new V(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return a.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;return a.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),a.validateCallback("DataSnapshot.forEach",1,e,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return e(new t(i,n.ref_.child(r),Nt))})},t.prototype.hasChildren=function(){return a.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return a.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return a.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),Yt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+a.stringify(this.snapshot.exportVal())},t}(),Xt=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),$t=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Yt("value",this,new Qt(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),Jt=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,a.contains(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Xt(this,t,e):null},t.prototype.createEvent=function(t,e){a.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Yt(t.type,this,new Qt(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var n=a.getCount(e.callbacks_);if(n===a.getCount(this.callbacks_)){if(1===n){var r=a.getAnyKey(e.callbacks_),i=a.getAnyKey(this.callbacks_);return!(i!==r||e.callbacks_[r]&&this.callbacks_[i]&&e.callbacks_[r]!==this.callbacks_[i])}return a.every(this.callbacks_,function(t,n){return e.callbacks_[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),Zt=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(Ht,"Reference.ts has not been loaded"),Ht},set:function(t){Ht=t},enumerable:!0,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===bt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=N)throw new Error(r);if("string"!=typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!=A)throw new Error(r);if("string"!=typeof n)throw new Error(i)}}else if(t.getIndex()===Nt){if(null!=e&&!rt(e)||null!=n&&!rt(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(a.assert(t.getIndex()instanceof Gt||t.getIndex()===Kt,"unknown index type."),null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return a.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){a.validateArgCount("Query.on",2,4,arguments.length),ut("Query.on",1,e,!1),a.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[e]=n,this.onChildEvent(s,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new $t(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new Jt(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){a.validateArgCount("Query.off",0,3,arguments.length),ut("Query.off",1,t,!0),a.validateCallback("Query.off",2,e,!0),a.validateContextObject("Query.off",3,n,!0);var r=null,i=null;"value"===t?r=new $t(e||null,null,n||null):t&&(e&&((i={})[t]=e),r=new Jt(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;a.validateArgCount("Query.once",1,4,arguments.length),ut("Query.once",1,e,!1),a.validateCallback("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new a.Deferred;c.promise.catch(function(){});var l=function(t){u&&(u=!1,o.off(e,l),n&&n.bind(s.context)(t),c.resolve(t))};return this.on(e,l,function(t){o.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)}),c.promise},t.prototype.limitToFirst=function(e){if(a.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(a.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(a.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');lt("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new V(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new Gt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){a.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(bt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){a.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(Nt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){a.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(Kt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.startAt",0,2,arguments.length),it("Query.startAt",1,e,this.path,!0),ct("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),a.validateArgCount("Query.endAt",0,2,arguments.length),it("Query.endAt",1,e,this.path,!0),ct("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(a.validateArgCount("Query.equalTo",1,2,arguments.length),it("Query.equalTo",1,t,this.path,!1),ct("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return a.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return a.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=R(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(a.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t)){throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.")}var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,a.validateCallback(t,3,r.cancel,!0),r.context=n,a.validateContextObject(t,4,r.context,!0);else if(e)if("object"==typeof e&&null!==e)r.context=e;else{if("function"!=typeof e)throw new Error(a.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),te=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return a.contains(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return a.isEmpty(this.set)},t.prototype.count=function(){return a.getCount(this.set)},t.prototype.each=function(t){a.forEach(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return a.forEach(this.set,function(e){t.push(e)}),t},t}(),ee=function(){function t(){this.value_=null,this.children_=null}return t.prototype.find=function(t){if(null!=this.value_)return this.value_.getChild(t);if(t.isEmpty()||null==this.children_)return null;var e=t.getFront();return t=t.popFront(),this.children_.contains(e)?this.children_.get(e).find(t):null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(e,n);else{null==this.children_&&(this.children_=new te);var r=e.getFront();this.children_.contains(r)||this.children_.add(r,new t);var i=this.children_.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var e=this.value_;this.value_=null;var n=this;return e.forEachChild(Nt,function(t,e){n.remember(new V(t),e)}),this.forget(t)}if(null!==this.children_){var r=t.getFront();if(t=t.popFront(),this.children_.contains(r))this.children_.get(r).forget(t)&&this.children_.remove(r);return!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.value_?e(t,this.value_):this.forEachChild(function(n,r){var i=new V(t.toString()+"/"+n);r.forEachTree(i,e)})},t.prototype.forEachChild=function(t){null!==this.children_&&this.children_.each(function(e,n){t(e,n)})},t}(),ne=function(t,e){return t&&"object"==typeof t?(a.assert(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},re=function(t,e){var n,r=t.getPriority().val(),i=ne(r,e);if(t.isLeafNode()){var o=t,a=ne(o.getValue(),e);return a!==o.getValue()||i!==o.getPriority().val()?new xt(a,Wt(i)):t}var s=t;return n=s,i!==s.getPriority().val()&&(n=n.updatePriority(new xt(i))),s.forEachChild(Nt,function(t,r){var i=re(r,e);i!==r&&(n=n.updateImmediateChild(t,i))}),n};!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(zt||(zt={}));var ie,oe,ae=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,a.assert(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),se=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=zt.ACK_USER_WRITE,this.source=ae.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return a.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new V(e));return new t(V.Empty,n,this.revert)}return a.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ue=function(){return ie||(ie=new Pt(O)),ie},ce=function(){function t(t,e){void 0===e&&(e=ue()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return a.forEach(e,function(t,e){n=n.set(new V(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:V.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new V(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||t.Empty).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(V.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,V.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,V.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(V.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal(function(n,r){r.foreach_(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}(),le=function(){function t(t,e){this.source=t,this.path=e,this.type=zt.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty):new t(this.source,this.path.popFront())},t}(),fe=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=zt.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,V.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),he=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=zt.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new V(e));return n.isEmpty()?null:n.value?new fe(this.source,V.Empty,n.value):new t(this.source,V.Empty,n)}return a.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),pe=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),de=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new pe(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new pe(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new pe(Bt.EMPTY_NODE,!1,!1),new pe(Bt.EMPTY_NODE,!1,!1)),t}(),ve=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),me=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,o){a.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()==n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(ve.childRemovedChange(e,s)):a.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(ve.childAddedChange(e,n)):o.trackChildChange(ve.childChangedChange(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Nt,function(t,r){e.hasChild(t)||n.trackChildChange(ve.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(Nt,function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(ve.childChangedChange(e,r,i))}else n.trackChildChange(ve.childAddedChange(e,r))})),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Bt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),ye=function(){function t(){this.changeMap_={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;a.assert(e==ve.CHILD_ADDED||e==ve.CHILD_CHANGED||e==ve.CHILD_REMOVED,"Only child changes supported for tracking"),a.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=a.safeGet(this.changeMap_,n);if(r){var i=r.type;if(e==ve.CHILD_ADDED&&i==ve.CHILD_REMOVED)this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.snapshotNode);else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_ADDED)delete this.changeMap_[n];else if(e==ve.CHILD_REMOVED&&i==ve.CHILD_CHANGED)this.changeMap_[n]=ve.childRemovedChange(n,r.oldSnap);else if(e==ve.CHILD_CHANGED&&i==ve.CHILD_ADDED)this.changeMap_[n]=ve.childAddedChange(n,t.snapshotNode);else{if(e!=ve.CHILD_CHANGED||i!=ve.CHILD_CHANGED)throw a.assertionError("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap_[n]=ve.childChangedChange(n,t.snapshotNode,r.oldSnap)}}else this.changeMap_[n]=t},t.prototype.getChanges=function(){return a.getValues(this.changeMap_)},t}(),ge=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),be=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new pe(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),_e=function(){return function(t,e){this.viewCache=t,this.changes=e}}(),we=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){a.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),a.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,s,u=new ye;if(n.type===zt.OVERWRITE){var c=n;c.source.fromUser?o=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(a.assert(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),o=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===zt.MERGE){var l=n;l.source.fromUser?o=this.applyUserMerge_(e,l.path,l.children,r,i,u):(a.assert(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),o=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===zt.ACK_USER_WRITE){var f=n;o=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==zt.LISTEN_COMPLETE)throw a.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,o,h),new _e(o,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(ve.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if(e.isEmpty())if(a.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof Bt?c:Bt.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var p=e.getFront();if(".priority"==p){a.assert(1==e.getLength(),"Can't have a priority with additional path components");var d=o.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);s=null!=v?this.filter_.updatePriority(d,v):o.getNode()}else{var m=e.popFront(),y=void 0;if(o.isCompleteForChild(p)){u=t.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),u);y=null!=g?o.getNode().getImmediateChild(p).updateChild(m,g):o.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,t.getServerCache());s=null!=y?this.filter_.updateChild(o.getNode(),p,y,m,r,i):o.getNode()}}return t.updateEventSnap(s,o.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var h=e.popFront(),p=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"==f?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),f,p,h,ge,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new be(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new be(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=e.popFront(),h=u.getNode().getImmediateChild(l),p=void 0;if(f.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===f.getBack()&&d.getChild(f.parent()).isEmpty()?d:d.updateChild(f,n):Bt.EMPTY_NODE}if(h.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),u},t.prototype.applyMerge_=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:ce.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new V(e),f,r,i,o,a)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new V(e),h,r,i,o,a)}}),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=ce.Empty;return s.getNode().forEachChild(bt,function(t,e){u=u.set(new V(t),e)}),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=ce.Empty;return n.foreach(function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))}),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,ge,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var s=new be(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();a.assert(f instanceof Bt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=e.getFront(),p=n.calcCompleteChild(h,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(h)&&(p=u.getImmediateChild(h)),(c=null!=p?this.filter_.updateChild(u,h,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Bt.EMPTY_NODE,e.popFront(),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,o,i))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(V.Empty),t.updateEventSnap(c,o,this.filter_.filtersNodes())},t}(),Ee=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach(function(t){t.type===ve.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(ve.childMovedChange(t.childName,t.snapshotNode))}),this.generateEventsForType_(i,ve.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,ve.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,ve.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,ve.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,ve.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter(function(t){return t.type===e});a.sort(this.compareChanges_.bind(this)),a.forEach(function(e){var n=o.materializeSingleChange_(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))})})},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_),t)},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw a.assertionError("Should only compare child_ events.");var n=new mt(t.childName,t.snapshotNode),r=new mt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Te=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new me(n.getIndex()),i=n.getNodeFilter();this.processor_=new we(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Bt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Bt.EMPTY_NODE,a.getNode(),null),c=new pe(s,o.isFullyInitialized(),r.filtersNodes()),l=new pe(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new de(l,c),this.eventGenerator_=new Ee(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){a.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var s=this.eventRegistrations_[o];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===zt.MERGE&&null!==t.source.queryId&&(a.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),a.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),a.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(Nt,function(t,e){n.push(ve.childAddedChange(t,e))});return e.isFullyInitialized()&&n.push(ve.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),Ce=function(){function t(){this.views_={}}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return a.assert(oe,"Reference.ts has not been loaded"),oe},set:function(t){a.assert(!oe,"__referenceConstructor has already been defined"),oe=t},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return a.isEmpty(this.views_)},t.prototype.applyOperation=function(t,e,n){var r=t.source.queryId;if(null!==r){var i=a.safeGet(this.views_,r);return a.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(t,e,n)}var o=[];return a.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(t,e,n))}),o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),s=a.safeGet(this.views_,o);if(!s){var u=n.calcCompleteEventCache(i?r:null),c=!1;u?c=!0:r instanceof Bt?(u=n.calcCompleteEventChildren(r),c=!1):(u=Bt.EMPTY_NODE,c=!1);var l=new de(new pe(u,c,!1),new pe(r,i,!1));s=new Te(t,l),this.views_[o]=s}return s.addEventRegistration(e),s.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i=e.queryIdentifier(),o=[],s=[],u=this.hasCompleteView();if("default"===i){var c=this;a.forEach(this.views_,function(t,e){s=s.concat(e.removeEventRegistration(n,r)),e.isEmpty()&&(delete c.views_[t],e.getQuery().getQueryParams().loadsAllData()||o.push(e.getQuery()))})}else{var l=a.safeGet(this.views_,i);l&&(s=s.concat(l.removeEventRegistration(n,r)),l.isEmpty()&&(delete this.views_[i],l.getQuery().getQueryParams().loadsAllData()||o.push(l.getQuery())))}return u&&!this.hasCompleteView()&&o.push(new t.__referenceConstructor(e.repo,e.path)),{removed:o,events:s}},t.prototype.getQueryViews=function(){var t=this;return Object.keys(this.views_).map(function(e){return t.views_[e]}).filter(function(t){return!t.getQuery().getQueryParams().loadsAllData()})},t.prototype.getCompleteServerCache=function(t){var e=null;return a.forEach(this.views_,function(n,r){e=e||r.getCompleteServerCache(t)}),e},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return a.safeGet(this.views_,e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){return a.findValue(this.views_,function(t){return t.getQuery().getQueryParams().loadsAllData()})||null},t}(),xe=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new ce(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=V.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new ce(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return a.forEach(e,function(e,r){n=n.addWrite(t.child(e),r)}),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,ce.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(V.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(Nt,function(e,n){t.push(new mt(e,n))}):this.writeTree_.children.inorderTraversal(function(e,n){null!=n.value&&t.push(new mt(e,n.value))}),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new ce(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(e){return t.applySubtreeWrite_(V.Empty,this.writeTree_,e)},t.Empty=new t(new ce(null)),t.applySubtreeWrite_=function(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(a.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t.applySubtreeWrite_(e.child(n),o,r)}),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r},t}(),Se=function(){function t(){this.visibleWrites_=xe.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new ke(t,this)},t.prototype.addOverwrite=function(t,e,n,r){a.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){a.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex(function(e){return e.writeId===t});a.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(o=!0)),s--}if(i){if(o)return this.resetTree_(),!0;if(r.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(r.path);else{var c=r.children;a.forEach(c,function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))})}return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(V.Empty)){var a=t.layerTree_(this.allWrites_,function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},e);c=n||Bt.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(e);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(e);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(V.Empty)){var c=n||Bt.EMPTY_NODE;return u.apply(c)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Bt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(Nt,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(Nt,function(t,e){var r=i.childCompoundWrite(new V(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){a.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(V.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){return t.snap?t.path.contains(e):!!a.findKey(t.children,function(n,r){return t.path.child(r).contains(e)})},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,V.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=xe.Empty,i=0;i<t.length;++i){var o=t[i];if(e(o)){var s=o.path,u=void 0;if(o.snap)n.contains(s)?(u=V.relativePath(n,s),r=r.addWrite(u,o.snap)):s.contains(n)&&(u=V.relativePath(s,n),r=r.addWrite(V.Empty,o.snap.getChild(u)));else{if(!o.children)throw a.assertionError("WriteRecord should have .snap or .children");if(n.contains(s))u=V.relativePath(n,s),r=r.addWrites(u,o.children);else if(s.contains(n))if((u=V.relativePath(s,n)).isEmpty())r=r.addWrites(V.Empty,o.children);else{var c=a.safeGet(o.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(V.Empty,l)}}}}}return r},t}(),ke=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),Ne=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=ce.Empty,this.pendingWriteTree_=new Se,this.tagToQueryMap_={},this.queryToTagMap_={}}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new fe(ae.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=ce.Empty;return null!=n.snap?r=r.set(V.Empty,!0):a.forEach(n.children,function(t,e){r=r.set(new V(t),e)}),this.applyOperationToSyncPoints_(new se(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new fe(ae.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=ce.fromObject(e);return this.applyOperationToSyncPoints_(new he(ae.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new le(ae.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=new fe(ae.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=V.relativePath(a,e),c=ce.fromObject(n),l=new he(ae.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=V.relativePath(o,e),u=new le(ae.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,function(t,e){var n=V.relativePath(t,r);i=i||e.getCompleteServerCache(n),o=o||e.hasCompleteView()});var s,u=this.syncPointTree_.get(r);(u?(o=o||u.hasCompleteView(),i=i||u.getCompleteServerCache(V.Empty)):(u=new Ce,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Bt.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild(function(t,e){var n=e.getCompleteServerCache(V.Empty);n&&(i=i.updateImmediateChild(t,n))}));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);a.assert(!(l in this.queryToTagMap_),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap_[l]=f,this.tagToQueryMap_["_"+f]=l}var h=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,h,i,s);if(!c&&!o){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(t){return t.getQueryParams().loadsAllData()}),f=this.syncPointTree_.findOnPath(o,function(t,e){return e.hasCompleteView()});if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(h),d=0;d<p.length;++d){var v=p[d],m=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(m),this.tagForQuery_(m),y.hashFn,y.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach(function(e){var n=i.queryToTagMap_[t.makeQueryKey_(e)];i.listenProvider_.stopListening(t.queryForListening_(e),n)});this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,function(e,n){var r=V.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),a.forEach(n,function(t,e){r=r.concat(e)}),r})},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),o=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,o.hashFn,o.onComplete),u=this.syncPointTree_.subtree(r);if(i)a.assert(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold(function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map(function(t){return t.getQuery()}))),a.forEach(n,function(t,e){r=r.concat(e)}),r}),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Bt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return a.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new V(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap_["_"+t]},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return a.safeGet(this.queryToTagMap_,n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);a.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(V.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(V.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(V.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(V.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(V.Empty));var a=[];return e.children.inorderTraversal(function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))}),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Ae=function(){function t(){this.rootNode_=Bt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Ie=function(){function t(t){this.app_=t}return t.prototype.getToken=function(t){return this.app_.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(E("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})},t.prototype.addTokenChangeListener=function(t){this.app_.INTERNAL.addAuthTokenListener(t)},t.prototype.removeTokenChangeListener=function(t){this.app_.INTERNAL.removeAuthTokenListener(t)},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',S(t)},t}(),Oe=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),a.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return a.deepCopy(this.counters_)},t}(),Pe=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Oe),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Re=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=a.clone(t);return this.last_&&a.forEach(this.last_,function(t,n){e[t]=e[t]-n}),this.last_=t,e},t}(),De=1e4,Me=3e4,Le=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Re(t);var n=De+(Me-De)*Math.random();q(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;a.forEach(e,function(e,i){i>0&&a.contains(t.statsToReport_,e)&&(n[e]=i,r=!0)}),r&&this.server_.reportStats(n),q(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Fe=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new Ue(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.equals(t)})},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.contains(t)||t.contains(e)})},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),Ue=function(){function t(t){this.path_=t,this.events_=[]}return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();b&&E("event: "+e.toString()),j(n)}}},t.prototype.getPath=function(){return this.path_},t}(),je=function(){function t(t){this.allowedEvents_=t,this.listeners_={},a.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=this.listeners_[t].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){a.assert(this.allowedEvents_.find(function(e){return e===t}),"Unknown event: "+t)},t}(),Be=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(n="visibilitychange",e="hidden"):void 0!==document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(n="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))},!1),r}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(je),qe=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||a.isMobileCordova()||(window.addEventListener("online",function(){e.online_||(e.online_=!0,e.trigger("online",!0))},!1),window.addEventListener("offline",function(){e.online_&&(e.online_=!1,e.trigger("online",!1))},!1)),e}return u.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return a.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(je),Ve=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&j(function(){n.onMessage_(t[e])})},r=0;r<t.length;++r)e(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),We="pLPCommand",He="pRTLPCB",ze=function(){function t(t,e,n,r){this.connId=t,this.repoInfo=e,this.transportSessionId=n,this.lastSessionId=r,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=T(t),this.stats_=Pe.getCollection(e),this.urlFn=function(t){return e.connectionURL(H,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new Ve(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null},Math.floor(3e4)),function(t){if(a.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}}(function(){if(!n.isClosed_){n.scriptTagHolder=new Ke(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1],o=t[2];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"==r)n.id=i,n.password=o;else{if("close"!==r)throw new Error("Unrecognized command received: "+r);i?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(i,function(){n.onClosed_()})):n.onClosed_()}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(r,i)},function(){n.onClosed_()},n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v="5",n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,function(){})}})},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return t.forceAllow_||!t.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.UI)&&!a.isNodeSdk()},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=a.base64Encode(e),r=D(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!a.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=a.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),Ke=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new te,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,a.isNodeSdk())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=m(),window[We+this.uniqueCallbackIdentifier]=e,window[He+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createIFrame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))o='<script>document.domain="'+document.domain+'";<\/script>';var s=""+o+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(t){E("frame writing exception"),t.stack&&E(t.stack),E(t)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||E("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var e=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)},Math.floor(0))),a.isNodeSdk()&&this.myID){var n={disconn:"t"};n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);t.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,function(){clearTimeout(i),r()})},t.prototype.addTag=function(t,e){var n=this;a.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){E("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(t){}},Math.floor(1))},t}(),Ge=null;"undefined"!=typeof MozWebSocket?Ge=MozWebSocket:"undefined"!=typeof WebSocket&&(Ge=WebSocket);var Qe=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=T(this.connId),this.stats_=Pe.getCollection(n),this.connURL=t.connectionURL_(n,r,i)}return t.connectionURL_=function(t,e,n){var r={v:"5"};return!a.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL("websocket",r)},t.prototype.open=function(t,e){var n=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,p.set("previous_websocket_failure",!0);try{if(a.isNodeSdk()){var i=a.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+c.SDK_VERSION+"/"+r.platform+"/"+i}},s=r.env,u=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(o.proxy={origin:u}),this.mySock=new Ge(this.connURL,[],o)}else this.mySock=new Ge(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var l=t.message||t.data;return l&&this.log_(l),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0},this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(t){n.handleIncomingFrame(t)},this.mySock.onerror=function(t){n.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&n.log_(e),n.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==Ge&&!t.forceDisallow_},t.previouslyFailed=function(){return p.isInMemoryStorage||!0===p.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){p.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=a.jsonEval(e);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},t.prototype.extractFrameCount_=function(t){if(a.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},t.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(t){this.resetKeepAlive();var e=a.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=D(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()},Math.floor(45e3))},t.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),Ye=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[ze,Qe]},enumerable:!0,configurable:!0}),t.prototype.initTransports_=function(e){var n=Qe&&Qe.isAvailable(),r=n&&!Qe.previouslyFailed();if(e.webSocketOnly&&(n||S("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[Qe];else{var i=this.transports_=[];M(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&i.push(e)})}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Xe=function(){function t(t,e,n,r,i,o,a){this.id=t,this.repoInfo_=e,this.onMessage_=n,this.onReady_=r,this.onDisconnect_=i,this.onKill_=o,this.lastSessionId=a,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=T("c:"+this.id+":"),this.transportManager_=new Ye(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(n,r)},Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=q(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!=e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);if("c"==e)this.onSecondaryControl_(n);else{if("d"!=e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);"c"==e?this.onControl_(n):"d"==e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=P("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?C("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):C("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),"5"!==n&&S("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),q(function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())},Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):q(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(p.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),$e=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),Je=1e3,Ze=3e5,tn=function(t){function e(n,r,i,o,s,u){var c=t.call(this)||this;if(c.repoInfo_=n,c.onDataUpdate_=r,c.onConnectStatus_=i,c.onServerInfoUpdate_=o,c.authTokenProvider_=s,c.authOverride_=u,c.id=e.nextPersistentConnectionId_++,c.log_=T("p:"+c.id+":"),c.interruptReasons_={},c.listens_={},c.outstandingPuts_=[],c.outstandingPutCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=Je,c.maxReconnectDelay_=Ze,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,u&&!a.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return c.scheduleConnect_(0),Be.getInstance().on("visible",c.onVisible_,c),-1===n.host.indexOf("fblocal")&&qe.getInstance().on("online",c.onOnline_,c),c}return u.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(a.stringify(i)),a.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),a.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens_[o][i]=s,this.connected_&&this.sendListen_(s)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens_[i]&&n.listens_[i][o])===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))})},e.warnOnListenWarnings_=function(t,e){if(t&&"object"==typeof t&&a.contains(t,"w")){var n=a.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();S("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||a.isAdmin(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=a.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))})}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)})},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}})}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+a.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):C("Unrecognized action received from server: "+a.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;a.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){e.establishConnectionTimer_=null,e.establishConnection_()},Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=Je),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,s=this.lastSessionId,u=!1,c=null,l=function(){c?c.close():(u=!0,r())};this.realtime_={close:l,sendRequest:function(t){a.assert(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(t)}};var f=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(f).then(function(e){u?E("getToken() completed but was canceled"):(E("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,c=new Xe(i,o.repoInfo_,t,n,r,function(t){S(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},s))}).then(null,function(t){o.log_("Failed to get token: "+t),u||(a.CONSTANTS.NODE_ADMIN&&S(t),l())})}},e.prototype.interrupt=function(t){E("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){E("Resuming connection for reason: "+t),delete this.interruptReasons_[t],a.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=Je,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map(function(t){return R(t)}).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new V(t).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][e],delete this.listens_[r][e],0===a.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},e.prototype.onAuthRevoked_=function(t,e){E("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t=this;this.tryAuth(),a.forEach(this.listens_,function(e,n){a.forEach(n,function(e,n){t.sendListen_(n)})});for(var e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";a.CONSTANTS.NODE_ADMIN?e="admin_node":a.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+c.SDK_VERSION.replace(/\./g,"-")]=1,a.isMobileCordova()?t["framework.cordova"]=1:a.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=qe.getInstance().currentlyOnline();return a.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}($e),en=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=T("p:rest:"),i.listens_={},i}return u.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(a.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(s,n,!1,r),a.safeGet(o.listens_,u)===c)&&i(t?401==t?"permission_denied":"rest_error:"+t:"ok",null)})},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var o=i&&i.accessToken;o&&(e.auth=o);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?"+a.querystring(e);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=a.jsonEval(u.responseText)}catch(t){S("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&S("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()})},e}($e),nn=function(){function t(t,e,n){var r=this;this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Fe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ee,this.persistentConnection_=null;var i=new Ie(n);if(this.stats_=Pe.getCollection(t),e||B())this.server_=new en(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!=typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{a.stringify(o)}catch(t){throw new Error("Invalid authOverride provided: "+t)}}this.persistentConnection_=new tn(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(t){r.server_.refreshAuthToken(t)}),this.statsReporter_=Pe.getOrCreateReporter(t,function(){return new Le(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new Ae,this.infoSyncTree_=new Ne({startListening:function(t,e,n,i){var o=[],a=r.infoData_.getNode(t.path);return a.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new Ne({startListening:function(t,e,n,i){return r.server_.listen(t,n,e,function(e,n){var o=i(e,n);r.eventQueue_.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new V(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new V(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var o=[];if(r)if(n){var s=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Wt(e);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=a.map(e,function(t){return Wt(t)});o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Wt(e);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;o.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,o)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;M(t,function(t,n){e.updateInfo_(n,t)})},t.prototype.updateInfo_=function(t,e){var n=new V("/.info/"+t),r=Wt(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Wt(e,n),s=re(a,o),u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserOverwrite(t,s,u,!0);this.eventQueue_.queueEvents(c),this.server_.put(t.toString(),a.val(!0),function(e,n){var o="ok"===e;o||S("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(u,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)});var l=this.abortTransactions_(t);this.rerunTransactions_(l),this.eventQueue_.raiseEventsForChangedPath(l,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),s={};if(a.forEach(e,function(t,e){i=!1;var n=Wt(e);s[t]=re(n,o)}),i)E("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var u=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserMerge(t,s,u);this.eventQueue_.queueEvents(c),this.server_.merge(t.toString(),e,function(e,i){var o="ok"===e;o||S("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(u,!o),s=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(s,a),r.callOnCompleteCallback(n,e,i)}),a.forEach(e,function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=[];(function(t,e){var n=new ee;return t.forEachTree(new V(""),function(t,r){n.remember(t,re(r,e))}),n})(this.onDisconnect_,e).forEachTree(V.Empty,function(e,r){n=n.concat(t.serverSyncTree_.applyServerOverwrite(e,r));var i=t.abortTransactions_(e);t.rerunTransactions_(i)}),this.onDisconnect_=new ee,this.eventQueue_.raiseEventsForChangedPath(V.Empty,n)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Wt(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Wt(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(a.isEmpty(e))return E("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,function(i,o){"ok"===i&&a.forEach(e,function(e,n){var i=Wt(n);r.onDisconnect_.remember(t.child(e),i)}),r.callOnCompleteCallback(n,i,o)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Re(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);a.forEach(e,function(t,e){for(var r=t.length;r<n+2;r++)t+=" ";console.log(t+e)})}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),E.apply(void 0,[n].concat(t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&j(function(){if("ok"==e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}})},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new pn(this))},enumerable:!0,configurable:!0}),t}(),rn=function(){function t(e){this.indexedFilter_=new me(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Bt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Bt.EMPTY_NODE);var i=this;return e.forEachChild(Nt,function(t,e){i.matches(new mt(t,e))||(r=r.updateImmediateChild(t,Bt.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),on=function(){function t(t){this.rangedFilter_=new rn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new mt(e,n))||(n=Bt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Bt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Bt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(Bt.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Bt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var o;if(this.reverse_){var s=this.index_.getCompare();o=function(t,e){return s(e,t)}}else o=this.index_.getCompare();var u=t;a.assert(u.numChildren()==this.limit_,"");var c=new mt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name==e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:o(p,c);if(f&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(ve.childChangedChange(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(ve.childRemovedChange(e,h));var v=u.updateImmediateChild(e,Bt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(ve.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:f&&o(l,c)>=0?(null!=i&&(i.trackChildChange(ve.childRemovedChange(l.name,l.node)),i.trackChildChange(ve.childAddedChange(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,Bt.EMPTY_NODE)):t},t}(),an=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Nt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return a.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:N},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return a.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:A},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return a.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==Nt&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==Nt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new me(this.getIndex()):this.hasLimit()?new on(this):new rn(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()?r:(this.index_===Nt?e=n.PRIORITY_INDEX:this.index_===Kt?e=n.VALUE_INDEX:this.index_===bt?e=n.KEY_INDEX:(a.assert(this.index_ instanceof Gt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=a.stringify(e),this.startSet_&&(r[n.START_AT]=a.stringify(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+a.stringify(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=a.stringify(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+a.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_),r)},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),sn=function(t){function e(e,n){if(!(e instanceof nn))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,an.DEFAULT,!1)||this}return u.__extends(e,t),e.prototype.getKey=function(){return a.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return a.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof t?t=String(t):t instanceof V||(null===this.path.getFront()?function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),lt(t,e,n,r)}("Reference.child",1,t,!1):lt("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){a.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){a.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){a.validateArgCount("Reference.set",1,2,arguments.length),ft("Reference.set",this.path),it("Reference.set",1,t,this.path,!1),a.validateCallback("Reference.set",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(a.validateArgCount("Reference.update",1,2,arguments.length),ft("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}at("Reference.update",1,t,this.path,!1),a.validateCallback("Reference.update",2,e,!0);var i=new a.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(a.validateArgCount("Reference.setWithPriority",2,3,arguments.length),ft("Reference.setWithPriority",this.path),it("Reference.setWithPriority",1,t,this.path,!1),st("Reference.setWithPriority",2,e,!1),a.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new a.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return a.validateArgCount("Reference.remove",0,1,arguments.length),ft("Reference.remove",this.path),a.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(a.validateArgCount("Reference.transaction",1,3,arguments.length),ft("Reference.transaction",this.path),a.validateCallback("Reference.transaction",1,t,!1),a.validateCallback("Reference.transaction",2,e,!0),function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!=typeof n)throw new Error(a.errorPrefix(t,e,r)+"must be a boolean.")}("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new a.Deferred;"function"==typeof e&&r.promise.catch(function(){});return this.repo.startTransaction(this.path,t,function(t,n,i){t?r.reject(t):r.resolve(new dt(n,i)),"function"==typeof e&&e(t,n,i)},n),r.promise},e.prototype.setPriority=function(t,e){a.validateArgCount("Reference.setPriority",1,2,arguments.length),ft("Reference.setPriority",this.path),st("Reference.setPriority",1,t,!1),a.validateCallback("Reference.setPriority",2,e,!0);var n=new a.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){a.validateArgCount("Reference.push",0,2,arguments.length),ft("Reference.push",this.path),it("Reference.push",1,t,this.path,!0),a.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=vt(r),o=this.child(i),s=this.child(i);return n=null!=t?o.set(t,e).then(function(){return s}):Promise.resolve(s),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"==typeof e&&n.catch(function(){}),o},e.prototype.onDisconnect=function(){return ft("Reference.onDisconnect",this.path),new pt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),e}(Zt);Zt.__referenceConstructor=sn,Ce.__referenceConstructor=sn;var un,cn=function(){return function(){this.children={},this.childCount=0,this.value=null}}(),ln=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new cn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n,r=e instanceof V?e:new V(e),i=this;null!==(n=r.getFront());){i=new t(n,i,a.safeGet(i.node_.children,n)||new cn),r=r.popFront()}return i},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){a.assert(void 0!==t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;a.forEach(this.node_.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new V(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=a.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(un||(un={})),nn.MAX_TRANSACTION_RETRIES_=25,nn.prototype.transactions_init_=function(){this.transactionQueueTree_=new ln},nn.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},o=new sn(this,t);o.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:m(),applyLocally:r,retryCount:0,unwatcher:function(){o.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new Qt(s.currentInputSnapshot,new sn(this,s.path),Nt);s.onComplete(null,!1,l)}}else{ot("transaction failed: Data returned ",c,s.path),s.status=un.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var p=void 0;if("object"==typeof c&&null!==c&&a.contains(c,".priority"))p=a.safeGet(c,".priority"),a.assert(rt(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||Bt.EMPTY_NODE).getPriority().val();p=p;var d=this.generateServerValues(),v=Wt(c,p),y=re(v,d);s.currentOutputSnapshotRaw=v,s.currentOutputSnapshotResolved=y,s.currentWriteId=this.getNextWriteId_();var g=this.serverSyncTree_.applyUserOverwrite(t,y,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,g),this.sendReadyTransactions_()}},nn.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Bt.EMPTY_NODE},nn.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);a.assert(n.length>0,"Sending zero length transaction queue"),n.every(function(t){return t.status===un.RUN})&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.sendReadyTransactions_(t)})},nn.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map(function(t){return t.currentWriteId}),i=this.getLatestState_(t,r),o=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];a.assert(c.status===un.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=un.SENT,c.retryCount++;var l=V.relativePath(t,c.path);o=o.updateChild(l,c.currentOutputSnapshotRaw)}var f=o.val(!0),h=t;this.server_.put(h.toString(),f,function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=un.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new sn(n,e[a].path),c=new Qt(s,u,Nt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)j(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===un.SENT_NEEDS_ABORT?e[a].status=un.NEEDS_ABORT:e[a].status=un.RUN;else{S("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=un.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}},s)},nn.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},nn.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],o=t.filter(function(t){return t.status===un.RUN}).map(function(t){return t.currentWriteId}),s=0;s<t.length;s++){var u=t[s],c=V.relativePath(e,u.path),l=!1,f=void 0;if(a.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===un.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===un.RUN)if(u.retryCount>=nn.MAX_TRANSACTION_RETRIES_)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,o);u.currentInputSnapshot=h;var p=t[s].update(h.val());if(void 0!==p){ot("transaction failed: Data returned ",p,u.path);var d=Wt(p);"object"==typeof p&&null!=p&&a.contains(p,".priority")||(d=d.updatePriority(h.getPriority()));var v=u.currentWriteId,m=this.generateServerValues(),y=re(d,m);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=un.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var g=new sn(this,t[s].path),b=t[s].currentInputSnapshot,_=new Qt(b,g,Nt);r.push(t[s].onComplete.bind(null,null,!1,_))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)j(r[s]);this.sendReadyTransactions_()}},nn.prototype.getAncestorTransactionNode_=function(t){for(var e,n=this.transactionQueueTree_;null!==(e=t.getFront())&&null===n.getValue();)n=n.subTree(e),t=t.popFront();return n},nn.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort(function(t,e){return t.order-e.order}),e},nn.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild(function(t){n.aggregateTransactionQueuesForNode_(t,e)})},nn.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==un.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild(function(t){e.pruneCompletedTransactionsBelowNode_(t)})},nn.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor(function(t){e.abortTransactionsOnNode_(t)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(t){e.abortTransactionsOnNode_(t)}),n},nn.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o<e.length;o++)if(e[o].status===un.SENT_NEEDS_ABORT);else if(e[o].status===un.SENT)a.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,e[o].status=un.SENT_NEEDS_ABORT,e[o].abortReason="set";else if(a.assert(e[o].status===un.RUN,"Unexpected transaction status in abort"),e[o].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[o].currentWriteId,!0)),e[o].onComplete){n.push(e[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(o=0;o<n.length;o++)j(n[o])}};var fn,hn=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return fn||(fn=new t),fn},t.prototype.interrupt=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].interrupt()},t.prototype.resume=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].resume()},t.prototype.databaseFromApp=function(t,e){var n=e||t.options.databaseURL;void 0===n&&x("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var r=$(n),i=r.repoInfo;return ht("Invalid Firebase Database URL",1,r),r.path.isEmpty()||x("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,t).database},t.prototype.deleteRepo=function(t){var e=a.safeGet(this.repos_,t.app.name);e&&a.safeGet(e,t.repoInfo_.toURLString())===t||x("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e){var n=a.safeGet(this.repos_,e.name);n||(n={},this.repos_[e.name]=n);var r=a.safeGet(n,t.toURLString());return r&&x("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new nn(t,this.useRestClient_,e),n[t.toURLString()]=r,r},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}(),pn=function(){function t(t){this.repo_=t,t instanceof nn||x("Don't call new Database() directly - please use firebase.database()."),this.root_=new sn(t,V.Empty),this.INTERNAL=new dn(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),a.validateArgCount("database.ref",0,1,arguments.length),t instanceof sn?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),a.validateArgCount(e,1,1,arguments.length);var n=$(t);ht(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&x(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&x("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){a.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){a.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"}},t}(),dn=function(){function t(t){this.database=t}return t.prototype.delete=function(){return u.__awaiter(this,void 0,void 0,function(){return u.__generator(this,function(t){return this.database.checkDeleted_("delete"),hn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},t}(),vn=Object.freeze({forceLongPolling:function(){Qe.forceDisallow(),ze.forceAllow()},forceWebSockets:function(){ze.forceDisallow()},isWebSocketsAvailable:function(){return Qe.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)}}),mn=tn;tn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},tn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var yn=Xe,gn=z,bn=Object.freeze({DataConnection:mn,RealTimeConnection:yn,hijackHash:function(t){var e=tn.prototype.put;return tn.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){tn.prototype.put=e}},ConnectionTarget:gn,queryIdentifier:function(t){return t.queryIdentifier()},listens:function(t){return t.repo.persistentConnection_.listens_},forceRestClient:function(t){hn.getInstance().forceRestClient(t)}}),_n=pn.ServerValue;function wn(e){var n=e.INTERNAL.registerService("database",function(t,e,n){return hn.getInstance().databaseFromApp(t,n)},{Reference:sn,Query:Zt,Database:pn,enableLogging:w,INTERNAL:vn,ServerValue:_n,TEST_ACCESS:bn},null,!0);a.isNodeSdk()&&(t.exports=n)}wn(c),e.registerDatabase=wn,e.Database=pn,e.Query=Zt,e.Reference=sn,e.enableLogging=w,e.ServerValue=_n,e.DataSnapshot=Qt,e.OnDisconnect=pt}).call(this,n(148))},function(t,e,n){"use strict";n.r(e),function(t){var e=n(14),r=n.n(e);(function(){var t,e=e||{},n=this;function i(t){return"string"==typeof t}function o(t){return"boolean"==typeof t}function a(){}function s(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function u(t){return null===t}function c(t){return"array"==s(t)}function l(t){var e=s(t);return"array"==e||"object"==e&&"number"==typeof t.length}function f(t){return"function"==s(t)}function h(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var p="closure_uid_"+(1e9*Math.random()>>>0),d=0;function v(t,e,n){return t.call.apply(t.bind,arguments)}function m(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v:m).apply(null,arguments)}function g(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now||function(){return+new Date};function _(t,e){function n(){}n.prototype=e.prototype,t.lb=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.cd=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function w(t){t.prototype.then=t.prototype.then,t.prototype.$goog_Thenable=!0}function E(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function T(t){if(Error.captureStackTrace)Error.captureStackTrace(this,T);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function C(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");T.call(this,n+t[r])}function x(t,e){throw new C("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function S(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function k(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function N(){this.b=this.a=null}_(T,Error),T.prototype.name="CustomError",_(C,T),C.prototype.name="AssertionError",S.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var A=new S(function(){return new O},function(t){t.reset()});function I(){var t=pt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function O(){this.next=this.b=this.a=null}N.prototype.add=function(t,e){var n=A.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},O.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},O.prototype.reset=function(){this.next=this.b=this.a=null};var P=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(i(t))return i(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},R=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,o=i(t)?t.split(""):t,a=0;a<r;a++)a in o&&e.call(n,o[a],a,t)};var D=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),o=i(t)?t.split(""):t,a=0;a<n;a++)a in o&&(r[a]=e.call(void 0,o[a],a,t));return r},M=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t))return!0;return!1};function L(t,e){return 0<=P(t,e)}function F(t,e){var n;return(n=0<=(e=P(t,e)))&&Array.prototype.splice.call(t,e,1),n}function U(t,e){!function(t,e){var n=t.length,r=i(t)?t.split(""):t;for(--n;0<=n;--n)n in r&&e.call(void 0,r[n],n,t)}(t,function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0})}function j(t){return Array.prototype.concat.apply([],arguments)}function B(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function q(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}var V=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function W(t){return $.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(z,"&")),-1!=t.indexOf("<")&&(t=t.replace(K,"<")),-1!=t.indexOf(">")&&(t=t.replace(G,">")),-1!=t.indexOf('"')&&(t=t.replace(Q,""")),-1!=t.indexOf("'")&&(t=t.replace(Y,"'")),-1!=t.indexOf("\0")&&(t=t.replace(X,"&#0;")),t):t}var H,z=/&/g,K=/</g,G=/>/g,Q=/"/g,Y=/'/g,X=/\x00/g,$=/[\x00&<>"']/;function J(t,e){return-1!=t.indexOf(e)}function Z(t,e){return t<e?-1:t>e?1:0}t:{var tt=n.navigator;if(tt){var et=tt.userAgent;if(et){H=et;break t}}H=""}function nt(t){return J(H,t)}function rt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function it(t){for(var e in t)return!1;return!0}function ot(t){var e,n={};for(e in t)n[e]=t[e];return n}var at,st,ut="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ct(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<ut.length;o++)n=ut[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function lt(t){n.setTimeout(function(){throw t},0)}function ft(t,e){st||function(){if(n.Promise&&n.Promise.resolve){var t=n.Promise.resolve(void 0);st=function(){t.then(dt)}}else st=function(){var t=dt;!f(n.setImmediate)||n.Window&&n.Window.prototype&&!nt("Edge")&&n.Window.prototype.setImmediate==n.setImmediate?(at||(at=function(){var t=n.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!nt("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=y(function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),void 0!==t&&!nt("Trident")&&!nt("MSIE")){var e=new t,r={},i=r;return e.port1.onmessage=function(){if(void 0!==r.next){var t=(r=r.next).tb;r.tb=null,t()}},function(t){i.next={tb:t},i=i.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){n.setTimeout(t,0)}}()),at(t)):n.setImmediate(t)}}(),ht||(st(),ht=!0),pt.add(t,e)}var ht=!1,pt=new N;function dt(){for(var t;t=I();){try{t.a.call(t.b)}catch(t){lt(t)}k(A,t)}ht=!1}function vt(t,e){if(this.a=mt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=a)try{var n=this;t.call(e,function(t){kt(n,yt,t)},function(t){if(!(t instanceof Dt))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}kt(n,gt,t)})}catch(t){kt(this,gt,t)}}var mt=0,yt=2,gt=3;function bt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}bt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var _t=new S(function(){return new bt},function(t){t.reset()});function wt(t,e,n){var r=_t.get();return r.g=t,r.b=e,r.f=n,r}function Et(t){if(t instanceof vt)return t;var e=new vt(a);return kt(e,yt,t),e}function Tt(t){return new vt(function(e,n){n(t)})}function Ct(t,e,n){Nt(t,e,n,null)||ft(g(e,t))}function xt(t,e){t.b||t.a!=yt&&t.a!=gt||At(t),t.f?t.f.next=e:t.b=e,t.f=e}function St(t,e,n,r){var i=wt(null,null,null);return i.a=new vt(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof Dt?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,xt(t,i),i.a}function kt(t,e,n){t.a==mt&&(t===n&&(e=gt,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Nt(n,t.Lc,t.Mc,t)||(t.i=n,t.a=e,t.c=null,At(t),e!=gt||n instanceof Dt||function(t,e){t.g=!0,ft(function(){t.g&&Rt.call(null,e)})}(t,n)))}function Nt(t,e,n,r){if(t instanceof vt)return xt(t,wt(e||a,n||null,r)),!0;if(E(t))return t.then(e,n,r),!0;if(h(t))try{var i=t.then;if(f(i))return function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}var a=!1;try{e.call(t,function(t){a||(a=!0,n.call(i,t))},o)}catch(t){o(t)}}(t,i,e,n,r),!0}catch(t){return n.call(r,t),!0}return!1}function At(t){t.h||(t.h=!0,ft(t.Ub,t))}function It(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ot(t,e,n,r){if(n==gt&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Pt(e,n,r);else try{e.c?e.g.call(e.f):Pt(e,n,r)}catch(t){Rt.call(null,t)}k(_t,e)}function Pt(t,e,n){e==yt?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}vt.prototype.then=function(t,e,n){return St(this,f(t)?t:null,f(e)?e:null,n)},w(vt),(t=vt.prototype).ia=function(t,e){return(t=wt(t,t,e)).c=!0,xt(this,t),this},t.s=function(t,e){return St(this,null,t,e)},t.cancel=function(t){this.a==mt&&ft(function(){!function t(e,n){if(e.a==mt)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&&(s.c||(i++,s.a==e&&(o=s),!(o&&1<i)));s=s.next)o||(a=s);o&&(r.a==mt&&1==i?t(r,n):(a?((i=a).next==r.f&&(r.f=i),i.next=i.next.next):It(r),Ot(r,o,gt,n)))}e.c=null}else kt(e,gt,n)}(this,new Dt(t))},this)},t.Lc=function(t){this.a=mt,kt(this,yt,t)},t.Mc=function(t){this.a=mt,kt(this,gt,t)},t.Ub=function(){for(var t;t=It(this);)Ot(this,t,this.a,this.i);this.h=!1};var Rt=lt;function Dt(t){T.call(this,t)}function Mt(){0!=Lt&&(Ft[this[p]||(this[p]=++d)]=this),this.pa=this.pa,this.ja=this.ja}_(Dt,T),Dt.prototype.name="cancel";var Lt=0,Ft={};function Ut(t){if(!t.pa&&(t.pa=!0,t.ua(),0!=Lt)){var e=t[p]||(t[p]=++d);if(0!=Lt&&t.ja&&0<t.ja.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ft[e]}}function jt(t){return jt[" "](t),t}Mt.prototype.pa=!1,Mt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},jt[" "]=a;var Bt,qt,Vt=nt("Opera"),Wt=nt("Trident")||nt("MSIE"),Ht=nt("Edge"),zt=Ht||Wt,Kt=nt("Gecko")&&!(J(H.toLowerCase(),"webkit")&&!nt("Edge"))&&!(nt("Trident")||nt("MSIE"))&&!nt("Edge"),Gt=J(H.toLowerCase(),"webkit")&&!nt("Edge");function Qt(){var t=n.document;return t?t.documentMode:void 0}t:{var Yt="",Xt=(qt=H,Kt?/rv:([^\);]+)(\)|;)/.exec(qt):Ht?/Edge\/([\d\.]+)/.exec(qt):Wt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(qt):Gt?/WebKit\/(\S+)/.exec(qt):Vt?/(?:Version)[ \/]?(\S+)/.exec(qt):void 0);if(Xt&&(Yt=Xt?Xt[1]:""),Wt){var $t=Qt();if(null!=$t&&$t>parseFloat(Yt)){Bt=String($t);break t}}Bt=Yt}var Jt,Zt={};function te(t){return function(t,e){var n=Zt;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,function(){for(var e=0,n=V(String(Bt)).split("."),r=V(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=Z(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||Z(0==a[2].length,0==s[2].length)||Z(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}var ee=n.document;Jt=ee&&Wt?Qt()||("CSS1Compat"==ee.compatMode?parseInt(Bt,10):5):void 0;var ne=Object.freeze||function(t){return t},re=!Wt||9<=Number(Jt),ie=Wt&&!te("9"),oe=function(){if(!n.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return n.addEventListener("test",a,e),n.removeEventListener("test",a,e),t}();function ae(t,e){this.type=t,this.b=this.target=e,this.Gb=!0}function se(t,e){if(ae.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Kt){t:{try{jt(e.nodeName);var o=!0;break t}catch(t){}o=!1}o||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=i(t.pointerType)?t.pointerType:ue[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}ae.prototype.preventDefault=function(){this.Gb=!1},_(se,ae);var ue=ne({2:"touch",3:"pen",4:"mouse"});se.prototype.preventDefault=function(){se.lb.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,ie)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},se.prototype.f=function(){return this.a};var ce="closure_listenable_"+(1e6*Math.random()|0),le=0;function fe(t){t.na=!0,t.listener=null,t.proxy=null,t.src=null,t.La=null}function he(t){this.src=t,this.a={},this.b=0}function pe(t,e){var n=e.type;n in t.a&&F(t.a[n],e)&&(fe(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function de(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.na&&o.listener==e&&o.capture==!!n&&o.La==r)return i}return-1}he.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=de(t,e,r,i);return-1<a?(e=t[a],n||(e.Ia=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.La=i,this.key=++le,this.na=this.Ia=!1}(e,this.src,o,!!r,i)).Ia=n,t.push(e)),e};var ve="closure_lm_"+(1e6*Math.random()|0),me={};function ye(t,e,n,r,i){if(r&&r.once)be(t,e,n,r,i);else if(c(e))for(var o=0;o<e.length;o++)ye(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Ie(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!1,r,i)}function ge(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=h(i)?!!i.capture:!!i,s=Se(t);if(s||(t[ve]=s=new he(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=xe,e=re?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)oe||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(Ee(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function be(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)be(t,e[o],n,r,i);else n=Ne(n),t&&t[ce]?Oe(t,e,n,h(r)?!!r.capture:!!r,i):ge(t,e,n,!0,r,i)}function _e(t,e,n,r,i){if(c(e))for(var o=0;o<e.length;o++)_e(t,e[o],n,r,i);else r=h(r)?!!r.capture:!!r,n=Ne(n),t&&t[ce]?(t=t.m,(e=String(e).toString())in t.a&&(-1<(n=de(o=t.a[e],n,r,i))&&(fe(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Se(t))&&(e=t.a[e.toString()],t=-1,e&&(t=de(e,n,r,i)),(n=-1<t?e[t]:null)&&we(n))}function we(t){if("number"!=typeof t&&t&&!t.na){var e=t.src;if(e&&e[ce])pe(e.m,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(Ee(n),r):e.addListener&&e.removeListener&&e.removeListener(r),0,(n=Se(e))?(pe(n,t),0==n.b&&(n.src=null,e[ve]=null)):fe(t)}}}function Ee(t){return t in me?me[t]:me[t]="on"+t}function Te(t,e,n,r){var i=!0;if((t=Se(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.na&&(o=Ce(o,r),i=i&&!1!==o)}return i}function Ce(t,e){var n=t.listener,r=t.La||t.src;return t.Ia&&we(t),n.call(r,e)}function xe(t,e){if(t.na)return!0;if(!re){if(!e)t:{e=["window","event"];for(var r=n,i=0;i<e.length;i++)if(null==(r=r[e[i]])){e=null;break t}e=r}if(e=new se(i=e,this),r=!0,!(0>i.keyCode||void 0!=i.returnValue)){t:{var o=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(t){o=!0}(o||void 0==i.returnValue)&&(i.returnValue=!0)}for(i=[],o=e.b;o;o=o.parentNode)i.push(o);for(t=t.type,o=i.length-1;0<=o;o--){e.b=i[o];var a=Te(i[o],t,!0,e);r=r&&a}for(o=0;o<i.length;o++)e.b=i[o],a=Te(i[o],t,!1,e),r=r&&a}return r}return Ce(t,new se(e,this))}function Se(t){return(t=t[ve])instanceof he?t:null}var ke="__closure_events_fn_"+(1e9*Math.random()>>>0);function Ne(t){return f(t)?t:(t[ke]||(t[ke]=function(e){return t.handleEvent(e)}),t[ke])}function Ae(){Mt.call(this),this.m=new he(this),this.Nb=this,this.Ua=null}function Ie(t,e,n,r,i){t.m.add(String(e),n,!1,r,i)}function Oe(t,e,n,r,i){t.m.add(String(e),n,!0,r,i)}function Pe(t,e,n,r){if(!(e=t.m.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.na&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ia&&pe(t.m,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Gb}function Re(t,e,r){if(f(t))r&&(t=y(t,r));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:n.setTimeout(t,e||0)}function De(t){var e=null;return new vt(function(n,r){-1==(e=Re(function(){n(void 0)},t))&&r(Error("Failed to schedule timer."))}).s(function(t){throw n.clearTimeout(e),t})}function Me(t){if(t.S&&"function"==typeof t.S)return t.S();if(i(t))return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function Le(t){if(t.U&&"function"==typeof t.U)return t.U();if(!t.S||"function"!=typeof t.S){if(l(t)||i(t)){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Fe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Fe)for(n=t.U(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ue(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];je(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)je(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}_(Ae,Mt),Ae.prototype[ce]=!0,Ae.prototype.addEventListener=function(t,e,n,r){ye(this,t,e,n,r)},Ae.prototype.removeEventListener=function(t,e,n,r){_e(this,t,e,n,r)},Ae.prototype.dispatchEvent=function(t){var e,n=this.Ua;if(n)for(e=[];n;n=n.Ua)e.push(n);n=this.Nb;var r=t.type||t;if(i(t))t=new ae(t,n);else if(t instanceof ae)t.target=t.target||n;else{var o=t;ct(t=new ae(r,n),o)}if(o=!0,e)for(var a=e.length-1;0<=a;a--){var s=t.b=e[a];o=Pe(s,r,!0,t)&&o}if(o=Pe(s=t.b=n,r,!0,t)&&o,o=Pe(s,r,!1,t)&&o,e)for(a=0;a<e.length;a++)o=Pe(s=t.b=e[a],r,!1,t)&&o;return o},Ae.prototype.ua=function(){if(Ae.lb.ua.call(this),this.m){var t,e=this.m;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)0,fe(n[r]);delete e.a[t],e.b--}}this.Ua=null},(t=Fe.prototype).S=function(){Ue(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},t.U=function(){return Ue(this),this.a.concat()},t.clear=function(){this.b={},this.c=this.a.length=0},t.get=function(t,e){return je(this.b,t)?this.b[t]:e},t.set=function(t,e){je(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},t.forEach=function(t,e){for(var n=this.U(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Be=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function qe(t,e){if(this.b=this.m=this.c="",this.i=null,this.h=this.g="",this.f=!1,t instanceof qe){this.f=void 0!==e?e:t.f,Ve(this,t.c),this.m=t.m,this.b=t.b,We(this,t.i),this.g=t.g,e=t.a;var n=new rn;n.c=e.c,e.a&&(n.a=new Fe(e.a),n.b=e.b),He(this,n),this.h=t.h}else t&&(n=String(t).match(Be))?(this.f=!!e,Ve(this,n[1]||"",!0),this.m=Ye(n[2]||""),this.b=Ye(n[3]||"",!0),We(this,n[4]),this.g=Ye(n[5]||"",!0),He(this,n[6]||"",!0),this.h=Ye(n[7]||"")):(this.f=!!e,this.a=new rn(null,this.f))}function Ve(t,e,n){t.c=n?Ye(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function We(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function He(t,e,n){e instanceof rn?(t.a=e,function(t,e){e&&!t.f&&(on(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(sn(this,e),cn(this,n,t))},t)),t.f=e}(t.a,t.f)):(n||(e=Xe(e,en)),t.a=new rn(e,t.f))}function ze(t,e,n){t.a.set(e,n)}function Ke(t,e){return t.a.get(e)}function Ge(t){return t instanceof qe?new qe(t):new qe(t,void 0)}function Qe(t,e){var n=new qe(null,void 0);return Ve(n,"https"),t&&(n.b=t),e&&(n.g=e),n}function Ye(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Xe(t,e,n){return i(t)?(t=encodeURI(t).replace(e,$e),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function $e(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}qe.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Xe(e,Je,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.m)&&t.push(Xe(e,Je,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(Xe(n,"/"==n.charAt(0)?tn:Ze,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Xe(n,nn)),t.join("")};var Je=/[#\/\?@]/g,Ze=/[#\?:]/g,tn=/[#\?]/g,en=/[#\?@]/g,nn=/#/g;function rn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function on(t){t.a||(t.a=new Fe,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function an(t){var e=Le(t);if(void 0===e)throw Error("Keys are undefined");var n=new rn(null,void 0);t=Me(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];c(o)?cn(n,i,o):n.add(i,o)}return n}function sn(t,e){on(t),e=ln(t,e),je(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,je((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ue(t)))}function un(t,e){return on(t),e=ln(t,e),je(t.a.b,e)}function cn(t,e,n){sn(t,e),0<n.length&&(t.c=null,t.a.set(ln(t,e),B(n)),t.b+=n.length)}function ln(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(t=rn.prototype).add=function(t,e){on(this),this.c=null,t=ln(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},t.clear=function(){this.a=this.c=null,this.b=0},t.forEach=function(t,e){on(this),this.a.forEach(function(n,r){R(n,function(n){t.call(e,n,r,this)},this)},this)},t.U=function(){on(this);for(var t=this.a.S(),e=this.a.U(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},t.S=function(t){on(this);var e=[];if(i(t))un(this,t)&&(e=j(e,this.a.get(ln(this,t))));else{t=this.a.S();for(var n=0;n<t.length;n++)e=j(e,t[n])}return e},t.set=function(t,e){return on(this),this.c=null,un(this,t=ln(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},t.get=function(t,e){return 0<(t=t?this.S(t):[]).length?String(t[0]):e},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.U(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.S(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var fn=!Wt||9<=Number(Jt);function hn(){this.a="",this.b=dn}function pn(t){return t instanceof hn&&t.constructor===hn&&t.b===dn?t.a:(x("expected object of type Const, got '"+t+"'"),"type_error:Const")}hn.prototype.ma=!0,hn.prototype.la=function(){return this.a},hn.prototype.toString=function(){return"Const{"+this.a+"}"};var dn={};function vn(t){var e=new hn;return e.a=t,e}function mn(){this.a="",this.b=wn}function yn(t){return t instanceof mn&&t.constructor===mn&&t.b===wn?t.a:(x("expected object of type TrustedResourceUrl, got '"+t+"' of type "+s(t)),"type_error:TrustedResourceUrl")}function gn(t,e){var n=pn(t);if(!_n.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=new mn;return e.a=t,e}(t=n.replace(bn,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof hn?pn(t):encodeURIComponent(String(t))}))}vn(""),mn.prototype.ma=!0,mn.prototype.la=function(){return this.a},mn.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var bn=/%{(\w+)}/g,_n=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,wn={};function En(){this.a="",this.b=Sn}function Tn(t){return t instanceof En&&t.constructor===En&&t.b===Sn?t.a:(x("expected object of type SafeUrl, got '"+t+"' of type "+s(t)),"type_error:SafeUrl")}En.prototype.ma=!0,En.prototype.la=function(){return this.a},En.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Cn=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function xn(t){return t instanceof En?t:(t=t.ma?t.la():String(t),Cn.test(t)||(t="about:invalid#zClosurez"),kn(t))}var Sn={};function kn(t){var e=new En;return e.a=t,e}function Nn(){this.a="",this.b=An}kn("about:blank"),Nn.prototype.ma=!0,Nn.prototype.la=function(){return this.a},Nn.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var An={};function In(t){var e=new Nn;return e.a=t,e}function On(t){var e=document;return i(t)?e.getElementById(t):t}function Pn(t,e){rt(e,function(e,n){e&&e.ma&&(e=e.la()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Rn.hasOwnProperty(n)?t.setAttribute(Rn[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}In("<!DOCTYPE html>"),In(""),In("
");var Rn={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Dn(t,e,n){var r=arguments,o=document,a=String(r[0]),s=r[1];if(!fn&&s&&(s.name||s.type)){if(a=["<",a],s.name&&a.push(' name="',W(s.name),'"'),s.type){a.push(' type="',W(s.type),'"');var u={};ct(u,s),delete u.type,s=u}a.push(">"),a=a.join("")}return a=o.createElement(a),s&&(i(s)?a.className=s:c(s)?a.className=s.join(" "):Pn(a,s)),2<r.length&&function(t,e,n){function r(n){n&&e.appendChild(i(n)?t.createTextNode(n):n)}for(var o=2;o<n.length;o++){var a=n[o];!l(a)||h(a)&&0<a.nodeType?r(a):R(Mn(a)?B(a):a,r)}}(o,a,r),a}function Mn(t){if(t&&"number"==typeof t.length){if(h(t))return"function"==typeof t.item||"string"==typeof t.item;if(f(t))return"function"==typeof t.item}return!1}function Ln(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(c(n)){var i=n;n=i.length,r.push("[");for(var o="",a=0;a<n;a++)r.push(o),t(e,i[a],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&&("function"!=typeof(a=n[i])&&(r.push(o),jn(i,r),r.push(":"),t(e,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":jn(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new function(){},t,e),e.join("")}var Fn={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Un=/\uffff/.test("�")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function jn(t,e){e.push('"',t.replace(Un,function(t){var e=Fn[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Fn[t]=e),e}),'"')}function Bn(){var t=ir();return Wt&&!!Jt&&11==Jt||/Edge\/\d+/.test(t)}function qn(){return n.window&&n.window.location.href||self&&self.location&&self.location.href||""}function Vn(t,e){e=e||n.window;var r="about:blank";t&&(r=Tn(xn(t))),e.location.href=r}function Wn(t){return!!((t=(t||ir()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function Hn(t){t=t||n.window;try{t.close()}catch(t){}}function zn(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=ir().toLowerCase(),r&&(e.target=r,J(n,"crios/")&&(e.target="_blank")),er(ir())==Zn&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof En?n:xn(void 0!==n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((nt("iPhone")&&!nt("iPod")&&!nt("iPad")||nt("iPad")||nt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(a=r.document.createElement("A"),e instanceof En||e instanceof En||(e=e.ma?e.la():String(e),Cn.test(e)||(e="about:invalid#zClosurez"),e=kn(e)),a.href=Tn(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Tn(e),a&&(zt&&J(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,vn("b/12014412, meta tag with sanitized URL"),t=In(t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+W(t)+'">'),a.document.write(function(t){return t instanceof Nn&&t.constructor===Nn&&t.b===An?t.a:(x("expected object of type SafeHtml, got '"+t+"' of type "+s(t)),"type_error:SafeHtml")}(t)),a.document.close())):(a=r.open(Tn(e),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var Kn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;function Gn(){var t=null;return new vt(function(e){"complete"==n.document.readyState?e():(t=function(){e()},be(window,"load",t))}).s(function(e){throw _e(window,"load",t),e})}function Qn(t){return t=t||ir(),!("file:"!==cr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Yn(){var t=n.window;try{return!(!t||t==t.top)}catch(t){return!1}}function Xn(){return"object"!=typeof n.window&&"function"==typeof n.importScripts}function $n(){return r.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.a.INTERNAL.hasOwnProperty("node")?"Node":Xn()?"Worker":"Browser"}function Jn(){var t=$n();return"ReactNative"===t||"Node"===t}var Zn="Firefox",tr="Chrome";function er(t){var e=t.toLowerCase();return J(e,"opera/")||J(e,"opr/")||J(e,"opios/")?"Opera":J(e,"iemobile")?"IEMobile":J(e,"msie")||J(e,"trident/")?"IE":J(e,"edge/")?"Edge":J(e,"firefox/")?Zn:J(e,"silk/")?"Silk":J(e,"blackberry")?"Blackberry":J(e,"webos")?"Webos":!J(e,"safari/")||J(e,"chrome/")||J(e,"crios/")||J(e,"android")?!J(e,"chrome/")&&!J(e,"crios/")||J(e,"edge/")?J(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":tr:"Safari"}var nr={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};function rr(t,e){e=e||[];var n,r=[],i={};for(n in nr)i[nr[n]]=!0;for(n=0;n<e.length;n++)void 0!==i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=$n())?r=er(i=ir()):"Worker"===r&&(r=er(i=ir())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function ir(){return n.navigator&&n.navigator.userAgent||""}function or(t,e){t=t.split("."),e=e||n;for(var r=0;r<t.length&&"object"==typeof e&&null!=e;r++)e=e[t[r]];return r!=t.length&&(e=void 0),e}function ar(){try{var t=n.localStorage,e=dr();if(t)return t.setItem(e,"1"),t.removeItem(e),!Bn()||!!n.indexedDB}catch(t){return Xn()&&!!n.indexedDB}return!1}function sr(){return(ur()||"chrome-extension:"===cr()||Qn())&&!Jn()&&ar()&&!Xn()}function ur(){return"http:"===cr()||"https:"===cr()}function cr(){return n.location&&n.location.protocol||null}function lr(t){return!Wn(t=t||ir())&&er(t)!=Zn}function fr(t){return void 0===t?null:Ln(t)}function hr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function pr(t){if(null!==t)return JSON.parse(t)}function dr(t){return t||Math.floor(1e9*Math.random()).toString()}function vr(t){return"Safari"!=er(t=t||ir())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function mr(){var t=n.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var r=0;r<t.CP.length;r++)t.CP[r]=null}function yr(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=ir(),e=$n(),this.b=Wn(t)||"ReactNative"===e}function gr(){var t=n.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function br(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function _r(){return!(!or("fireauth.oauthhelper",n)&&!or("fireauth.iframe",n))}yr.prototype.get=function(){var t=n.navigator;return!t||"boolean"!=typeof t.onLine||!ur()&&"chrome-extension:"!==cr()&&void 0===t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var wr,Er={};function Tr(t){Er[t]||(Er[t]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t))}try{var Cr={};Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Cr,"abcd",{configurable:!0,enumerable:!0,value:2}),wr=2==Cr.abcd}catch(qt){wr=!1}function xr(t,e,n){wr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Sr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&xr(t,n,e[n])}function kr(t){var e={};return Sr(e,t),e}function Nr(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)xr(e,n,Nr(t[n]));return e}var Ar="EMAIL_SIGNIN",Ir="email",Or="newEmail",Pr="requestType",Rr="email",Dr="fromEmail",Mr="data",Lr="operation";function Fr(t,e){this.code=jr+t,this.message=e||Br[t]||""}function Ur(t){var e=t&&t.code;return e?new Fr(e.substring(jr.length),t.message):null}_(Fr,Error),Fr.prototype.D=function(){return{code:this.code,message:this.message}},Fr.prototype.toJSON=function(){return this.D()};var jr="auth/",Br={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."};function qr(t){var e=t[zr];if(void 0===e)throw new Fr("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&&!e.length)throw new Fr("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Vr];if(n&&"object"==typeof n){e=n[Qr];var r=n[Kr];if(n=n[Gr],"string"==typeof e&&e.length){if(this.a=e,void 0!==r&&"boolean"!=typeof r)throw new Fr("argument-error",Kr+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new Fr("argument-error",Gr+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==e)throw new Fr("argument-error",Qr+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new Fr("missing-android-pkg-name")}}else if(void 0!==n)throw new Fr("argument-error",Vr+" property must be a non null object when specified.");if(this.f=null,(e=t[Hr])&&"object"==typeof e){if("string"==typeof(e=e[Yr])&&e.length)this.f=e;else if(void 0!==e)throw new Fr("argument-error",Yr+" property must be a non empty string when specified.")}else if(void 0!==e)throw new Fr("argument-error",Hr+" property must be a non null object when specified.");if(void 0!==(t=t[Wr])&&"boolean"!=typeof t)throw new Fr("argument-error",Wr+" property must be a boolean when specified.");this.c=!!t}var Vr="android",Wr="handleCodeInApp",Hr="iOS",zr="url",Kr="installApp",Gr="minimumVersion",Qr="packageName",Yr="bundleId";function Xr(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e)null===e[n]&&delete e[n];return e}var $r=null,Jr=null;function Zr(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Jr[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!$r){$r={},Jr={};for(var t=0;65>t;t++)$r[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Jr[$r[t]]=t,62<=t&&(Jr["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,function(t){e+=String.fromCharCode(t)}),e}function ti(t){this.c=t.sub,b(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function ei(t){return(t=ni(t))&&t.sub&&t.iss&&t.aud&&t.exp?new ti(t):null}function ni(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(Zr(t))}catch(t){}return null}ti.prototype.f=function(){return this.b};var ri="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),ii=["client_id","response_type","scope","redirect_uri","state"],oi={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:ii},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:ii},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:ii},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ri}};function ai(t){for(var e in oi)if(oi[e].Na==t)return oi[e];return null}function si(t){var e={};e["facebook.com"]=hi,e["google.com"]=di,e["github.com"]=pi,e["twitter.com"]=vi;var n=t&&t[ci];try{if(n)return e[n]?new e[n](t):new fi(t);if(void 0!==t[ui])return new li(t)}catch(t){}return null}var ui="idToken",ci="providerId";function li(t){var e=t[ci];if(!e&&t[ui]){var n=ei(t[ui]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,void 0!==t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),xr(this,"providerId",e),xr(this,"isNewUser",n)}function fi(t){li.call(this,t),xr(this,"profile",Nr((t=pr(t.rawUserInfo||"{}"))||{}))}function hi(t){if(fi.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function pi(t){if(fi.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",this.profile&&this.profile.login||null)}function di(t){if(fi.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function vi(t){if(fi.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");xr(this,"username",t.screenName||null)}function mi(t){var e=Ge(t),n=Ke(e,"link"),r=Ke(Ge(n),"link");return Ke(Ge(e=Ke(e,"deep_link_id")),"link")||e||r||n||t}function yi(t,e){return t.then(function(t){if(t[$o]){var n=ei(t[$o]);if(!n||e!=n.c)throw new Fr("user-mismatch");return t}throw new Fr("user-mismatch")}).s(function(t){throw t&&t.code&&t.code==jr+"user-not-found"?new Fr("user-mismatch"):t})}function gi(t,e,n){if(e.idToken||e.accessToken)e.idToken&&xr(this,"idToken",e.idToken),e.accessToken&&xr(this,"accessToken",e.accessToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new Fr("internal-error","failed to construct a credential");xr(this,"accessToken",e.oauthToken),xr(this,"secret",e.oauthTokenSecret)}xr(this,"providerId",t),xr(this,"signInMethod",n)}function bi(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,{postBody:an(e).toString(),requestUri:"http://localhost"}}function _i(t,e){this.Ac=e||[],Sr(this,{providerId:t,isOAuthProvider:!0}),this.vb={},this.$a=(ai(t)||{}).Ma||null,this.Ya=null}function wi(t){_i.call(this,t,ii),this.a=[]}function Ei(){wi.call(this,"facebook.com")}function Ti(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ei).credential(null,e)}function Ci(){wi.call(this,"github.com")}function xi(t){if(!t)throw new Fr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return h(t)&&(e=t.accessToken),(new Ci).credential(null,e)}function Si(){wi.call(this,"google.com"),this.ta("profile")}function ki(t,e){var n=t;return h(t)&&(n=t.idToken,e=t.accessToken),(new Si).credential(n,e)}function Ni(){_i.call(this,"twitter.com",ri)}function Ai(t,e){var n=t;if(h(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new Fr("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new gi("twitter.com",n,"twitter.com")}function Ii(t,e,n){this.a=t,this.b=e,xr(this,"providerId","password"),xr(this,"signInMethod",n===Oi.EMAIL_LINK_SIGN_IN_METHOD?Oi.EMAIL_LINK_SIGN_IN_METHOD:Oi.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Oi(){Sr(this,{providerId:"password",isOAuthProvider:!1})}function Pi(t,e){if(!(e=Ri(e)))throw new Fr("argument-error","Invalid email link!");return new Ii(t,e,Oi.EMAIL_LINK_SIGN_IN_METHOD)}function Ri(t){var e=Ke((t=new function(t){this.a=Ge(t)}(t=mi(t))).a,"oobCode")||null;return"signIn"===(Ke(t.a,"mode")||null)&&e?e:null}function Di(t){if(!(t.Sa&&t.Ra||t.Fa&&t.$))throw new Fr("internal-error");this.a=t,xr(this,"providerId","phone"),xr(this,"signInMethod","phone")}function Mi(t){return t.a.Fa&&t.a.$?{temporaryProof:t.a.Fa,phoneNumber:t.a.$}:{sessionInfo:t.a.Sa,code:t.a.Ra}}function Li(t){try{this.a=t||r.a.auth()}catch(t){throw new Fr("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Sr(this,{providerId:"phone",isOAuthProvider:!1})}function Fi(t,e){if(!t)throw new Fr("missing-verification-id");if(!e)throw new Fr("missing-verification-code");return new Di({Sa:t,Ra:e})}function Ui(t){if(t.temporaryProof&&t.phoneNumber)return new Di({Fa:t.temporaryProof,$:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret;t=t&&t.oauthIdToken;try{switch(e){case"google.com":return ki(t,n);case"facebook.com":return Ti(n);case"github.com":return xi(n);case"twitter.com":return Ai(n,r);default:return new wi(e).credential(t,n)}}catch(t){return null}}function ji(t){if(!t.isOAuthProvider)throw new Fr("invalid-oauth-provider")}function Bi(t,e,n,r,i){if(this.b=t,this.c=e||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new Fr("invalid-auth-event");if(this.f&&this.a)throw new Fr("invalid-auth-event");if(this.f&&!this.g)throw new Fr("invalid-auth-event")}function qi(t){return(t=t||{}).type?new Bi(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&Ur(t.error)):null}function Vi(){this.b=null,this.a=[]}_(fi,li),_(hi,fi),_(pi,fi),_(di,fi),_(vi,fi),gi.prototype.ya=function(t){return da(t,bi(this))},gi.prototype.c=function(t,e){var n=bi(this);return n.idToken=e,va(t,n)},gi.prototype.f=function(t,e){return yi(ma(t,bi(this)),e)},gi.prototype.D=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},_i.prototype.Da=function(t){return this.vb=ot(t),this},_(wi,_i),wi.prototype.ta=function(t){return L(this.a,t)||this.a.push(t),this},wi.prototype.Ab=function(){return B(this.a)},wi.prototype.credential=function(t,e){if(!t&&!e)throw new Fr("argument-error","credential failed: must provide the ID token and/or the access token.");return new gi(this.providerId,{idToken:t||null,accessToken:e||null},this.providerId)},_(Ei,wi),xr(Ei,"PROVIDER_ID","facebook.com"),xr(Ei,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),_(Ci,wi),xr(Ci,"PROVIDER_ID","github.com"),xr(Ci,"GITHUB_SIGN_IN_METHOD","github.com"),_(Si,wi),xr(Si,"PROVIDER_ID","google.com"),xr(Si,"GOOGLE_SIGN_IN_METHOD","google.com"),_(Ni,_i),xr(Ni,"PROVIDER_ID","twitter.com"),xr(Ni,"TWITTER_SIGN_IN_METHOD","twitter.com"),Ii.prototype.ya=function(t){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,Ca,{email:this.a,oobCode:this.b}):za(t,qa,{email:this.a,password:this.b})},Ii.prototype.c=function(t,e){return this.signInMethod==Oi.EMAIL_LINK_SIGN_IN_METHOD?za(t,xa,{idToken:e,email:this.a,oobCode:this.b}):za(t,Ma,{idToken:e,email:this.a,password:this.b})},Ii.prototype.f=function(t,e){return yi(this.ya(t),e)},Ii.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},Sr(Oi,{PROVIDER_ID:"password"}),Sr(Oi,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Sr(Oi,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Di.prototype.ya=function(t){return t.Ta(Mi(this))},Di.prototype.c=function(t,e){var n=Mi(this);return n.idToken=e,za(t,Wa,n)},Di.prototype.f=function(t,e){var n=Mi(this);return n.operation="REAUTH",yi(t=za(t,Ha,n),e)},Di.prototype.D=function(){var t={providerId:"phone"};return this.a.Sa&&(t.verificationId=this.a.Sa),this.a.Ra&&(t.verificationCode=this.a.Ra),this.a.Fa&&(t.temporaryProof=this.a.Fa),this.a.$&&(t.phoneNumber=this.a.$),t},Li.prototype.Ta=function(t,e){var n=this.a.b;return Et(e.verify()).then(function(r){if(!i(r))throw new Fr("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":return function(t,e){return za(t,Ra,e)}(n,{phoneNumber:t,recaptchaToken:r}).then(function(t){return"function"==typeof e.reset&&e.reset(),t},function(t){throw"function"==typeof e.reset&&e.reset(),t});default:throw new Fr("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Sr(Li,{PROVIDER_ID:"phone"}),Sr(Li,{PHONE_SIGN_IN_METHOD:"phone"}),Bi.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var Wi=null;function Hi(t){var e="unauthorized-domain",n=void 0,r=Ge(t);t=r.b,"chrome-extension"==(r=r.c)?n=q("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=q("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",Fr.call(this,e,n)}function zi(t,e,n){Fr.call(this,t,n),(t=e||{}).wb&&xr(this,"email",t.wb),t.$&&xr(this,"phoneNumber",t.$),t.credential&&xr(this,"credential",t.credential)}function Ki(t){if(t.code){var e=t.code||"";0==e.indexOf(jr)&&(e=e.substring(jr.length));var n={credential:Ui(t)};if(t.email)n.wb=t.email;else{if(!t.phoneNumber)return new Fr(e,t.message||void 0);n.$=t.phoneNumber}return new zi(e,n,t.message)}return null}Vi.prototype.subscribe=function(t){var e=this;this.a.push(t),this.b||(this.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"==typeof(t=or("universalLinks.subscribe",n))&&t(null,this.b))},Vi.prototype.unsubscribe=function(t){U(this.a,function(e){return e==t})},_(Hi,Fr),_(zi,Fr),zi.prototype.D=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var e=this.credential&&this.credential.D();return e&&ct(t,e),t},zi.prototype.toJSON=function(){return this.D()};var Gi,Qi=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function Yi(){}function Xi(t){return t.c||(t.c=t.b())}function $i(){}function Ji(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Zi(){}function to(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=y(this.bc,this),this.a.onerror=y(this.Bb,this),this.a.onprogress=y(this.cc,this),this.a.ontimeout=y(this.fc,this)}function eo(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function no(t,e,n){this.reset(t,e,n,void 0,void 0)}Yi.prototype.c=null,_($i,Yi),$i.prototype.a=function(){var t=Ji(this);return t?new ActiveXObject(t):new XMLHttpRequest},$i.prototype.b=function(){var t={};return Ji(this)&&(t[0]=!0,t[1]=!0),t},Gi=new $i,_(Zi,Yi),Zi.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new to;throw Error("Unsupported browser")},Zi.prototype.b=function(){return{}},(t=to.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},t.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},t.bc=function(){this.status=200,this.responseText=this.a.responseText,eo(this,4)},t.Bb=function(){this.status=500,this.responseText="",eo(this,4)},t.fc=function(){this.Bb()},t.cc=function(){this.status=200,eo(this,1)},t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},no.prototype.a=null;function ro(t){this.f=t,this.b=this.c=this.a=null}function io(t,e){this.name=t,this.value=e}no.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||b(),delete this.a},io.prototype.toString=function(){return this.name};var oo=new io("SEVERE",1e3),ao=new io("WARNING",900),so=new io("CONFIG",700),uo=new io("FINE",500);ro.prototype.log=function(t,e,n){if(t.value>=function t(e){return e.c?e.c:e.a?t(e.a):(x("Root logger has no level set."),null)}(this).value)for(f(e)&&(e=e()),t=new no(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var co={},lo=null;function fo(t){var e;if(lo||(lo=new ro(""),co[""]=lo,lo.c=so),!(e=co[t])){e=new ro(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=fo(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,co[t]=e}return e}function ho(t,e){t&&t.log(uo,e,void 0)}function po(t){this.f=t}function vo(t){Ae.call(this),this.i=t,this.readyState=mo,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=fo("goog.net.FetchXmlHttp")}_(po,Yi),po.prototype.a=function(){return new vo(this.f)},po.prototype.b=function(t){return function(){return t}}({}),_(vo,Ae);var mo=0;function yo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function go(t){Ae.call(this),this.headers=new Fe,this.C=t||null,this.c=!1,this.w=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.i=this.G=!1,this.g=0,this.u=null,this.o=bo,this.v=this.O=!1}(t=vo.prototype).open=function(t,e){if(this.readyState!=mo)throw this.abort(),Error("Error reopening a connection");this.h=t,this.c=e,this.readyState=1,yo(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.g,method:this.h,credentials:void 0,cache:void 0};t&&(e.body=t),this.i.fetch(new Request(this.c,e)).then(this.ec.bind(this),this.Cb.bind(this))},t.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,yo(this)),this.readyState=mo},t.ec=function(t){this.a&&(this.b||(this.b=t.headers,this.readyState=2,yo(this)),this.a&&(this.readyState=3,yo(this),this.a&&t.text().then(this.dc.bind(this,t),this.Cb.bind(this))))},t.dc=function(t,e){this.a&&(this.status=t.status,this.statusText=t.statusText,this.responseText=e,this.readyState=4,yo(this))},t.Cb=function(t){var e=this.f;e&&e.log(ao,"Failed to fetch url "+this.c,t instanceof Error?t:Error(t)),this.a&&(this.readyState=4,yo(this))},t.setRequestHeader=function(t,e){this.g.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.f)&&t.log(ao,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.f;return t&&t.log(ao,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},_(go,Ae);var bo="";go.prototype.b=fo("goog.net.XhrIo");var _o=/^https?$/i,wo=["POST","PUT"];function Eo(t,e,r,o,a){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);r=r?r.toUpperCase():"GET",t.l=e,t.h="",t.N=r,t.G=!1,t.c=!0,t.a=t.C?t.C.a():Gi.a(),t.w=t.C?Xi(t.C):Xi(Gi),t.a.onreadystatechange=y(t.Fb,t);try{ho(t.b,Oo(t,"Opening Xhr")),t.I=!0,t.a.open(r,String(e),!0),t.I=!1}catch(e){return ho(t.b,Oo(t,"Error opening Xhr: "+e.message)),void Co(t,e)}e=o||"";var s=new Fe(t.headers);a&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||i(t))R(t,e,void 0);else for(var n=Le(t),r=Me(t),o=r.length,a=0;a<o;a++)e.call(void 0,r[a],n&&n[a],t)}(a,function(t,e){s.set(e,t)}),a=function(t){t:{for(var e=To,n=t.length,r=i(t)?t.split(""):t,o=0;o<n;o++)if(o in r&&e.call(void 0,r[o],o,t)){e=o;break t}e=-1}return 0>e?null:i(t)?t.charAt(e):t[e]}(s.U()),o=n.FormData&&e instanceof n.FormData,!L(wo,r)||a||o||s.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),s.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.o&&(t.a.responseType=t.o),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{No(t),0<t.g&&(t.v=function(t){return Wt&&te(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(t.a),ho(t.b,Oo(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=y(t.Ga,t)):t.u=Re(t.Ga,t.g,t)),ho(t.b,Oo(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(e){ho(t.b,Oo(t,"Send error: "+e.message)),Co(t,e)}}function To(t){return"content-type"==t.toLowerCase()}function Co(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,xo(t),ko(t)}function xo(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function So(t){if(t.c&&void 0!==e)if(t.w[1]&&4==Ao(t)&&2==Io(t))ho(t.b,Oo(t,"Local request error detected and ignored"));else if(t.i&&4==Ao(t))Re(t.Fb,0,t);else if(t.dispatchEvent("readystatechange"),4==Ao(t)){ho(t.b,Oo(t,"Request complete")),t.c=!1;try{var r,i=Io(t);t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break t;default:o=!1}if(!(r=o)){var a;if(a=0===i){var s=String(t.l).match(Be)[1]||null;if(!s&&n.self&&n.self.location){var u=n.self.location.protocol;s=u.substr(0,u.length-1)}a=!_o.test(s?s.toLowerCase():"")}r=a}if(r)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<Ao(t)?t.a.statusText:""}catch(e){ho(t.b,"Can not get status: "+e.message),c=""}t.h=c+" ["+Io(t)+"]",xo(t)}}finally{ko(t)}}}function ko(t,e){if(t.a){No(t);var n=t.a,r=t.w[0]?a:null;t.a=null,t.w=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(oo,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function No(t){t.a&&t.v&&(t.a.ontimeout=null),t.u&&(n.clearTimeout(t.u),t.u=null)}function Ao(t){return t.a?t.a.readyState:0}function Io(t){try{return 2<Ao(t)?t.a.status:-1}catch(t){return-1}}function Oo(t,e){return e+" ["+t.N+" "+t.l+" "+Io(t)+"]"}function Po(t,e){this.g=[],this.v=t,this.u=e||null,this.f=this.a=!1,this.c=void 0,this.l=this.w=this.i=!1,this.h=0,this.b=null,this.m=0}function Ro(t,e,n){t.a=!0,t.c=n,t.f=!e,Fo(t)}function Do(t){if(t.a){if(!t.l)throw new Uo(t);t.l=!1}}function Mo(t,e,n,r){t.g.push([e,n,r]),t.a&&Fo(t)}function Lo(t){return M(t.g,function(t){return f(t[1])})}function Fo(t){if(t.h&&t.a&&Lo(t)){var e=t.h,r=qo[e];r&&(n.clearTimeout(r.a),delete qo[e]),t.h=0}t.b&&(t.b.m--,delete t.b),e=t.c;for(var i=r=!1;t.g.length&&!t.i;){var o=t.g.shift(),a=o[0],s=o[1];if(o=o[2],a=t.f?s:a)try{var u=a.call(o||t.u,e);void 0!==u&&(t.f=t.f&&(u==e||u instanceof Error),t.c=e=u),(E(e)||"function"==typeof n.Promise&&e instanceof n.Promise)&&(i=!0,t.i=!0)}catch(n){e=n,t.f=!0,Lo(t)||(r=!0)}}t.c=e,i&&(u=y(t.o,t,!0),i=y(t.o,t,!1),e instanceof Po?(Mo(e,u,i),e.w=!0):e.then(u,i)),r&&(e=new Bo(e),qo[e.a]=e,t.h=e.a)}function Uo(){T.call(this)}function jo(){T.call(this)}function Bo(t){this.a=n.setTimeout(y(this.c,this),0),this.b=t}(t=go.prototype).Ga=function(){void 0!==e&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",ho(this.b,Oo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(){this.a&&this.c&&(ho(this.b,Oo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ko(this))},t.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),ko(this,!0)),go.lb.ua.call(this)},t.Fb=function(){this.pa||(this.I||this.i||this.f?So(this):this.tc())},t.tc=function(){So(this)},t.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case bo:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(oo,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(t){return ho(this.b,"Can not get response: "+t.message),null}},Po.prototype.cancel=function(t){if(this.a)this.c instanceof Po&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.m--,0>=e.m&&e.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(t=new jo(this),Do(this),Ro(this,!1,t))}},Po.prototype.o=function(t,e){this.i=!1,Ro(this,t,e)},Po.prototype.C=function(){Do(this),Ro(this,!0,null)},Po.prototype.then=function(t,e,n){var r,i,o=new vt(function(t,e){r=t,i=e});return Mo(this,r,function(t){t instanceof jo?o.cancel():i(t)}),o.then(t,e,n)},w(Po),_(Uo,T),Uo.prototype.message="Deferred has already fired",Uo.prototype.name="AlreadyCalledError",_(jo,T),jo.prototype.message="Deferred was canceled",jo.prototype.name="CanceledError",Bo.prototype.c=function(){throw delete qo[this.a],this.b};var qo={};function Vo(t){var e={},n=e.document||document,r=yn(t),i=document.createElement("SCRIPT"),o={Hb:i,Ga:void 0},a=new Po(Wo,o),s=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){Ho(i,!0);var t=new Go(Ko,"Timeout reached for loading script "+r);Do(a),Ro(a,!1,t)},u),o.Ga=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ho(i,e.dd||!1,s),a.C())},i.onerror=function(){Ho(i,!0,s);var t=new Go(zo,"Error while loading script "+r);Do(a),Ro(a,!1,t)},ct(o=e.attributes||{},{type:"text/javascript",charset:"UTF-8"}),Pn(i,o),i.src=yn(t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Wo(){if(this&&this.Hb){var t=this.Hb;t&&"SCRIPT"==t.tagName&&Ho(t,!0,this.Ga)}}function Ho(t,e,r){null!=r&&n.clearTimeout(r),t.onload=a,t.onerror=a,t.onreadystatechange=a,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}var zo=0,Ko=1;function Go(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),T.call(this,n),this.code=t}function Qo(t){this.f=t}function Yo(t,e,i){if(this.b=t,t=e||{},this.i=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||Jo,this.f=ot(t.secureTokenHeaders||Zo),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||ta,this.a=ot(t.firebaseHeaders||ea),i&&(this.a["X-Client-Version"]=i,this.f["X-Client-Version"]=i),i="Node"==$n(),!(i=n.XMLHttpRequest||i&&r.a.INTERNAL.node&&r.a.INTERNAL.node.XMLHttpRequest)&&!Xn())throw new Fr("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,Xn()?this.c=new po(self):Jn()?this.c=new Qo(i):this.c=new Zi}_(Go,T),_(Qo,Yi),Qo.prototype.a=function(){return new this.f},Qo.prototype.b=function(){return{}};var Xo,$o="idToken",Jo=new yr(3e4,6e4),Zo={"Content-Type":"application/x-www-form-urlencoded"},ta=new yr(3e4,6e4),ea={"Content-Type":"application/json"};function na(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function ra(t,e){e?(t.a["X-Client-Version"]=e,t.f["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.f["X-Client-Version"])}function ia(t,e,r,i,o,a,s){(function(){var t=ir();return!((t=er(t)!=tr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t||Wt&&Jt&&!(9<Jt))})()||Xn()?t=y(t.o,t):(Xo||(Xo=new vt(function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{n[aa]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};var r=gn(oa,{onload:aa});!function(t,e){Mo(t,null,e,void 0)}(Vo(r),function(){e(Error("CORS_UNSUPPORTED"))})}}(t,e)})),t=y(t.l,t)),t(e,r,i,o,a,s)}Yo.prototype.o=function(t,e,r,i,o,a){if(Xn()&&(void 0===n.fetch||void 0===n.Headers||void 0===n.Request))throw new Fr("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var s=new go(this.c);if(a){s.g=Math.max(0,a);var u=setTimeout(function(){s.dispatchEvent("timeout")},a)}Ie(s,"complete",function(){u&&clearTimeout(u);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ho(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(e){t=null}e&&e(t)}),Oe(s,"ready",function(){u&&clearTimeout(u),Ut(this)}),Oe(s,"timeout",function(){u&&clearTimeout(u),Ut(this),e&&e(null)}),Eo(s,t,r,i,o)};var oa=vn("https://apis.google.com/js/client.js?onload=%{onload}"),aa="__fcb"+Math.floor(1e6*Math.random()).toString();function sa(t){if(!Qi.test(t.email))throw new Fr("invalid-email")}function ua(t){"email"in t&&sa(t)}function ca(t){if(!t[$o])throw new Fr("internal-error")}function la(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new Fr("internal-error")}else{if(!t.sessionInfo)throw new Fr("missing-verification-id");if(!t.code)throw new Fr("missing-verification-code")}}Yo.prototype.l=function(t,e,n,r,i){var o=this;Xo.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})}).s(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})},Yo.prototype.Pa=function(){return za(this,La,{})},Yo.prototype.mb=function(t,e){return za(this,Da,{idToken:t,email:e})},Yo.prototype.nb=function(t,e){return za(this,Ma,{idToken:t,password:e})};var fa={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ha(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new Fr("internal-error")}function pa(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Ki(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Ki(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Ki(t)):t.errorMessage&&(e=Ka(t.errorMessage)),e)throw e;if(!t[$o])throw new Fr("internal-error")}function da(t,e){return e.returnIdpCredential=!0,za(t,Fa,e)}function va(t,e){return e.returnIdpCredential=!0,za(t,ja,e)}function ma(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,za(t,Ua,e)}function ya(t){if(!t.oobCode)throw new Fr("invalid-action-code")}(t=Yo.prototype).ob=function(t,e){var n={idToken:t},r=[];return rt(fa,function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),za(this,Da,n)},t.hb=function(t,e){return ct(t={requestType:"PASSWORD_RESET",email:t},e),za(this,Aa,t)},t.ib=function(t,e){return ct(t={requestType:"EMAIL_SIGNIN",email:t},e),za(this,ka,t)},t.gb=function(t,e){return ct(t={requestType:"VERIFY_EMAIL",idToken:t},e),za(this,Na,t)},t.Ta=function(t){return za(this,Va,t)},t.Xa=function(t,e){return za(this,Pa,{oobCode:t,newPassword:e})},t.Ja=function(t){return za(this,ba,{oobCode:t})},t.Va=function(t){return za(this,ga,{oobCode:t})};var ga={endpoint:"setAccountInfo",B:ya,da:"email"},ba={endpoint:"resetPassword",B:ya,J:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e)throw new Fr("internal-error")}},_a={endpoint:"signupNewUser",B:function(t){if(sa(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},wa={endpoint:"createAuthUri"},Ea={endpoint:"deleteAccount",T:["idToken"]},Ta={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(t){if(!c(t.deleteProvider))throw new Fr("internal-error")}},Ca={endpoint:"emailLinkSignin",T:["email","oobCode"],B:sa,J:ca,R:!0},xa={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:sa,J:ca,R:!0},Sa={endpoint:"getAccountInfo"},ka={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Na={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new Fr("internal-error")},da:"email"},Aa={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(t){if("PASSWORD_RESET"!=t.requestType)throw new Fr("internal-error");sa(t)},da:"email"},Ia={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},Oa={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(t){if(!t.recaptchaSiteKey)throw new Fr("internal-error")}},Pa={endpoint:"resetPassword",B:ya,da:"email"},Ra={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},Da={endpoint:"setAccountInfo",T:["idToken"],B:ua,R:!0},Ma={endpoint:"setAccountInfo",T:["idToken"],B:function(t){if(ua(t),!t.password)throw new Fr("weak-password")},J:ca,R:!0},La={endpoint:"signupNewUser",J:ca,R:!0},Fa={endpoint:"verifyAssertion",B:ha,J:pa,R:!0},Ua={endpoint:"verifyAssertion",B:ha,J:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new Fr("user-not-found");if(t.errorMessage)throw Ka(t.errorMessage);if(!t[$o])throw new Fr("internal-error")},R:!0},ja={endpoint:"verifyAssertion",B:function(t){if(ha(t),!t.idToken)throw new Fr("internal-error")},J:pa,R:!0},Ba={endpoint:"verifyCustomToken",B:function(t){if(!t.token)throw new Fr("invalid-custom-token")},J:ca,R:!0},qa={endpoint:"verifyPassword",B:function(t){if(sa(t),!t.password)throw new Fr("wrong-password")},J:ca,R:!0},Va={endpoint:"verifyPhoneNumber",B:la,J:ca},Wa={endpoint:"verifyPhoneNumber",B:function(t){if(!t.idToken)throw new Fr("internal-error");la(t)},J:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Ki(t);ca(t)}},Ha={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:la,J:ca};function za(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.T))return Tt(new Fr("internal-error"));var r,i=e.Eb||"POST";return Et(n).then(e.B).then(function(){return e.R&&(n.returnSecureToken=!0),function(t,e,n,r,i,o){var a=Ge(t.g+e);ze(a,"key",t.b),o&&ze(a,"cb",b().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&ze(a,u,r[u]);return new vt(function(e,o){ia(t,a.toString(),function(t){t?t.error?o(Ga(t,i||{})):e(t):o(new Fr("network-request-failed"))},n,s?void 0:Ln(hr(r)),t.a,t.h.get())})}(t,e.endpoint,i,n,e.Tb,e.rb||!1)}).then(function(t){return r=t}).then(e.J).then(function(){if(!e.da)return r;if(!(e.da in r))throw new Fr("internal-error");return r[e.da]})}function Ka(t){return Ga({error:{errors:[{message:t}],code:400,message:t}})}function Ga(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new Fr(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",ct(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new Fr(r[i],e);return!e&&t&&(e=fr(t)),new Fr("internal-error",e)}var Qa,Ya={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};function Xa(t){for(var e in Ya)if(Ya[e].id===t)return{firebaseEndpoint:(t=Ya[e]).Za,secureTokenEndpoint:t.fb};return null}function $a(t){this.b=t,this.a=null,this.bb=function(t){return(ns||(ns=new vt(function(t,e){function r(){mr(),or("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){mr(),e(Error("Network Error"))},timeout:ts.get()})}if(or("gapi.iframes.Iframe"))t();else if(or("gapi.load"))r();else{var i="__iframefcb"+Math.floor(1e6*Math.random()).toString();n[i]=function(){or("gapi.load")?r():e(Error("Network Error"))},Et(Vo(i=gn(Za,{onload:i}))).s(function(){e(Error("Network Error"))})}}).s(function(t){throw ns=null,t}))).then(function(){return new vt(function(e,n){or("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},es.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}(this)}Qa=Xa("__EID__")?"__EID__":void 0;var Ja,Za=vn("https://apis.google.com/js/api.js?onload=%{onload}"),ts=new yr(3e4,6e4),es=new yr(5e3,15e3),ns=null;function rs(t,e,n){this.i=t,this.g=e,this.h=n,this.f=null,this.a=Qe(this.i,"/__/auth/iframe"),ze(this.a,"apiKey",this.g),ze(this.a,"appName",this.h),this.b=null,this.c=[]}function is(t,e,n,r,i){this.o=t,this.l=e,this.c=n,this.m=r,this.h=this.g=this.i=null,this.a=i,this.f=null}function os(t){try{return r.a.app(t).auth().xa()}catch(t){return[]}}function as(t,e,n,r,i){this.l=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.o=this.u=this.v=null,this.g=[],this.m=this.a=null}function ss(t){var e=qn();return function(t){return za(t,Ia,{}).then(function(t){return t.authorizedDomains||[]})}(t).then(function(t){t:{var n=Ge(e),r=n.c;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Ge(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:Kn.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Hi(qn())})}function us(t){return t.m?t.m:(t.m=Gn().then(function(){if(!t.u){var e=t.c,n=t.h,r=os(t.b),i=new rs(t.l,t.f,t.b);i.f=e,i.b=n,i.c=B(r||[]),t.u=i.toString()}t.i=new $a(t.u),function(t){if(!t.i)throw Error("IfcHandler must be initialized!");!function(t,e){t.bb.then(function(){t.a.register("authEvent",e,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}(t.i,function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=qi(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Et(n)}return n.status="ERROR",Et(n)})}(t)}),t.m)}function cs(t){return t.o||(t.v=t.c?rr(t.c,os(t.b)):null,t.o=new Yo(t.f,Xa(t.h),t.v)),t.o}function ls(t,e,n,r,i,o,a,s,u,c){return(t=new is(t,e,n,r,i)).i=o,t.g=a,t.h=s,t.b=ot(u||null),t.f=c,t.toString()}function fs(t){if(this.a=t||r.a.INTERNAL.reactNative&&r.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new Fr("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function hs(){if(!vs())throw new Fr("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=n.indexedDB,this.type="indexedDB"}function ps(t){return new vt(function(e,n){var r=t.g.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(t){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new vt(function(e,n){var r=t.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}})}(t).then(function(){return ps(t)}).then(function(t){e(t)}).s(function(t){n(t)})}})}function ds(t){return t.h||(t.h=ps(t)),t.h}function vs(){try{return!!n.indexedDB}catch(t){return!1}}function ms(t){return t.objectStore("firebaseLocalStorage")}function ys(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function gs(t){return new vt(function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(Error(t.target.errorCode))}})}function bs(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Et().then(function(){if(vs()){var t=dr(),r="__sak"+t;return Ja||(Ja=new hs),(n=Ja).set(r,t).then(function(){return n.get(r)}).then(function(e){if(e!==t)throw Error("indexedDB not supported!");return n.P(r)}).then(function(){return n}).s(function(){return e.c})}return e.c}).then(function(t){return e.type=t.type,t.Y(function(t){R(e.a,function(e){e(t)})}),t})}function _s(){this.a={},this.type="inMemory"}function ws(){if(!function(){var t="Node"==$n();if(!(t=Es()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The LocalStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=Es()||r.a.INTERNAL.node.localStorage,this.type="localStorage"}function Es(){try{var t=n.localStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function Ts(){this.type="nullStorage"}function Cs(){if(!function(){var t="Node"==$n();if(!(t=xs()||t&&r.a.INTERNAL.node&&r.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==$n())throw new Fr("internal-error","The SessionStorage compatibility library was not found.");throw new Fr("web-storage-unsupported")}this.a=xs()||r.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function xs(){try{var t=n.sessionStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}rs.prototype.toString=function(){return this.f?ze(this.a,"v",this.f):sn(this.a.a,"v"),this.b?ze(this.a,"eid",this.b):sn(this.a.a,"eid"),this.c.length?ze(this.a,"fw",this.c.join(",")):sn(this.a.a,"fw"),this.a.toString()},is.prototype.toString=function(){var t=Qe(this.o,"/__/auth/handler");if(ze(t,"apiKey",this.l),ze(t,"appName",this.c),ze(t,"authType",this.m),this.a.isOAuthProvider){var e=this.a;try{var n=r.a.app(this.c).auth().ea()}catch(t){n=null}for(var i in e.Ya=n,ze(t,"providerId",this.a.providerId),n=hr((e=this.a).vb))n[i]=n[i].toString();i=e.Ac,n=ot(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}e.$a&&e.Ya&&!n[e.$a]&&(n[e.$a]=e.Ya),it(n)||ze(t,"customParameters",fr(n))}if("function"==typeof this.a.Ab&&((e=this.a.Ab()).length&&ze(t,"scopes",e.join(","))),this.i?ze(t,"redirectUrl",this.i):sn(t.a,"redirectUrl"),this.g?ze(t,"eventId",this.g):sn(t.a,"eventId"),this.h?ze(t,"v",this.h):sn(t.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Ke(t,s)&&ze(t,s,this.b[s]);return this.f?ze(t,"eid",this.f):sn(t.a,"eid"),(s=os(this.c)).length&&ze(t,"fw",s.join(",")),t.toString()},(t=as.prototype).Ea=function(t,e,n){var r=new Fr("popup-closed-by-user"),i=new Fr("web-storage-unsupported"),o=this,a=!1;return this.ga().then(function(){(function(t){var e={type:"webStorageSupport"};return us(t).then(function(){return function(t,e){return t.bb.then(function(){return new vt(function(n){t.a.send(e.type,e,n,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}(t.i,e)}).then(function(t){if(t&&t.length&&void 0!==t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})})(o).then(function(n){n||(t&&Hn(t),e(i),a=!0)})}).s(function(){}).then(function(){if(!a)return function(t){return new vt(function(e){return function n(){De(2e3).then(function(){if(t&&!t.closed)return n();e()})}()})}(t)}).then(function(){if(!a)return De(n).then(function(){e(r)})})},t.Ib=function(){var t=ir();return!lr(t)&&!vr(t)},t.Db=function(){return!1},t.zb=function(t,e,n,r,i,o,a){if(!t)return Tt(new Fr("popup-blocked"));if(a&&!lr())return this.ga().s(function(e){Hn(t),i(e)}),r(),Et();this.a||(this.a=ss(cs(this)));var s=this;return this.a.then(function(){var e=s.ga().s(function(e){throw Hn(t),i(e),e});return r(),e}).then(function(){(ji(n),a)||Vn(ls(s.l,s.f,s.b,e,n,null,o,s.c,void 0,s.h),t)}).s(function(t){throw"auth/network-request-failed"==t.code&&(s.a=null),t})},t.Ca=function(t,e,n){this.a||(this.a=ss(cs(this)));var r=this;return this.a.then(function(){ji(e),Vn(ls(r.l,r.f,r.b,t,e,qn(),n,r.c,void 0,r.h))}).s(function(t){throw"auth/network-request-failed"==t.code&&(r.a=null),t})},t.ga=function(){var t=this;return us(this).then(function(){return t.i.bb}).s(function(){throw t.a=null,new Fr("network-request-failed")})},t.Mb=function(){return!0},t.va=function(t){this.g.push(t)},t.Ka=function(t){U(this.g,function(e){return e==t})},(t=fs.prototype).get=function(t){return Et(this.a.getItem(t)).then(function(t){return t&&pr(t)})},t.set=function(t,e){return Et(this.a.setItem(t,fr(e)))},t.P=function(t){return Et(this.a.removeItem(t))},t.Y=function(){},t.ca=function(){},(t=hs.prototype).set=function(t,e){var n,r=!1,i=this;return ds(this).then(function(e){return gs((e=ms(ys(n=e,!0))).get(t))}).then(function(o){var a=ms(ys(n,!0));return o?(o.value=e,gs(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=t,o.value=e,gs(a.add(o)))}).then(function(){i.f[t]=e}).ia(function(){r&&i.b--})},t.get=function(t){return ds(this).then(function(e){return gs(ms(ys(e,!1)).get(t))}).then(function(t){return t&&t.value})},t.P=function(t){var e=!1,n=this;return ds(this).then(function(r){return e=!0,n.b++,gs(ms(ys(r,!0)).delete(t))}).then(function(){delete n.f[t]}).ia(function(){e&&n.b--})},t.Kc=function(){var t=this;return ds(this).then(function(t){var e=ms(ys(t,!1));return e.getAll?gs(e.getAll()):new vt(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)r in n?typeof e[r]!=typeof n[r]?i.push(r):"object"==typeof e[r]&&null!=e[r]&&null!=n[r]?0<t(e[r],n[r]).length&&i.push(r):e[r]!==n[r]&&i.push(r):i.push(r);for(r in n)r in e||i.push(r);return i}(t.f,n),t.f=n}return r})},t.Y=function(t){0==this.a.length&&function(t){t.c&&t.c.cancel("STOP_EVENT"),function e(){t.c=De(800).then(y(t.Kc,t)).then(function(e){0<e.length&&R(t.a,function(t){t(e)})}).then(e).s(function(t){"STOP_EVENT"!=t.message&&e()});return t.c}()}(this),this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},(t=bs.prototype).get=function(t){return this.b.then(function(e){return e.get(t)})},t.set=function(t,e){return this.b.then(function(n){return n.set(t,e)})},t.P=function(t){return this.b.then(function(e){return e.P(t)})},t.Y=function(t){this.a.push(t)},t.ca=function(t){U(this.a,function(e){return e==t})},(t=_s.prototype).get=function(t){return Et(this.a[t])},t.set=function(t,e){return this.a[t]=e,Et()},t.P=function(t){return delete this.a[t],Et()},t.Y=function(){},t.ca=function(){},(t=ws.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(t){n.window&&ye(n.window,"storage",t)},t.ca=function(t){n.window&&_e(n.window,"storage",t)},(t=Ts.prototype).get=function(){return Et(null)},t.set=function(){return Et()},t.P=function(){return Et()},t.Y=function(){},t.ca=function(){},(t=Cs.prototype).get=function(t){var e=this;return Et().then(function(){return pr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Et().then(function(){var r=fr(e);null===r?n.P(t):n.a.setItem(t,r)})},t.P=function(t){var e=this;return Et().then(function(){e.a.removeItem(t)})},t.Y=function(){},t.ca=function(){};var Ss,ks,Ns={A:ws,Qa:Cs},As={A:ws,Qa:Cs},Is={A:fs,Qa:Ts},Os={A:ws,Qa:Ts},Ps={Xc:"local",NONE:"none",Zc:"session"};function Rs(){var t=!(vr(ir())||!Yn()),e=lr(),r=ar();this.o=t,this.h=e,this.m=r,this.a={},Ss||(Ss=new function(){var t={};t.Browser=Ns,t.Node=As,t.ReactNative=Is,t.Worker=Os,this.a=t[$n()]}),t=Ss;try{this.g=!Bn()&&_r()||!n.indexedDB?new t.a.A:new bs(Xn()?new _s:new t.a.A)}catch(t){this.g=new _s,this.h=!0}try{this.i=new t.a.Qa}catch(t){this.i=new _s}this.l=new _s,this.f=y(this.Lb,this),this.b={}}function Ds(){return ks||(ks=new Rs),ks}function Ms(t,e){switch(e){case"session":return t.i;case"none":return t.l;default:return t.g}}function Ls(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Fs(t,e,n){return n=Ls(e,n),"local"==e.A&&(t.b[n]=null),Ms(t,e.A).P(n)}function Us(t){t.c&&(clearInterval(t.c),t.c=null)}(t=Rs.prototype).get=function(t,e){return Ms(this,t.A).get(Ls(t,e))},t.set=function(t,e,n){var r=Ls(t,n),i=this,o=Ms(this,t.A);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.A&&(i.b[r]=e)})},t.addListener=function(t,e,r){t=Ls(t,e),this.m&&(this.b[t]=n.localStorage.getItem(t)),it(this.a)&&(Ms(this,"local").Y(this.f),this.h||(Bn()||!_r())&&n.indexedDB||!this.m||function(t){Us(t),t.c=setInterval(function(){for(var e in t.a){var r=n.localStorage.getItem(e),i=t.b[e];r!=i&&(t.b[e]=r,r=new se({type:"storage",key:e,target:window,oldValue:i,newValue:r,a:!0}),t.Lb(r))}},1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(r)},t.removeListener=function(t,e,n){t=Ls(t,e),this.a[t]&&(U(this.a[t],function(t){return t==n}),0==this.a[t].length&&delete this.a[t]),it(this.a)&&(Ms(this,"local").ca(this.f),Us(this))},t.Lb=function(t){if(t&&t.f){var e=t.a.key;if(null==e)for(var r in this.a){var i=this.b[r];void 0===i&&(i=null);var o=n.localStorage.getItem(r);o!==i&&(this.b[r]=o,this.Wa(r))}else if(0==e.indexOf("firebase:")&&this.a[e]){if(void 0!==t.a.a?Ms(this,"local").ca(this.f):Us(this),this.o)if(r=n.localStorage.getItem(e),(i=t.a.newValue)!==r)null!==i?n.localStorage.setItem(e,i):n.localStorage.removeItem(e);else if(this.b[e]===i&&void 0===t.a.a)return;var a=this;r=function(){void 0===t.a.a&&a.b[e]===n.localStorage.getItem(e)||(a.b[e]=n.localStorage.getItem(e),a.Wa(e))},Wt&&Jt&&10==Jt&&n.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(r,10):r()}}else R(t,y(this.Wa,this))},t.Wa=function(t){this.a[t]&&R(this.a[t],function(t){t()})};var js,Bs={name:"authEvent",A:"local"};function qs(t,e){this.b=-1,this.b=Vs,this.f=n.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.m=n.Int32Array?new Int32Array(64):Array(64),void 0!==js||(js=n.Int32Array?new Int32Array(Ys):Ys),this.reset()}_(qs,function(){this.b=-1});for(var Vs=64,Ws=Vs-1,Hs=[],zs=0;zs<Ws;zs++)Hs[zs]=0;var Ks=j(128,Hs);function Gs(t){for(var e=t.f,n=t.m,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&f)+(0|js[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function Qs(t,e,n){void 0===n&&(n=e.length);var r=0,o=t.c;if(i(e))for(;r<n;)t.f[o++]=e.charCodeAt(r++),o==t.b&&(Gs(t),o=0);else{if(!l(e))throw Error("message must be string or array");for(;r<n;){var a=e[r++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");t.f[o++]=a,o==t.b&&(Gs(t),o=0)}}t.c=o,t.g+=n}qs.prototype.reset=function(){this.g=this.c=0,this.a=n.Int32Array?new Int32Array(this.h):B(this.h)};var Ys=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Xs(){qs.call(this,8,$s)}_(Xs,qs);var $s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Js(t,e,n,r,i){this.l=t,this.i=e,this.m=n,this.o=r||null,this.u=i||null,this.h=e+":"+n,this.v=new function(){this.a=Ds()},this.g=new function(t){this.a=t,this.b=Ds()}(this.h),this.f=null,this.b=[],this.a=this.c=null}function Zs(t){return new Fr("invalid-cordova-configuration",t)}function tu(t){var e=new Xs;Qs(e,t),t=[];var n=8*e.g;56>e.c?Qs(e,Ks,56-e.c):Qs(e,Ks,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(Gs(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return D(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}function eu(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(t){}}function nu(t){return t.f||(t.f=t.ga().then(function(){return new vt(function(e){t.va(function n(r){return e(r),t.Ka(n),!1}),function(t){function e(e){i=!0,o&&o.cancel(),ru(t).then(function(n){var i=r;if(n&&e&&e.url){var o=null;-1!=(i=mi(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"==typeof(o=pr(Ke(o=Ge(i),"firebaseError")||null))?Ur(o):null)?new Bi(n.b,n.c,null,null,o):new Bi(n.b,n.c,i,n.g)),i=o||r}eu(t,i)})}var r=new Bi("unknown",null,null,null,new Fr("no-auth-event")),i=!1,o=De(500).then(function(){return ru(t).then(function(){i||eu(t,r)})}),a=n.handleOpenURL;n.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(or("BuildInfo.packageName",n).toLowerCase()+"://")&&e({url:t}),"function"==typeof a)try{a(t)}catch(t){console.error(t)}},Wi||(Wi=new Vi),Wi.subscribe(e)}(t)})})),t.f}function ru(t){var e=null;return function(t){return t.b.get(Bs,t.a).then(function(t){return qi(t)})}(t.g).then(function(n){return e=n,Fs((n=t.g).b,Bs,n.a)}).then(function(){return e})}(t=Js.prototype).ga=function(){return this.za?this.za:this.za=(Qn(void 0)?Gn().then(function(){return new vt(function(t,e){var r=n.document,i=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);r.addEventListener("deviceready",function(){clearTimeout(i),t()},!1)})}):Tt(Error("Cordova must run in an Android or iOS file scheme."))).then(function(){if("function"!=typeof or("universalLinks.subscribe",n))throw Zs("cordova-universal-links-plugin is not installed");if(void 0===or("BuildInfo.packageName",n))throw Zs("cordova-plugin-buildinfo is not installed");if("function"!=typeof or("cordova.plugins.browsertab.openUrl",n))throw Zs("cordova-plugin-browsertab is not installed");if("function"!=typeof or("cordova.InAppBrowser.open",n))throw Zs("cordova-plugin-inappbrowser is not installed")},function(){throw new Fr("cordova-not-ready")})},t.Ea=function(t,e){return e(new Fr("operation-not-supported-in-this-environment")),Et()},t.zb=function(){return Tt(new Fr("operation-not-supported-in-this-environment"))},t.Mb=function(){return!1},t.Ib=function(){return!0},t.Db=function(){return!0},t.Ca=function(t,e,r){if(this.c)return Tt(new Fr("redirect-operation-pending"));var i=this,o=n.document,a=null,s=null,u=null,c=null;return this.c=Et().then(function(){return ji(e),nu(i)}).then(function(){return function(t,e,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new Bi(e,i,null,o,new Fr("no-auth-event")),s=or("BuildInfo.packageName",n);if("string"!=typeof s)throw new Fr("invalid-cordova-configuration");var u=or("BuildInfo.displayName",n),c={};if(ir().toLowerCase().match(/iphone|ipad|ipod/))c.ibi=s;else{if(!ir().toLowerCase().match(/android/))return Tt(new Fr("operation-not-supported-in-this-environment"));c.apn=s}u&&(c.appDisplayName=u),o=tu(o),c.sessionId=o;var l=ls(t.l,t.i,t.m,e,r,null,i,t.o,c,t.u);return t.ga().then(function(){var e=t.h;return t.v.a.set(Bs,a.D(),e)}).then(function(){var e=or("cordova.plugins.browsertab.isAvailable",n);if("function"!=typeof e)throw new Fr("invalid-cordova-configuration");var r=null;e(function(e){if(e){if("function"!=typeof(r=or("cordova.plugins.browsertab.openUrl",n)))throw new Fr("invalid-cordova-configuration");r(l)}else{if("function"!=typeof(r=or("cordova.InAppBrowser.open",n)))throw new Fr("invalid-cordova-configuration");e=!(!(e=ir()).match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=r(l,e?"_blank":"_system","location=yes")}})})}(i,t,e,r)}).then(function(){return new vt(function(t,e){s=function(){var e=or("cordova.plugins.browsertab.close",n);return t(),"function"==typeof e&&e(),i.a&&"function"==typeof i.a.close&&(i.a.close(),i.a=null),!1},i.va(s),u=function(){a||(a=De(2e3).then(function(){e(new Fr("redirect-cancelled-by-user"))}))},c=function(){gr()&&u()},o.addEventListener("resume",u,!1),ir().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",c,!1)}).s(function(t){return ru(i).then(function(){throw t})})}).ia(function(){u&&o.removeEventListener("resume",u,!1),c&&o.removeEventListener("visibilitychange",c,!1),a&&a.cancel(),s&&i.Ka(s),i.c=null})},t.va=function(t){this.b.push(t),nu(this).s(function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Bi("unknown",null,null,null,new Fr("no-auth-event")),t(e))})},t.Ka=function(t){U(this.b,function(e){return e==t})};var iu={name:"pendingRedirect",A:"session"};function ou(t){return Fs(t.b,iu,t.a)}function au(t,e,n){this.v=t,this.m=e,this.l=n,this.h=[],this.f=!1,this.i=y(this.o,this),this.c=new mu,this.u=new _u,this.g=new function(t){this.a=t,this.b=Ds()}(this.m+":"+this.l),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.u,this.b.linkViaPopup=this.u,this.b.reauthViaPopup=this.u,this.a=su(this.v,this.m,this.l,Qa)}function su(t,e,n,i){var o=r.a.SDK_VERSION||null;return Qn()?new Js(t,e,n,o,i):new as(t,e,n,o,i)}function uu(t){t.f||(t.f=!0,t.a.va(t.i));var e=t.a;return t.a.ga().s(function(n){throw t.a==e&&t.reset(),n})}function cu(t){t.a.Ib()&&uu(t).s(function(e){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(e)&&t.o(n)}),t.a.Db()||yu(t.c)}au.prototype.reset=function(){this.f=!1,this.a.Ka(this.i),this.a=su(this.v,this.m,this.l)},au.prototype.subscribe=function(t){if(L(this.h,t)||this.h.push(t),!this.f){var e=this;(function(t){return t.b.get(iu,t.a).then(function(t){return"pending"==t})})(this.g).then(function(t){t?ou(e.g).then(function(){uu(e).s(function(t){var n=new Bi("unknown",null,null,null,new Fr("operation-not-supported-in-this-environment"));pu(t)&&e.o(n)})}):cu(e)}).s(function(){cu(e)})}},au.prototype.unsubscribe=function(t){U(this.h,function(e){return e==t})},au.prototype.o=function(t){if(!t)throw new Fr("invalid-auth-event");for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.sb(t.b,t.c)){(e=this.b[t.b])&&e.h(t,r),e=!0;break}}return yu(this.c),e};var lu=new yr(2e3,1e4),fu=new yr(3e4,6e4);function hu(t,e,n,r,i,o){return t.a.zb(e,n,r,function(){t.f||(t.f=!0,t.a.va(t.i))},function(){t.reset()},i,o)}function pu(t){return!(!t||"auth/cordova-not-ready"!=t.code)}au.prototype.fa=function(){return this.c.fa()},au.prototype.Ca=function(t,e,n){var r,i=this;return function(t){return t.b.set(iu,"pending",t.a)}(this.g).then(function(){return i.a.Ca(t,e,n).s(function(t){if(pu(t))throw new Fr("operation-not-supported-in-this-environment");return r=t,ou(i.g).then(function(){throw r})}).then(function(){return i.a.Mb()?new vt(function(){}):ou(i.g).then(function(){return i.fa()}).then(function(){}).s(function(){})})})},au.prototype.Ea=function(t,e,n,r){return this.a.Ea(n,function(n){t.ha(e,null,n,r)},lu.get())};var du={};function vu(t,e,n){var r=e+":"+n;return du[r]||(du[r]=new au(t,e,n)),du[r]}function mu(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function yu(t){t.g||(t.g=!0,bu(t,!1,null,null))}function gu(t,e){if(t.b=function(){return Et(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function bu(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Tt(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):gu(t,n):gu(t,{user:null}),t.f=[],t.c=[]}function _u(){}function wu(){this.pb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.pb},set:function(t){this.pb=t},enumerable:!1})}function Eu(t,e){this.a=e,xr(this,"verificationId",t)}function Tu(t,e,n,r){return new Li(t).Ta(e,n).then(function(t){return new Eu(t,r)})}function Cu(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function xu(t){this.f=t,this.b=this.a=null,this.c=0}function Su(t,e){var n=e[$o],r=e.refreshToken;e=ku(e.expiresIn),t.b=n,t.c=e,t.a=r}function ku(t){return b()+1e3*parseInt(t,10)}function Nu(t,e){return function(t,e){return new vt(function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?ia(t,t.i+"?key="+encodeURIComponent(t.b),function(t){t?t.error?r(Ga(t)):t.access_token&&t.refresh_token?n(t):r(new Fr("internal-error")):r(new Fr("network-request-failed"))},"POST",an(e).toString(),t.f,t.m.get()):r(new Fr("internal-error"))})}(t.f,e).then(function(e){return t.b=e.access_token,t.c=ku(e.expires_in),t.a=e.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).s(function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e})}function Au(t,e){this.a=t||null,this.b=e||null,Sr(this,{lastSignInTime:br(e||null),creationTime:br(t||null)})}function Iu(t,e){for(var n in ae.call(this,t),e)this[n]=e[n]}function Ou(t,e,n){this.G=[],this.l=t.apiKey,this.o=t.appName,this.u=t.authDomain||null,t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(this.l,Xa(Qa),t),this.h=new xu(this.b),Uu(this,e[$o]),Su(this.h,e),xr(this,"refreshToken",this.h.a),qu(this,n||{}),Ae.call(this),this.I=!1,this.u&&sr()&&(this.a=vu(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=function(t){return new Cu(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=t.h.c-b()-3e5;return 0<e?e:0})}(this),this.V=y(this.Ha,this);var i=this;this.ka=null,this.sa=function(t){i.oa(t.g)},this.X=null,this.O=[],this.ra=function(t){Ru(i,t.c)},this.W=null}function Pu(t,e){t.X&&_e(t.X,"languageCodeChanged",t.sa),(t.X=e)&&ye(e,"languageCodeChanged",t.sa)}function Ru(t,e){t.O=e,ra(t.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,t.O):null)}function Du(t,e){t.W&&_e(t.W,"frameworkChanged",t.ra),(t.W=e)&&ye(e,"frameworkChanged",t.ra)}function Mu(t){try{return r.a.app(t.o).auth()}catch(e){throw new Fr("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.o+"'!")}}function Lu(t){t.C||t.w.b||(t.w.start(),_e(t,"tokenChanged",t.V),ye(t,"tokenChanged",t.V))}function Fu(t){_e(t,"tokenChanged",t.V),t.w.stop()}function Uu(t,e){t.qa=e,xr(t,"_lat",e)}function ju(t){for(var e=[],n=0;n<t.N.length;n++)e.push(t.N[n](t));return function(t){return new vt(function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Ct(t[o],g(i,o,!0),g(i,o,!1));else e(r)})}(e).then(function(){return t})}function Bu(t){t.a&&!t.I&&(t.I=!0,t.a.subscribe(t))}function qu(t,e){Sr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,metadata:new Au(e.createdAt,e.lastLoginAt),providerData:[]})}function Vu(){}function Wu(t){return Et().then(function(){if(t.C)throw new Fr("app-deleted")})}function Hu(t){return D(t.providerData,function(t){return t.providerId})}function zu(t,e){e&&(Ku(t,e.providerId),t.providerData.push(e))}function Ku(t,e){U(t.providerData,function(t){return t.providerId==e})}function Gu(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&xr(t,e,n)}function Qu(t,e){t!=e&&(Sr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,providerData:[]}),e.metadata?xr(t,"metadata",function(t){return new Au(t.a,t.b)}(e.metadata)):xr(t,"metadata",new Au),R(e.providerData,function(e){zu(t,e)}),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.h,e.h),xr(t,"refreshToken",t.h.a))}function Yu(t){return t.F().then(function(e){var n=t.isAnonymous;return function(t,e){return za(t.b,Sa,{idToken:e}).then(y(t.uc,t))}(t,e).then(function(){return n||Gu(t,"isAnonymous",!1),e})})}function Xu(t,e){e[$o]&&t.qa!=e[$o]&&(Su(t.h,e),t.dispatchEvent(new Iu("tokenChanged")),Uu(t,e[$o]),Gu(t,"refreshToken",t.h.a))}function $u(t,e){return Yu(t).then(function(){if(L(Hu(t),e))return ju(t).then(function(){throw new Fr("provider-already-linked")})})}function Ju(t,e,n){return kr({user:t,credential:Ui(e),additionalUserInfo:e=si(e),operationType:n})}function Zu(t,e){return Xu(t,e),t.reload().then(function(){return t})}function tc(t,e,n,i,o){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!o)return Tt(t.i);var a=ai(n.providerId),s=dr(t.uid+":::"),u=null;(!lr()||Yn())&&t.u&&n.isOAuthProvider&&(u=ls(t.u,t.l,t.o,e,n,null,s,r.a.SDK_VERSION||null));var c=zn(u,a&&a.Ba,a&&a.Aa);return i=i().then(function(){if(nc(t),!o)return t.F().then(function(){})}).then(function(){return hu(t.a,c,e,n,s,!!u)}).then(function(){return new vt(function(n,r){t.ha(e,null,new Fr("cancelled-popup-request"),t.g||null),t.f=n,t.v=r,t.g=s,t.c=t.a.Ea(t,e,c,s)})}).then(function(t){return c&&Hn(c),t?kr(t):null}).s(function(t){throw c&&Hn(c),t}),rc(t,i,o)}function ec(t,e,n,r,i){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));if(t.i&&!i)return Tt(t.i);var o=null,a=dr(t.uid+":::");return r=r().then(function(){if(nc(t),!i)return t.F().then(function(){})}).then(function(){return t.aa=a,ju(t)}).then(function(e){return t.ba&&(e=(e=t.ba).b.set(oc,t.D(),e.a)),e}).then(function(){return t.a.Ca(e,n,a)}).s(function(e){if(o=e,t.ba)return ac(t.ba);throw o}).then(function(){if(o)throw o}),rc(t,r,i)}function nc(t){if(!t.a||!t.I){if(t.a&&!t.I)throw new Fr("internal-error");throw new Fr("auth-domain-config-required")}}function rc(t,e,n){var r=function(t,e,n){return t.i&&!n?(e.cancel(),Tt(t.i)):e.s(function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.i||t.dispatchEvent(new Iu("userInvalidated")),t.i=e),e})}(t,e,n);return t.G.push(r),r.ia(function(){F(t.G,r)}),r}function ic(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!(t.stsTokenManager&&t.stsTokenManager.accessToken&&t.stsTokenManager.expirationTime))return null;n[$o]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null,n.expiresIn=(t.stsTokenManager.expirationTime-b())/1e3;var r=new Ou(e,n,t);return t.providerData&&R(t.providerData,function(t){t&&zu(r,kr(t))}),t.redirectEventId&&(r.aa=t.redirectEventId),r}mu.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},mu.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.b,r=t.c,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;"unknown"!=n||i||o?t.a?(bu(this,!0,null,t.a),Et()):e.wa(n,r)?function(t,e,n){n=n.wa(e.b,e.c);var r=e.f,i=e.g,o=!!e.b.match(/Redirect$/);n(r,i).then(function(e){bu(t,o,e,null)}).s(function(e){bu(t,o,null,e)})}(this,t,e):Tt(new Fr("invalid-auth-event")):(bu(this,!1,null,null),Et())}else Tt(new Fr("invalid-auth-event"))},mu.prototype.fa=function(){var t=this;return new vt(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new Fr("timeout");t.a&&t.a.cancel(),t.a=De(fu.get()).then(function(){t.b||bu(t,!0,null,e)})}(t))})},_u.prototype.h=function(t,e){if(t){var n=t.b,r=t.c;t.a?(e.ha(t.b,null,t.a,t.c),Et()):e.wa(n,r)?function(t,e){var n=t.c,r=t.b;e.wa(r,n)(t.f,t.g).then(function(t){e.ha(r,t,null,n)}).s(function(t){e.ha(r,null,t,n)})}(t,e):Tt(new Fr("invalid-auth-event"))}else Tt(new Fr("invalid-auth-event"))},Eu.prototype.confirm=function(t){return t=Fi(this.verificationId,t),this.a(t)},Cu.prototype.start=function(){this.a=this.c,function t(e,r){e.stop();e.b=De(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(e,r)).then(function(){return t=n.document,e=null,gr()||!t?Et():new vt(function(n){e=function(){gr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)}).s(function(n){throw t.removeEventListener("visibilitychange",e,!1),n});var t,e}).then(function(){return e.h()}).then(function(){t(e,!0)}).s(function(n){e.i(n)&&t(e,!1)})}(this,!0)},Cu.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},xu.prototype.D=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},xu.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?Tt(new Fr("user-token-expired")):t||!this.b||b()>this.c-3e4?this.a?Nu(this,{grant_type:"refresh_token",refresh_token:this.a}):Et(null):Et({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Au.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},_(Iu,ae),_(Ou,Ae),Ou.prototype.oa=function(t){this.ka=t,na(this.b,t)},Ou.prototype.ea=function(){return this.ka},Ou.prototype.xa=function(){return B(this.O)},Ou.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},xr(Ou.prototype,"providerId","firebase"),(t=Ou.prototype).reload=function(){var t=this;return rc(this,Wu(this).then(function(){return Yu(t).then(function(){return ju(t)}).then(Vu)}))},t.ac=function(t){return this.F(t).then(function(t){return new function(t){var e=ni(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new Fr("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Sr(this,{token:t,expirationTime:br(1e3*e.exp),authTime:br(1e3*e.auth_time),issuedAtTime:br(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,claims:e})}(t)})},t.F=function(t){var e=this;return rc(this,Wu(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new Fr("internal-error");return t.accessToken!=e.qa&&(Uu(e,t.accessToken),e.dispatchEvent(new Iu("tokenChanged"))),Gu(e,"refreshToken",t.refreshToken),t.accessToken}))},t.uc=function(t){if(!(t=t.users)||!t.length)throw new Fr("internal-error");qu(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?D(t,function(t){return new function(t,e,n,r,i,o){Sr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n<e.length;n++)zu(this,e[n]);Gu(this,"isAnonymous",!(this.email&&t.passwordHash||this.providerData&&this.providerData.length))},t.cb=function(t){var e=this,n=null;return rc(this,t.f(this.b,this.uid).then(function(t){return Xu(e,t),n=Ju(e,t,"reauthenticate"),e.i=null,e.reload()}).then(function(){return n}),!0)},t.vc=function(t){return Tr("firebase.User.prototype.reauthenticateWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential instead."),this.cb(t).then(function(){})},t.ab=function(t){var e=this,n=null;return rc(this,$u(this,t.providerId).then(function(){return e.F()}).then(function(n){return t.c(e.b,n)}).then(function(t){return n=Ju(e,t,"link"),Zu(e,t)}).then(function(){return n}))},t.mc=function(t){return Tr("firebase.User.prototype.linkWithCredential is deprecated. Please use firebase.User.prototype.linkAndRetrieveDataWithCredential instead."),this.ab(t).then(function(t){return t.user})},t.nc=function(t,e){var n=this;return rc(this,$u(this,"phone").then(function(){return Tu(Mu(n),t,e,y(n.ab,n))}))},t.wc=function(t,e){var n=this;return rc(this,Et().then(function(){return Tu(Mu(n),t,e,y(n.cb,n))}),!0)},t.mb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.mb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.Pc=function(t){var e=this;return rc(this,this.F().then(function(n){return t.c(e.b,n)}).then(function(t){return Xu(e,t),e.reload()}))},t.nb=function(t){var e=this;return rc(this,this.F().then(function(n){return e.b.nb(n,t)}).then(function(t){return Xu(e,t),e.reload()}))},t.ob=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Wu(this);var e=this;return rc(this,this.F().then(function(n){return e.b.ob(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Xu(e,t),Gu(e,"displayName",t.displayName||null),Gu(e,"photoURL",t.photoUrl||null),R(e.providerData,function(t){"password"===t.providerId&&(xr(t,"displayName",e.displayName),xr(t,"photoURL",e.photoURL))}),ju(e)}).then(Vu))},t.Nc=function(t){var e=this;return rc(this,Yu(this).then(function(n){return L(Hu(e),t)?function(t,e,n){return za(t,Ta,{idToken:e,deleteProvider:n})}(e.b,n,[t]).then(function(t){var n={};return R(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),R(Hu(e),function(t){n[t]||Ku(e,t)}),n[Li.PROVIDER_ID]||xr(e,"phoneNumber",null),ju(e)}):ju(e).then(function(){throw new Fr("no-such-provider")})}))},t.delete=function(){var t=this;return rc(this,this.F().then(function(e){return za(t.b,Ea,{idToken:e})}).then(function(){t.dispatchEvent(new Iu("userDeleted"))})).then(function(){for(var e=0;e<t.G.length;e++)t.G[e].cancel("app-deleted");Pu(t,null),Du(t,null),t.G=[],t.C=!0,Fu(t),xr(t,"refreshToken",null),t.a&&t.a.unsubscribe(t)})},t.sb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.aa||null)==e||"reauthViaRedirect"==t&&(this.aa||null)==e)},t.ha=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?y(this.xb,this):"reauthViaPopup"==t&&e==(this.g||null)?y(this.yb,this):"linkViaRedirect"==t&&(this.aa||null)==e?y(this.xb,this):"reauthViaRedirect"==t&&(this.aa||null)==e?y(this.yb,this):null},t.oc=function(t){var e=this;return tc(this,"linkViaPopup",t,function(){return $u(e,t.providerId).then(function(){return ju(e)})},!1)},t.xc=function(t){return tc(this,"reauthViaPopup",t,function(){return Et()},!0)},t.pc=function(t){var e=this;return ec(this,"linkViaRedirect",t,function(){return $u(e,t.providerId)},!1)},t.yc=function(t){return ec(this,"reauthViaRedirect",t,function(){return Et()},!0)},t.xb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,this.F().then(function(r){return va(n.b,{requestUri:t,sessionId:e,idToken:r})}).then(function(t){return r=Ju(n,t,"link"),Zu(n,t)}).then(function(){return r}))},t.yb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return rc(this,Et().then(function(){return yi(ma(n.b,{requestUri:t,sessionId:e}),n.uid)}).then(function(t){return r=Ju(n,t,"reauthenticate"),Xu(n,t),n.i=null,n.reload()}).then(function(){return r}),!0)},t.gb=function(t){var e=this,n=null;return rc(this,this.F().then(function(e){return n=e,void 0===t||it(t)?{}:Xr(new qr(t))}).then(function(t){return e.b.gb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},t.toJSON=function(){return this.D()},t.D=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.l,appName:this.o,authDomain:this.u,stsTokenManager:this.h.D(),redirectEventId:this.aa||null};return this.metadata&&ct(t,this.metadata.D()),R(this.providerData,function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))}),t};var oc={name:"redirectUser",A:"session"};function ac(t){return Fs(t.b,oc,t.a)}function sc(t){this.a=t,this.b=Ds(),this.c=null,this.f=function(t){var e=lc("local"),r=lc("session"),i=lc("none");return function(t,e,r){var i=Ls(e,r),o=Ms(t,e.A);return t.get(e,r).then(function(a){var s=null;try{s=pr(n.localStorage.getItem(i))}catch(t){}if(s&&!a)return n.localStorage.removeItem(i),t.set(e,s,r);s&&a&&"localStorage"!=o.type&&n.localStorage.removeItem(i)})}(t.b,e,t.a).then(function(){return t.b.get(r,t.a)}).then(function(n){return n?r:t.b.get(i,t.a).then(function(n){return n?i:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(cc,t.a).then(function(t){return t?lc(t):e})})})}).then(function(e){return t.c=e,uc(t,e.A)}).s(function(){t.c||(t.c=e)})}(this),this.b.addListener(lc("local"),this.a,y(this.g,this))}function uc(t,e){var n,r=[];for(n in Ps)Ps[n]!==e&&r.push(Fs(t.b,lc(Ps[n]),t.a));return r.push(Fs(t.b,cc,t.a)),function(t){return new vt(function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Ct(t[s],g(o,s),a);else e(i)})}(r)}sc.prototype.g=function(){var t=this,e=lc("local");dc(this,function(){return Et().then(function(){return t.c&&"local"!=t.c.A?t.b.get(e,t.a):null}).then(function(n){if(n)return uc(t,"local").then(function(){t.c=e})})})};var cc={name:"persistence",A:"session"};function lc(t){return{name:"authUser",A:t}}function fc(t,e){return dc(t,function(){return t.b.set(t.c,e.D(),t.a)})}function hc(t){return dc(t,function(){return Fs(t.b,t.c,t.a)})}function pc(t,e){return dc(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})})}function dc(t,e){return t.f=t.f.then(e,e),t.f}function vc(t){if(this.l=!1,xr(this,"settings",new wu),xr(this,"app",t),!Ec(this).options||!Ec(this).options.apiKey)throw new Fr("invalid-api-key");t=r.a.SDK_VERSION?rr(r.a.SDK_VERSION):null,this.b=new Yo(Ec(this).options&&Ec(this).options.apiKey,Xa(Qa),t),this.N=[],this.o=[],this.I=[],this.Pb=r.a.INTERNAL.createSubscribe(y(this.ic,this)),this.O=void 0,this.Qb=r.a.INTERNAL.createSubscribe(y(this.jc,this)),_c(this,null),this.h=new sc(Ec(this).options.apiKey+":"+Ec(this).name),this.w=new function(t){this.a=t,this.b=Ds()}(Ec(this).options.apiKey+":"+Ec(this).name),this.V=Sc(this,function(t){var e=Ec(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(oc,t.a).then(function(t){return t&&e&&(t.authDomain=e),ic(t||{})})}(t.w,Ec(t).options.authDomain).then(function(e){return(t.C=e)&&(e.ba=t.w),ac(t.w)});return Sc(t,e)}(t).then(function(){return pc(t.h,e)}).then(function(e){return e?(e.ba=t.w,t.C&&(t.C.aa||null)==(e.aa||null)?e:e.reload().then(function(){return fc(t.h,e).then(function(){return e})}).s(function(n){return"auth/network-request-failed"==n.code?e:hc(t.h)})):null}).then(function(e){_c(t,e||null)});return Sc(t,n)}(this)),this.i=Sc(this,function(t){return t.V.then(function(){return t.fa()}).s(function(){}).then(function(){if(!t.l)return t.ka()}).s(function(){}).then(function(){if(!t.l){t.X=!0;var e=t.h;e.b.addListener(lc("local"),e.a,t.ka)}})}(this)),this.X=!1,this.ka=y(this.Jc,this),this.Ha=y(this.Z,this),this.qa=y(this.Yb,this),this.ra=y(this.gc,this),this.sa=y(this.hc,this),function(t){var e=Ec(t).options.authDomain,n=Ec(t).options.apiKey;e&&sr()&&(t.Ob=t.V.then(function(){if(!t.l){if(t.a=vu(e,n,Ec(t).name),t.a.subscribe(t),Tc(t)&&Bu(Tc(t)),t.C){Bu(t.C);var r=t.C;r.oa(t.ea()),Pu(r,t),Ru(r=t.C,t.G),Du(r,t),t.C=null}return t.a}}))}(this),this.INTERNAL={},this.INTERNAL.delete=y(this.delete,this),this.INTERNAL.logFramework=y(this.qc,this),this.u=0,Ae.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ea()},set:function(t){this.oa(t)},enumerable:!1}),t.W=null}(this),this.G=[]}function mc(t){ae.call(this,"languageCodeChanged"),this.g=t}function yc(t){ae.call(this,"frameworkChanged"),this.c=t}function gc(t){return t.Ob||Tt(new Fr("auth-domain-config-required"))}function bc(t,e){var n={};return n.apiKey=Ec(t).options.apiKey,n.authDomain=Ec(t).options.authDomain,n.appName=Ec(t).name,t.V.then(function(){return function(t,e,n,r){var i=new Ou(t,e);return n&&(i.ba=n),r&&Ru(i,r),i.reload().then(function(){return i})}(n,e,t.w,t.xa())}).then(function(e){return Tc(t)&&e.uid==Tc(t).uid?(Qu(Tc(t),e),t.Z(e)):(_c(t,e),Bu(e),t.Z(e))}).then(function(){xc(t)})}function _c(t,e){Tc(t)&&(function(t,e){U(t.N,function(t){return t==e})}(Tc(t),t.Ha),_e(Tc(t),"tokenChanged",t.qa),_e(Tc(t),"userDeleted",t.ra),_e(Tc(t),"userInvalidated",t.sa),Fu(Tc(t))),e&&(e.N.push(t.Ha),ye(e,"tokenChanged",t.qa),ye(e,"userDeleted",t.ra),ye(e,"userInvalidated",t.sa),0<t.u&&Lu(e)),xr(t,"currentUser",e),e&&(e.oa(t.ea()),Pu(e,t),Ru(e,t.G),Du(e,t))}function wc(t,e){var n=null,r=null;return Sc(t,e.then(function(e){return n=Ui(e),r=si(e),bc(t,e)}).then(function(){return kr({user:Tc(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Ec(t){return t.app}function Tc(t){return t.currentUser}function Cc(t){return Tc(t)&&Tc(t)._lat||null}function xc(t){if(t.X){for(var e=0;e<t.o.length;e++)t.o[e]&&t.o[e](Cc(t));if(t.O!==t.getUid()&&t.I.length)for(t.O=t.getUid(),e=0;e<t.I.length;e++)t.I[e]&&t.I[e](Cc(t))}}function Sc(t,e){return t.N.push(e),e.ia(function(){F(t.N,e)}),e}function kc(){}function Nc(){this.a={},this.b=1e12}sc.prototype.jb=function(t){var e=null,n=this;return function(t){var e=new Fr("invalid-persistence-type"),n=new Fr("unsupported-persistence-type");t:{for(r in Ps)if(Ps[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch($n()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;default:if(!ar()&&"none"!==t)throw n}}(t),dc(this,function(){return t!=n.c.A?n.b.get(n.c,n.a).then(function(r){return e=r,uc(n,t)}).then(function(){if(n.c=lc(t),e)return n.b.set(n.c,e,n.a)}):Et()})},_(vc,Ae),_(mc,ae),_(yc,ae),(t=vc.prototype).jb=function(t){return Sc(this,t=this.h.jb(t))},t.oa=function(t){this.W===t||this.l||(this.W=t,na(this.b,this.W),this.dispatchEvent(new mc(this.ea())))},t.ea=function(){return this.W},t.Qc=function(){var t=n.navigator;this.oa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},t.qc=function(t){this.G.push(t),ra(this.b,r.a.SDK_VERSION?rr(r.a.SDK_VERSION,this.G):null),this.dispatchEvent(new yc(this.G))},t.xa=function(){return B(this.G)},t.toJSON=function(){return{apiKey:Ec(this).options.apiKey,authDomain:Ec(this).options.authDomain,appName:Ec(this).name,currentUser:Tc(this)&&Tc(this).D()}},t.sb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},t.ha=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?y(this.Xb,this):null},t.Xb=function(t,e){var n=this;t={requestUri:t,sessionId:e},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=da(n.b,t).then(function(t){return r=Ui(t),i=si(t),t});return Sc(this,t=n.V.then(function(){return o}).then(function(t){return bc(n,t)}).then(function(){return kr({user:Tc(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}))},t.Hc=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this,n=ai(t.providerId),i=dr(),o=null;(!lr()||Yn())&&Ec(this).options.authDomain&&t.isOAuthProvider&&(o=ls(Ec(this).options.authDomain,Ec(this).options.apiKey,Ec(this).name,"signInViaPopup",t,null,i,r.a.SDK_VERSION||null));var a=zn(o,n&&n.Ba,n&&n.Aa);return Sc(this,n=gc(this).then(function(e){return hu(e,a,"signInViaPopup",t,i,!!o)}).then(function(){return new vt(function(t,n){e.ha("signInViaPopup",null,new Fr("cancelled-popup-request"),e.g),e.f=t,e.v=n,e.g=i,e.c=e.a.Ea(e,"signInViaPopup",a,i)})}).then(function(t){return a&&Hn(a),t?kr(t):null}).s(function(t){throw a&&Hn(a),t}))},t.Ic=function(t){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var e=this;return Sc(this,gc(this).then(function(){return dc(t=e.h,function(){return t.b.set(cc,t.c.A,t.a)});var t}).then(function(){return e.a.Ca("signInViaRedirect",t)}))},t.fa=function(){if(!sr())return Tt(new Fr("operation-not-supported-in-this-environment"));var t=this;return Sc(this,gc(this).then(function(){return t.a.fa()}).then(function(t){return t?kr(t):null}))},t.Oc=function(t){if(!t)return Tt(new Fr("null-user"));var e=this,n={};n.apiKey=Ec(this).options.apiKey,n.authDomain=Ec(this).options.authDomain,n.appName=Ec(this).name;var r=function(t,e,n,r){e=e||{apiKey:t.l,authDomain:t.u,appName:t.o};var i=t.h,o={};return o[$o]=i.b,o.refreshToken=i.a,o.expiresIn=(i.c-b())/1e3,e=new Ou(e,o),n&&(e.ba=n),r&&Ru(e,r),Qu(e,t),e}(t,n,e.w,e.xa());return Sc(this,this.i.then(function(){if(Ec(e).options.apiKey!=t.l)return r.reload()}).then(function(){return Tc(e)&&t.uid==Tc(e).uid?(Qu(Tc(e),t),e.Z(t)):(_c(e,r),Bu(r),e.Z(r))}).then(function(){xc(e)}))},t.kb=function(){var t=this;return Sc(this,this.i.then(function(){return Tc(t)?(_c(t,null),hc(t.h).then(function(){xc(t)})):Et()}))},t.Jc=function(){var t=this;return pc(this.h,Ec(this).options.authDomain).then(function(e){if(!t.l){var n;if(n=Tc(t)&&e){n=Tc(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Qu(Tc(t),e),Tc(t).F();(Tc(t)||e)&&(_c(t,e),e&&(Bu(e),e.ba=t.w),t.a&&t.a.subscribe(t),xc(t))}})},t.Z=function(t){return fc(this.h,t)},t.Yb=function(){xc(this),this.Z(Tc(this))},t.gc=function(){this.kb()},t.hc=function(){this.kb()},t.ic=function(t){var e=this;this.addAuthTokenListener(function(){t.next(Tc(e))})},t.jc=function(t){var e=this;!function(t,e){t.I.push(e),Sc(t,t.i.then(function(){!t.l&&L(t.I,e)&&t.O!==t.getUid()&&(t.O=t.getUid(),e(Cc(t)))}))}(this,function(){t.next(Tc(e))})},t.sc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Pb(t,e,n)},t.rc=function(t,e,n){var i=this;return this.X&&r.a.Promise.resolve().then(function(){i.O=i.getUid(),f(t)?t(Tc(i)):f(t.next)&&t.next(Tc(i))}),this.Qb(t,e,n)},t.$b=function(t){var e=this;return Sc(this,this.i.then(function(){return Tc(e)?Tc(e).F(t).then(function(t){return{accessToken:t}}):null}))},t.Jb=function(t){var e=this;return this.i.then(function(){return wc(e,za(e.b,Ba,{token:t}))}).then(function(t){var n=t.user;return Gu(n,"isAnonymous",!1),e.Z(n),t})},t.Bc=function(t){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCustomToken is deprecated. Please use firebase.auth.Auth.prototype.signInWithCustomToken instead."),this.Jb(t)},t.Cc=function(t,e){return Tr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.signInWithEmailAndPassword instead."),this.Kb(t,e)},t.Kb=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,qa,{email:t,password:e}))})},t.ub=function(t,e){var n=this;return this.i.then(function(){return wc(n,za(n.b,_a,{email:t,password:e}))})},t.Sb=function(t,e){return Tr("firebase.auth.Auth.prototype.createUserAndRetrieveDataWithEmailAndPassword is deprecated. Please use firebase.auth.Auth.prototype.createUserWithEmailAndPassword instead."),this.ub(t,e)},t.Ec=function(t){return Tr("firebase.auth.Auth.prototype.signInWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential instead."),this.Oa(t).then(function(t){return t.user})},t.Oa=function(t){var e=this;return this.i.then(function(){return wc(e,t.ya(e.b))})},t.Pa=function(){var t=this;return this.i.then(function(){var e=Tc(t);return e&&e.isAnonymous?kr({user:e,credential:null,additionalUserInfo:kr({providerId:null,isNewUser:!1}),operationType:"signIn"}):wc(t,t.b.Pa()).then(function(e){var n=e.user;return Gu(n,"isAnonymous",!0),t.Z(n),e})})},t.Dc=function(){return Tr("firebase.auth.Auth.prototype.signInAnonymouslyAndRetrieveData is deprecated. Please use firebase.auth.Auth.prototype.signInAnonymously instead."),this.Pa()},t.getUid=function(){return Tc(this)&&Tc(this).uid||null},t.Rb=function(t){this.addAuthTokenListener(t),this.u++,0<this.u&&Tc(this)&&Lu(Tc(this))},t.zc=function(t){var e=this;R(this.o,function(n){n==t&&e.u--}),0>this.u&&(this.u=0),0==this.u&&Tc(this)&&Fu(Tc(this)),this.removeAuthTokenListener(t)},t.addAuthTokenListener=function(t){var e=this;this.o.push(t),Sc(this,this.i.then(function(){e.l||L(e.o,t)&&t(Cc(e))}))},t.removeAuthTokenListener=function(t){U(this.o,function(e){return e==t})},t.delete=function(){this.l=!0;for(var t=0;t<this.N.length;t++)this.N[t].cancel("app-deleted");return this.N=[],this.h&&(t=this.h).b.removeListener(lc("local"),t.a,this.ka),this.a&&this.a.unsubscribe(this),r.a.Promise.resolve()},t.Vb=function(t){return Tr("firebase.auth.Auth.prototype.fetchProvidersForEmail is deprecated. Please use firebase.auth.Auth.prototype.fetchSignInMethodsForEmail instead."),Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.allProviders||[]})}(this.b,t))},t.Wb=function(t){return Sc(this,function(t,e){return za(t,wa,{identifier:e,continueUri:ur()?qn():"http://localhost"}).then(function(t){return t.signinMethods||[]})}(this.b,t))},t.kc=function(t){return!!Ri(t)},t.ib=function(t,e){var n=this;return Sc(this,Et().then(function(){var t=new qr(e);if(!t.c)throw new Fr("argument-error",Wr+" must be true when sending sign in link to email");return Xr(t)}).then(function(e){return n.b.ib(t,e)}).then(function(){}))},t.Rc=function(t){return this.Ja(t).then(function(t){return t.data.email})},t.Xa=function(t,e){return Sc(this,this.b.Xa(t,e).then(function(){}))},t.Ja=function(t){return Sc(this,this.b.Ja(t).then(function(t){return new function(t){var e={},n=t[Ir],r=t[Or];if(!(t=t[Pr])||t!=Ar&&!n)throw Error("Invalid provider user info!");e[Dr]=r||null,e[Rr]=n||null,xr(this,Lr,t),xr(this,Mr,Nr(e))}(t)}))},t.Va=function(t){return Sc(this,this.b.Va(t).then(function(){}))},t.hb=function(t,e){var n=this;return Sc(this,Et().then(function(){return void 0===e||it(e)?{}:Xr(new qr(e))}).then(function(e){return n.b.hb(t,e)}).then(function(){}))},t.Gc=function(t,e){return Sc(this,Tu(this,t,e,y(this.Oa,this)))},t.Fc=function(t,e){var n=this;return Sc(this,Et().then(function(){var r=Pi(t,e||qn());return n.Oa(r)}))},kc.prototype.render=function(){},kc.prototype.reset=function(){},kc.prototype.getResponse=function(){},kc.prototype.execute=function(){};var Ac=null;function Ic(t,e){return(e=Oc(e))&&t.a[e]||null}function Oc(t){return(t=void 0===t?1e12:t)?t.toString():null}function Pc(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=On(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():ye(this.f,"click",this.i)}function Rc(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function Dc(){}Nc.prototype.render=function(t,e){return this.a[this.b.toString()]=new Pc(t,e),this.b++},Nc.prototype.reset=function(t){var e=Ic(this,t);t=Oc(t),e&&t&&(e.delete(),delete this.a[t])},Nc.prototype.getResponse=function(t){return(t=Ic(this,t))?t.getResponse():null},Nc.prototype.execute=function(t){(t=Ic(this,t))&&t.execute()},Pc.prototype.getResponse=function(){return Rc(this),this.b},Pc.prototype.execute=function(){Rc(this);var t=this;this.a||(this.a=setTimeout(function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(t){}t.a=setTimeout(function(){if(t.a=null,t.b=null,n)try{n()}catch(t){}t.h&&t.execute()},6e4)},500))},Pc.prototype.delete=function(){Rc(this),this.g=!0,clearTimeout(this.a),this.a=null,_e(this.f,"click",this.i)},Dc.prototype.g=function(){return Ac||(Ac=new Nc),Et(Ac)},Dc.prototype.c=function(){};var Mc=null;function Lc(){this.b=n.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Fc=vn("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Uc=new yr(3e4,6e4);Lc.prototype.g=function(t){var e=this;return new vt(function(r,i){var o=setTimeout(function(){i(new Fr("network-request-failed"))},Uc.get());!n.grecaptcha||t!==e.f&&!e.b?(n[e.a]=function(){if(n.grecaptcha){e.f=t;var a=n.grecaptcha.render;n.grecaptcha.render=function(t,n){return t=a(t,n),e.b++,t},clearTimeout(o),r(n.grecaptcha)}else clearTimeout(o),i(new Fr("internal-error"));delete n[e.a]},Et(Vo(gn(Fc,{onload:e.a,hl:t||""}))).s(function(){clearTimeout(o),i(new Fr("internal-error","Unable to load external reCAPTCHA dependencies!"))})):(clearTimeout(o),r(n.grecaptcha))})},Lc.prototype.c=function(){this.b--};var jc=null;function Bc(t,e,r,i,o,a,s){if(xr(this,"type","recaptcha"),this.c=this.f=null,this.C=!1,this.l=e,this.g=null,s?(Mc||(Mc=new Dc),s=Mc):(jc||(jc=new Lc),s=jc),this.o=s,this.a=r||{theme:"light",type:"image"},this.h=[],this.a[Wc])throw new Fr("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Hc],!n.document)throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!On(e)||!this.i&&On(e).hasChildNodes())throw new Fr("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new Yo(t,a||null,o||null),this.v=i||function(){return null};var u=this;this.m=[];var c=this.a[qc];this.a[qc]=function(t){if(zc(u,t),"function"==typeof c)c(t);else if("string"==typeof c){var e=or(c,n);"function"==typeof e&&e(t)}};var l=this.a[Vc];this.a[Vc]=function(){if(zc(u,null),"function"==typeof l)l();else if("string"==typeof l){var t=or(l,n);"function"==typeof t&&t()}}}var qc="callback",Vc="expired-callback",Wc="sitekey",Hc="size";function zc(t,e){for(var n=0;n<t.m.length;n++)try{t.m[n](e)}catch(t){}}function Kc(t,e){return t.h.push(e),e.ia(function(){F(t.h,e)}),e}function Gc(t){if(t.C)throw new Fr("internal-error","RecaptchaVerifier instance has been destroyed.")}function Qc(t,e,n){var i=!1;try{this.b=n||r.a.app()}catch(t){throw new Fr("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new Fr("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().xa()}catch(t){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(t){}a=r.a.SDK_VERSION?rr(r.a.SDK_VERSION,a):null,Bc.call(this,n,t,e,function(){try{var t=o.b.auth().ea()}catch(e){t=null}return t},a,Xa(Qa),i)}function Yc(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new Fr("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Xc.length)throw new Fr("internal-error","Argument validator received an unsupported number of arguments.");n=Xc[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new Fr("argument-error",t+" failed: "+r)}(t=Bc.prototype).za=function(){var t=this;return this.f?this.f:this.f=Kc(this,Et().then(function(){if(ur()&&!Xn())return Gn();throw new Fr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return t.o.g(t.v())}).then(function(e){return t.g=e,za(t.u,Oa,{})}).then(function(e){t.a[Wc]=e.recaptchaSiteKey}).s(function(e){throw t.f=null,e}))},t.render=function(){Gc(this);var t=this;return Kc(this,this.za().then(function(){if(null===t.c){var e=t.l;if(!t.i){var n=On(e);e=Dn("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c}))},t.verify=function(){Gc(this);var t=this;return Kc(this,this.render().then(function(e){return new vt(function(n){var r=t.g.getResponse(e);if(r)n(r);else{var i=function(e){e&&(function(t,e){U(t.m,function(t){return t==e})}(t,i),n(e))};t.m.push(i),t.i&&t.g.execute(t.c)}})}))},t.reset=function(){Gc(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Gc(this),this.C=!0,this.o.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=On(this.l);for(var e;e=t.firstChild;)t.removeChild(e)}},_(Qc,Bc);var Xc="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function $c(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:i}}function Jc(t,e){return{name:t||"",K:"a boolean",optional:!!e,M:o}}function Zc(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:h}}function tl(t,e){return{name:t||"",K:"a function",optional:!!e,M:f}}function el(t,e){return{name:t||"",K:"null",optional:!!e,M:u}}function nl(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ya||!n)}}}function rl(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&i(t.type)&&f(t.verify))}}}function il(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function ol(t,e){for(var n in e){var r=e[n].name;t[r]=ul(r,t[n],e[n].j)}}function al(t,e){for(var n in e){var r=e[n].name;if(r!==n){var i=e[n].qb;Object.defineProperty(t,r,{get:function(){return this[n]},set:function(t){Yc(r,[i],[t],!0),this[n]=t},enumerable:!0})}}}function sl(t,e,n,r){t[e]=ul(e,n,r)}function ul(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Yc(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}ol(vc.prototype,{Va:{name:"applyActionCode",j:[$c("code")]},Ja:{name:"checkActionCode",j:[$c("code")]},Xa:{name:"confirmPasswordReset",j:[$c("code"),$c("newPassword")]},ub:{name:"createUserWithEmailAndPassword",j:[$c("email"),$c("password")]},Sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Vb:{name:"fetchProvidersForEmail",j:[$c("email")]},Wb:{name:"fetchSignInMethodsForEmail",j:[$c("email")]},fa:{name:"getRedirectResult",j:[]},kc:{name:"isSignInWithEmailLink",j:[$c("emailLink")]},rc:{name:"onAuthStateChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},sc:{name:"onIdTokenChanged",j:[il(Zc(),tl(),"nextOrObserver"),tl("opt_error",!0),tl("opt_completed",!0)]},hb:{name:"sendPasswordResetEmail",j:[$c("email"),il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},ib:{name:"sendSignInLinkToEmail",j:[$c("email"),Zc("actionCodeSettings")]},jb:{name:"setPersistence",j:[$c("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",j:[nl()]},Pa:{name:"signInAnonymously",j:[]},Dc:{name:"signInAnonymouslyAndRetrieveData",j:[]},Ec:{name:"signInWithCredential",j:[nl()]},Jb:{name:"signInWithCustomToken",j:[$c("token")]},Bc:{name:"signInAndRetrieveDataWithCustomToken",j:[$c("token")]},Kb:{name:"signInWithEmailAndPassword",j:[$c("email"),$c("password")]},Fc:{name:"signInWithEmailLink",j:[$c("email"),$c("emailLink",!0)]},Cc:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[$c("email"),$c("password")]},Gc:{name:"signInWithPhoneNumber",j:[$c("phoneNumber"),rl()]},Hc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Ic:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"updateCurrentUser",j:[il({name:"user",K:"an instance of Firebase User",optional:!1,M:function(t){return!!(t&&t instanceof Ou)}},el(),"user")]},kb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Qc:{name:"useDeviceLanguage",j:[]},Rc:{name:"verifyPasswordResetCode",j:[$c("code")]}}),al(vc.prototype,{lc:{name:"languageCode",qb:il($c(),el(),"languageCode")}}),vc.Persistence=Ps,vc.Persistence.LOCAL="local",vc.Persistence.SESSION="session",vc.Persistence.NONE="none",ol(Ou.prototype,{delete:{name:"delete",j:[]},ac:{name:"getIdTokenResult",j:[Jc("opt_forceRefresh",!0)]},F:{name:"getIdToken",j:[Jc("opt_forceRefresh",!0)]},ab:{name:"linkAndRetrieveDataWithCredential",j:[nl()]},mc:{name:"linkWithCredential",j:[nl()]},nc:{name:"linkWithPhoneNumber",j:[$c("phoneNumber"),rl()]},oc:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},pc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},cb:{name:"reauthenticateAndRetrieveDataWithCredential",j:[nl()]},vc:{name:"reauthenticateWithCredential",j:[nl()]},wc:{name:"reauthenticateWithPhoneNumber",j:[$c("phoneNumber"),rl()]},xc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},yc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},gb:{name:"sendEmailVerification",j:[il(Zc("opt_actionCodeSettings",!0),el(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[$c(null,!0)]},Nc:{name:"unlink",j:[$c("provider")]},mb:{name:"updateEmail",j:[$c("email")]},nb:{name:"updatePassword",j:[$c("password")]},Pc:{name:"updatePhoneNumber",j:[nl("phone")]},ob:{name:"updateProfile",j:[Zc("profile")]}}),ol(Nc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(kc.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ol(vt.prototype,{ia:{name:"finally"},s:{name:"catch"},then:{name:"then"}}),al(wu.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",qb:Jc("appVerificationDisabledForTesting")}}),ol(Eu.prototype,{confirm:{name:"confirm",j:[$c("verificationCode")]}}),sl(Oi,"credential",function(t,e){return new Ii(t,e)},[$c("email"),$c("password")]),ol(Ei.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ei,"credential",Ti,[il($c(),Zc(),"token")]),sl(Oi,"credentialWithLink",Pi,[$c("email"),$c("emailLink")]),ol(Ci.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ci,"credential",xi,[il($c(),Zc(),"token")]),ol(Si.prototype,{ta:{name:"addScope",j:[$c("scope")]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Si,"credential",ki,[il($c(),il(Zc(),el()),"idToken"),il($c(),el(),"accessToken",!0)]),ol(Ni.prototype,{Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Ni,"credential",Ai,[il($c(),Zc(),"token"),$c("secret",!0)]),ol(wi.prototype,{ta:{name:"addScope",j:[$c("scope")]},credential:{name:"credential",j:[il($c(),el(),"idToken",!0),il($c(),el(),"accessToken",!0)]},Da:{name:"setCustomParameters",j:[Zc("customOAuthParameters")]}}),sl(Li,"credential",Fi,[$c("verificationId"),$c("verificationCode")]),ol(Li.prototype,{Ta:{name:"verifyPhoneNumber",j:[$c("phoneNumber"),rl()]}}),ol(Fr.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(zi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Hi.prototype,{toJSON:{name:"toJSON",j:[$c(null,!0)]}}),ol(Qc.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if(void 0===r.a||!r.a.INTERNAL||!r.a.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={Auth:vc,Error:Fr};sl(t,"EmailAuthProvider",Oi,[]),sl(t,"FacebookAuthProvider",Ei,[]),sl(t,"GithubAuthProvider",Ci,[]),sl(t,"GoogleAuthProvider",Si,[]),sl(t,"TwitterAuthProvider",Ni,[]),sl(t,"OAuthProvider",wi,[$c("providerId")]),sl(t,"PhoneAuthProvider",Li,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof vc)}}]),sl(t,"RecaptchaVerifier",Qc,[il($c(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Zc("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof r.a.app.App)}}]),r.a.INTERNAL.registerService("auth",function(t,e){return e({INTERNAL:{getUid:y((t=new vc(t)).getUid,t),getToken:y(t.$b,t),addAuthTokenListener:y(t.Rb,t),removeAuthTokenListener:y(t.zc,t)}}),t},t,function(t,e){if("create"===t)try{e.auth()}catch(t){}}),r.a.INTERNAL.extendNamespace({User:Ou})}()}).call(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}.call(this,n(66))},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",function(){return i}),n.d(e,"__assign",function(){return o}),n.d(e,"__rest",function(){return a}),n.d(e,"__decorate",function(){return s}),n.d(e,"__param",function(){return u}),n.d(e,"__metadata",function(){return c}),n.d(e,"__awaiter",function(){return l}),n.d(e,"__generator",function(){return f}),n.d(e,"__exportStar",function(){return h}),n.d(e,"__values",function(){return p}),n.d(e,"__read",function(){return d}),n.d(e,"__spread",function(){return v}),n.d(e,"__await",function(){return m}),n.d(e,"__asyncGenerator",function(){return y}),n.d(e,"__asyncDelegator",function(){return g}),n.d(e,"__asyncValues",function(){return b}),n.d(e,"__makeTemplateObject",function(){return _}),n.d(e,"__importStar",function(){return w}),n.d(e,"__importDefault",function(){return E}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

                                                                                                                                                          • */

var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function f(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function y(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e})}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):p(t)}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=s(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},l.prototype.delete=function(t){delete this.map[s(t)]},l.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},l.prototype.set=function(t,e){this.map[s(t)]=u(e)},l.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},v.call(m.prototype),v.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];g.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=m,t.Response=g,t.fetch=function(t,n){return new Promise(function(r,i){var o=new m(t,n),a=new XMLHttpRequest;a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new g(i,n))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=h(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=d(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=f(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=h(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function m(t,e){var n,r,i=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),o.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){d(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&d(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete c[t]}function d(t){if(l)setTimeout(d,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(66),n(148))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(327),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(66))},function(t,e,n){"use strict";n.r(e),function(t,e){n(326);var r=setTimeout;function i(){}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function a(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}s(e.promise,r)}else(1===t._state?s:u)(e.promise,t._value)})):t._deferreds.push(e)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(i);return a(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,e,n)),n},o.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},o.all=function(t){return new o(function(e,n){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(t,e)},n)}r[t]=a,0==--i&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)o(a,r[a])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){r(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();function h(t,e){return t(e={exports:{}},e.exports),e.exports}f.Promise||(f.Promise=o);var p=h(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),d=h(function(t){var e=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)}),v=(d.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),m=function(t){if(!v(t))throw TypeError(t+" is not an object!");return t},y=function(t){try{return!!t()}catch(t){return!0}},g=!y(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=p.document,_=v(b)&&v(b.createElement),w=function(t){return _?b.createElement(t):{}},E=!g&&!y(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),T=function(t,e){if(!v(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!v(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!v(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},C=Object.defineProperty,x={f:g?Object.defineProperty:function(t,e,n){if(m(t),e=T(e,!0),m(n),E)try{return C(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=g?function(t,e,n){return x.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},N={}.hasOwnProperty,A=function(t,e){return N.call(t,e)},I=0,O=Math.random(),P=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++I+O).toString(36))},R=h(function(t){var e=P("src"),n=Function.toString,r=(""+n).split("toString");d.inspectSource=function(t){return n.call(t)},(t.exports=function(t,n,i,o){var a="function"==typeof i;a&&(A(i,"name")||k(i,"name",n)),t[n]!==i&&(a&&(A(i,e)||k(i,e,t[n]?""+t[n]:r.join(String(n)))),t===p?t[n]=i:o?t[n]?t[n]=i:k(t,n,i):(delete t[n],k(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||n.call(this)})}),D=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},M=function(t,e,n){var r,i,o,a,s=t&M.F,u=t&M.G,c=t&M.S,l=t&M.P,f=t&M.B,h=u?p:c?p[e]||(p[e]={}):(p[e]||{}).prototype,v=u?d:d[e]||(d[e]={}),m=v.prototype||(v.prototype={});for(r in u&&(n=e),n)o=((i=!s&&h&&void 0!==h[r])?h:n)[r],a=f&&i?D(o,p):l&&"function"==typeof o?D(Function.call,o):o,h&&R(h,r,o,t&M.U),v[r]!=o&&k(v,r,a),l&&m[r]!=o&&(m[r]=o)};p.core=d,M.F=1,M.G=2,M.S=4,M.P=8,M.B=16,M.W=32,M.U=64,M.R=128;var L=M,F={}.toString,U=function(t){return F.call(t).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==U(t)?t.split(""):Object(t)},B=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},q=function(t){return Object(B(t))},V=Math.ceil,W=Math.floor,H=function(t){return isNaN(t=+t)?0:(t>0?W:V)(t)},z=Math.min,K=function(t){return t>0?z(H(t),9007199254740991):0},G=Array.isArray||function(t){return"Array"==U(t)},Q=p["__core-js_shared__"]||(p["__core-js_shared__"]={}),Y=function(t){return Q[t]||(Q[t]={})},X=h(function(t){var e=Y("wks"),n=p.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:P)("Symbol."+t))}).store=e}),$=X("species"),J=function(t,e){return new(function(t){var e;return G(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!G(e.prototype)||(e=void 0),v(e)&&null===(e=e[$])&&(e=void 0)),void 0===e?Array:e}(t))(e)},Z=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,a=6==t,s=5==t||a,u=e||J;return function(e,c,l){for(var f,h,p=q(e),d=j(p),v=D(c,l,3),m=K(d.length),y=0,g=n?u(e,m):r?u(e,0):void 0;m>y;y++)if((s||y in d)&&(h=v(f=d[y],y,p),t))if(n)g[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:g.push(f)}else if(o)return!1;return a?-1:i||o?o:g}},tt=X("unscopables"),et=Array.prototype;void 0==et[tt]&&k(et,tt,{});var nt=function(t){et[tt][t]=!0},rt=Z(5),it=!0;"find"in[]&&Array(1).find(function(){it=!1}),L(L.P+L.F*it,"Array",{find:function(t){return rt(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("find");d.Array.find;var ot=Z(6),at=!0;"findIndex"in[]&&Array(1).findIndex(function(){at=!1}),L(L.P+L.F*at,"Array",{findIndex:function(t){return ot(this,t,arguments.length>1?arguments[1]:void 0)}}),nt("findIndex");d.Array.findIndex;var st,ut=function(t){return j(B(t))},ct=Math.max,lt=Math.min,ft=Y("keys"),ht=function(t){return ft[t]||(ft[t]=P(t))},pt=(st=!1,function(t,e,n){var r,i=ut(t),o=K(i.length),a=function(t,e){return(t=H(t))<0?ct(t+e,0):lt(t,e)}(n,o);if(st&&e!=e){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((st||a in i)&&i[a]===e)return st||a||0;return!st&&-1}),dt=ht("IE_PROTO"),vt=function(t,e){var n,r=ut(t),i=0,o=[];for(n in r)n!=dt&&A(r,n)&&o.push(n);for(;e.length>i;)A(r,n=e[i++])&&(~pt(o,n)||o.push(n));return o},mt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),yt=Object.keys||function(t){return vt(t,mt)},gt={f:Object.getOwnPropertySymbols},bt={f:{}.propertyIsEnumerable},_t=Object.assign,wt=!_t||y(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=_t({},t)[n]||Object.keys(_t({},e)).join("")!=r})?function(t,e){for(var n=q(t),r=arguments.length,i=1,o=gt.f,a=bt.f;r>i;)for(var s,u=j(arguments[i++]),c=o?yt(u).concat(o(u)):yt(u),l=c.length,f=0;l>f;)a.call(u,s=c[f++])&&(n[s]=u[s]);return n}:_t;L(L.S+L.F,"Object",{assign:wt});d.Object.assign;var Et=X("match"),Tt=function(t,e,n){if(v(r=e)&&(void 0!==(i=r[Et])?i:"RegExp"==U(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(B(t))},Ct=X("match"),xt="".startsWith;L(L.P+L.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Ct]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=Tt(this,t,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return xt?xt.call(e,r,n):e.slice(n,n+r.length)===r}});d.String.startsWith;L(L.P,"String",{repeat:function(t){var e=String(B(this)),n="",r=H(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});d.String.repeat;var St=h(function(t){var e=P("meta"),n=x.f,r=0,i=Object.isExtensible||function(){return!0},o=!y(function(){return i(Object.preventExtensions({}))}),a=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},s=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!v(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!A(t,e)){if(!i(t))return"F";if(!n)return"E";a(t)}return t[e].i},getWeak:function(t,n){if(!A(t,e)){if(!i(t))return!0;if(!n)return!1;a(t)}return t[e].w},onFreeze:function(t){return o&&s.NEED&&i(t)&&!A(t,e)&&a(t),t}}}),kt=(St.KEY,St.NEED,St.fastKey,St.getWeak,St.onFreeze,x.f),Nt=X("toStringTag"),At=function(t,e,n){t&&!A(t=n?t:t.prototype,Nt)&&kt(t,Nt,{configurable:!0,value:e})},It={f:X},Ot=x.f,Pt=function(t){var e=d.Symbol||(d.Symbol=p.Symbol||{});"_"==t.charAt(0)||t in e||Ot(e,t,{value:It.f(t)})},Rt=g?Object.defineProperties:function(t,e){m(t);for(var n,r=yt(e),i=r.length,o=0;i>o;)x.f(t,n=r[o++],e[n]);return t},Dt=p.document,Mt=Dt&&Dt.documentElement,Lt=ht("IE_PROTO"),Ft=function(){},Ut=function(){var t,e=w("iframe"),n=mt.length;for(e.style.display="none",Mt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Ut=t.F;n--;)delete Ut.prototype[mt[n]];return Ut()},jt=Object.create||function(t,e){var n;return null!==t?(Ft.prototype=m(t),n=new Ft,Ft.prototype=null,n[Lt]=t):n=Ut(),void 0===e?n:Rt(n,e)},Bt=mt.concat("length","prototype"),qt={f:Object.getOwnPropertyNames||function(t){return vt(t,Bt)}},Vt=qt.f,Wt={}.toString,Ht="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zt={f:function(t){return Ht&&"[object Window]"==Wt.call(t)?function(t){try{return Vt(t)}catch(t){return Ht.slice()}}(t):Vt(ut(t))}},Kt=Object.getOwnPropertyDescriptor,Gt={f:g?Kt:function(t,e){if(t=ut(t),e=T(e,!0),E)try{return Kt(t,e)}catch(t){}if(A(t,e))return S(!bt.f.call(t,e),t[e])}},Qt=St.KEY,Yt=Gt.f,Xt=x.f,$t=zt.f,Jt=p.Symbol,Zt=p.JSON,te=Zt&&Zt.stringify,ee=X("_hidden"),ne=X("toPrimitive"),re={}.propertyIsEnumerable,ie=Y("symbol-registry"),oe=Y("symbols"),ae=Y("op-symbols"),se=Object.prototype,ue="function"==typeof Jt,ce=p.QObject,le=!ce||!ce.prototype||!ce.prototype.findChild,fe=g&&y(function(){return 7!=jt(Xt({},"a",{get:function(){return Xt(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Yt(se,e);r&&delete se[e],Xt(t,e,n),r&&t!==se&&Xt(se,e,r)}:Xt,he=function(t){var e=oe[t]=jt(Jt.prototype);return e._k=t,e},pe=ue&&"symbol"==typeof Jt.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Jt},de=function(t,e,n){return t===se&&de(ae,e,n),m(t),e=T(e,!0),m(n),A(oe,e)?(n.enumerable?(A(t,ee)&&t[ee][e]&&(t[ee][e]=!1),n=jt(n,{enumerable:S(0,!1)})):(A(t,ee)||Xt(t,ee,S(1,{})),t[ee][e]=!0),fe(t,e,n)):Xt(t,e,n)},ve=function(t,e){m(t);for(var n,r=function(t){var e=yt(t),n=gt.f;if(n)for(var r,i=n(t),o=bt.f,a=0;i.length>a;)o.call(t,r=i[a++])&&e.push(r);return e}(e=ut(e)),i=0,o=r.length;o>i;)de(t,n=r[i++],e[n]);return t},me=function(t){var e=re.call(this,t=T(t,!0));return!(this===se&&A(oe,t)&&!A(ae,t))&&(!(e||!A(this,t)||!A(oe,t)||A(this,ee)&&this[ee][t])||e)},ye=function(t,e){if(t=ut(t),e=T(e,!0),t!==se||!A(oe,e)||A(ae,e)){var n=Yt(t,e);return!n||!A(oe,e)||A(t,ee)&&t[ee][e]||(n.enumerable=!0),n}},ge=function(t){for(var e,n=$t(ut(t)),r=[],i=0;n.length>i;)A(oe,e=n[i++])||e==ee||e==Qt||r.push(e);return r},be=function(t){for(var e,n=t===se,r=$t(n?ae:ut(t)),i=[],o=0;r.length>o;)!A(oe,e=r[o++])||n&&!A(se,e)||i.push(oe[e]);return i};ue||(R((Jt=function(){if(this instanceof Jt)throw TypeError("Symbol is not a constructor!");var t=P(arguments.length>0?arguments[0]:void 0),e=function(n){this===se&&e.call(ae,n),A(this,ee)&&A(this[ee],t)&&(this[ee][t]=!1),fe(this,t,S(1,n))};return g&&le&&fe(se,t,{configurable:!0,set:e}),he(t)}).prototype,"toString",function(){return this._k}),Gt.f=ye,x.f=de,qt.f=zt.f=ge,bt.f=me,gt.f=be,g&&R(se,"propertyIsEnumerable",me,!0),It.f=function(t){return he(X(t))}),L(L.G+L.W+L.F*!ue,{Symbol:Jt});for(var _e="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),we=0;_e.length>we;)X(_e[we++]);for(var Ee=yt(X.store),Te=0;Ee.length>Te;)Pt(Ee[Te++]);L(L.S+L.F*!ue,"Symbol",{for:function(t){return A(ie,t+="")?ie[t]:ie[t]=Jt(t)},keyFor:function(t){if(!pe(t))throw TypeError(t+" is not a symbol!");for(var e in ie)if(ie[e]===t)return e},useSetter:function(){le=!0},useSimple:function(){le=!1}}),L(L.S+L.F*!ue,"Object",{create:function(t,e){return void 0===e?jt(t):ve(jt(t),e)},defineProperty:de,defineProperties:ve,getOwnPropertyDescriptor:ye,getOwnPropertyNames:ge,getOwnPropertySymbols:be}),Zt&&L(L.S+L.F*(!ue||y(function(){var t=Jt();return"[null]"!=te([t])||"{}"!=te({a:t})||"{}"!=te(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(v(e)||void 0!==t)&&!pe(t))return G(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!pe(e))return e}),r[1]=e,te.apply(Zt,r)}}),Jt.prototype[ne]||k(Jt.prototype,ne,Jt.prototype.valueOf),At(Jt,"Symbol"),At(Math,"Math",!0),At(p.JSON,"JSON",!0);var Ce=X("toStringTag"),xe="Arguments"==U(function(){return arguments}()),Se={};Se[X("toStringTag")]="z",Se+""!="[object z]"&&R(Object.prototype,"toString",function(){return"[object "+(void 0===(t=this)?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?n:xe?U(e):"Object"==(r=U(e))&&"function"==typeof e.callee?"Arguments":r)+"]";var t,e,n,r},!0),Pt("asyncIterator"),Pt("observable");d.Symbol;var ke={},Ne={};k(Ne,X("iterator"),function(){return this});var Ae,Ie=function(t,e,n){t.prototype=jt(Ne,{next:S(1,n)}),At(t,e+" Iterator")},Oe=ht("IE_PROTO"),Pe=Object.prototype,Re=Object.getPrototypeOf||function(t){return t=q(t),A(t,Oe)?t[Oe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Pe:null},De=X("iterator"),Me=!([].keys&&"next"in[].keys()),Le=function(){return this},Fe=function(t,e,n,r,i,o,a){Ie(n,e,r);var s,u,c,l=function(t){if(!Me&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",h="values"==i,p=!1,d=t.prototype,v=d[De]||d["@@iterator"]||i&&d[i],m=v||l(i),y=i?h?l("entries"):m:void 0,g="Array"==e&&d.entries||v;if(g&&(c=Re(g.call(new t)))!==Object.prototype&&c.next&&(At(c,f,!0),"function"!=typeof c[De]&&k(c,De,Le)),h&&v&&"values"!==v.name&&(p=!0,m=function(){return v.call(this)}),(Me||p||!d[De])&&k(d,De,m),ke[e]=m,ke[f]=Le,i)if(s={values:h?m:l("values"),keys:o?m:l("keys"),entries:y},a)for(u in s)u in d||R(d,u,s[u]);else L(L.P+L.F*(Me||p),e,s);return s},Ue=(Ae=!0,function(t,e){var n,r,i=String(B(t)),o=H(e),a=i.length;return o<0||o>=a?Ae?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?Ae?i.charAt(o):n:Ae?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});Fe(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ue(e,n),this._i+=t.length,{value:t,done:!1})});var je=function(t,e){return{value:e,done:!!t}},Be=Fe(Array,"Array",function(t,e){this._t=ut(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,je(1)):je(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ke.Arguments=ke.Array,nt("keys"),nt("values"),nt("entries");for(var qe=X("iterator"),Ve=X("toStringTag"),We=ke.Array,He={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},ze=yt(He),Ke=0;Ke<ze.length;Ke++){var Ge,Qe=ze[Ke],Ye=He[Qe],Xe=p[Qe],$e=Xe&&Xe.prototype;if($e&&($e[qe]||k($e,qe,We),$e[Ve]||k($e,Ve,Qe),ke[Qe]=We,Ye))for(Ge in Be)$e[Ge]||R($e,Ge,Be[Ge],!0)}It.f("iterator")}.call(this,n(328).setImmediate,n(66))},function(t,e,n){"use strict";n(329);var r,i=(r=n(14))&&"object"==typeof r&&"default"in r?r.default:r;n(324),n(323),n(321),n(318),n(298),n(316),console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),t.exports=i},function(t,e,n){var r=n(46),i=n(118),o=n(43),a=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),n=null==n?0:a(r(n),292)){var s=(o(t)+"e").split("e"),u=e(s[0]+"e"+(+s[1]+n));return+((s=(o(u)+"e").split("e"))[0]+"e"+(+s[1]-n))}return e(t)}}},function(t,e,n){var r=n(53),i=n(77);t.exports=function(t){return r(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},function(t,e,n){var r=n(223)("length");t.exports=r},function(t,e,n){var r=n(334),i=n(105),o=n(333);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=!0;return r(t,function(t,r,i){return n=!!e(t,r,i)}),n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(10);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e,n){var r=n(134),i=n(173),o=n(54),a=n(49),s=n(71),u=n(55);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=i(e))?t(c,n,l):void 0}})},function(t,e,n){n(339),t.exports=n(26).Reflect.get},function(t,e,n){t.exports=n(340)},function(t,e,n){var r=n(149),i=n(105),o=n(106),a=n(43);t.exports=function(t){return function(e){e=a(e);var n=i(e)?o(e):void 0,s=n?n[0]:e.charAt(0),u=n?r(n,1).join(""):e.slice(1);return s[t]()+u}}},function(t,e,n){var r=n(342)("toUpperCase");t.exports=r},function(t,e){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",i="\\d+",o="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",s="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+s+")",h="(?:"+l+"|"+s+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),v="(?:"+[o,u,c].join("|")+")"+d,m=RegExp([l+"?"+a+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,l,"$"].join("|")+")",h+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,v].join("|"),"g");t.exports=function(t){return t.match(m)||[]}},function(t,e){var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return n.test(t)}},function(t,e){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(n)||[]}},function(t,e,n){var r=n(346),i=n(345),o=n(43),a=n(344);t.exports=function(t,e,n){return t=o(t),void 0===(e=n?void 0:e)?i(t)?a(t):r(t):t.match(e)||[]}},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,n){var r=n(348)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=r},function(t,e,n){var r=n(200),i=n(141),o=n(347),a=RegExp("['’]","g");t.exports=function(t){return function(e){return r(o(i(e).replace(a,"")),t,"")}}},function(t,e){t.exports=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}},function(t,e,n){var r=n(67),i=n(85),o=n(52),a=n(38),s=n(96),u=n(351),c=n(232),l=n(113),f=n(106),h=n(72),p="[object Map]",d="[object Set]",v=r?r.iterator:void 0;t.exports=function(t){if(!t)return[];if(a(t))return s(t)?f(t):i(t);if(v&&t[v])return u(t[v]());var e=o(t);return(e==p?c:e==d?l:h)(t)}},function(t,e,n){var r=n(90),i=n(15);t.exports=function(t,e){return r(i(t,e),1)}},function(t,e,n){var r=n(41),i=n(30),o="[object RegExp]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(354),i=n(63),o=n(115),a=o&&o.isRegExp,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(128),i=n(149),o=n(105),a=n(77),s=n(355),u=n(106),c=n(43),l=4294967295;t.exports=function(t,e,n){return n&&"number"!=typeof n&&a(t,e,n)&&(e=n=void 0),(n=void 0===n?l:n>>>0)?(t=c(t))&&("string"==typeof e||null!=e&&!s(e))&&!(e=r(e))&&o(t)?i(u(t),0,n):t.split(e,n):[]}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,s=r(n((e-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},function(t,e,n){var r=n(358),i=n(77),o=n(161);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){t.exports=function(t){return t&&t.length?t[0]:void 0}},function(t,e){var n=Math.max,r=Math.min;t.exports=function(t,e,i){return t>=r(e,i)&&t<n(e,i)}},function(t,e,n){var r=n(48);t.exports=function(t,e){return r(e,function(e){return t[e]})}},function(t,e,n){var r=n(228),i=n(212),o=n(113),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e,n){var r=n(153),i=n(150),o=n(154),a=n(211),s=n(18),u=n(213),c="Expected a function",l=8,f=32,h=128,p=256;t.exports=function(t){return i(function(e){var n=e.length,i=n,d=r.prototype.thru;for(t&&e.reverse();i--;){var v=e[i];if("function"!=typeof v)throw new TypeError(c);if(d&&!m&&"wrapper"==a(v))var m=new r([],!0)}for(i=m?i:n;++i<n;){v=e[i];var y=a(v),g="wrapper"==y?o(v):void 0;m=g&&u(g[0])&&g[1]==(h|l|f|p)&&!g[4].length&&1==g[9]?m[a(g[0])].apply(m,g[3]):1==v.length&&u(v)?m[y]():m.thru(v)}return function(){var t=arguments,r=t[0];if(m&&1==t.length&&s(r))return m.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}},function(t,e,n){var r=n(364)();t.exports=r},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(68);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}},function(t,e,n){var r=n(367),i=n(366),o=n(47);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}},function(t,e,n){var r=n(68);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(48),i=n(34),o=n(202),a=n(372),s=n(63),u=n(371),c=n(47);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=o(t,function(t,n,i){return{criteria:r(e,function(e){return e(t)}),index:++l,value:t}});return a(f,function(t,e){return u(t,e,n)})}},function(t,e,n){var r=n(90),i=n(373),o=n(53),a=n(77),s=o(function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])});t.exports=s},function(t,e,n){var r=n(124),i=n(46);t.exports=function(t,e,n){return t&&t.length?(e=n||void 0===e?1:i(e),r(t,0,e<0?0:e)):[]}},function(t,e,n){var r=n(108),i=n(92),o=n(91),a=n(39),s=n(64);t.exports=function(t,e,n,u){if(!a(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var p=s(e[c]),d=n;if(c!=f){var v=h[p];void 0===(d=u?u(v,p,h):void 0)&&(d=a(v)?v:o(e[c+1])?[]:{})}r(h,p,d),h=h[p]}return t}},function(t,e,n){var r=n(203),i=n(224);t.exports=function(t,e){return r(t,e,function(e,n){return i(t,n)})}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=-1,i=t.length;++n<i&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(121);t.exports=function(t,e){for(var n=t.length;n--&&r(e,t[n],0)>-1;);return n}},function(t,e,n){var r=n(128),i=n(149),o=n(381),a=n(380),s=n(106),u=n(43),c=/^\s+|\s+$/g;t.exports=function(t,e,n){if((t=u(t))&&(n||void 0===e))return t.replace(c,"");if(!t||!(e=r(e)))return t;var l=s(t),f=s(e),h=a(l,f),p=o(l,f)+1;return i(l,h,p).join("")}},function(t,e,n){var r=n(48),i=n(85),o=n(18),a=n(68),s=n(251),u=n(64),c=n(43);t.exports=function(t){return o(t)?r(t,u):a(t)?[t]:i(s(c(t)))}},function(t,e,n){var r=n(90);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},function(t,e,n){var r=n(111),i=n(150)(function(t,e){return r(t,256,void 0,void 0,void 0,e)});t.exports=i},function(t,e,n){var r=n(207),i=n(34),o=1;t.exports=function(t){return i("function"==typeof t?t:r(t,o))}},function(t,e,n){var r=n(52),i=n(30),o="[object WeakMap]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(41),i=n(30),o=n(81),a="[object DOMException]",s="[object Error]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==s||e==a||"string"==typeof t.message&&"string"==typeof t.name&&!o(t)}},function(t,e,n){var r=n(111),i=8;function o(t,e,n){var a=r(t,i,void 0,void 0,void 0,void 0,void 0,e=n?void 0:e);return a.placeholder=o.placeholder,a}o.placeholder={},t.exports=o},function(t,e,n){var r=n(52),i=n(30),o="[object Set]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(390),i=n(63),o=n(115),a=o&&o.isSet,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(52),i=n(30),o="[object Map]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(392),i=n(63),o=n(115),a=o&&o.isMap,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(86),i=n(107),o=n(88);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(67),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(151);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e,n){var r=n(151),i=n(398),o=n(397),a=n(396),s=n(395),u="[object Boolean]",c="[object Date]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]";t.exports=function(t,e,n){var k=t.constructor;switch(e){case m:return r(t);case u:case c:return new k(+t);case y:return i(t,n);case g:case b:case _:case w:case E:case T:case C:case x:case S:return s(t,n);case l:return new k;case f:case d:return new k(t);case h:return o(t);case p:return new k;case v:return a(t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(84),i=n(205);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(84),i=n(157);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){(function(t){var r=n(33),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(117)(t))},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(39),i=n(88),o=n(404),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},function(t,e,n){var r=n(84),i=n(206);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(207),i=4;t.exports=function(t){return r(t,i)}},function(t,e,n){var r=n(216),i=n(215),o=n(109),a="__lodash_placeholder__",s=1,u=2,c=4,l=8,f=128,h=256,p=Math.min;t.exports=function(t,e){var n=t[1],d=e[1],v=n|d,m=v<(s|u|f),y=d==f&&n==l||d==f&&n==h&&t[7].length<=e[8]||d==(f|h)&&e[7].length<=e[8]&&n==l;if(!m&&!y)return t;d&s&&(t[2]=e[2],v|=n&s?0:c);var g=e[3];if(g){var b=t[3];t[3]=b?r(b,g,e[4]):g,t[4]=b?o(t[3],a):e[4]}return(g=e[5])&&(b=t[5],t[5]=b?i(b,g,e[6]):g,t[6]=b?o(t[5],a):e[6]),(g=e[7])&&(t[7]=g),d&f&&(t[8]=null==t[8]?e[8]:p(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=v,t}},function(t,e,n){var r=n(126),i=n(110),o=n(33),a=1;t.exports=function(t,e,n,s){var u=e&a,c=i(t);return function e(){for(var i=-1,a=arguments.length,l=-1,f=s.length,h=Array(f+a),p=this&&this!==o&&this instanceof e?c:t;++l<f;)h[l]=s[l];for(;a--;)h[l++]=arguments[++i];return r(p,u?n:this,h)}}},function(t,e,n){var r=n(85),i=n(91),o=Math.min;t.exports=function(t,e){for(var n=t.length,a=o(e.length,n),s=r(t);a--;){var u=e[a];t[a]=i(u,n)?s[u]:void 0}return t}},function(t,e,n){var r=n(87),i=n(122),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return r(o,function(n){var r="_."+n[0];e&n[1]&&!i(t,r)&&t.push(r)}),t.sort()}},function(t,e){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,e){var r=e.length;if(!r)return t;var i=r-1;return e[i]=(r>1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}},function(t,e){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var e=t.match(n);return e?e[1].split(r):[]}},function(t,e,n){var r=n(156),i=n(153),o=n(85);t.exports=function(t){if(t instanceof r)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=o(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},function(t,e,n){var r=n(156),i=n(153),o=n(155),a=n(18),s=n(30),u=n(414),c=Object.prototype.hasOwnProperty;function l(t){if(s(t)&&!a(t)&&!(t instanceof r)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=o.prototype,l.prototype.constructor=l,t.exports=l},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}},function(t,e,n){var r=n(126),i=n(110),o=n(217),a=n(214),s=n(152),u=n(109),c=n(33);t.exports=function(t,e,n){var l=i(t);return function i(){for(var f=arguments.length,h=Array(f),p=f,d=s(i);p--;)h[p]=arguments[p];var v=f<3&&h[0]!==d&&h[f-1]!==d?[]:u(h,d);return(f-=v.length)<n?a(t,e,o,i.placeholder,void 0,h,v,void 0,void 0,n-f):r(this&&this!==c&&this instanceof i?l:t,this,h)}}},function(t,e,n){var r=n(110),i=n(33),o=1;t.exports=function(t,e,n){var a=e&o,s=r(t);return function e(){return(this&&this!==i&&this instanceof e?s:t).apply(a?n:this,arguments)}}},function(t,e,n){var r=n(111),i=128;t.exports=function(t,e,n){return e=n?void 0:e,e=t&&null==e?t.length:e,r(t,i,void 0,void 0,void 0,void 0,e)}},function(t,e,n){t.exports={ary:n(420),assign:n(208),clone:n(407),curry:n(389),forEach:n(87),isArray:n(18),isError:n(388),isFunction:n(44),isWeakMap:n(387),iteratee:n(386),keys:n(114),rearg:n(385),toInteger:n(46),toPath:n(383)}},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,r={};for(var i in n){var o=n[i];t.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e,n){var r=n(422),i=n(21),o=Array.prototype.push;function a(t,e){return 2==e?function(e,n){return t(e,n)}:function(e){return t(e)}}function s(t){for(var e=t?t.length:0,n=Array(e);e--;)n[e]=t[e];return n}function u(t,e){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=e.apply(void 0,r);return t.apply(void 0,r),i}}}t.exports=function t(e,n,c,l){var f,h="function"==typeof n,p=n===Object(n);if(p&&(l=c,c=n,n=void 0),null==c)throw new TypeError;l||(l={});var d={cap:!("cap"in l)||l.cap,curry:!("curry"in l)||l.curry,fixed:!("fixed"in l)||l.fixed,immutable:!("immutable"in l)||l.immutable,rearg:!("rearg"in l)||l.rearg},v="curry"in l&&l.curry,m="fixed"in l&&l.fixed,y="rearg"in l&&l.rearg,g=h?c:i,b=h?c.runInContext():void 0,_=h?c:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},w=_.ary,E=_.assign,T=_.clone,C=_.curry,x=_.forEach,S=_.isArray,k=_.isError,N=_.isFunction,A=_.isWeakMap,I=_.keys,O=_.rearg,P=_.toInteger,R=_.toPath,D=I(r.aryMethod),M={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(s(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],n=arguments[1],r=t(e,n),i=r.length;return d.cap&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(t){return function(e){var n=this;if(!N(n))return t(n,Object(e));var r=[];return x(I(e),function(t){N(e[t])&&r.push([t,n.prototype[t]])}),t(n,Object(e)),x(r,function(t){var e=t[1];N(e)?n.prototype[t[0]]=e:delete n.prototype[t[0]]}),n}},nthArg:function(t){return function(e){var n=e<0?1:P(e)+1;return C(t(e),n)}},rearg:function(t){return function(e,n){var r=n?n.length:0;return C(t(e,n),r)}},runInContext:function(n){return function(r){return t(e,n(r),l)}}};function L(t,e){if(d.cap){var n=r.iterateeRearg[t];if(n)return function(t,e){return q(t,function(t){var n=e.length;return function(t,e){return 2==e?function(e,n){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}(O(a(t,n),e),n)})}(e,n);var i=!h&&r.iterateeAry[t];if(i)return function(t,e){return q(t,function(t){return"function"==typeof t?a(t,e):t})}(e,i)}return e}function F(t,e,n){if(d.fixed&&(m||!r.skipFixed[t])){var i=r.methodSpread[t],a=i&&i.start;return void 0===a?w(e,n):function(t,e){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var a=i[e],s=i.slice(0,e);return a&&o.apply(s,a),e!=r&&o.apply(s,i.slice(e+1)),t.apply(this,s)}}(e,a)}return e}function U(t,e,n){return d.rearg&&n>1&&(y||!r.skipRearg[t])?O(e,r.methodRearg[t]||r.aryRearg[n]):e}function j(t,e){for(var n=-1,r=(e=R(e)).length,i=r-1,o=T(Object(t)),a=o;null!=a&&++n<r;){var s=e[n],u=a[s];null==u||N(u)||k(u)||A(u)||(a[s]=T(n==i?u:Object(u))),a=a[s]}return o}function B(e,n){var i=r.aliasToReal[e]||e,o=r.remap[i]||i,a=l;return function(e){var r=h?b:_,s=h?b[o]:n,u=E(E({},a),e);return t(r,i,s,u)}}function q(t,e){return function(){var n=arguments.length;if(!n)return t();for(var r=Array(n);n--;)r[n]=arguments[n];var i=d.rearg?0:n-1;return r[i]=e(r[i]),t.apply(void 0,r)}}function V(t,e){var n,i=r.aliasToReal[t]||t,o=e,a=M[i];return a?o=a(e):d.immutable&&(r.mutate.array[i]?o=u(e,s):r.mutate.object[i]?o=u(e,function(t){return function(e){return t({},e)}}(e)):r.mutate.set[i]&&(o=u(e,j))),x(D,function(t){return x(r.aryMethod[t],function(e){if(i==e){var a=r.methodSpread[i],s=a&&a.afterRearg;return n=s?F(i,U(i,o,t),t):U(i,F(i,o,t),t),n=L(i,n),u=n,c=t,n=v||d.curry&&c>1?C(u,c):u,!1}var u,c}),!n}),n||(n=o),n==e&&(n=v?C(n,1):function(){return e.apply(this,arguments)}),n.convert=B(i,e),r.placeholder[i]&&(f=!0,n.placeholder=e.placeholder=g),n}if(!p)return V(n,c);var W=c,H=[];return x(D,function(t){x(r.aryMethod[t],function(t){var e=W[r.remap[t]||t];e&&H.push([t,V(t,e)])})}),x(I(W),function(t){var e=W[t];if("function"==typeof e){for(var n=H.length;n--;)if(H[n][0]==t)return;e.convert=B(t,e),H.push([t,e])}}),x(H,function(t){W[t[0]]=t[1]}),W.convert=function(t){return W.runInContext.convert(t)(void 0)},f&&(W.placeholder=g),x(I(W),function(t){x(r.realToAlias[t]||[],function(e){W[e]=W[t]})}),W}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){var r=n(220),i=n(42)("iterator"),o=n(78);t.exports=n(26).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){n(172),n(135),t.exports=n(425)},function(t,e,n){t.exports=n(426)},function(t,e,n){var r=n(42)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(56),i=n(95);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(78),i=n(42)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(55);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(184),i=n(49),o=n(93),a=n(431),s=n(430),u=n(260),c=n(429),l=n(221);i(i.S+i.F*!n(428)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,m=void 0!==v,y=0,g=l(h);if(m&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==g||p==Array&&s(g))for(n=new p(e=u(h.length));e>y;y++)c(n,y,m?v(h[y],y):h[y]);else for(f=g.call(h),n=new p;!(i=f.next()).done;y++)c(n,y,m?a(f,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){n(135),n(432),t.exports=n(26).Array.from},function(t,e,n){t.exports=n(433)},function(t,e,n){var r=n(434),i=n(427);t.exports=function(t){if(i(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return r(t)}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e,n){var r=n(62);t.exports=function(t,e){var n;return r(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}},function(t,e,n){var r=n(34),i=n(38),o=n(28);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,a);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(62);t.exports=function(t,e,n,i){return r(t,function(t,r,o){e(i,t,n(t),o)}),i}},function(t,e){t.exports=function(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}},function(t,e,n){var r=n(440),i=n(439),o=n(34),a=n(18);t.exports=function(t,e){return function(n,s){var u=a(n)?r:i,c=e?e():{};return u(n,t,o(s,2),c)}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(55),i=n(221);t.exports=n(26).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){n(172),n(135),t.exports=n(443)},function(t,e,n){t.exports=n(444)},function(t,e,n){var r=n(445);t.exports=function(t,e){var n=[],i=!0,o=!1,a=void 0;try{for(var s,u=r(t);!(i=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return n}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e,n){var r=n(119);t.exports=function(t){return r(t)?t:[]}},function(t,e,n){var r=n(123),i=n(122),o=n(163),a=n(48),s=n(63),u=n(120),c=Math.min;t.exports=function(t,e,n){for(var l=n?o:i,f=t[0].length,h=t.length,p=h,d=Array(h),v=1/0,m=[];p--;){var y=t[p];p&&e&&(y=a(y,s(e))),v=c(y.length,v),d[p]=!n&&(e||f>=120&&y.length>=120)?new r(p&&y):void 0}y=t[0];var g=-1,b=d[0];t:for(;++g<f&&m.length<v;){var _=y[g],w=e?e(_):_;if(_=n||0!==_?_:0,!(b?u(b,w):l(m,w,n))){for(p=h;--p;){var E=d[p];if(!(E?u(E,w):l(t[p],w,n)))continue t}b&&b.push(w),m.push(_)}}return m}},function(t,e,n){var r=n(48),i=n(449),o=n(53),a=n(448),s=o(function(t){var e=r(t,a);return e.length&&e[0]===t[0]?i(e):[]});t.exports=s},function(t,e,n){var r=n(125);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(223),i=n(451),o=n(168),a=n(64);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(158),i=n(20),o=n(224),a=n(168),s=n(226),u=n(225),c=n(64),l=1,f=2;t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,l|f)}}},function(t,e,n){var r=n(226),i=n(28);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(65)(n(33),"Promise");t.exports=r},function(t,e,n){var r=n(65)(n(33),"DataView");t.exports=r},function(t,e,n){var r=n(231),i=1,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,s,u){var c=n&i,l=r(t),f=l.length;if(f!=r(e).length&&!c)return!1;for(var h=f;h--;){var p=l[h];if(!(c?p in e:o.call(e,p)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var v=!0;u.set(t,e),u.set(e,t);for(var m=c;++h<f;){var y=t[p=l[h]],g=e[p];if(a)var b=c?a(g,y,p,e,t,u):a(y,g,p,t,e,u);if(!(void 0===b?y===g||s(y,g,n,a,u):b)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(v=!1)}return u.delete(t),u.delete(e),v}},function(t,e,n){var r=n(67),i=n(233),o=n(130),a=n(235),s=n(232),u=n(113),c=1,l=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",v="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",E=r?r.prototype:void 0,T=E?E.valueOf:void 0;t.exports=function(t,e,n,r,E,C,x){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case _:return!(t.byteLength!=e.byteLength||!C(new i(t),new i(e)));case f:case h:case v:return o(+t,+e);case p:return t.name==e.name&&t.message==e.message;case m:case g:return t==e+"";case d:var S=s;case y:var k=r&c;if(S||(S=u),t.size!=e.size&&!k)return!1;var N=x.get(t);if(N)return N==e;r|=l,x.set(t,e);var A=a(S(t),S(e),r,E,C,x);return x.delete(t),A;case b:if(T)return T.call(t)==T.call(e)}return!1}},function(t,e,n){var r=n(159),i=n(235),o=n(459),a=n(458),s=n(52),u=n(18),c=n(89),l=n(116),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",v=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,y,g){var b=u(t),_=u(e),w=b?p:s(t),E=_?p:s(e),T=(w=w==h?d:w)==d,C=(E=E==h?d:E)==d,x=w==E;if(x&&c(t)){if(!c(e))return!1;b=!0,T=!1}if(x&&!T)return g||(g=new r),b||l(t)?i(t,e,n,m,y,g):o(t,e,w,n,m,y,g);if(!(n&f)){var S=T&&v.call(t,"__wrapped__"),k=C&&v.call(e,"__wrapped__");if(S||k){var N=S?t.value():t,A=k?e.value():e;return g||(g=new r),y(N,A,n,m,g)}}return!!x&&(g||(g=new r),a(t,e,n,m,y,g))}},function(t,e,n){var r=n(132),i=n(166),o=n(167),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<a-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e,n){var r=n(132);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e,n){var r=n(159),i=n(158),o=1,a=2;t.exports=function(t,e,n,s){var u=n.length,c=u,l=!s;if(null==t)return!c;for(t=Object(t);u--;){var f=n[u];if(l&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++u<c;){var h=(f=n[u])[0],p=t[h],d=f[1];if(l&&f[2]){if(void 0===p&&!(h in t))return!1}else{var v=new r;if(s)var m=s(p,d,h,t,e,v);if(!(void 0===m?i(d,p,o|a,s,v):m))return!1}}return!0}},function(t,e,n){var r=n(466),i=n(455),o=n(225);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(38);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(t,e,n){var r=n(236)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(41),i=n(165),o=n(30),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(){return!1}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(472)();t.exports=r},function(t,e,n){var r=n(62);t.exports=function(t,e){var n=[];return r(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}},function(t,e,n){var r=n(240),i=n(128),o=n(46),a=n(43);t.exports=function(t,e,n){return t=a(t),n=null==n?0:r(o(n),0,t.length),e=i(e),t.slice(n,n+e.length)==e}},function(t,e,n){var r=n(67),i=n(127),o=n(18),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){var n="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,n),this}},function(t,e,n){var r=n(93),i=n(94);n(169)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(481),t.exports=n(26).Object.keys},function(t,e,n){n(256),t.exports=n(26).Object.getOwnPropertySymbols},function(t,e,n){var r=n(69),i=n(134).f;n(169)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){n(484);var r=n(26).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(486),i=n(247),o=n(47),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e,n){var r=n(125),i=n(124);t.exports=function(t,e){return e.length<2?t:r(t,i(e,0,-1))}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(126),i=n(92),o=n(489),a=n(488),s=n(64);t.exports=function(t,e,n){e=i(e,t);var u=null==(t=a(t,e))?t:t[s(o(e))];return null==u?void 0:r(u,t,n)}},function(t,e,n){var r=n(41),i=n(30),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e,n){var r=n(129);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(129);t.exports=function(t){return r(this,t).get(t)}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(129);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,n){var r=n(131);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(131);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(131);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(131),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}},function(t,e,n){var r=n(133),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(133),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(33)["__core-js_shared__"];t.exports=r},function(t,e,n){var r,i=n(507),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(44),i=n(508),o=n(39),a=n(249),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},function(t,e,n){var r=n(133);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(510),i=n(505),o=n(504),a=n(503),s=n(502);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(511),i=n(132),o=n(166);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(250),i=500;t.exports=function(t){var e=r(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(67),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(254);function i(e,n){return t.exports=i=r||function(t,e){return t.__proto__=e,t},i(e,n)}t.exports=i},function(t,e,n){var r=n(49);r(r.S,"Object",{create:n(175)})},function(t,e,n){n(518);var r=n(26).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){t.exports=n(519)},function(t,e,n){var r=n(71),i=n(55),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(184)(Function.call,n(134).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){var r=n(49);r(r.S,"Object",{setPrototypeOf:n(521).set})},function(t,e,n){n(522),t.exports=n(26).Object.setPrototypeOf},function(t,e,n){var r=n(93),i=n(173);n(169)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){n(524),t.exports=n(26).Object.getPrototypeOf},function(t,e,n){t.exports=n(525)},function(t,e,n){n(170)("observable")},function(t,e,n){n(170)("asyncIterator")},function(t,e){},function(t,e,n){var r=n(69),i=n(255).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(182);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(94),i=n(176),o=n(136);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(137)("meta"),i=n(71),o=n(54),a=n(56).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(79)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){n(256),n(529),n(528),n(527),t.exports=n(26).Symbol},function(t,e,n){t.exports=n(534)},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(537),i=n(536),o=n(78),a=n(69);t.exports=n(258)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(57).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(56),i=n(55),o=n(94);t.exports=n(70)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(175),i=n(95),o=n(174),a={};n(80)(a,n(42)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(180),i=n(181);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){n(135),n(172),t.exports=n(171).f("iterator")},function(t,e,n){t.exports=n(543)},function(t,e,n){var r=n(49);r(r.S+r.F*!n(70),"Object",{defineProperty:n(56).f})},function(t,e,n){n(545);var r=n(26).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(180),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(69),i=n(260),o=n(547);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){"use strict";var r=n(94),i=n(176),o=n(136),a=n(93),s=n(261),u=Object.assign;t.exports=!u||n(79)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=i.f,f=o.f;u>c;)for(var h,p=s(arguments[c++]),d=l?r(p).concat(l(p)):r(p),v=d.length,m=0;v>m;)f.call(p,h=d[m++])&&(n[h]=p[h]);return n}:u},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(49);r(r.S+r.F,"Object",{assign:n(549)})},function(t,e,n){n(551),t.exports=n(26).Object.assign},function(t,e,n){t.exports=n(552)},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(185),i=n(186),o=n(555);t.exports=function(){function t(t,e,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),o=u(i),a=n(101),s=n(37);u(n(199));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={activeItem:"home"},n.handleItemClick=function(t,e){var r=e.name;return n.setState({activeItem:r})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),r(e,[{key:"handleChange",value:function(t){var e=this.state.pages;e.home.title=t.target.value,this.setState({pages:e})}},{key:"componentDidMount",value:function(){var t=this;setTimeout(function(){t.setState({PageItems:o.default.createElement("div",null)})},100)}},{key:"render",value:function(){var t=this.state.activeItem;return o.default.createElement("div",null,o.default.createElement(s.Menu,{basic:!0,style:{"border-radius":"0",height:"58px",width:"101%","margin-left":"-1px","margin-top":"-1px"}},o.default.createElement(s.Container,null,o.default.createElement(s.Menu.Item,{header:!0},o.default.createElement("img",{className:"ui small image",src:"logo.png"})),o.default.createElement(a.Link,{to:"/"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"home",active:"home"===t,onClick:this.handleItemClick})),o.default.createElement(a.Link,{to:"/Outreach"},o.default.createElement(s.Menu.Item,{style:{height:"100%"},name:"outreach",active:"outreach"===t,onClick:this.handleItemClick}))," ")))}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=m(o),s=m(n(557)),u=(m(n(61)),m(n(313))),c=m(n(310)),l=m(n(302)),f=(m(n(76)),m(n(301))),h=m(n(300)),p=m(n(299)),d=n(101),v=m(n(199));n(37);function m(t){return t&&t.__esModule?t:{default:t}}var y=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={visible:!1,data:{}},n.toggleVisibility=function(){return n.setState({visible:!n.state.visible})},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.Component),i(e,[{key:"componentDidMount",value:function(){var t=this;v.default.then(function(e){return e.json().then(function(e){t.setState({data:e})})})}},{key:"render",value:function(){var t=this;return a.default.createElement(d.HashRouter,null,this.state.data&&a.default.createElement("div",null,a.default.createElement(s.default,{pages:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/",render:function(e){return a.default.createElement(u.default,r({},e,{data:t.state.data.pages}))}}),a.default.createElement(d.Route,{exact:!0,path:"/Team",component:c.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/Profile",component:l.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/SidebarExample",component:p.default,data:this.state.data.pages}),a.default.createElement(d.Route,{exact:!0,path:"/Outreach",component:h.default,data:this.state.data.pages}),a.default.createElement(f.default,null)))}}]),e}();e.default=y},function(t,e,n){"use strict";t.exports=function(t){var e=(t?t.ownerDocument||t:document).defaultView||window;return!(!t||!("function"==typeof e.Node?t instanceof e.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}},function(t,e,n){"use strict";var r=n(559);t.exports=function(t){return r(t)&&3==t.nodeType}},function(t,e,n){"use strict";var r=n(560);t.exports=function t(e,n){return!(!e||!n)&&(e===n||!r(e)&&(r(n)?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}},function(t,e,n){"use strict";t.exports=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=i},function(t,e,n){"use strict"; /** @license React v16.4.1

* react-dom.production.min.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(186),i=n(0),o=n(563),a=n(266),s=n(185),u=n(562),c=n(190),l=n(561),f=n(265);function h(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);r(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}i||h("227");var p={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(t,e,n,r,i,o,a,s,u){(function(t,e,n,r,i,o,a,s,u){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(t){this._caughtError=t,this._hasCaughtError=!0}}).apply(p,arguments)},invokeGuardedCallbackAndCatchFirstError:function(t,e,n,r,i,o,a,s,u){if(p.invokeGuardedCallback.apply(this,arguments),p.hasCaughtError()){var c=p.clearCaughtError();p._hasRethrowError||(p._hasRethrowError=!0,p._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(p._hasRethrowError){var t=p._rethrowError;throw p._rethrowError=null,p._hasRethrowError=!1,t}}.apply(p,arguments)},hasCaughtError:function(){return p._hasCaughtError},clearCaughtError:function(){if(p._hasCaughtError){var t=p._caughtError;return p._caughtError=null,p._hasCaughtError=!1,t}h("198")}};var d=null,v={};function m(){if(d)for(var t in v){var e=v[t],n=d.indexOf(t);if(-1<n||h("96",t),!g[n])for(var r in e.extractEvents||h("97",t),g[n]=e,n=e.eventTypes){var i=void 0,o=n[r],a=e,s=r;b.hasOwnProperty(s)&&h("99",s),b[s]=o;var u=o.phasedRegistrationNames;if(u){for(i in u)u.hasOwnProperty(i)&&y(u[i],a,s);i=!0}else o.registrationName?(y(o.registrationName,a,s),i=!0):i=!1;i||h("98",r,t)}}}function y(t,e,n){_[t]&&h("100",t),_[t]=e,w[t]=e.eventTypes[n].dependencies}var g=[],b={},_={},w={};function E(t){d&&h("101"),d=Array.prototype.slice.call(t),m()}function T(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];v.hasOwnProperty(e)&&v[e]===r||(v[e]&&h("102",e),v[e]=r,n=!0)}n&&m()}var C={plugins:g,eventNameDispatchConfigs:b,registrationNameModules:_,registrationNameDependencies:w,possibleRegistrationNames:null,injectEventPluginOrder:E,injectEventPluginsByName:T},x=null,S=null,k=null;function N(t,e,n,r){e=t.type||"unknown-event",t.currentTarget=k(r),p.invokeGuardedCallbackAndCatchFirstError(e,n,void 0,t),t.currentTarget=null}function A(t,e){return null==e&&h("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function I(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var O=null;function P(t,e){if(t){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!t.isPropagationStopped();i++)N(t,e,n[i],r[i]);else n&&N(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function R(t){return P(t,!0)}function D(t){return P(t,!1)}var M={injectEventPluginOrder:E,injectEventPluginsByName:T};function L(t,e){var n=t.stateNode;if(!n)return null;var r=x(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}return t?null:(n&&"function"!=typeof n&&h("231",e,typeof n),n)}function F(t,e){null!==t&&(O=A(O,t)),t=O,O=null,t&&(I(t,e?R:D),O&&h("95"),p.rethrowCaughtError())}function U(t,e,n,r){for(var i=null,o=0;o<g.length;o++){var a=g[o];a&&(a=a.extractEvents(t,e,n,r))&&(i=A(i,a))}F(i,!1)}var j={injection:M,getListener:L,runEventsInBatch:F,runExtractedEventsInBatch:U},B=Math.random().toString(36).slice(2),q="__reactInternalInstance$"+B,V="__reactEventHandlers$"+B;function W(t){if(t[q])return t[q];for(;!t[q];){if(!t.parentNode)return null;t=t.parentNode}return 5===(t=t[q]).tag||6===t.tag?t:null}function H(t){if(5===t.tag||6===t.tag)return t.stateNode;h("33")}function z(t){return t[V]||null}var K={precacheFiberNode:function(t,e){e[q]=t},getClosestInstanceFromNode:W,getInstanceFromNode:function(t){return!(t=t[q])||5!==t.tag&&6!==t.tag?null:t},getNodeFromInstance:H,getFiberCurrentPropsFromNode:z,updateFiberProps:function(t,e){t[V]=e}};function G(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Q(t,e,n){for(var r=[];t;)r.push(t),t=G(t);for(t=r.length;0<t--;)e(r[t],"captured",n);for(t=0;t<r.length;t++)e(r[t],"bubbled",n)}function Y(t,e,n){(e=L(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function X(t){t&&t.dispatchConfig.phasedRegistrationNames&&Q(t._targetInst,Y,t)}function $(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst;Q(e=e?G(e):null,Y,t)}}function J(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=L(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=A(n._dispatchListeners,e),n._dispatchInstances=A(n._dispatchInstances,t))}function Z(t){t&&t.dispatchConfig.registrationName&&J(t._targetInst,null,t)}function tt(t){I(t,X)}function et(t,e,n,r){if(n&&r)t:{for(var i=n,o=r,a=0,s=i;s;s=G(s))a++;s=0;for(var u=o;u;u=G(u))s++;for(;0<a-s;)i=G(i),a--;for(;0<s-a;)o=G(o),s--;for(;a--;){if(i===o||i===o.alternate)break t;i=G(i),o=G(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=G(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=G(r);for(r=0;r<i.length;r++)J(i[r],"bubbled",t);for(t=n.length;0<t--;)J(n[t],"captured",e)}var nt={accumulateTwoPhaseDispatches:tt,accumulateTwoPhaseDispatchesSkipTarget:function(t){I(t,$)},accumulateEnterLeaveDispatches:et,accumulateDirectDispatches:function(t){I(t,Z)}};function rt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}var it={animationend:rt("Animation","AnimationEnd"),animationiteration:rt("Animation","AnimationIteration"),animationstart:rt("Animation","AnimationStart"),transitionend:rt("Transition","TransitionEnd")},ot={},at={};function st(t){if(ot[t])return ot[t];if(!it[t])return t;var e,n=it[t];for(e in n)if(n.hasOwnProperty(e)&&e in at)return ot[t]=n[e];return t}o.canUseDOM&&(at=document.createElement("div").style,"AnimationEvent"in window||(delete it.animationend.animation,delete it.animationiteration.animation,delete it.animationstart.animation),"TransitionEvent"in window||delete it.transitionend.transition);var ut=st("animationend"),ct=st("animationiteration"),lt=st("animationstart"),ft=st("transitionend"),ht="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pt=null;function dt(){return!pt&&o.canUseDOM&&(pt="textContent"in document.documentElement?"textContent":"innerText"),pt}var vt={_root:null,_startText:null,_fallbackText:null};function mt(){if(vt._fallbackText)return vt._fallbackText;var t,e,n=vt._startText,r=n.length,i=yt(),o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return vt._fallbackText=i.slice(t,1<e?1-e:void 0),vt._fallbackText}function yt(){return"value"in vt._root?vt._root.value:vt._root[dt()]}var gt="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),bt={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function _t(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?s.thatReturnsTrue:s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}function wt(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Et(t){t instanceof this||h("223"),t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Tt(t){t.eventPool=[],t.getPooled=wt,t.release=Et}a(_t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;for(e=0;e<gt.length;e++)this[gt[e]]=null}}),_t.Interface=bt,_t.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return a(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=a({},r.Interface,t),n.extend=r.extend,Tt(n),n},Tt(_t);var Ct=_t.extend({data:null}),xt=_t.extend({data:null}),St=[9,13,27,32],kt=o.canUseDOM&&"CompositionEvent"in window,Nt=null;o.canUseDOM&&"documentMode"in document&&(Nt=document.documentMode);var At=o.canUseDOM&&"TextEvent"in window&&!Nt,It=o.canUseDOM&&(!kt||Nt&&8<Nt&&11>=Nt),Ot=String.fromCharCode(32),Pt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Rt=!1;function Dt(t,e){switch(t){case"keyup":return-1!==St.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Mt(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Lt=!1;var Ft={eventTypes:Pt,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(kt)t:{switch(t){case"compositionstart":i=Pt.compositionStart;break t;case"compositionend":i=Pt.compositionEnd;break t;case"compositionupdate":i=Pt.compositionUpdate;break t}i=void 0}else Lt?Dt(t,n)&&(i=Pt.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=Pt.compositionStart);return i?(It&&(Lt||i!==Pt.compositionStart?i===Pt.compositionEnd&&Lt&&(o=mt()):(vt._root=r,vt._startText=yt(),Lt=!0)),i=Ct.getPooled(i,e,n,r),o?i.data=o:null!==(o=Mt(n))&&(i.data=o),tt(i),o=i):o=null,(t=At?function(t,e){switch(t){case"compositionend":return Mt(e);case"keypress":return 32!==e.which?null:(Rt=!0,Ot);case"textInput":return(t=e.data)===Ot&&Rt?null:t;default:return null}}(t,n):function(t,e){if(Lt)return"compositionend"===t||!kt&&Dt(t,e)?(t=mt(),vt._root=null,vt._startText=null,vt._fallbackText=null,Lt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return It?null:e.data;default:return null}}(t,n))?((e=xt.getPooled(Pt.beforeInput,e,n,r)).data=t,tt(e)):e=null,null===o?e:null===e?o:[o,e]}},Ut=null,jt={injectFiberControlledHostComponent:function(t){Ut=t}},Bt=null,qt=null;function Vt(t){if(t=S(t)){Ut&&"function"==typeof Ut.restoreControlledState||h("194");var e=x(t.stateNode);Ut.restoreControlledState(t.stateNode,t.type,e)}}function Wt(t){Bt?qt?qt.push(t):qt=[t]:Bt=t}function Ht(){return null!==Bt||null!==qt}function zt(){if(Bt){var t=Bt,e=qt;if(qt=Bt=null,Vt(t),e)for(t=0;t<e.length;t++)Vt(e[t])}}var Kt={injection:jt,enqueueStateRestore:Wt,needsStateRestore:Ht,restoreStateIfNeeded:zt};function Gt(t,e){return t(e)}function Qt(t,e,n){return t(e,n)}function Yt(){}var Xt=!1;function $t(t,e){if(Xt)return t(e);Xt=!0;try{return Gt(t,e)}finally{Xt=!1,Ht()&&(Yt(),zt())}}var Jt={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zt(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Jt[t.type]:"textarea"===e}function te(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ee(t,e){return!(!o.canUseDOM||e&&!("addEventListener"in document))&&((e=(t="on"+t)in document)||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"==typeof e[t]),e)}function ne(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function re(t){t._valueTracker||(t._valueTracker=function(t){var e=ne(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function ie(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ne(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}var oe=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ae="function"==typeof Symbol&&Symbol.for,se=ae?Symbol.for("react.element"):60103,ue=ae?Symbol.for("react.portal"):60106,ce=ae?Symbol.for("react.fragment"):60107,le=ae?Symbol.for("react.strict_mode"):60108,fe=ae?Symbol.for("react.profiler"):60114,he=ae?Symbol.for("react.provider"):60109,pe=ae?Symbol.for("react.context"):60110,de=ae?Symbol.for("react.async_mode"):60111,ve=ae?Symbol.for("react.forward_ref"):60112,me=ae?Symbol.for("react.timeout"):60113,ye="function"==typeof Symbol&&Symbol.iterator;function ge(t){return null===t||void 0===t?null:"function"==typeof(t=ye&&t[ye]||t["@@iterator"])?t:null}function be(t){var e=t.type;if("function"==typeof e)return e.displayName||e.name;if("string"==typeof e)return e;switch(e){case de:return"AsyncMode";case pe:return"Context.Consumer";case ce:return"ReactFragment";case ue:return"ReactPortal";case fe:return"Profiler("+t.pendingProps.id+")";case he:return"Context.Provider";case le:return"StrictMode";case me:return"Timeout"}if("object"==typeof e&&null!==e)switch(e.$$typeof){case ve:return""!==(t=e.render.displayName||e.render.name||"")?"ForwardRef("+t+")":"ForwardRef"}return null}function _e(t){var e="";do{t:switch(t.tag){case 0:case 1:case 2:case 5:var n=t._debugOwner,r=t._debugSource,i=be(t),o=null;n&&(o=be(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break t;default:i=""}e+=i,t=t.return}while(t);return e}var we=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ee={},Te={};function Ce(t,e,n,r,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xe[t]=new Ce(t,0,!1,t,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xe[e]=new Ce(e,1,!1,t[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){xe[t]=new Ce(t,2,!1,t.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(t){xe[t]=new Ce(t,2,!1,t,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){xe[t]=new Ce(t,3,!1,t.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(t){xe[t]=new Ce(t,3,!0,t.toLowerCase(),null)}),["capture","download"].forEach(function(t){xe[t]=new Ce(t,4,!1,t.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(t){xe[t]=new Ce(t,6,!1,t.toLowerCase(),null)}),["rowSpan","start"].forEach(function(t){xe[t]=new Ce(t,5,!1,t.toLowerCase(),null)});var Se=/[\-:]([a-z])/g;function ke(t){return t[1].toUpperCase()}function Ne(t,e,n,r){var i=xe.hasOwnProperty(e)?xe[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||void 0===e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!Te.hasOwnProperty(t)||!Ee.hasOwnProperty(t)&&(we.test(t)?Te[t]=!0:(Ee[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function Ae(t,e){var n=e.checked;return a({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Ie(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=Me(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function Oe(t,e){null!=(e=e.checked)&&Ne(t,"checked",e,!1)}function Pe(t,e){Oe(t,e);var n=Me(e.value);null!=n&&("number"===e.type?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n)),e.hasOwnProperty("value")?De(t,e.type,n):e.hasOwnProperty("defaultValue")&&De(t,e.type,Me(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Re(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){e=""+t._wrapperState.initialValue;var r=t.value;n||e===r||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!t.defaultChecked,t.defaultChecked=!t.defaultChecked,""!==n&&(t.name=n)}function De(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Me(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Se,ke);xe[e]=new Ce(e,1,!1,t,"http://www.w3.org/XML/1998/namespace")}),xe.tabIndex=new Ce("tabIndex",1,!1,"tabindex",null);var Le={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Fe(t,e,n){return(t=_t.getPooled(Le.change,t,e,n)).type="change",Wt(n),tt(t),t}var Ue=null,je=null;function Be(t){F(t,!1)}function qe(t){if(ie(H(t)))return t}function Ve(t,e){if("change"===t)return e}var We=!1;function He(){Ue&&(Ue.detachEvent("onpropertychange",ze),je=Ue=null)}function ze(t){"value"===t.propertyName&&qe(je)&&$t(Be,t=Fe(je,t,te(t)))}function Ke(t,e,n){"focus"===t?(He(),je=n,(Ue=e).attachEvent("onpropertychange",ze)):"blur"===t&&He()}function Ge(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return qe(je)}function Qe(t,e){if("click"===t)return qe(e)}function Ye(t,e){if("input"===t||"change"===t)return qe(e)}o.canUseDOM&&(We=ee("input")&&(!document.documentMode||9<document.documentMode));var Xe={eventTypes:Le,_isInputEventSupported:We,extractEvents:function(t,e,n,r){var i=e?H(e):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=Ve:Zt(i)?We?o=Ye:(o=Ge,a=Ke):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Qe),o&&(o=o(t,e)))return Fe(o,n,r);a&&a(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&De(i,"number",i.value)}},$e=_t.extend({view:null,detail:null}),Je={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ze(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Je[t])&&!!e[t]}function tn(){return Ze}var en=$e.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:tn,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)}}),nn=en.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),rn={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},on={eventTypes:rn,extractEvents:function(t,e,n,r){var i="mouseover"===t||"pointerover"===t,o="mouseout"===t||"pointerout"===t;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=e,e=(e=n.relatedTarget||n.toElement)?W(e):null):o=null,o===e)return null;var a=void 0,s=void 0,u=void 0,c=void 0;return"mouseout"===t||"mouseover"===t?(a=en,s=rn.mouseLeave,u=rn.mouseEnter,c="mouse"):"pointerout"!==t&&"pointerover"!==t||(a=nn,s=rn.pointerLeave,u=rn.pointerEnter,c="pointer"),t=null==o?i:H(o),i=null==e?i:H(e),(s=a.getPooled(s,o,n,r)).type=c+"leave",s.target=t,s.relatedTarget=i,(n=a.getPooled(u,e,n,r)).type=c+"enter",n.target=i,n.relatedTarget=t,et(s,n,o,e),[s,n]}};function an(t){var e=t;if(t.alternate)for(;e.return;)e=e.return;else{if(0!=(2&e.effectTag))return 1;for(;e.return;)if(0!=(2&(e=e.return).effectTag))return 1}return 3===e.tag?2:3}function sn(t){2!==an(t)&&h("188")}function un(t){var e=t.alternate;if(!e)return 3===(e=an(t))&&h("188"),1===e?null:t;for(var n=t,r=e;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return sn(i),t;if(a===r)return sn(i),e;a=a.sibling}h("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||h("189")}}n.alternate!==r&&h("190")}return 3!==n.tag&&h("188"),n.stateNode.current===n?t:e}function cn(t){if(!(t=un(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}var ln=_t.extend({animationName:null,elapsedTime:null,pseudoElement:null}),fn=_t.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),hn=$e.extend({relatedTarget:null});function pn(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var dn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn=$e.extend({key:function(t){if(t.key){var e=dn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=pn(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?vn[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:tn,charCode:function(t){return"keypress"===t.type?pn(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?pn(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),yn=en.extend({dataTransfer:null}),gn=$e.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:tn}),bn=_t.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),_n=en.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),wn=[["abort","abort"],[ut,"animationEnd"],[ct,"animationIteration"],[lt,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ft,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],En={},Tn={};function Cn(t,e){var n=t[0],r="on"+((t=t[1])[0].toUpperCase()+t.slice(1));e={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:e},En[t]=e,Tn[n]=e}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(t){Cn(t,!0)}),wn.forEach(function(t){Cn(t,!1)});var xn={eventTypes:En,isInteractiveTopLevelEventType:function(t){return void 0!==(t=Tn[t])&&!0===t.isInteractive},extractEvents:function(t,e,n,r){var i=Tn[t];if(!i)return null;switch(t){case"keypress":if(0===pn(n))return null;case"keydown":case"keyup":t=mn;break;case"blur":case"focus":t=hn;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=en;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=gn;break;case ut:case ct:case lt:t=ln;break;case ft:t=bn;break;case"scroll":t=$e;break;case"wheel":t=_n;break;case"copy":case"cut":case"paste":t=fn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=nn;break;default:t=_t}return tt(e=t.getPooled(i,e,n,r)),e}},Sn=xn.isInteractiveTopLevelEventType,kn=[];function Nn(t){var e=t.targetInst;do{if(!e){t.ancestors.push(e);break}var n;for(n=e;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;t.ancestors.push(e),e=W(n)}while(e);for(n=0;n<t.ancestors.length;n++)e=t.ancestors[n],U(t.topLevelType,e,t.nativeEvent,te(t.nativeEvent))}var An=!0;function In(t){An=!!t}function On(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!1)}function Pn(t,e){if(!e)return null;var n=(Sn(t)?Rn:Dn).bind(null,t);e.addEventListener(t,n,!0)}function Rn(t,e){Qt(Dn,t,e)}function Dn(t,e){if(An){var n=te(e);if(null===(n=W(n))||"number"!=typeof n.tag||2===an(n)||(n=null),kn.length){var r=kn.pop();r.topLevelType=t,r.nativeEvent=e,r.targetInst=n,t=r}else t={topLevelType:t,nativeEvent:e,targetInst:n,ancestors:[]};try{$t(Nn,t)}finally{t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>kn.length&&kn.push(t)}}}var Mn={get _enabled(){return An},setEnabled:In,isEnabled:function(){return An},trapBubbledEvent:On,trapCapturedEvent:Pn,dispatchEvent:Dn},Ln={},Fn=0,Un="_reactListenersID"+(""+Math.random()).slice(2);function jn(t){return Object.prototype.hasOwnProperty.call(t,Un)||(t[Un]=Fn++,Ln[t[Un]]={}),Ln[t[Un]]}function Bn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qn(t,e){var n,r=Bn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=Bn(r)}}function Vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var Wn=o.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Hn={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},zn=null,Kn=null,Gn=null,Qn=!1;function Yn(t,e){if(Qn||null==zn||zn!==u())return null;var n=zn;return"selectionStart"in n&&Vn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,Gn&&c(Gn,n)?null:(Gn=n,(t=_t.getPooled(Hn.select,Kn,t,e)).type="select",t.target=zn,tt(t),t)}var Xn={eventTypes:Hn,extractEvents:function(t,e,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){t:{o=jn(o),i=w.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break t}}o=!0}i=!o}if(i)return null;switch(o=e?H(e):window,t){case"focus":(Zt(o)||"true"===o.contentEditable)&&(zn=o,Kn=e,Gn=null);break;case"blur":Gn=Kn=zn=null;break;case"mousedown":Qn=!0;break;case"contextmenu":case"mouseup":return Qn=!1,Yn(n,r);case"selectionchange":if(Wn)break;case"keydown":case"keyup":return Yn(n,r)}return null}};M.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),x=K.getFiberCurrentPropsFromNode,S=K.getInstanceFromNode,k=K.getNodeFromInstance,M.injectEventPluginsByName({SimpleEventPlugin:xn,EnterLeaveEventPlugin:on,ChangeEventPlugin:Xe,SelectEventPlugin:Xn,BeforeInputEventPlugin:Ft});var $n="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Jn=Date,Zn=setTimeout,tr=clearTimeout,er=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var nr=performance;er=function(){return nr.now()}}else er=function(){return Jn.now()};var rr=void 0,ir=void 0;if(o.canUseDOM){var or="function"==typeof $n?$n:function(){h("276")},ar=null,sr=null,ur=-1,cr=!1,lr=!1,fr=0,hr=33,pr=33,dr={didTimeout:!1,timeRemaining:function(){var t=fr-er();return 0<t?t:0}},vr=function(t,e){var n=t.scheduledCallback,r=!1;try{n(e),r=!0}finally{ir(t),r||(cr=!0,window.postMessage(mr,"*"))}},mr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(t){if(t.source===window&&t.data===mr&&(cr=!1,null!==ar)){if(null!==ar){var e=er();if(!(-1===ur||ur>e)){t=-1;for(var n=[],r=ar;null!==r;){var i=r.timeoutTime;-1!==i&&i<=e?n.push(r):-1!==i&&(-1===t||i<t)&&(t=i),r=r.next}if(0<n.length)for(dr.didTimeout=!0,e=0,r=n.length;e<r;e++)vr(n[e],dr);ur=t}}for(t=er();0<fr-t&&null!==ar;)t=ar,dr.didTimeout=!1,vr(t,dr),t=er();null===ar||lr||(lr=!0,or(yr))}},!1);var yr=function(t){lr=!1;var e=t-fr+pr;e<pr&&hr<pr?(8>e&&(e=8),pr=e<hr?hr:e):hr=e,fr=t+pr,cr||(cr=!0,window.postMessage(mr,"*"))};rr=function(t,e){var n=-1;return null!=e&&"number"==typeof e.timeout&&(n=er()+e.timeout),(-1===ur||-1!==n&&n<ur)&&(ur=n),t={scheduledCallback:t,timeoutTime:n,prev:null,next:null},null===ar?ar=t:null!==(e=t.prev=sr)&&(e.next=t),sr=t,lr||(lr=!0,or(yr)),t},ir=function(t){if(null!==t.prev||ar===t){var e=t.next,n=t.prev;t.next=null,t.prev=null,null!==e?null!==n?(n.next=e,e.prev=n):(e.prev=null,ar=e):null!==n?(n.next=null,sr=n):sr=ar=null}}}else{var gr=new Map;rr=function(t){var e={scheduledCallback:t,timeoutTime:0,next:null,prev:null},n=Zn(function(){t({timeRemaining:function(){return 1/0},didTimeout:!1})});return gr.set(t,n),e},ir=function(t){var e=gr.get(t.scheduledCallback);gr.delete(t),tr(e)}}function br(t,e){return t=a({children:void 0},e),(e=function(t){var e="";return i.Children.forEach(t,function(t){null==t||"string"!=typeof t&&"number"!=typeof t||(e+=t)}),e}(e.children))&&(t.children=e),t}function _r(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+n,e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function wr(t,e){var n=e.value;t._wrapperState={initialValue:null!=n?n:e.defaultValue,wasMultiple:!!e.multiple}}function Er(t,e){return null!=e.dangerouslySetInnerHTML&&h("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Tr(t,e){var n=e.value;null==n&&(n=e.defaultValue,null!=(e=e.children)&&(null!=n&&h("92"),Array.isArray(e)&&(1>=e.length||h("93"),e=e[0]),n=""+e),null==n&&(n="")),t._wrapperState={initialValue:""+n}}function Cr(t,e){var n=e.value;null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&(t.defaultValue=n)),null!=e.defaultValue&&(t.defaultValue=e.defaultValue)}function xr(t){var e=t.textContent;e===t._wrapperState.initialValue&&(t.value=e)}var Sr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function kr(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nr(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?kr(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ar,Ir=void 0,Or=(Ar=function(t,e){if(t.namespaceURI!==Sr.svg||"innerHTML"in t)t.innerHTML=e;else{for((Ir=Ir||document.createElement("div")).innerHTML="<svg>"+e+"</svg>",e=Ir.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction(function(){return Ar(t,e)})}:Ar);function Pr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dr=["Webkit","ms","Moz","O"];function Mr(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=e[n];i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||Rr.hasOwnProperty(i)&&Rr[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(Rr).forEach(function(t){Dr.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Rr[e]=Rr[t]})});var Lr=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fr(t,e,n){e&&(Lr[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&h("137",t,n()),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&h("60"),"object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML||h("61")),null!=e.style&&"object"!=typeof e.style&&h("62",n()))}function Ur(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jr=s.thatReturns("");function Br(t,e){var n=jn(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=w[e];for(var r=0;r<e.length;r++){var i=e[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":Pn("scroll",t);break;case"focus":case"blur":Pn("focus",t),Pn("blur",t),n.blur=!0,n.focus=!0;break;case"cancel":case"close":ee(i,!0)&&Pn(i,t);break;case"invalid":case"submit":case"reset":break;default:-1===ht.indexOf(i)&&On(i,t)}n[i]=!0}}}function qr(t,e,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Sr.html&&(r=kr(t)),r===Sr.html?"script"===t?((t=n.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):t="string"==typeof e.is?n.createElement(t,{is:e.is}):n.createElement(t):t=n.createElementNS(r,t),t}function Vr(t,e){return(9===e.nodeType?e:e.ownerDocument).createTextNode(t)}function Wr(t,e,n,r){var i=Ur(e,n);switch(e){case"iframe":case"object":On("load",t);var o=n;break;case"video":case"audio":for(o=0;o<ht.length;o++)On(ht[o],t);o=n;break;case"source":On("error",t),o=n;break;case"img":case"image":case"link":On("error",t),On("load",t),o=n;break;case"form":On("reset",t),On("submit",t),o=n;break;case"details":On("toggle",t),o=n;break;case"input":Ie(t,n),o=Ae(t,n),On("invalid",t),Br(r,"onChange");break;case"option":o=br(t,n);break;case"select":wr(t,n),o=a({},n,{value:void 0}),On("invalid",t),Br(r,"onChange");break;case"textarea":Tr(t,n),o=Er(t,n),On("invalid",t),Br(r,"onChange");break;default:o=n}Fr(e,o,jr);var u,c=o;for(u in c)if(c.hasOwnProperty(u)){var l=c[u];"style"===u?Mr(t,l):"dangerouslySetInnerHTML"===u?null!=(l=l?l.__html:void 0)&&Or(t,l):"children"===u?"string"==typeof l?("textarea"!==e||""!==l)&&Pr(t,l):"number"==typeof l&&Pr(t,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(_.hasOwnProperty(u)?null!=l&&Br(r,u):null!=l&&Ne(t,u,l,i))}switch(e){case"input":re(t),Re(t,n,!1);break;case"textarea":re(t),xr(t);break;case"option":null!=n.value&&t.setAttribute("value",n.value);break;case"select":t.multiple=!!n.multiple,null!=(e=n.value)?_r(t,!!n.multiple,e,!1):null!=n.defaultValue&&_r(t,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(t.onclick=s)}}function Hr(t,e,n,r,i){var o=null;switch(e){case"input":n=Ae(t,n),r=Ae(t,r),o=[];break;case"option":n=br(t,n),r=br(t,r),o=[];break;case"select":n=a({},n,{value:void 0}),r=a({},r,{value:void 0}),o=[];break;case"textarea":n=Er(t,n),r=Er(t,r),o=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(t.onclick=s)}Fr(e,r,jr),e=t=void 0;var u=null;for(t in n)if(!r.hasOwnProperty(t)&&n.hasOwnProperty(t)&&null!=n[t])if("style"===t){var c=n[t];for(e in c)c.hasOwnProperty(e)&&(u||(u={}),u[e]="")}else"dangerouslySetInnerHTML"!==t&&"children"!==t&&"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&"autoFocus"!==t&&(_.hasOwnProperty(t)?o||(o=[]):(o=o||[]).push(t,null));for(t in r){var l=r[t];if(c=null!=n?n[t]:void 0,r.hasOwnProperty(t)&&l!==c&&(null!=l||null!=c))if("style"===t)if(c){for(e in c)!c.hasOwnProperty(e)||l&&l.hasOwnProperty(e)||(u||(u={}),u[e]="");for(e in l)l.hasOwnProperty(e)&&c[e]!==l[e]&&(u||(u={}),u[e]=l[e])}else u||(o||(o=[]),o.push(t,u)),u=l;else"dangerouslySetInnerHTML"===t?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(o=o||[]).push(t,""+l)):"children"===t?c===l||"string"!=typeof l&&"number"!=typeof l||(o=o||[]).push(t,""+l):"suppressContentEditableWarning"!==t&&"suppressHydrationWarning"!==t&&(_.hasOwnProperty(t)?(null!=l&&Br(i,t),o||c===l||(o=[])):(o=o||[]).push(t,l))}return u&&(o=o||[]).push("style",u),o}function zr(t,e,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&Oe(t,i),Ur(n,r),r=Ur(n,i);for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];"style"===a?Mr(t,s):"dangerouslySetInnerHTML"===a?Or(t,s):"children"===a?Pr(t,s):Ne(t,a,s,r)}switch(n){case"input":Pe(t,i);break;case"textarea":Cr(t,i);break;case"select":t._wrapperState.initialValue=void 0,e=t._wrapperState.wasMultiple,t._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?_r(t,!!i.multiple,n,!1):e!==!!i.multiple&&(null!=i.defaultValue?_r(t,!!i.multiple,i.defaultValue,!0):_r(t,!!i.multiple,i.multiple?[]:"",!1))}}function Kr(t,e,n,r,i){switch(e){case"iframe":case"object":On("load",t);break;case"video":case"audio":for(r=0;r<ht.length;r++)On(ht[r],t);break;case"source":On("error",t);break;case"img":case"image":case"link":On("error",t),On("load",t);break;case"form":On("reset",t),On("submit",t);break;case"details":On("toggle",t);break;case"input":Ie(t,n),On("invalid",t),Br(i,"onChange");break;case"select":wr(t,n),On("invalid",t),Br(i,"onChange");break;case"textarea":Tr(t,n),On("invalid",t),Br(i,"onChange")}for(var o in Fr(e,n,jr),r=null,n)if(n.hasOwnProperty(o)){var a=n[o];"children"===o?"string"==typeof a?t.textContent!==a&&(r=["children",a]):"number"==typeof a&&t.textContent!==""+a&&(r=["children",""+a]):_.hasOwnProperty(o)&&null!=a&&Br(i,o)}switch(e){case"input":re(t),Re(t,n,!0);break;case"textarea":re(t),xr(t);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(t.onclick=s)}return r}function Gr(t,e){return t.nodeValue!==e}var Qr={createElement:qr,createTextNode:Vr,setInitialProperties:Wr,diffProperties:Hr,updateProperties:zr,diffHydratedProperties:Kr,diffHydratedText:Gr,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(t,e,n){switch(e){case"input":if(Pe(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=z(r);i||h("90"),ie(r),Pe(r,i)}}}break;case"textarea":Cr(t,n);break;case"select":null!=(e=n.value)&&_r(t,!!n.multiple,e,!1)}}},Yr=null,Xr=null;function $r(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function Jr(t,e){return"textarea"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"==typeof e.dangerouslySetInnerHTML.__html}var Zr=er,ti=rr,ei=ir;function ni(t){for(t=t.nextSibling;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}function ri(t){for(t=t.firstChild;t&&1!==t.nodeType&&3!==t.nodeType;)t=t.nextSibling;return t}new Set;var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){ii[++oi]=t.current,t.current=e}var ci=ai(f),li=ai(!1),fi=f;function hi(t){return di(t)?fi:ci.current}function pi(t,e){var n=t.type.contextTypes;if(!n)return f;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function di(t){return 2===t.tag&&null!=t.type.childContextTypes}function vi(t){di(t)&&(si(li),si(ci))}function mi(t){si(li),si(ci)}function yi(t,e,n){ci.current!==f&&h("168"),ui(ci,e),ui(li,n)}function gi(t,e){var n=t.stateNode,r=t.type.childContextTypes;if("function"!=typeof n.getChildContext)return e;for(var i in n=n.getChildContext())i in r||h("108",be(t)||"Unknown",i);return a({},e,n)}function bi(t){if(!di(t))return!1;var e=t.stateNode;return e=e&&e.__reactInternalMemoizedMergedChildContext||f,fi=ci.current,ui(ci,e),ui(li,li.current),!0}function _i(t,e){var n=t.stateNode;if(n||h("169"),e){var r=gi(t,fi);n.__reactInternalMemoizedMergedChildContext=r,si(li),si(ci),ui(ci,r)}else si(li);ui(li,e)}function wi(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=e,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ei(t,e,n){var r=t.alternate;return null===r?((r=new wi(t.tag,e,t.key,t.mode)).type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ti(t,e,n){var r=t.type,i=t.key;if(t=t.props,"function"==typeof r)var o=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)o=5;else switch(r){case ce:return Ci(t.children,e,n,i);case de:o=11,e|=3;break;case le:o=11,e|=2;break;case fe:return(r=new wi(15,t,i,4|e)).type=fe,r.expirationTime=n,r;case me:o=16,e|=2;break;default:t:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case he:o=13;break t;case pe:o=12;break t;case ve:o=14;break t;default:h("130",null==r?r:typeof r,"")}o=void 0}}return(e=new wi(o,t,i,e)).type=r,e.expirationTime=n,e}function Ci(t,e,n,r){return(t=new wi(10,t,r,e)).expirationTime=n,t}function xi(t,e,n){return(t=new wi(6,t,null,e)).expirationTime=n,t}function Si(t,e,n){return(e=new wi(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ki(t,e,n){return t={current:e=new wi(3,null,null,e?3:0),containerInfo:t,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},e.stateNode=t}var Ni=null,Ai=null;function Ii(t){return function(e){try{return t(e)}catch(t){}}}function Oi(t){"function"==typeof Ni&&Ni(t)}function Pi(t){"function"==typeof Ai&&Ai(t)}var Ri=!1;function Di(t){return{expirationTime:0,baseState:t,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Mi(t){return{expirationTime:t.expirationTime,baseState:t.baseState,firstUpdate:t.firstUpdate,lastUpdate:t.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Li(t){return{expirationTime:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Fi(t,e,n){null===t.lastUpdate?t.firstUpdate=t.lastUpdate=e:(t.lastUpdate.next=e,t.lastUpdate=e),(0===t.expirationTime||t.expirationTime>n)&&(t.expirationTime=n)}function Ui(t,e,n){var r=t.alternate;if(null===r){var i=t.updateQueue,o=null;null===i&&(i=t.updateQueue=Di(t.memoizedState))}else i=t.updateQueue,o=r.updateQueue,null===i?null===o?(i=t.updateQueue=Di(t.memoizedState),o=r.updateQueue=Di(r.memoizedState)):i=t.updateQueue=Mi(o):null===o&&(o=r.updateQueue=Mi(i));null===o||i===o?Fi(i,e,n):null===i.lastUpdate||null===o.lastUpdate?(Fi(i,e,n),Fi(o,e,n)):(Fi(i,e,n),o.lastUpdate=e)}function ji(t,e,n){var r=t.updateQueue;null===(r=null===r?t.updateQueue=Di(t.memoizedState):Bi(t,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=e:(r.lastCapturedUpdate.next=e,r.lastCapturedUpdate=e),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Bi(t,e){var n=t.alternate;return null!==n&&e===n.updateQueue&&(e=t.updateQueue=Mi(e)),e}function qi(t,e,n,r,i,o){switch(n.tag){case 1:return"function"==typeof(t=n.payload)?t.call(o,r,i):t;case 3:t.effectTag=-1025&t.effectTag|64;case 0:if(null===(i="function"==typeof(t=n.payload)?t.call(o,r,i):t)||void 0===i)break;return a({},r,i);case 2:Ri=!0}return r}function Vi(t,e,n,r,i){if(Ri=!1,!(0===e.expirationTime||e.expirationTime>i)){for(var o=(e=Bi(t,e)).baseState,a=null,s=0,u=e.firstUpdate,c=o;null!==u;){var l=u.expirationTime;l>i?(null===a&&(a=u,o=c),(0===s||s>l)&&(s=l)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastEffect?e.firstEffect=e.lastEffect=u:(e.lastEffect.nextEffect=u,e.lastEffect=u))),u=u.next}for(l=null,u=e.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>i?(null===l&&(l=u,null===a&&(o=c)),(0===s||s>f)&&(s=f)):(c=qi(t,0,u,c,n,r),null!==u.callback&&(t.effectTag|=32,u.nextEffect=null,null===e.lastCapturedEffect?e.firstCapturedEffect=e.lastCapturedEffect=u:(e.lastCapturedEffect.nextEffect=u,e.lastCapturedEffect=u))),u=u.next}null===a&&(e.lastUpdate=null),null===l?e.lastCapturedUpdate=null:t.effectTag|=32,null===a&&null===l&&(o=c),e.baseState=o,e.firstUpdate=a,e.firstCapturedUpdate=l,e.expirationTime=s,t.memoizedState=c}}function Wi(t,e){"function"!=typeof t&&h("191",t),t.call(e)}function Hi(t,e,n){for(null!==e.firstCapturedUpdate&&(null!==e.lastUpdate&&(e.lastUpdate.next=e.firstCapturedUpdate,e.lastUpdate=e.lastCapturedUpdate),e.firstCapturedUpdate=e.lastCapturedUpdate=null),t=e.firstEffect,e.firstEffect=e.lastEffect=null;null!==t;){var r=t.callback;null!==r&&(t.callback=null,Wi(r,n)),t=t.nextEffect}for(t=e.firstCapturedEffect,e.firstCapturedEffect=e.lastCapturedEffect=null;null!==t;)null!==(e=t.callback)&&(t.callback=null,Wi(e,n)),t=t.nextEffect}function zi(t,e){return{value:t,source:e,stack:_e(e)}}var Ki=ai(null),Gi=ai(null),Qi=ai(0);function Yi(t){var e=t.type._context;ui(Qi,e._changedBits),ui(Gi,e._currentValue),ui(Ki,t),e._currentValue=t.pendingProps.value,e._changedBits=t.stateNode}function Xi(t){var e=Qi.current,n=Gi.current;si(Ki),si(Gi),si(Qi),(t=t.type._context)._currentValue=n,t._changedBits=e}var $i={},Ji=ai($i),Zi=ai($i),to=ai($i);function eo(t){return t===$i&&h("174"),t}function no(t,e){ui(to,e),ui(Zi,t),ui(Ji,$i);var n=e.nodeType;switch(n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Nr(null,"");break;default:e=Nr(e=(n=8===n?e.parentNode:e).namespaceURI||null,n=n.tagName)}si(Ji),ui(Ji,e)}function ro(t){si(Ji),si(Zi),si(to)}function io(t){Zi.current===t&&(si(Ji),si(Zi))}function oo(t,e,n){var r=t.memoizedState;r=null===(e=e(n,r))||void 0===e?r:a({},r,e),t.memoizedState=r,null!==(t=t.updateQueue)&&0===t.expirationTime&&(t.baseState=r)}var ao={isMounted:function(t){return!!(t=t._reactInternalFiber)&&2===an(t)},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=ba(),i=Li(r=ya(r,t));i.tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),Ui(t,i,r),ga(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=ba(),r=Li(n=ya(n,t));r.tag=2,void 0!==e&&null!==e&&(r.callback=e),Ui(t,r,n),ga(t,n)}};function so(t,e,n,r,i,o){var a=t.stateNode;return t=t.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!c(e,n)||!c(r,i))}function uo(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&ao.enqueueReplaceState(e,e.state,null)}function co(t,e){var n=t.type,r=t.stateNode,i=t.pendingProps,o=hi(t);r.props=i,r.state=t.memoizedState,r.refs=f,r.context=pi(t,o),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState),"function"==typeof(o=t.type.getDerivedStateFromProps)&&(oo(t,o,i),r.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&ao.enqueueReplaceState(r,r.state,null),null!==(o=t.updateQueue)&&(Vi(t,o,i,r,e),r.state=t.memoizedState)),"function"==typeof r.componentDidMount&&(t.effectTag|=4)}var lo=Array.isArray;function fo(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&h("110"),r=n.stateNode),r||h("147",t);var i=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs===f?r.refs={}:r.refs;null===t?delete e[i]:e[i]=t})._stringRef=i,e)}"string"!=typeof t&&h("148"),n._owner||h("254",t)}return t}function ho(t,e){"textarea"!==t.type&&h("31","[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,"")}function po(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e,n){return(t=Ei(t,e,n)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function a(e){return t&&null===e.alternate&&(e.effectTag=2),e}function s(t,e,n,r){return null===e||6!==e.tag?((e=xi(n,t.mode,r)).return=t,e):((e=i(e,n,r)).return=t,e)}function u(t,e,n,r){return null!==e&&e.type===n.type?((r=i(e,n.props,r)).ref=fo(t,e,n),r.return=t,r):((r=Ti(n,t.mode,r)).ref=fo(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Si(n,t.mode,r)).return=t,e):((e=i(e,n.children||[],r)).return=t,e)}function l(t,e,n,r,o){return null===e||10!==e.tag?((e=Ci(n,t.mode,r,o)).return=t,e):((e=i(e,n,r)).return=t,e)}function f(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=xi(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case se:return(n=Ti(e,t.mode,n)).ref=fo(t,null,e),n.return=t,n;case ue:return(e=Si(e,t.mode,n)).return=t,e}if(lo(e)||ge(e))return(e=Ci(e,t.mode,n,null)).return=t,e;ho(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case se:return n.key===i?n.type===ce?l(t,e,n.props.children,r,i):u(t,e,n,r):null;case ue:return n.key===i?c(t,e,n,r):null}if(lo(n)||ge(n))return null!==i?null:l(t,e,n,r,null);ho(t,n)}return null}function d(t,e,n,r,i){if("string"==typeof r||"number"==typeof r)return s(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case se:return t=t.get(null===r.key?n:r.key)||null,r.type===ce?l(e,t,r.props.children,i,r.key):u(e,t,r,i);case ue:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(lo(r)||ge(r))return l(e,t=t.get(n)||null,r,i,null);ho(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,h=a,v=a=0,m=null;null!==h&&v<s.length;v++){h.index>v?(m=h,h=null):m=h.sibling;var y=p(i,h,s[v],u);if(null===y){null===h&&(h=m);break}t&&h&&null===y.alternate&&e(i,h),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,h=m}if(v===s.length)return n(i,h),c;if(null===h){for(;v<s.length;v++)(h=f(i,s[v],u))&&(a=o(h,a,v),null===l?c=h:l.sibling=h,l=h);return c}for(h=r(i,h);v<s.length;v++)(m=d(h,i,v,s[v],u))&&(t&&null!==m.alternate&&h.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return t&&h.forEach(function(t){return e(i,t)}),c}function m(i,a,s,u){var c=ge(s);"function"!=typeof c&&h("150"),null==(s=c.call(s))&&h("151");for(var l=c=null,v=a,m=a=0,y=null,g=s.next();null!==v&&!g.done;m++,g=s.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(i,v,g.value,u);if(null===b){v||(v=y);break}t&&v&&null===b.alternate&&e(i,v),a=o(b,a,m),null===l?c=b:l.sibling=b,l=b,v=y}if(g.done)return n(i,v),c;if(null===v){for(;!g.done;m++,g=s.next())null!==(g=f(i,g.value,u))&&(a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return c}for(v=r(i,v);!g.done;m++,g=s.next())null!==(g=d(v,i,m,g.value,u))&&(t&&null!==g.alternate&&v.delete(null===g.key?m:g.key),a=o(g,a,m),null===l?c=g:l.sibling=g,l=g);return t&&v.forEach(function(t){return e(i,t)}),c}return function(t,r,o,s){var u="object"==typeof o&&null!==o&&o.type===ce&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case se:t:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(10===u.tag?o.type===ce:u.type===o.type){n(t,u.sibling),(r=i(u,o.type===ce?o.props.children:o.props,s)).ref=fo(t,u,o),r.return=t,t=r;break t}n(t,u);break}e(t,u),u=u.sibling}o.type===ce?((r=Ci(o.props.children,t.mode,s,o.key)).return=t,t=r):((s=Ti(o,t.mode,s)).ref=fo(t,r,o),s.return=t,t=s)}return a(t);case ue:t:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[],s)).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Si(o,t.mode,s)).return=t,t=r}return a(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o,s)).return=t,t=r):(n(t,r),(r=xi(o,t.mode,s)).return=t,t=r),a(t);if(lo(o))return v(t,r,o,s);if(ge(o))return m(t,r,o,s);if(c&&ho(t,o),void 0===o&&!u)switch(t.tag){case 2:case 1:h("152",(s=t.type).displayName||s.name||"Component")}return n(t,r)}}var vo=po(!0),mo=po(!1),yo=null,go=null,bo=!1;function _o(t,e){var n=new wi(5,null,null,0);n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function wo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);default:return!1}}function Eo(t){if(bo){var e=go;if(e){var n=e;if(!wo(t,e)){if(!(e=ni(n))||!wo(t,e))return t.effectTag|=2,bo=!1,void(yo=t);_o(yo,n)}yo=t,go=ri(e)}else t.effectTag|=2,bo=!1,yo=t}}function To(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag;)t=t.return;yo=t}function Co(t){if(t!==yo)return!1;if(!bo)return To(t),bo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!Jr(e,t.memoizedProps))for(e=go;e;)_o(t,e),e=ni(e);return To(t),go=yo?ni(t.stateNode):null,!0}function xo(){go=yo=null,bo=!1}function So(t,e,n){ko(t,e,n,e.expirationTime)}function ko(t,e,n,r){e.child=null===t?mo(e,null,n,r):vo(e,t.child,n,r)}function No(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Ao(t,e,n,r,i){No(t,e);var o=0!=(64&e.effectTag);if(!n&&!o)return r&&_i(e,!1),Po(t,e);n=e.stateNode,oe.current=e;var a=o?null:n.render();return e.effectTag|=1,o&&(ko(t,e,null,i),e.child=null),ko(t,e,a,i),e.memoizedState=n.state,e.memoizedProps=n.props,r&&_i(e,!0),e.child}function Io(t){var e=t.stateNode;e.pendingContext?yi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&yi(0,e.context,!1),no(t,e.containerInfo)}function Oo(t,e,n,r){var i=t.child;for(null!==i&&(i.return=t);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===e&&0!=(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===t.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===t){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}}function Po(t,e){if(null!==t&&e.child!==t.child&&h("153"),null!==e.child){var n=Ei(t=e.child,t.pendingProps,t.expirationTime);for(e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ei(t,t.pendingProps,t.expirationTime)).return=e;n.sibling=null}return e.child}function Ro(t,e,n){if(0===e.expirationTime||e.expirationTime>n){switch(e.tag){case 3:Io(e);break;case 2:bi(e);break;case 4:no(e,e.stateNode.containerInfo);break;case 13:Yi(e)}return null}switch(e.tag){case 0:null!==t&&h("155");var r=e.type,i=e.pendingProps,o=hi(e);return r=r(i,o=pi(e,o)),e.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(o=e.type,e.tag=2,e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(o=o.getDerivedStateFromProps)&&oo(e,o,i),i=bi(e),r.updater=ao,e.stateNode=r,r._reactInternalFiber=e,co(e,n),t=Ao(t,e,!0,i,n)):(e.tag=1,So(t,e,r),e.memoizedProps=i,t=e.child),t;case 1:return i=e.type,n=e.pendingProps,li.current||e.memoizedProps!==n?(i=i(n,r=pi(e,r=hi(e))),e.effectTag|=1,So(t,e,i),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 2:if(i=bi(e),null===t)if(null===e.stateNode){var a=e.pendingProps,s=e.type;r=hi(e);var u=2===e.tag&&null!=e.type.contextTypes;a=new s(a,o=u?pi(e,r):f),e.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=ao,e.stateNode=a,a._reactInternalFiber=e,u&&((u=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,u.__reactInternalMemoizedMaskedChildContext=o),co(e,n),r=!0}else{s=e.type,r=e.stateNode,u=e.memoizedProps,o=e.pendingProps,r.props=u;var c=r.context;a=pi(e,a=hi(e));var l=s.getDerivedStateFromProps;(s="function"==typeof l||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(u!==o||c!==a)&&uo(e,r,o,a),Ri=!1;var p=e.memoizedState;c=r.state=p;var d=e.updateQueue;null!==d&&(Vi(e,d,o,r,n),c=e.memoizedState),u!==o||p!==c||li.current||Ri?("function"==typeof l&&(oo(e,l,o),c=e.memoizedState),(u=Ri||so(e,u,o,p,c,a))?(s||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(e.effectTag|=4)):("function"==typeof r.componentDidMount&&(e.effectTag|=4),e.memoizedProps=o,e.memoizedState=c),r.props=o,r.state=c,r.context=a,r=u):("function"==typeof r.componentDidMount&&(e.effectTag|=4),r=!1)}else s=e.type,r=e.stateNode,o=e.memoizedProps,u=e.pendingProps,r.props=o,c=r.context,a=pi(e,a=hi(e)),(s="function"==typeof(l=s.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(o!==u||c!==a)&&uo(e,r,u,a),Ri=!1,c=e.memoizedState,p=r.state=c,null!==(d=e.updateQueue)&&(Vi(e,d,u,r,n),p=e.memoizedState),o!==u||c!==p||li.current||Ri?("function"==typeof l&&(oo(e,l,u),p=e.memoizedState),(l=Ri||so(e,o,u,c,p,a))?(s||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(u,p,a),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(u,p,a)),"function"==typeof r.componentDidUpdate&&(e.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),e.memoizedProps=u,e.memoizedState=p),r.props=u,r.state=p,r.context=a,r=l):("function"!=typeof r.componentDidUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===t.memoizedProps&&c===t.memoizedState||(e.effectTag|=256),r=!1);return Ao(t,e,r,i,n);case 3:return Io(e),null!==(i=e.updateQueue)?(r=null!==(r=e.memoizedState)?r.element:null,Vi(e,i,e.pendingProps,null,n),(i=e.memoizedState.element)===r?(xo(),t=Po(t,e)):(r=e.stateNode,(r=(null===t||null===t.child)&&r.hydrate)&&(go=ri(e.stateNode.containerInfo),yo=e,r=bo=!0),r?(e.effectTag|=2,e.child=mo(e,null,i,n)):(xo(),So(t,e,i)),t=e.child)):(xo(),t=Po(t,e)),t;case 5:return eo(to.current),(i=eo(Ji.current))!==(r=Nr(i,e.type))&&(ui(Zi,e),ui(Ji,r)),null===t&&Eo(e),i=e.type,u=e.memoizedProps,r=e.pendingProps,o=null!==t?t.memoizedProps:null,li.current||u!==r||((u=1&e.mode&&!!r.hidden)&&(e.expirationTime=1073741823),u&&1073741823===n)?(u=r.children,Jr(i,r)?u=null:o&&Jr(i,o)&&(e.effectTag|=16),No(t,e),1073741823!==n&&1&e.mode&&r.hidden?(e.expirationTime=1073741823,e.memoizedProps=r,t=null):(So(t,e,u),e.memoizedProps=r,t=e.child)):t=Po(t,e),t;case 6:return null===t&&Eo(e),e.memoizedProps=e.pendingProps,null;case 16:return null;case 4:return no(e,e.stateNode.containerInfo),i=e.pendingProps,li.current||e.memoizedProps!==i?(null===t?e.child=vo(e,null,i,n):So(t,e,i),e.memoizedProps=i,t=e.child):t=Po(t,e),t;case 14:return i=e.type.render,n=e.pendingProps,r=e.ref,li.current||e.memoizedProps!==n||r!==(null!==t?t.ref:null)?(So(t,e,i=i(n,r)),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 10:return n=e.pendingProps,li.current||e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 11:return n=e.pendingProps.children,li.current||null!==n&&e.memoizedProps!==n?(So(t,e,n),e.memoizedProps=n,t=e.child):t=Po(t,e),t;case 15:return n=e.pendingProps,e.memoizedProps===n?t=Po(t,e):(So(t,e,n.children),e.memoizedProps=n,t=e.child),t;case 13:return function(t,e,n){var r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=!0;if(li.current)a=!1;else if(o===i)return e.stateNode=0,Yi(e),Po(t,e);var s=i.value;if(e.memoizedProps=i,null===o)s=1073741823;else if(o.value===i.value){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else{var u=o.value;if(u===s&&(0!==u||1/u==1/s)||u!=u&&s!=s){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e);s=0}else if(s="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,s):1073741823,0==(s|=0)){if(o.children===i.children&&a)return e.stateNode=0,Yi(e),Po(t,e)}else Oo(e,r,s,n)}return e.stateNode=s,Yi(e),So(t,e,i.children),e.child}(t,e,n);case 12:t:if(r=e.type,o=e.pendingProps,u=e.memoizedProps,i=r._currentValue,a=r._changedBits,li.current||0!==a||u!==o){if(e.memoizedProps=o,void 0!==(s=o.unstable_observedBits)&&null!==s||(s=1073741823),e.stateNode=s,0!=(a&s))Oo(e,r,a,n);else if(u===o){t=Po(t,e);break t}n=(n=o.children)(i),e.effectTag|=1,So(t,e,n),t=e.child}else t=Po(t,e);return t;default:h("156")}}function Do(t){t.effectTag|=4}var Mo=void 0,Lo=void 0,Fo=void 0;function Uo(t,e){var n=e.pendingProps;switch(e.tag){case 1:return null;case 2:return vi(e),null;case 3:ro(),mi();var r=e.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(Co(e),e.effectTag&=-3),Mo(e),null;case 5:io(e),r=eo(to.current);var i=e.type;if(null!==t&&null!=e.stateNode){var o=t.memoizedProps,a=e.stateNode,s=eo(Ji.current);a=Hr(a,i,o,n,r),Lo(t,e,a,i,o,n,r,s),t.ref!==e.ref&&(e.effectTag|=128)}else{if(!n)return null===e.stateNode&&h("166"),null;if(t=eo(Ji.current),Co(e))n=e.stateNode,i=e.type,o=e.memoizedProps,n[q]=e,n[V]=o,r=Kr(n,i,o,t,r),e.updateQueue=r,null!==r&&Do(e);else{(t=qr(i,n,r,t))[q]=e,t[V]=n;t:for(o=e.child;null!==o;){if(5===o.tag||6===o.tag)t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}Wr(t,i,n,r),$r(i,n)&&Do(e),e.stateNode=t}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Fo(t,e,t.memoizedProps,n);else{if("string"!=typeof n)return null===e.stateNode&&h("166"),null;r=eo(to.current),eo(Ji.current),Co(e)?(r=e.stateNode,n=e.memoizedProps,r[q]=e,Gr(r,n)&&Do(e)):((r=Vr(n,r))[q]=e,e.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return ro(),Mo(e),null;case 13:return Xi(e),null;case 12:return null;case 0:h("167");default:h("156")}}function jo(t,e){var n=e.source;null===e.stack&&null!==n&&_e(n),null!==n&&be(n),e=e.value,null!==t&&2===t.tag&&be(t);try{e&&e.suppressReactErrorLogging||console.error(e)}catch(t){t&&t.suppressReactErrorLogging||console.error(t)}}function Bo(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){va(t,e)}else e.current=null}function qo(t){switch(Pi(t),t.tag){case 2:Bo(t);var e=t.stateNode;if("function"==typeof e.componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){va(t,e)}break;case 5:Bo(t);break;case 4:Ho(t)}}function Vo(t){return 5===t.tag||3===t.tag||4===t.tag}function Wo(t){t:{for(var e=t.return;null!==e;){if(Vo(e)){var n=e;break t}e=e.return}h("160"),n=void 0}var r=e=void 0;switch(n.tag){case 5:e=n.stateNode,r=!1;break;case 3:case 4:e=n.stateNode.containerInfo,r=!0;break;default:h("161")}16&n.effectTag&&(Pr(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||Vo(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}for(var i=t;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=e,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else e.insertBefore(i.stateNode,n);else r?(o=e,a=i.stateNode,8===o.nodeType?o.parentNode.insertBefore(a,o):o.appendChild(a)):e.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Ho(t){for(var e=t,n=!1,r=void 0,i=void 0;;){if(!n){n=e.return;t:for(;;){switch(null===n&&h("160"),n.tag){case 5:r=n.stateNode,i=!1;break t;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break t}n=n.return}n=!0}if(5===e.tag||6===e.tag){t:for(var o=e,a=o;;)if(qo(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=e.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(e.stateNode)}else if(4===e.tag?r=e.stateNode.containerInfo:qo(e),null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return;4===(e=e.return).tag&&(n=!1)}e.sibling.return=e.return,e=e.sibling}}function zo(t,e){switch(e.tag){case 2:break;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps;t=null!==t?t.memoizedProps:r;var i=e.type,o=e.updateQueue;e.updateQueue=null,null!==o&&(n[V]=r,zr(n,o,i,t,r))}break;case 6:null===e.stateNode&&h("162"),e.stateNode.nodeValue=e.memoizedProps;break;case 3:case 15:case 16:break;default:h("163")}}function Ko(t,e,n){(n=Li(n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ja(r),jo(t,e)},n}function Go(t,e,n){(n=Li(n)).tag=3;var r=t.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===la?la=new Set([this]):la.add(this);var n=e.value,r=e.stack;jo(t,e),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Qo(t,e,n,r,i,o){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=zi(r,n),t=e;do{switch(t.tag){case 3:return t.effectTag|=1024,void ji(t,r=Ko(t,r,o),o);case 2:if(e=r,n=t.stateNode,0==(64&t.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===la||!la.has(n)))return t.effectTag|=1024,void ji(t,r=Go(t,e,o),o)}t=t.return}while(null!==t)}function Yo(t){switch(t.tag){case 2:vi(t);var e=t.effectTag;return 1024&e?(t.effectTag=-1025&e|64,t):null;case 3:return ro(),mi(),1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 5:return io(t),null;case 16:return 1024&(e=t.effectTag)?(t.effectTag=-1025&e|64,t):null;case 4:return ro(),null;case 13:return Xi(t),null;default:return null}}Mo=function(){},Lo=function(t,e,n){(e.updateQueue=n)&&Do(e)},Fo=function(t,e,n,r){n!==r&&Do(e)};var Xo=Zr(),$o=2,Jo=Xo,Zo=0,ta=0,ea=!1,na=null,ra=null,ia=0,oa=-1,aa=!1,sa=null,ua=!1,ca=!1,la=null;function fa(){if(null!==na)for(var t=na.return;null!==t;){var e=t;switch(e.tag){case 2:vi(e);break;case 3:ro(),mi();break;case 5:io(e);break;case 4:ro();break;case 13:Xi(e)}t=t.return}ra=null,ia=0,oa=-1,aa=!1,na=null,ca=!1}function ha(t){for(;;){var e=t.alternate,n=t.return,r=t.sibling;if(0==(512&t.effectTag)){e=Uo(e,t);var i=t;if(1073741823===ia||1073741823!==i.expirationTime){var o=0;switch(i.tag){case 3:case 2:var a=i.updateQueue;null!==a&&(o=a.expirationTime)}for(a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==e)return e;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=t.firstEffect),n.lastEffect=t.lastEffect),1<t.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=t:n.firstEffect=t,n.lastEffect=t)),null!==r)return r;if(null===n){ca=!0;break}t=n}else{if(null!==(t=Yo(t)))return t.effectTag&=511,t;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;t=n}}return null}function pa(t){var e=Ro(t.alternate,t,ia);return null===e&&(e=ha(t)),oe.current=null,e}function da(t,e,n){ea&&h("243"),ea=!0,e===ia&&t===ra&&null!==na||(fa(),ia=e,oa=-1,na=Ei((ra=t).current,null,ia),t.pendingCommitExpirationTime=0);var r=!1;for(aa=!n||ia<=$o;;){try{if(n)for(;null!==na&&!$a();)na=pa(na);else for(;null!==na;)na=pa(na)}catch(e){if(null===na)r=!0,Ja(e);else{null===na&&h("271");var i=(n=na).return;if(null===i){r=!0,Ja(e);break}Qo(t,i,n,e,0,ia),na=ha(n)}}break}if(ea=!1,r)return null;if(null===na){if(ca)return t.pendingCommitExpirationTime=e,t.current.alternate;aa&&h("262"),0<=oa&&setTimeout(function(){var e=t.current.expirationTime;0!==e&&(0===t.remainingExpirationTime||t.remainingExpirationTime<e)&&Va(t,e)},oa),function(t){null===ka&&h("246"),ka.remainingExpirationTime=t}(t.current.expirationTime)}return null}function va(t,e){var n;t:{for(ea&&!ua&&h("263"),n=t.return;null!==n;){switch(n.tag){case 2:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof r.componentDidCatch&&(null===la||!la.has(r))){Ui(n,t=Go(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}break;case 3:Ui(n,t=Ko(n,t=zi(e,t),1),1),ga(n,1),n=void 0;break t}n=n.return}3===t.tag&&(Ui(t,n=Ko(t,n=zi(e,t),1),1),ga(t,1)),n=void 0}return n}function ma(){var t=2+25*(1+((ba()-2+500)/25|0));return t<=Zo&&(t=Zo+1),Zo=t}function ya(t,e){return t=0!==ta?ta:ea?ua?1:ia:1&e.mode?La?2+10*(1+((t-2+15)/10|0)):2+25*(1+((t-2+500)/25|0)):1,La&&(0===Aa||t>Aa)&&(Aa=t),t}function ga(t,e){for(;null!==t;){if((0===t.expirationTime||t.expirationTime>e)&&(t.expirationTime=e),null!==t.alternate&&(0===t.alternate.expirationTime||t.alternate.expirationTime>e)&&(t.alternate.expirationTime=e),null===t.return){if(3!==t.tag)break;var n=t.stateNode;!ea&&0!==ia&&e<ia&&fa();var r=n.current.expirationTime;ea&&!ua&&ra===n||Va(n,r),ja>Ua&&h("185")}t=t.return}}function ba(){return Jo=Zr()-Xo,$o=2+(Jo/10|0)}function _a(t){var e=ta;ta=2+25*(1+((ba()-2+500)/25|0));try{return t()}finally{ta=e}}function wa(t,e,n,r,i){var o=ta;ta=1;try{return t(e,n,r,i)}finally{ta=o}}var Ea=null,Ta=null,Ca=0,xa=void 0,Sa=!1,ka=null,Na=0,Aa=0,Ia=!1,Oa=!1,Pa=null,Ra=null,Da=!1,Ma=!1,La=!1,Fa=null,Ua=1e3,ja=0,Ba=1;function qa(t){if(0!==Ca){if(t>Ca)return;null!==xa&&ei(xa)}var e=Zr()-Xo;Ca=t,xa=ti(Ha,{timeout:10*(t-2)-e})}function Va(t,e){if(null===t.nextScheduledRoot)t.remainingExpirationTime=e,null===Ta?(Ea=Ta=t,t.nextScheduledRoot=t):(Ta=Ta.nextScheduledRoot=t).nextScheduledRoot=Ea;else{var n=t.remainingExpirationTime;(0===n||e<n)&&(t.remainingExpirationTime=e)}Sa||(Da?Ma&&(ka=t,Na=1,Ya(t,1,!1)):1===e?za():qa(e))}function Wa(){var t=0,e=null;if(null!==Ta)for(var n=Ta,r=Ea;null!==r;){var i=r.remainingExpirationTime;if(0===i){if((null===n||null===Ta)&&h("244"),r===r.nextScheduledRoot){Ea=Ta=r.nextScheduledRoot=null;break}if(r===Ea)Ea=i=r.nextScheduledRoot,Ta.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===Ta){(Ta=n).nextScheduledRoot=Ea,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if((0===t||i<t)&&(t=i,e=r),r===Ta)break;n=r,r=r.nextScheduledRoot}}null!==(n=ka)&&n===e&&1===t?ja++:ja=0,ka=e,Na=t}function Ha(t){Ka(0,!0,t)}function za(){Ka(1,!1,null)}function Ka(t,e,n){if(Ra=n,Wa(),e)for(;null!==ka&&0!==Na&&(0===t||t>=Na)&&(!Ia||ba()>=Na);)ba(),Ya(ka,Na,!Ia),Wa();else for(;null!==ka&&0!==Na&&(0===t||t>=Na);)Ya(ka,Na,!1),Wa();null!==Ra&&(Ca=0,xa=null),0!==Na&&qa(Na),Ra=null,Ia=!1,Qa()}function Ga(t,e){Sa&&h("253"),ka=t,Na=e,Ya(t,e,!1),za(),Qa()}function Qa(){if(ja=0,null!==Fa){var t=Fa;Fa=null;for(var e=0;e<t.length;e++){var n=t[e];try{n._onComplete()}catch(t){Oa||(Oa=!0,Pa=t)}}}if(Oa)throw t=Pa,Pa=null,Oa=!1,t}function Ya(t,e,n){Sa&&h("245"),Sa=!0,n?null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!0))&&($a()?t.finishedWork=n:Xa(t,n,e)):null!==(n=t.finishedWork)?Xa(t,n,e):null!==(n=da(t,e,!1))&&Xa(t,n,e),Sa=!1}function Xa(t,e,n){var r=t.firstBatch;if(null!==r&&r._expirationTime<=n&&(null===Fa?Fa=[r]:Fa.push(r),r._defer))return t.finishedWork=e,void(t.remainingExpirationTime=0);if(t.finishedWork=null,ua=ea=!0,(n=e.stateNode).current===e&&h("177"),0===(r=n.pendingCommitExpirationTime)&&h("261"),n.pendingCommitExpirationTime=0,ba(),oe.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var i=e.firstEffect}else i=e;else i=e.firstEffect;Yr=An;var o=u();if(Vn(o)){if("selectionStart"in o)var a={start:o.selectionStart,end:o.selectionEnd};else t:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){a=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch(t){a=null;break t}var p=0,d=-1,v=-1,m=0,y=0,g=o,b=null;e:for(;;){for(var _;g!==a||0!==c&&3!==g.nodeType||(d=p+c),g!==f||0!==s&&3!==g.nodeType||(v=p+s),3===g.nodeType&&(p+=g.nodeValue.length),null!==(_=g.firstChild);)b=g,g=_;for(;;){if(g===o)break e;if(b===a&&++m===c&&(d=p),b===f&&++y===s&&(v=p),null!==(_=g.nextSibling))break;b=(g=b).parentNode}g=_}a=-1===d||-1===v?null:{start:d,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xr={focusedElem:o,selectionRange:a},In(!1),sa=i;null!==sa;){o=!1,a=void 0;try{for(;null!==sa;){if(256&sa.effectTag){var w=sa.alternate;switch((c=sa).tag){case 2:if(256&c.effectTag&&null!==w){var E=w.memoizedProps,T=w.memoizedState,C=c.stateNode;C.props=c.memoizedProps,C.state=c.memoizedState;var x=C.getSnapshotBeforeUpdate(E,T);C.__reactInternalSnapshotBeforeUpdate=x}break;case 3:case 5:case 6:case 4:break;default:h("163")}}sa=sa.nextEffect}}catch(t){o=!0,a=t}o&&(null===sa&&h("178"),va(sa,a),null!==sa&&(sa=sa.nextEffect))}for(sa=i;null!==sa;){w=!1,E=void 0;try{for(;null!==sa;){var S=sa.effectTag;if(16&S&&Pr(sa.stateNode,""),128&S){var k=sa.alternate;if(null!==k){var N=k.ref;null!==N&&("function"==typeof N?N(null):N.current=null)}}switch(14&S){case 2:Wo(sa),sa.effectTag&=-3;break;case 6:Wo(sa),sa.effectTag&=-3,zo(sa.alternate,sa);break;case 4:zo(sa.alternate,sa);break;case 8:Ho(T=sa),T.return=null,T.child=null,T.alternate&&(T.alternate.child=null,T.alternate.return=null)}sa=sa.nextEffect}}catch(t){w=!0,E=t}w&&(null===sa&&h("178"),va(sa,E),null!==sa&&(sa=sa.nextEffect))}if(N=Xr,k=u(),S=N.focusedElem,w=N.selectionRange,k!==S&&l(document.documentElement,S)){null!==w&&Vn(S)&&(k=w.start,void 0===(N=w.end)&&(N=k),"selectionStart"in S?(S.selectionStart=k,S.selectionEnd=Math.min(N,S.value.length)):window.getSelection&&(k=window.getSelection(),E=S[dt()].length,N=Math.min(w.start,E),w=void 0===w.end?N:Math.min(w.end,E),!k.extend&&N>w&&(E=w,w=N,N=E),E=qn(S,N),T=qn(S,w),E&&T&&(1!==k.rangeCount||k.anchorNode!==E.node||k.anchorOffset!==E.offset||k.focusNode!==T.node||k.focusOffset!==T.offset)&&((C=document.createRange()).setStart(E.node,E.offset),k.removeAllRanges(),N>w?(k.addRange(C),k.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),k.addRange(C))))),k=[];for(N=S;N=N.parentNode;)1===N.nodeType&&k.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"==typeof S.focus&&S.focus(),S=0;S<k.length;S++)(N=k[S]).element.scrollLeft=N.left,N.element.scrollTop=N.top}for(Xr=null,In(Yr),Yr=null,n.current=e,sa=i;null!==sa;){i=!1,S=void 0;try{for(k=r;null!==sa;){var A=sa.effectTag;if(36&A){var I=sa.alternate;switch(w=k,(N=sa).tag){case 2:var O=N.stateNode;if(4&N.effectTag)if(null===I)O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidMount();else{var P=I.memoizedProps,R=I.memoizedState;O.props=N.memoizedProps,O.state=N.memoizedState,O.componentDidUpdate(P,R,O.__reactInternalSnapshotBeforeUpdate)}var D=N.updateQueue;null!==D&&(O.props=N.memoizedProps,O.state=N.memoizedState,Hi(N,D,O));break;case 3:var M=N.updateQueue;if(null!==M){if(E=null,null!==N.child)switch(N.child.tag){case 5:E=N.child.stateNode;break;case 2:E=N.child.stateNode}Hi(N,M,E)}break;case 5:var L=N.stateNode;null===I&&4&N.effectTag&&$r(N.type,N.memoizedProps)&&L.focus();break;case 6:case 4:case 15:case 16:break;default:h("163")}}if(128&A){N=void 0;var F=sa.ref;if(null!==F){var U=sa.stateNode;switch(sa.tag){case 5:N=U;break;default:N=U}"function"==typeof F?F(N):F.current=N}}var j=sa.nextEffect;sa.nextEffect=null,sa=j}}catch(t){i=!0,S=t}i&&(null===sa&&h("178"),va(sa,S),null!==sa&&(sa=sa.nextEffect))}ea=ua=!1,Oi(e.stateNode),0===(e=n.current.expirationTime)&&(la=null),t.remainingExpirationTime=e}function $a(){return!(null===Ra||Ra.timeRemaining()>Ba)&&(Ia=!0)}function Ja(t){null===ka&&h("246"),ka.remainingExpirationTime=0,Oa||(Oa=!0,Pa=t)}function Za(t,e){var n=Da;Da=!0;try{return t(e)}finally{(Da=n)||Sa||za()}}function ts(t,e){if(Da&&!Ma){Ma=!0;try{return t(e)}finally{Ma=!1}}return t(e)}function es(t,e){Sa&&h("187");var n=Da;Da=!0;try{return wa(t,e)}finally{Da=n,za()}}function ns(t,e,n){if(La)return t(e,n);Da||Sa||0===Aa||(Ka(Aa,!1,null),Aa=0);var r=La,i=Da;Da=La=!0;try{return t(e,n)}finally{La=r,(Da=i)||Sa||za()}}function rs(t){var e=Da;Da=!0;try{wa(t)}finally{(Da=e)||Sa||Ka(1,!1,null)}}function is(t,e,n,r,i){var o=e.current;if(n){var a;n=n._reactInternalFiber;t:{for(2===an(n)&&2===n.tag||h("170"),a=n;3!==a.tag;){if(di(a)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}(a=a.return)||h("171")}a=a.stateNode.context}n=di(n)?gi(n,a):a}else n=f;return null===e.context?e.context=n:e.pendingContext=n,e=i,(i=Li(r)).payload={element:t},null!==(e=void 0===e?null:e)&&(i.callback=e),Ui(o,i,r),ga(o,r),r}function os(t){var e=t._reactInternalFiber;return void 0===e&&("function"==typeof t.render?h("188"):h("268",Object.keys(t))),null===(t=cn(e))?null:t.stateNode}function as(t,e,n,r){var i=e.current;return is(t,e,n,i=ya(ba(),i),r)}function ss(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function us(t){var e=t.findFiberByHostInstance;return function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);Ni=Ii(function(t){return e.onCommitFiberRoot(n,t)}),Ai=Ii(function(t){return e.onCommitFiberUnmount(n,t)})}catch(t){}return!0}(a({},t,{findHostInstanceByFiber:function(t){return null===(t=cn(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null}}))}var cs=Za,ls=ns,fs=function(){Sa||0===Aa||(Ka(Aa,!1,null),Aa=0)};function hs(t){this._expirationTime=ma(),this._root=t,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function ps(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ds(t,e,n){this._internalRoot=ki(t,e,n)}function vs(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function ms(t,e,n,r,i){vs(n)||h("200");var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var t=ss(o._internalRoot);a.call(t)}}null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ds(t,!1,e)}(n,r),"function"==typeof i){var s=i;i=function(){var t=ss(o._internalRoot);s.call(t)}}ts(function(){null!=t?o.legacy_renderSubtreeIntoContainer(t,e,i):o.render(e,i)})}return ss(o._internalRoot)}function ys(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return vs(e)||h("200"),function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ue,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}(t,e,null,n)}jt.injectFiberControlledHostComponent(Qr),hs.prototype.render=function(t){this._defer||h("250"),this._hasChildren=!0,this._children=t;var e=this._root._internalRoot,n=this._expirationTime,r=new ps;return is(t,e,null,n,r._onCommit),r},hs.prototype.then=function(t){if(this._didComplete)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},hs.prototype.commit=function(){var t=this._root._internalRoot,e=t.firstBatch;if(this._defer&&null!==e||h("251"),this._hasChildren){var n=this._expirationTime;if(e!==this){this._hasChildren&&(n=this._expirationTime=e._expirationTime,this.render(this._children));for(var r=null,i=e;i!==this;)r=i,i=i._next;null===r&&h("251"),r._next=i._next,this._next=e,t.firstBatch=this}this._defer=!1,Ga(t,n),e=this._next,this._next=null,null!==(e=t.firstBatch=e)&&e._hasChildren&&e.render(e._children)}else this._next=null,this._defer=!1},hs.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++)(0,t[e])()}},ps.prototype.then=function(t){if(this._didCommit)t();else{var e=this._callbacks;null===e&&(e=this._callbacks=[]),e.push(t)}},ps.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var t=this._callbacks;if(null!==t)for(var e=0;e<t.length;e++){var n=t[e];"function"!=typeof n&&h("191",n),n()}}},ds.prototype.render=function(t,e){var n=this._internalRoot,r=new ps;return null!==(e=void 0===e?null:e)&&r.then(e),as(t,n,null,r._onCommit),r},ds.prototype.unmount=function(t){var e=this._internalRoot,n=new ps;return null!==(t=void 0===t?null:t)&&n.then(t),as(null,e,null,n._onCommit),n},ds.prototype.legacy_renderSubtreeIntoContainer=function(t,e,n){var r=this._internalRoot,i=new ps;return null!==(n=void 0===n?null:n)&&i.then(n),as(e,r,t,i._onCommit),i},ds.prototype.createBatch=function(){var t=new hs(this),e=t._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=t,t._next=null;else{for(n=null;null!==r&&r._expirationTime<=e;)n=r,r=r._next;t._next=r,null!==n&&(n._next=t)}return t},Gt=cs,Qt=ls,Yt=fs;var gs={createPortal:ys,findDOMNode:function(t){return null==t?null:1===t.nodeType?t:os(t)},hydrate:function(t,e,n){return ms(null,t,e,!0,n)},render:function(t,e,n){return ms(null,t,e,!1,n)},unstable_renderSubtreeIntoContainer:function(t,e,n,r){return(null==t||void 0===t._reactInternalFiber)&&h("38"),ms(t,e,n,!1,r)},unmountComponentAtNode:function(t){return vs(t)||h("40"),!!t._reactRootContainer&&(ts(function(){ms(null,null,t,!1,function(){t._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return ys.apply(void 0,arguments)},unstable_batchedUpdates:Za,unstable_deferredUpdates:_a,unstable_interactiveUpdates:ns,flushSync:es,unstable_flushControlled:rs,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:j,EventPluginRegistry:C,EventPropagators:nt,ReactControlledComponent:Kt,ReactDOMComponentTree:K,ReactDOMEventListener:Mn},unstable_createRoot:function(t,e){return new ds(t,!0,null!=e&&!0===e.hydrate)}};us({findFiberByHostInstance:W,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});var bs={default:gs},_s=bs&&gs||bs;t.exports=_s.default?_s.default:_s},function(t,e,n){"use strict";

/** @license React v16.4.1

* react.production.min.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(266),i=n(186),o=n(265),a=n(185),s="function"==typeof Symbol&&Symbol.for,u=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,l=s?Symbol.for("react.fragment"):60107,f=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,d=s?Symbol.for("react.context"):60110,v=s?Symbol.for("react.async_mode"):60111,m=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);i(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function _(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}function w(){}function E(t,e,n){this.props=t,this.context=e,this.refs=o,this.updater=n||b}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&g("85"),this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var T=E.prototype=new w;T.constructor=E,r(T,_.prototype),T.isPureReactComponent=!0;var C={current:null},x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,n){var r=void 0,i={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),e)x.call(e,r)&&!S.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:u,type:t,key:o,ref:a,props:i,_owner:C.current}}function N(t){return"object"==typeof t&&null!==t&&t.$$typeof===u}var A=/\/+/g,I=[];function O(t,e,n,r){if(I.length){var i=I.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function P(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>I.length&&I.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var o=!1;if(null===t)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case u:case c:o=!0}}if(o)return n(r,t,""===e?"."+D(t,0):e),1;if(o=0,e=""===e?".":e+":",Array.isArray(t))for(var a=0;a<t.length;a++){var s=e+D(i=t[a],a);o+=R(i,s,n,r)}else if(null===t||void 0===t?s=null:s="function"==typeof(s=y&&t[y]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),a=0;!(i=t.next()).done;)o+=R(i=i.value,s=e+D(i,a++),n,r);else"object"===i&&g("31","[object Object]"===(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return o}function D(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function L(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,a.thatReturnsArgument):null!=t&&(N(t)&&(e=i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n,t={$$typeof:u,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}),r.push(t))}function F(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),e=O(e,o,r,i),null==t||R(t,"",L,e),P(e)}var U={Children:{map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;e=O(null,null,e,n),null==t||R(t,"",M,e),P(e)},count:function(t){return null==t?0:R(t,"",a.thatReturnsNull,null)},toArray:function(t){var e=[];return F(t,e,null,a.thatReturnsArgument),e},only:function(t){return N(t)||g("143"),t}},createRef:function(){return{current:null}},Component:_,PureComponent:E,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:d,_calculateChangedBits:e,_defaultValue:t,_currentValue:t,_currentValue2:t,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:p,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:m,render:t}},Fragment:l,StrictMode:f,unstable_AsyncMode:v,unstable_Profiler:h,createElement:k,cloneElement:function(t,e,n){(null===t||void 0===t)&&g("267",t);var i=void 0,o=r({},t.props),a=t.key,s=t.ref,c=t._owner;if(null!=e){void 0!==e.ref&&(s=e.ref,c=C.current),void 0!==e.key&&(a=""+e.key);var l=void 0;for(i in t.type&&t.type.defaultProps&&(l=t.type.defaultProps),e)x.call(e,i)&&!S.hasOwnProperty(i)&&(o[i]=void 0===e[i]&&void 0!==l?l[i]:e[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){l=Array(i);for(var f=0;f<i;f++)l[f]=arguments[f+2];o.children=l}return{$$typeof:u,type:t.type,key:a,ref:s,props:o,_owner:c}},createFactory:function(t){var e=k.bind(null,t);return e.type=t,e},isValidElement:N,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:C,assign:r}},j={default:U},B=j&&U||j;t.exports=B.default?B.default:B},function(t,e,n){"use strict";var r=a(n(0)),i=a(n(83)),o=a(n(558));function a(t){return t&&t.__esModule?t:{default:t}}i.default.render(r.default.createElement(o.default,null),document.getElementById("index"))}]);